1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// Fireblocks API
//
// 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)
//
// The version of the OpenAPI document: 1.8.0
// Contact: developers@fireblocks.com
// Generated by: https://openapi-generator.tech
use {
crate::models,
serde::{Deserialize, Serialize},
};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TransactionReceiptResponse {
/// The block hash
#[serde(rename = "blockHash")]
pub block_hash: String,
/// The block number
#[serde(rename = "blockNumber")]
pub block_number: i32,
/// The address of deployed contract
#[serde(
rename = "contractAddress",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub contract_address: Option<Option<String>>,
/// The cumulative gas used in the transaction
#[serde(rename = "cumulativeGasUsed")]
pub cumulative_gas_used: i32,
/// The effective gas price
#[serde(rename = "effectiveGasPrice")]
pub effective_gas_price: i32,
/// Sender address
#[serde(rename = "from")]
pub from: String,
/// Gas used by the transaction
#[serde(rename = "gasUsed")]
pub gas_used: i32,
/// Array of transaction logs
#[serde(rename = "logs")]
pub logs: Vec<models::TxLog>,
/// Logs bloom filter
#[serde(rename = "logsBloom")]
pub logs_bloom: String,
/// Transaction status (1 for success, 0 for failure)
#[serde(rename = "status")]
pub status: i32,
/// Recipient address
#[serde(
rename = "to",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub to: Option<Option<String>>,
/// The transaction hash
#[serde(rename = "transactionHash")]
pub transaction_hash: String,
/// Transaction index in the block
#[serde(rename = "transactionIndex")]
pub transaction_index: i32,
/// Type of transaction
#[serde(rename = "type")]
pub r#type: String,
}
impl TransactionReceiptResponse {
pub fn new(
block_hash: String,
block_number: i32,
cumulative_gas_used: i32,
effective_gas_price: i32,
from: String,
gas_used: i32,
logs: Vec<models::TxLog>,
logs_bloom: String,
status: i32,
transaction_hash: String,
transaction_index: i32,
r#type: String,
) -> TransactionReceiptResponse {
TransactionReceiptResponse {
block_hash,
block_number,
contract_address: None,
cumulative_gas_used,
effective_gas_price,
from,
gas_used,
logs,
logs_bloom,
status,
to: None,
transaction_hash,
transaction_index,
r#type,
}
}
}