Skip to content
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

TxResult.log is missing type information #1265

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

TxResult.log is missing type information #1265

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

Comments

@0xForerunner
Copy link

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,
}
@0xForerunner 0xForerunner added the bug Something isn't working label Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant