Skip to content

Commit

Permalink
ink! 4.2: Contractresult update
Browse files Browse the repository at this point in the history
* Added new `ContractExecResultTo269` (#111)
* Added preset for "contracts-on-rococo" parachain
* Added override for scale info path `primitive_types::U256`
  • Loading branch information
arjanz committed Jun 22, 2023
1 parent 739d8af commit 045b348
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion scalecodec/type_registry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
SUPPORTED_TYPE_REGISTRY_PRESETS = ('canvas', 'legacy', 'kusama', 'polkadot', 'rococo', 'core',
'substrate-node-template', 'westend', 'statemint', 'statemine', 'karura',
'moonbeam', 'moonriver', 'moonbase-alpha', 'crust', 'polymesh-mainnet',
'polymesh-testnet', 'acala', 'test')
'polymesh-testnet', 'acala', 'test', 'contracts-on-rococo')

ONLINE_BASE_URL = 'https://raw.githubusercontent.com/polkascan/py-scale-codec/v1.0/scalecodec/type_registry/'

Expand Down
6 changes: 6 additions & 0 deletions scalecodec/type_registry/contracts-on-rococo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"types": {
"ContractExecResult": "ContractExecResultTo269"
},
"versioning": []
}
32 changes: 32 additions & 0 deletions scalecodec/type_registry/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -1573,6 +1573,8 @@
]
},
"Compact<Moment>": "CompactMoment",
"primitive_types::H256": "H256",
"primitive_types::U256": "U256",
"sp_core::crypto::AccountId32": "GenericAccountId",
"sp_runtime::multiaddress::MultiAddress": "GenericMultiAddress",
"sp_runtime::generic::era::Era": "Era",
Expand Down Expand Up @@ -1636,6 +1638,36 @@
]
]
},
"ContractExecResultTo269": {
"type": "struct",
"base_class": "GenericContractExecResultV2",
"type_mapping": [
[
"gas_consumed",
"Weight"
],
[
"gas_required",
"Weight"
],
[
"storage_deposit",
"StorageDeposit"
],
[
"debug_message",
"Bytes"
],
[
"result",
"ContractExecResultResult"
],
[
"events",
"Option<Vec<frame_system::eventrecord>>"
]
]
},
"ContractExecResultResult": {
"type": "enum",
"type_mapping": [
Expand Down

0 comments on commit 045b348

Please sign in to comment.