-
Notifications
You must be signed in to change notification settings - Fork 637
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
docs: update migration docs for merkle path v2 changes #6757
docs: update migration docs for merkle path v2 changes #6757
Conversation
#[cw_serde] | ||
pub struct MerklePath { | ||
+ #[schemars(with = "String")] | ||
+ #[serde(with = "Base64", default)] | ||
+ pub key_path: Vec<Bytes>, | ||
- pub key_path: Vec<String>, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@srdtrk, could you confirm if this is correct unmarshalling syntax for []string
-> [][]byte
? I can also modify the composable-ibc grandpa-cw contract and try to test this
this was based on code here: https://github.com/ComposableFi/composable-ibc/blob/main/light-clients/ics10-grandpa-cw/src/msg.rs#L150-L167
I'm unsure if Bytes
is some kind of alias or not. Is Vec<Vec<u8>>
valid syntax also? Maybe with the alias is fine...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What would be the right way to do it, @srdtrk?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've decided to replace the usage of Bytes with cosmwasm_std::Binary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.rs/cosmwasm-std/2.0.4/cosmwasm_std/struct.Binary.html
Binary is a wrapper around Vec to add base64 de/serialization with serde. It also adds some helper methods to help encode inline.
This is only needed as serde-json-{core,wasm} has a horrible encoding for Vec. See also https://github.com/CosmWasm/cosmwasm/blob/main/docs/MESSAGE_TYPES.md.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs looks great to me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice docs, pending just figuring out how to decode this on the contract side...
Description
Migration documentation for merkle path v2 in 08-wasm contract apis.
ref: #6496
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.