Skip to content

Commit 045b348

Browse files
authored
ink! 4.2: Contractresult update
* Added new `ContractExecResultTo269` (#111) * Added preset for "contracts-on-rococo" parachain * Added override for scale info path `primitive_types::U256`
1 parent 739d8af commit 045b348

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

scalecodec/type_registry/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
SUPPORTED_TYPE_REGISTRY_PRESETS = ('canvas', 'legacy', 'kusama', 'polkadot', 'rococo', 'core',
2424
'substrate-node-template', 'westend', 'statemint', 'statemine', 'karura',
2525
'moonbeam', 'moonriver', 'moonbase-alpha', 'crust', 'polymesh-mainnet',
26-
'polymesh-testnet', 'acala', 'test')
26+
'polymesh-testnet', 'acala', 'test', 'contracts-on-rococo')
2727

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

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"types": {
3+
"ContractExecResult": "ContractExecResultTo269"
4+
},
5+
"versioning": []
6+
}

scalecodec/type_registry/core.json

+32
Original file line numberDiff line numberDiff line change
@@ -1573,6 +1573,8 @@
15731573
]
15741574
},
15751575
"Compact<Moment>": "CompactMoment",
1576+
"primitive_types::H256": "H256",
1577+
"primitive_types::U256": "U256",
15761578
"sp_core::crypto::AccountId32": "GenericAccountId",
15771579
"sp_runtime::multiaddress::MultiAddress": "GenericMultiAddress",
15781580
"sp_runtime::generic::era::Era": "Era",
@@ -1636,6 +1638,36 @@
16361638
]
16371639
]
16381640
},
1641+
"ContractExecResultTo269": {
1642+
"type": "struct",
1643+
"base_class": "GenericContractExecResultV2",
1644+
"type_mapping": [
1645+
[
1646+
"gas_consumed",
1647+
"Weight"
1648+
],
1649+
[
1650+
"gas_required",
1651+
"Weight"
1652+
],
1653+
[
1654+
"storage_deposit",
1655+
"StorageDeposit"
1656+
],
1657+
[
1658+
"debug_message",
1659+
"Bytes"
1660+
],
1661+
[
1662+
"result",
1663+
"ContractExecResultResult"
1664+
],
1665+
[
1666+
"events",
1667+
"Option<Vec<frame_system::eventrecord>>"
1668+
]
1669+
]
1670+
},
16391671
"ContractExecResultResult": {
16401672
"type": "enum",
16411673
"type_mapping": [

0 commit comments

Comments
 (0)