Skip to main content

fireblocks_sdk/models/
tx_log.rs

1// Fireblocks API
2//
3// Fireblocks provides a suite of applications to manage digital asset operations and a complete development platform to build your business on the blockchain.  - Visit our website for more information: [Fireblocks Website](https://fireblocks.com) - Visit our developer docs: [Fireblocks DevPortal](https://developers.fireblocks.com)
4//
5// The version of the OpenAPI document: 1.8.0
6// Contact: developers@fireblocks.com
7// Generated by: https://openapi-generator.tech
8
9use {
10    crate::models,
11    serde::{Deserialize, Serialize},
12};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct TxLog {
16    /// The log address
17    #[serde(rename = "address")]
18    pub address: String,
19    /// Array of log topics
20    #[serde(rename = "topics")]
21    pub topics: Vec<String>,
22    /// The log data
23    #[serde(rename = "data")]
24    pub data: String,
25    /// Block number where the log occurred
26    #[serde(rename = "blockNumber")]
27    pub block_number: i32,
28    /// Transaction hash associated with the log
29    #[serde(rename = "transactionHash")]
30    pub transaction_hash: String,
31    /// Transaction index in the block
32    #[serde(rename = "transactionIndex")]
33    pub transaction_index: i32,
34    /// The hash of the block
35    #[serde(rename = "blockHash")]
36    pub block_hash: String,
37    /// Log index in the block
38    #[serde(rename = "logIndex")]
39    pub log_index: i32,
40    /// Indicates if the log was removed
41    #[serde(rename = "removed")]
42    pub removed: bool,
43}
44
45impl TxLog {
46    pub fn new(
47        address: String,
48        topics: Vec<String>,
49        data: String,
50        block_number: i32,
51        transaction_hash: String,
52        transaction_index: i32,
53        block_hash: String,
54        log_index: i32,
55        removed: bool,
56    ) -> TxLog {
57        TxLog {
58            address,
59            topics,
60            data,
61            block_number,
62            transaction_hash,
63            transaction_index,
64            block_hash,
65            log_index,
66            removed,
67        }
68    }
69}