Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to getKeys in a Map Storage query? #300

Open
johnuopini opened this issue Sep 29, 2022 · 4 comments
Open

How to getKeys in a Map Storage query? #300

johnuopini opened this issue Sep 29, 2022 · 4 comments

Comments

@johnuopini
Copy link

johnuopini commented Sep 29, 2022

In polkadot JS i can disable an optional Map query option and get all the results, how do i do the same with this client? How can i get all the Keys and loop through them in a Map type of storage query?

@DylanVerstraete
Copy link

In the polkadot JS api there are 2 methods on a storagemap: keys() and entries(), how do we achieve the same using this client?

@cdamian
Copy link
Contributor

cdamian commented Dec 5, 2023

@johnuopini Does the answer from Dylan help? Alternatively, you could look into adjusting CreateStorageKey to support partial arguments since at this point, we error our if the number of hashes for a specific key does not match the number of provided arguments.

@bb4L
Copy link

bb4L commented Dec 14, 2023

@johnuopini Does the answer from Dylan help? Alternatively, you could look into adjusting CreateStorageKey to support partial arguments since at this point, we error our if the number of hashes for a specific key does not match the number of provided arguments.

support for partial / leaving out optional arguments would be great 🙏🏽

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants