I have only read some documents from the internet.
In my understand, the positions are defined as following:
contract Demo {
uint a = 1;
uint128 b = 2;
uint32 c = 3;
/* ... omit ... */
}
storage(position = 0) is 0x0000000000000000000000000000000000000000000000000000000000000001
^
storage(position = 1) is 0x0000000000000000000000000000000300000000000000000000000000000002
^ ^
Also, the position will be the key in the storage.
Since Axon system contracts use self-defined keys for all state variables, how could users to get those keys?
If one data has more than 256 bits, it will have more than 1 position.
If data type is array or map, it's more complex.
But each data for Axon system contracts has only one key, how to process these situations?
Question
I want to get the proof of
Metadata.CKB_RELATED_INFO_KEY
througheth_getProof
.What's the position (or storage keys) of it?
https://github.com/axonweb3/axon/blob/3dbfe5a515c8c46eec434d4584acec13b8d69649/core/executor/src/system_contract/metadata/store.rs#L24
https://github.com/axonweb3/axon/blob/835cb164fae28f3d200fc2a0eb790bfedd426049/core/api/README.md?plain=1#L1081-L1087 https://github.com/axonweb3/axon/blob/835cb164fae28f3d200fc2a0eb790bfedd426049/core/api/README.md?plain=1#L1910-L1917
In Further
If I'm incorrect, please point out.
I have only read some documents from the internet.
In my understand, the positions are defined as following:
Also, the position will be the key in the storage.
Since Axon system contracts use self-defined keys for all state variables, how could users to get those keys?
If one data has more than 256 bits, it will have more than 1 position. If data type is array or map, it's more complex. But each data for Axon system contracts has only one key, how to process these situations?
References
1561
1457