feat: ink! v5 (#5791)

* adds definitions and types according to ink v5 changes

* adds toV5 boilerplate code draft

* adds v5 flipper test contract code

* fix license dates

* adds test v5 toLatest test

* implements new scheme to determine event

* apply linter changes

* adds test result outputs

* change `EventRecord['topics'][0]` type to plain `Hash`

* adds testcases for decoding payload data of a ink!v4 and ink!v5 event

* changes `Abi.decodeEvent(data:Bytes)` method interface to `Abi.decodeEvent(record:EventRecord)` which includes the event and the topic for decoding.

* draft implementation with version metadata

* cleaner implementation of versioned Metadata by actually leveraging the `version` field included since v2 contract metadata

* trying to make linter happy

* makes `ContractMetadataSupported` in internal to `Abi` type and not exposing it externally.

* properly types unused parameter for tsc 🤷

* adds `@polkadot/types-support` dev dependency

* Update yarn.lock

* references `types-support` in `api-contract

* resolving change requests

* resolves linter warnings

* changes ContractMetadataV5 field to `u64` from `Text`

* adds contracts and contract metadata compiled with the most recent ink version

* implements decoding of anonymous events if possible

* removes done todo comments
This commit is contained in:
peetzweg/
2024-03-02 09:18:14 -05:00
committed by GitHub
parent f9b2d26381
commit ca4802326c
39 changed files with 6245 additions and 93 deletions
@@ -0,0 +1,253 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Result",
"lookupIndex": 1,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Enum",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 4,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Plain",
"lookupIndex": 5,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 6,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 7,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 7,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Result",
"lookupIndex": 8,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 9,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "Lookup10"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Result",
"lookupIndex": 9,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "Lookup10"
}
]
},
{
"info": "Enum",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 11,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 5,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 12,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 13,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 14,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 15,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,253 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Result",
"lookupIndex": 1,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Enum",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 4,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Plain",
"lookupIndex": 5,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 6,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 7,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 7,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Result",
"lookupIndex": 8,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 9,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "Lookup10"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 3,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup3"
}
]
},
{
"info": "Result",
"lookupIndex": 9,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 2,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "Lookup10"
}
]
},
{
"info": "Enum",
"lookupIndex": 10,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 11,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 5,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 12,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 13,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 14,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 15,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,370 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 3,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 5,
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 6,
"lookupName": "InkStorageTraitsImplsAutoKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::AutoKey"
},
{
"info": "Null",
"lookupIndex": 7,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Tuple",
"lookupIndex": 10,
"type": "(AccountId,AccountId)",
"docs": [],
"namespace": "",
"sub": [
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
]
},
{
"info": "Null",
"lookupIndex": 11,
"lookupName": "InkStorageTraitsImplsResolverKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 12,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Struct",
"lookupIndex": 13,
"lookupName": "Erc20",
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
"docs": [],
"namespace": "erc20::erc20::Erc20",
"sub": [
{
"docs": [],
"name": "totalSupply",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"namespace": "",
"typeName": ""
},
{
"docs": [],
"name": "balances",
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
},
{
"docs": [],
"name": "allowances",
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 14,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Enum",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 16,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 17,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"info": "Enum",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 20,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 21,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 22,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 23,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 24,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,370 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 3,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 5,
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 6,
"lookupName": "InkStorageTraitsImplsAutoKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::AutoKey"
},
{
"info": "Null",
"lookupIndex": 7,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Tuple",
"lookupIndex": 10,
"type": "(AccountId,AccountId)",
"docs": [],
"namespace": "",
"sub": [
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
]
},
{
"info": "Null",
"lookupIndex": 11,
"lookupName": "InkStorageTraitsImplsResolverKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 12,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Struct",
"lookupIndex": 13,
"lookupName": "Erc20",
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
"docs": [],
"namespace": "erc20::erc20::Erc20",
"sub": [
{
"docs": [],
"name": "totalSupply",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"namespace": "",
"typeName": ""
},
{
"docs": [],
"name": "balances",
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
},
{
"docs": [],
"name": "allowances",
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 14,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Enum",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 16,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 17,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"info": "Enum",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 20,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 21,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 22,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 23,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 24,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,370 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 3,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 5,
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 6,
"lookupName": "InkStorageTraitsImplsAutoKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::AutoKey"
},
{
"info": "Null",
"lookupIndex": 7,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Tuple",
"lookupIndex": 10,
"type": "(AccountId,AccountId)",
"docs": [],
"namespace": "",
"sub": [
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
]
},
{
"info": "Null",
"lookupIndex": 11,
"lookupName": "InkStorageTraitsImplsResolverKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 12,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Struct",
"lookupIndex": 13,
"lookupName": "Erc20",
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
"docs": [],
"namespace": "erc20::erc20::Erc20",
"sub": [
{
"docs": [],
"name": "totalSupply",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"namespace": "",
"typeName": ""
},
{
"docs": [],
"name": "balances",
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
},
{
"docs": [],
"name": "allowances",
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 14,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Enum",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 16,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 17,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"info": "Enum",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 20,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 21,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 22,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 23,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 24,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,370 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 3,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 4,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 5,
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 6,
"lookupName": "InkStorageTraitsImplsAutoKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::AutoKey"
},
{
"info": "Null",
"lookupIndex": 7,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"docs": [],
"namespace": "ink_storage::lazy::mapping::Mapping"
},
{
"info": "Tuple",
"lookupIndex": 10,
"type": "(AccountId,AccountId)",
"docs": [],
"namespace": "",
"sub": [
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
]
},
{
"info": "Null",
"lookupIndex": 11,
"lookupName": "InkStorageTraitsImplsResolverKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ResolverKey"
},
{
"info": "Null",
"lookupIndex": 12,
"lookupName": "InkStorageTraitsImplsManualKey",
"type": "Null",
"docs": [],
"namespace": "ink_storage_traits::impls::ManualKey"
},
{
"info": "Struct",
"lookupIndex": 13,
"lookupName": "Erc20",
"type": "{\"totalSupply\":\"u128\",\"balances\":\"Null\",\"allowances\":\"InkStorageLazyMapping\"}",
"docs": [],
"namespace": "erc20::erc20::Erc20",
"sub": [
{
"docs": [],
"name": "totalSupply",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"namespace": "",
"typeName": ""
},
{
"docs": [],
"name": "balances",
"info": "Null",
"lookupIndex": 1,
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
},
{
"docs": [],
"name": "allowances",
"info": "Null",
"lookupIndex": 9,
"lookupName": "InkStorageLazyMapping",
"type": "Null",
"namespace": "ink_storage::lazy::mapping::Mapping",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 14,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Enum",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 16,
"type": "Result<u128, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 17,
"type": "Result<Result<Null, Erc20Error>, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 15,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup15"
}
]
},
{
"info": "Result",
"lookupIndex": 18,
"type": "Result<Null, Erc20Error>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 8,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "Lookup19"
}
]
},
{
"info": "Enum",
"lookupIndex": 19,
"lookupName": "Erc20Error",
"type": "{\"_enum\":[\"InsufficientBalance\",\"InsufficientAllowance\"]}",
"docs": [],
"namespace": "erc20::erc20::Error",
"sub": [
{
"info": "Null",
"type": "Null",
"index": 0,
"name": "InsufficientBalance"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "InsufficientAllowance"
}
]
},
{
"info": "Option",
"lookupIndex": 20,
"type": "Option<AccountId>",
"docs": [],
"namespace": "Option",
"sub": {
"info": "Plain",
"lookupIndex": 2,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
}
},
{
"info": "Plain",
"lookupIndex": 21,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 22,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 23,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 24,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,174 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"docs": [],
"namespace": ""
},
{
"info": "Struct",
"lookupIndex": 1,
"lookupName": "Flipper",
"type": "{\"value\":\"bool\"}",
"docs": [],
"namespace": "flipper::flipper::Flipper",
"sub": [
{
"docs": [],
"name": "value",
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"namespace": "",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 2,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 3,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup4"
}
]
},
{
"info": "Null",
"lookupIndex": 3,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Enum",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 5,
"type": "Result<bool, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup4"
}
]
},
{
"info": "Plain",
"lookupIndex": 6,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 7,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 8,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 8,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 9,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 10,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 11,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 12,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 13,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -0,0 +1,174 @@
[
{
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"docs": [],
"namespace": ""
},
{
"info": "Struct",
"lookupIndex": 1,
"lookupName": "Flipper",
"type": "{\"value\":\"bool\"}",
"docs": [],
"namespace": "flipper::flipper::Flipper",
"sub": [
{
"docs": [],
"name": "value",
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"namespace": "",
"typeName": ""
}
]
},
{
"info": "Result",
"lookupIndex": 2,
"type": "Result<Null, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Null",
"lookupIndex": 3,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup4"
}
]
},
{
"info": "Null",
"lookupIndex": 3,
"type": "Null",
"docs": [],
"namespace": ""
},
{
"info": "Enum",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "{\"_enum\":[\"__Unused0\",\"CouldNotReadInput\"]}",
"docs": [],
"namespace": "ink_primitives::LangError",
"sub": [
{
"index": 0,
"info": "Null",
"name": "__Unused0",
"type": "Null"
},
{
"info": "Null",
"type": "Null",
"index": 1,
"name": "CouldNotReadInput"
}
]
},
{
"info": "Result",
"lookupIndex": 5,
"type": "Result<bool, InkPrimitivesLangError>",
"docs": [],
"namespace": "Result",
"sub": [
{
"name": "Ok",
"info": "Plain",
"lookupIndex": 0,
"type": "bool",
"docs": [],
"namespace": ""
},
{
"name": "Error",
"docs": [],
"info": "Si",
"lookupIndex": 4,
"lookupName": "InkPrimitivesLangError",
"type": "Lookup4"
}
]
},
{
"info": "Plain",
"lookupIndex": 6,
"type": "AccountId",
"docs": [],
"namespace": "ink_primitives::types::AccountId",
"lookupNameRoot": "InkPrimitivesAccountId"
},
{
"info": "VecFixed",
"lookupIndex": 7,
"type": "[u8;32]",
"docs": [],
"namespace": "",
"length": 32,
"sub": {
"info": "Plain",
"lookupIndex": 8,
"type": "u8",
"docs": [],
"namespace": ""
}
},
{
"info": "Plain",
"lookupIndex": 8,
"type": "u8",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 9,
"type": "u128",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 10,
"type": "Hash",
"docs": [],
"namespace": "ink_primitives::types::Hash",
"lookupNameRoot": "InkPrimitivesHash"
},
{
"info": "Plain",
"lookupIndex": 11,
"type": "u64",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 12,
"type": "u32",
"docs": [],
"namespace": ""
},
{
"info": "Plain",
"lookupIndex": 13,
"type": "NoChainExtension",
"docs": [],
"namespace": "ink_env::types::NoChainExtension",
"lookupNameRoot": "InkEnvNoChainExtension"
}
]
@@ -7,5 +7,6 @@ import * as v1 from './v1/index.js';
import * as v2 from './v2/index.js';
import * as v3 from './v3/index.js';
import * as v4 from './v4/index.js';
import * as v5 from './v5/index.js';
export default createVersionedExport({ v0, v1, v2, v3, v4 });
export default createVersionedExport({ v0, v1, v2, v3, v4, v5 });
File diff suppressed because one or more lines are too long
@@ -0,0 +1,821 @@
{
"source": {
"hash": "0x114f55289bcdfd0d28e0bbd1c63452b4e45901a022b1011d298fa2eb12d1711d",
"language": "ink! 4.3.0",
"compiler": "rustc 1.75.0",
"build_info": {
"build_mode": "Debug",
"cargo_contract_version": "3.2.0",
"rust_toolchain": "stable-aarch64-apple-darwin",
"wasm_opt_settings": {
"keep_debug_symbols": false,
"optimization_passes": "Z"
}
}
},
"contract": {
"name": "erc20",
"version": "4.3.0",
"authors": [
"Parity Technologies <admin@parity.io>"
]
},
"spec": {
"constructors": [
{
"args": [
{
"label": "total_supply",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"default": false,
"docs": [
"Creates a new ERC-20 contract with the specified initial supply."
],
"label": "new",
"payable": false,
"returnType": {
"displayName": [
"ink_primitives",
"ConstructorResult"
],
"type": 1
},
"selector": "0x9bae9d5e"
}
],
"docs": [],
"environment": {
"accountId": {
"displayName": [
"AccountId"
],
"type": 5
},
"balance": {
"displayName": [
"Balance"
],
"type": 0
},
"blockNumber": {
"displayName": [
"BlockNumber"
],
"type": 14
},
"chainExtension": {
"displayName": [
"ChainExtension"
],
"type": 15
},
"hash": {
"displayName": [
"Hash"
],
"type": 12
},
"maxEventTopics": 4,
"timestamp": {
"displayName": [
"Timestamp"
],
"type": 13
}
},
"events": [
{
"args": [
{
"docs": [],
"indexed": true,
"label": "from",
"type": {
"displayName": [
"Option"
],
"type": 11
}
},
{
"docs": [],
"indexed": true,
"label": "to",
"type": {
"displayName": [
"Option"
],
"type": 11
}
},
{
"docs": [],
"indexed": false,
"label": "value",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"docs": [
"Event emitted when a token transfer occurs."
],
"label": "Transfer"
},
{
"args": [
{
"docs": [],
"indexed": true,
"label": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"docs": [],
"indexed": true,
"label": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"docs": [],
"indexed": false,
"label": "value",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"docs": [
"Event emitted when an approval occurs that `spender` is allowed to withdraw",
"up to the amount of `value` tokens from `owner`."
],
"label": "Approval"
}
],
"lang_error": {
"displayName": [
"ink",
"LangError"
],
"type": 3
},
"messages": [
{
"args": [],
"default": false,
"docs": [
" Returns the total token supply."
],
"label": "total_supply",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 4
},
"selector": "0xdb6375a8"
},
{
"args": [
{
"label": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
}
],
"default": false,
"docs": [
" Returns the account balance for the specified `owner`.",
"",
" Returns `0` if the account is non-existent."
],
"label": "balance_of",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 4
},
"selector": "0x0f755a56"
},
{
"args": [
{
"label": "owner",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"label": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
}
],
"default": false,
"docs": [
" Returns the amount which `spender` is still allowed to withdraw from `owner`.",
"",
" Returns `0` if no allowance has been set."
],
"label": "allowance",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 4
},
"selector": "0x6a00165e"
},
{
"args": [
{
"label": "to",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"label": "value",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"default": false,
"docs": [
" Transfers `value` amount of tokens from the caller's account to account `to`.",
"",
" On success a `Transfer` event is emitted.",
"",
" # Errors",
"",
" Returns `InsufficientBalance` error if there are not enough tokens on",
" the caller's account balance."
],
"label": "transfer",
"mutates": true,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 8
},
"selector": "0x84a15da1"
},
{
"args": [
{
"label": "spender",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"label": "value",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"default": false,
"docs": [
" Allows `spender` to withdraw from the caller's account multiple times, up to",
" the `value` amount.",
"",
" If this function is called again it overwrites the current allowance with",
" `value`.",
"",
" An `Approval` event is emitted."
],
"label": "approve",
"mutates": true,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 8
},
"selector": "0x681266a0"
},
{
"args": [
{
"label": "from",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"label": "to",
"type": {
"displayName": [
"AccountId"
],
"type": 5
}
},
{
"label": "value",
"type": {
"displayName": [
"Balance"
],
"type": 0
}
}
],
"default": false,
"docs": [
" Transfers `value` tokens on the behalf of `from` to the account `to`.",
"",
" This can be used to allow a contract to transfer tokens on ones behalf and/or",
" to charge fees in sub-currencies, for example.",
"",
" On success a `Transfer` event is emitted.",
"",
" # Errors",
"",
" Returns `InsufficientAllowance` error if there are not enough tokens allowed",
" for the caller to withdraw from `from`.",
"",
" Returns `InsufficientBalance` error if there are not enough tokens on",
" the account balance of `from`."
],
"label": "transfer_from",
"mutates": true,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 8
},
"selector": "0x0b396f18"
}
]
},
"storage": {
"root": {
"layout": {
"struct": {
"fields": [
{
"layout": {
"leaf": {
"key": "0x00000000",
"ty": 0
}
},
"name": "total_supply"
},
{
"layout": {
"root": {
"layout": {
"leaf": {
"key": "0x2623dce7",
"ty": 0
}
},
"root_key": "0x2623dce7"
}
},
"name": "balances"
},
{
"layout": {
"root": {
"layout": {
"leaf": {
"key": "0xeca021b7",
"ty": 0
}
},
"root_key": "0xeca021b7"
}
},
"name": "allowances"
}
],
"name": "Erc20"
}
},
"root_key": "0x00000000"
}
},
"types": [
{
"id": 0,
"type": {
"def": {
"primitive": "u128"
}
}
},
{
"id": 1,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 2
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 3
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 2
},
{
"name": "E",
"type": 3
}
],
"path": [
"Result"
]
}
},
{
"id": 2,
"type": {
"def": {
"tuple": []
}
}
},
{
"id": 3,
"type": {
"def": {
"variant": {
"variants": [
{
"index": 1,
"name": "CouldNotReadInput"
}
]
}
},
"path": [
"ink_primitives",
"LangError"
]
}
},
{
"id": 4,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 0
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 3
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 0
},
{
"name": "E",
"type": 3
}
],
"path": [
"Result"
]
}
},
{
"id": 5,
"type": {
"def": {
"composite": {
"fields": [
{
"type": 6,
"typeName": "[u8; 32]"
}
]
}
},
"path": [
"ink_primitives",
"types",
"AccountId"
]
}
},
{
"id": 6,
"type": {
"def": {
"array": {
"len": 32,
"type": 7
}
}
}
},
{
"id": 7,
"type": {
"def": {
"primitive": "u8"
}
}
},
{
"id": 8,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 9
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 3
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 9
},
{
"name": "E",
"type": 3
}
],
"path": [
"Result"
]
}
},
{
"id": 9,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 2
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 10
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 2
},
{
"name": "E",
"type": 10
}
],
"path": [
"Result"
]
}
},
{
"id": 10,
"type": {
"def": {
"variant": {
"variants": [
{
"index": 0,
"name": "InsufficientBalance"
},
{
"index": 1,
"name": "InsufficientAllowance"
}
]
}
},
"path": [
"erc20",
"erc20",
"Error"
]
}
},
{
"id": 11,
"type": {
"def": {
"variant": {
"variants": [
{
"index": 0,
"name": "None"
},
{
"fields": [
{
"type": 5
}
],
"index": 1,
"name": "Some"
}
]
}
},
"params": [
{
"name": "T",
"type": 5
}
],
"path": [
"Option"
]
}
},
{
"id": 12,
"type": {
"def": {
"composite": {
"fields": [
{
"type": 6,
"typeName": "[u8; 32]"
}
]
}
},
"path": [
"ink_primitives",
"types",
"Hash"
]
}
},
{
"id": 13,
"type": {
"def": {
"primitive": "u64"
}
}
},
{
"id": 14,
"type": {
"def": {
"primitive": "u32"
}
}
},
{
"id": 15,
"type": {
"def": {
"variant": {}
},
"path": [
"ink_env",
"types",
"NoChainExtension"
]
}
}
],
"version": "4"
}
@@ -1,5 +1,7 @@
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,420 @@
{
"source": {
"hash": "0xaf1c6d2ea289d7d4f8753db2d658782f4d066544f3ee34b3d54272075ad0de99",
"language": "ink! 5.0.0-rc.1",
"compiler": "rustc 1.75.0",
"build_info": {
"build_mode": "Debug",
"cargo_contract_version": "4.0.0-rc.2",
"rust_toolchain": "stable-aarch64-apple-darwin",
"wasm_opt_settings": {
"keep_debug_symbols": false,
"optimization_passes": "Z"
}
}
},
"contract": {
"name": "flipper",
"version": "5.0.0-rc.1",
"authors": [
"Parity Technologies <admin@parity.io>"
]
},
"image": null,
"spec": {
"constructors": [
{
"args": [
{
"label": "init_value",
"type": {
"displayName": [
"bool"
],
"type": 0
}
}
],
"default": false,
"docs": [
"Creates a new flipper smart contract initialized with the given value."
],
"label": "new",
"payable": false,
"returnType": {
"displayName": [
"ink_primitives",
"ConstructorResult"
],
"type": 2
},
"selector": "0x9bae9d5e"
},
{
"args": [],
"default": false,
"docs": [
"Creates a new flipper smart contract initialized to `false`."
],
"label": "new_default",
"payable": false,
"returnType": {
"displayName": [
"ink_primitives",
"ConstructorResult"
],
"type": 2
},
"selector": "0x61ef7e3e"
}
],
"docs": [],
"environment": {
"accountId": {
"displayName": [
"AccountId"
],
"type": 6
},
"balance": {
"displayName": [
"Balance"
],
"type": 9
},
"blockNumber": {
"displayName": [
"BlockNumber"
],
"type": 12
},
"chainExtension": {
"displayName": [
"ChainExtension"
],
"type": 13
},
"hash": {
"displayName": [
"Hash"
],
"type": 10
},
"maxEventTopics": 4,
"staticBufferSize": 16384,
"timestamp": {
"displayName": [
"Timestamp"
],
"type": 11
}
},
"events": [],
"lang_error": {
"displayName": [
"ink",
"LangError"
],
"type": 4
},
"messages": [
{
"args": [],
"default": false,
"docs": [
" Flips the current value of the Flipper's boolean."
],
"label": "flip",
"mutates": true,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 2
},
"selector": "0x633aa551"
},
{
"args": [],
"default": false,
"docs": [
" Returns the current value of the Flipper's boolean."
],
"label": "get",
"mutates": false,
"payable": false,
"returnType": {
"displayName": [
"ink",
"MessageResult"
],
"type": 5
},
"selector": "0x2f865bd9"
}
]
},
"storage": {
"root": {
"layout": {
"struct": {
"fields": [
{
"layout": {
"leaf": {
"key": "0x00000000",
"ty": 0
}
},
"name": "value"
}
],
"name": "Flipper"
}
},
"root_key": "0x00000000",
"ty": 1
}
},
"types": [
{
"id": 0,
"type": {
"def": {
"primitive": "bool"
}
}
},
{
"id": 1,
"type": {
"def": {
"composite": {
"fields": [
{
"name": "value",
"type": 0,
"typeName": "<bool as::ink::storage::traits::AutoStorableHint<::ink::storage\n::traits::ManualKey<2054318728u32, ()>,>>::Type"
}
]
}
},
"path": [
"flipper",
"flipper",
"Flipper"
]
}
},
{
"id": 2,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 3
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 4
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 3
},
{
"name": "E",
"type": 4
}
],
"path": [
"Result"
]
}
},
{
"id": 3,
"type": {
"def": {
"tuple": []
}
}
},
{
"id": 4,
"type": {
"def": {
"variant": {
"variants": [
{
"index": 1,
"name": "CouldNotReadInput"
}
]
}
},
"path": [
"ink_primitives",
"LangError"
]
}
},
{
"id": 5,
"type": {
"def": {
"variant": {
"variants": [
{
"fields": [
{
"type": 0
}
],
"index": 0,
"name": "Ok"
},
{
"fields": [
{
"type": 4
}
],
"index": 1,
"name": "Err"
}
]
}
},
"params": [
{
"name": "T",
"type": 0
},
{
"name": "E",
"type": 4
}
],
"path": [
"Result"
]
}
},
{
"id": 6,
"type": {
"def": {
"composite": {
"fields": [
{
"type": 7,
"typeName": "[u8; 32]"
}
]
}
},
"path": [
"ink_primitives",
"types",
"AccountId"
]
}
},
{
"id": 7,
"type": {
"def": {
"array": {
"len": 32,
"type": 8
}
}
}
},
{
"id": 8,
"type": {
"def": {
"primitive": "u8"
}
}
},
{
"id": 9,
"type": {
"def": {
"primitive": "u128"
}
}
},
{
"id": 10,
"type": {
"def": {
"composite": {
"fields": [
{
"type": 7,
"typeName": "[u8; 32]"
}
]
}
},
"path": [
"ink_primitives",
"types",
"Hash"
]
}
},
{
"id": 11,
"type": {
"def": {
"primitive": "u64"
}
}
},
{
"id": 12,
"type": {
"def": {
"primitive": "u32"
}
}
},
{
"id": 13,
"type": {
"def": {
"variant": {}
},
"path": [
"ink_env",
"types",
"NoChainExtension"
]
}
}
],
"version": 5
}
@@ -0,0 +1,8 @@
// Copyright 2017-2024 @polkadot/api-contract authors & contributors
// SPDX-License-Identifier: Apache-2.0
export { default as erc20Contract } from './erc20.contract.json' assert { type: 'json' };
export { default as erc20Metadata } from './erc20.json' assert { type: 'json' };
export { default as erc20AnonymousTransferMetadata } from './erc20_anonymous_transfer.json' assert { type: 'json' };
export { default as flipperContract } from './flipper.contract.json' assert { type: 'json' };
export { default as flipperMetadata } from './flipper.json' assert { type: 'json' };