Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Comments

Document StorageNMap in the knowledge base#1013

Merged
jimmychu0807 merged 1 commit intosourcefrom
kckyeung/storage-n-map
Jun 2, 2021
Merged

Document StorageNMap in the knowledge base#1013
jimmychu0807 merged 1 commit intosourcefrom
kckyeung/storage-n-map

Conversation

@KiChjang
Copy link
Contributor

@KiChjang KiChjang commented May 20, 2021

This is in preparation for the next release since paritytech/substrate#8635 has been merged.

The links to the rustdocs obviously don't work yet since a new release of substrate hasn't been cut yet.

Copy link
Contributor

@nuke-web3 nuke-web3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the docs ❤️

Once the companion lands, feel free to merge.

- for `StorageDoubleMap`:
`doublemap hasher($hasher) rust_type, hasher($hasher) rust_type => rust_type`
- for `StorageNMap`:
`nmap hasher($hasher1) rust_type, hasher($hasher2) rust_type, /* ... */ hasher($hasherN) rust_type => rust_type`
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't actually have a good syntax to indicate that the hasher($hasher) rust_type part is repeatable here, not sure what I have on this line correctly captures the intent, or whether I needed to write more to explain that this part is repeatable.

@jimmychu0807
Copy link
Contributor

Thanks for the update, @KiChjang

@jimmychu0807 jimmychu0807 merged commit 830bd8b into source Jun 2, 2021
@jimmychu0807 jimmychu0807 deleted the kckyeung/storage-n-map branch June 2, 2021 06:21
@KiChjang
Copy link
Contributor Author

KiChjang commented Jun 2, 2021

@jimmychu0807 Did we make a release for a new version of substrate? If not, the links referenced in this PR would break since e.g. https://substrate.dev/rustdocs/v3.0.0/frame_support/storage/trait.StorageNMap.html does not exist.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants