* 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
253 lines
5.0 KiB
JSON
253 lines
5.0 KiB
JSON
[
|
|
{
|
|
"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"
|
|
}
|
|
] |