Closed mokrzesa closed 9 months ago
Actually I had already prepared this change by adding the type:
On which network did you encountered this issue?
I didn't really track which networks already updated to the latest version of the contract pallet, so I probably need to update the type registry for that network..
Until then, what you could do to apply the latest version of ContractResult
:
substrate = SubstrateInterface(
url="ws://127.0.0.1:9944",
type_registry={
"types": {
"ContractExecResult": "ContractExecResultTo269"
}
}
)
Thanks for pointing this out, let me know if this works!
@arjanz thanks for super quick response 🙏
I've encountered this issue on Aleph Zero Testnet --> https://testnet.alephzero.org/
I can confirm with the fix you suggested it is working ! 🏅 Thank you very much! If you would need any help with the development I'm happy to help!
With best regards, Mikołaj
No problem, glad it could be fixed easily.
I will add a type registry for the Alephzero testnet pointing to ContractExecResultTo269
.
How about mainnet of Alephzero, does that still have the older version or same issues there? It would help if you could give me a sign when the runtime upgrade will take place, so I can update the type reg file for the mainnet as well..
@arjanz the answer that I've got from A0 team regarding your question:
The change will be there once Aleph Zero mainnet updates to version 12.x, currently only testnet is on 12.x and mainnet still 11.x
Which type should be used can be determined based on StorageVersion for pallet contract though.
The latest release https://github.com/polkascan/py-substrate-interface/releases/tag/v1.7.5 has automatic type detection by pallet version, as the guys at Aleph Zero suggested. This shouldn't be an issue then anymore.
Hello 👋 Happy to contribute to the library ! Due to updated version of
ContractResult
: https://github.com/paritytech/polkadot-sdk/blob/9f5221cc2f7f10adfd22b293ceed060617468936/substrate/frame/contracts/src/primitives.rs#L41Problems that I've encountered on test networks running the new changes:
and after running: substrate.reload_type_registry(), with:
I can also help with the implementation if you want 👍