We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
DeliverTx and rpc block_result Response include events in the form Vec<Event>, where Event is defined here like this:
DeliverTx
Response
Vec<Event>
Event
/// Event #[derive(Clone, Debug, Serialize, Deserialize)] pub struct Event { /// Event type #[serde(rename = "type")] pub type_str: String, /// Attributes pub attributes: Vec<Tag>, }
Where Tag is defined here The Tag fields are base64 encoded but we do not decode when deserializing them, so the the Event looks something like:
Tag
decode
type_str: "send_packet", attributes: [ Tag { key: Key( "cGFja2V0X3RpbWVvdXRfaGVpZ2h0", ), value: Value( "MC00ODQw", ), }, ...
instead of:
Event { type_str: "send_packet", attributes: [ Tag { key: Key( "packet_timeout_height", ), value: Value( "0-4840", ), }, ...
In IBC we need to extract some info from these tags (in particular the ones in DeliverTx) so we currently have to do something like:
let key = String::from_utf8(base64::decode(tag.key.to_string().as_bytes())?)?;
I think this should be done in tendermint-rs instead.
tendermint-rs
The text was updated successfully, but these errors were encountered:
thanethomson
Successfully merging a pull request may close this issue.
DeliverTx
and rpc block_resultResponse
include events in the formVec<Event>
, whereEvent
is defined here like this:Where
Tag
is defined hereThe
Tag
fields are base64 encoded but we do notdecode
when deserializing them, so the theEvent
looks something like:instead of:
In IBC we need to extract some info from these tags (in particular the ones in
DeliverTx
) so we currently have to do something like:I think this should be done in
tendermint-rs
instead.The text was updated successfully, but these errors were encountered: