You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. The types.CreateStorageKey returns an error in an attempt to create a key without secondary key of the StorageDoubleMap specified. Please find a minimal example below.
At the same time state_getKeys method allows to query by pallet name + storage item name for all keys and by pallet name + storage item name + primary key for all secondary keys under the primary key.
How to create a key for querying for all the secondary keys under a specific primary key prefix?
Minimal example.
Querying FRAME pallet-staking pallet, ErasStakers storage item with 1261 era index.
$ go run .
2023/11/16 11:45:32 Connecting to wss://rpc.polkadot.io...
panic: Staking:ErasStakers is a map, therefore requires that number of arguments should exactly match number of hashers in metadata. Expected: 2, received: 1
goroutine 1 [running]:
main.main()
/example/main.go:18 +0x12e
exit status 2
Hello. The
types.CreateStorageKey
returns an error in an attempt to create a key without secondary key of theStorageDoubleMap
specified. Please find a minimal example below.At the same time
state_getKeys
method allows to query by pallet name + storage item name for all keys and by pallet name + storage item name + primary key for all secondary keys under the primary key.How to create a key for querying for all the secondary keys under a specific primary key prefix?
Minimal example.
Querying FRAME
pallet-staking
pallet,ErasStakers
storage item with1261
era index.Output.
Keys that works with
state_getKeys
call.The text was updated successfully, but these errors were encountered: