philoniare / polkadot-sdk-tutorial-dex

A tutorial for building a Decentralized Exchange Pallet using the Polkadot SDK
https://www.shawntabrizi.com/polkadot-sdk-tutorial-dex/
6 stars 4 forks source link

Dot Code School Suggestion: Feedback for Section 1 - Chapter 3: Substrate Storage #1

Closed benjaminsalon closed 5 months ago

benjaminsalon commented 6 months ago

Hey @philoniare, I think this part about the ValueQuery is not true:

https://github.com/philoniare/polkadot-sdk-tutorial-dex/blob/b4611fc2ec6dbae147f15f46e05d0db99778e6ed/README.md?plain=1#L22

The ValueQuery is there to define the default behavior of the storage when we try to get something with an unexisting key. You can check here: https://paritytech.github.io/polkadot-sdk/master/frame_support/storage/types/trait.QueryKindTrait.html

shawntabrizi commented 6 months ago

yes, this is correct.

The way i would explain value query is to go a little deeper in general:

philoniare commented 5 months ago

@benjaminsalon @shawntabrizi Thanks for pointing it out guys. Updated