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

TxResult.log is missing type information #1265

Open
ewoolsey opened this issue Feb 7, 2023 · 0 comments
Open

TxResult.log is missing type information #1265

ewoolsey opened this issue Feb 7, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@ewoolsey
Copy link

ewoolsey commented Feb 7, 2023

TxResult is defined as such:

/// Transaction result.
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
pub struct TxResult {
    pub log: Option<String>,
    pub gas_wanted: Option<String>,
    pub gas_used: Option<String>,
    pub events: Vec<abci::Event>,
}

The log field is defined as a string here, but I believe it's correct type should look something like this:

#[derive(Debug, Clone, Serialize, Deserialize)]
struct Log {
    events: Vec<SubEvent>,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
struct SubEvent {
    attributes: Vec<Attribute>,
    #[serde(rename = "type")]
    type_string: String,
}

#[derive(Debug, Clone, Serialize, Deserialize)]
struct Attribute {
    key: String,
    value: String,
}
@ewoolsey ewoolsey added the bug Something isn't working label Feb 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant