Closed dadamu closed 2 years ago
BTW, I have created a branch for testing it. https://github.com/desmos-labs/desmos-contracts/tree/paul/refactor-route
Nice one! This rename feature from serde is very powerful! I guess we can make this change, but we need to add also some docs lines in the file to let others that are not familiar with serde to properly understand the signature (maybe you can put the reference you put in the note directly?).
@bragaz Sure, will do it with a PR.
Currently the structure of
DesmosMsg
is like:It could be simplified with serde tag attribute, say:
To produce the json like:
We can do the same way to
DesmosQuery
as well. It will reduce some code related toDesmosRoute
. What do you think? @bragazNote:
it will break the current wasm part of modules in the desmos chain since the json format is different from the current one.
Reference: https://serde.rs/enum-representations.html#adjacently-tagged