tron_api_client/response/
transaction_info.rs1#[derive(Default, Debug, Clone, PartialEq, serde_derive::Serialize, serde_derive::Deserialize)]
2#[serde(rename_all = "camelCase")]
3pub struct TransactionInfo {
4 pub id: String,
5 pub fee: Option<i64>,
6 pub block_number: i64,
7 pub block_time_stamp: i64,
8 pub contract_result: Vec<String>,
9 pub receipt: Receipt,
10 #[serde(rename = "contract_address")]
11 pub contract_address: Option<String>,
12 pub log: Option<Vec<Log>>,
13 #[serde(rename = "internal_transactions")]
14 pub internal_transactions: Option<Vec<InternalTransaction>>,
15}
16
17#[derive(Default, Debug, Clone, PartialEq, serde_derive::Serialize, serde_derive::Deserialize)]
18#[serde(rename_all = "camelCase")]
19pub struct Receipt {
20 #[serde(rename = "net_fee")]
21 pub net_fee: Option<i64>,
22 #[serde(rename = "energy_usage")]
23 pub energy_usage: Option<i64>,
24 #[serde(rename = "energy_usage_total")]
25 pub energy_usage_total: Option<i64>,
26 #[serde(rename = "net_usage")]
27 pub net_usage: Option<i64>,
28 pub result: Option<String>,
29}
30
31#[derive(Default, Debug, Clone, PartialEq, serde_derive::Serialize, serde_derive::Deserialize)]
32#[serde(rename_all = "camelCase")]
33pub struct Log {
34 pub address: String,
35 pub topics: Vec<String>,
36 pub data: Option<String>,
37}
38
39#[derive(Default, Debug, Clone, PartialEq, serde_derive::Serialize, serde_derive::Deserialize)]
40#[serde(rename_all = "camelCase")]
41pub struct InternalTransaction {
42 pub hash: String,
43 #[serde(rename = "caller_address")]
44 pub caller_address: String,
45 #[serde(rename = "transferTo_address")]
46 pub transfer_to_address: String,
47 pub call_value_info: Vec<CallValueInfo>,
48 pub note: String,
49}
50
51#[derive(Default, Debug, Clone, PartialEq, serde_derive::Serialize, serde_derive::Deserialize)]
52#[serde(rename_all = "camelCase")]
53pub struct CallValueInfo {}