Skip to main content

multiversx_sdk/data/transaction/
events.rs

1use multiversx_chain_core::std::Bech32Address;
2use serde::{Deserialize, Serialize};
3
4use super::log_data::LogData;
5
6/// Events generated by a transaction with changed fields' types in order to make it friendly for the API's JSON.
7///
8/// Corresponds to [`Events`](https://github.com/multiversx/mx-chain-core-go/blob/main/data/transaction/apiTransactionResult.go) in mx-chain-core-go.
9#[derive(Debug, Clone, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11pub struct Events {
12    pub address: Bech32Address,
13    pub identifier: String,
14    #[serde(default)]
15    pub topics: Vec<String>,
16    #[serde(default)]
17    pub data: LogData,
18}