Genesis validation before initialization
In the nft module, inside the InitGenesis method
https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/genesis.go#L21
it seems it is missing the validation step of the data.
A method called ValidateGenesis is provided inside the nft/types/genesis.go file
https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/nft/types/genesis.go#L24
so it could be called to validate the passed data before the initialization.
Similar validation is executed on the fantoken module:
https://github.com/bitsongofficial/go-bitsong/blob/84691c819214a1f9b9dd844ea2b49b7ccc8ece1b/x/fantoken/genesis.go#L11-L24
What do you think about this? Could it be better to add this validation step? Or maybe am I missing something and this step is already evaluated?
I think validate genesis is already executed before init genesis execution on SDK side.
I thought it was possible but I'm not sure. Do you have any references for it?
I think validate genesis is already executed before init genesis execution on SDK side.
Yes, please post any reference