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

API fn try_append is missing for StorageNMap #5722

Closed
shawntabrizi opened this issue Sep 16, 2024 · 4 comments · Fixed by #5745
Closed

API fn try_append is missing for StorageNMap #5722

shawntabrizi opened this issue Sep 16, 2024 · 4 comments · Fixed by #5745
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder.

Comments

@shawntabrizi
Copy link
Member

Storage Map has try_append for pushing to a bounded vec: https://crates.parity.io/frame_support/pallet_prelude/struct.StorageMap.html#method.try_append

Storage N Map is missing this API: https://crates.parity.io/frame_support/pallet_prelude/struct.StorageNMap.html

@shawntabrizi shawntabrizi added C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. labels Sep 16, 2024
@rainbow-promise
Copy link

Hey @shawntabrizi, I would like to take this on!

@CJ13th
Copy link
Contributor

CJ13th commented Sep 18, 2024

Sorry for the confusion @rainbow-promise, I saw this one via email notification and started working on it before I realised someone else had expressed interest. Hopefully we haven't duplicated our efforts! @shawntabrizi I have submitted a pull request for this here #5745 if you wouldn't mind taking a look?

@shawntabrizi
Copy link
Member Author

@CJ13th please do notify in the github issue next time :)

but no harm i think. maybe @rainbow-promise if you are interested you can do a code review along with us?

@rainbow-promise
Copy link

@CJ13th please do notify in the github issue next time :)

but no harm i think. maybe @rainbow-promise if you are interested you can do a code review along with us?

Happy to @shawntabrizi and no problem @CJ13th, many other issues available.

github-merge-queue bot pushed a commit that referenced this issue Sep 23, 2024
# Description

Closes #5722 

Added an implementation of the `try_append` functionality which is
present on the other storage map types but currently missing from
StorageNMap.

---------

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. D0-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants