Closed rogerjbos closed 1 year ago
This is a very interesting question, as I also confirmed that this was working in PolkadotJS, but there was no such storage function in the metadata.
All calls, storage functions, constants etc are extracted from the metadata found on-chain, so this is always be up-to-date with the runtime (you can even historically call storage functions back in time that have been removed later on, by specifying a block_hash
).
So I went on searching and found out it is a fixed storage key suffix per pallet, a convention in Substrate: https://github.com/polkadot-js/api/issues/3323
I was aware there were static 'well-known' storage keys as specified here but I wasn't aware of generic per pallet keys.
Thanks for pointing this out, I will make a PR for this soon.
Storage function PalletVersion
available in release https://github.com/polkascan/py-substrate-interface/releases/tag/v1.5.1
The
Contracts
pallet has a storage function calledPalletVersion
, but this is not available in py-substrate-interface. Currently only a few parachains use the contracts pallet, but two examples are shiden and rococo. The following works in JS:but it does not work in python. In fact if I list all the storage functions available in the metadata,
PalletVersion
does not show up:Do recently added storage functions need to be manually added, or am I missing something?