Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a method to parse IbcSendPacketResponse protobuf bytes #13

Open
larry0x opened this issue Jul 17, 2023 · 1 comment
Open

Add a method to parse IbcSendPacketResponse protobuf bytes #13

larry0x opened this issue Jul 17, 2023 · 1 comment

Comments

@larry0x
Copy link
Contributor

larry0x commented Jul 17, 2023

This response type has been introduced to wasmd, but there isn't a handy function to parse it: CosmWasm/wasmd#1154

@webmaster128
Copy link
Member

You can do that with Bufany now (untested):

use anybuf::Bufany;

let deserialized = Bufany::deserialize(&data).map_err(|_e| StdError::generic("could not parse response data")?;
let sequence = deserialized.uint64(1).ok_or_else(StdError::generic("could not get sequence")?;

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants