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
/*
 * CryptoAPIs
 *
 * Crypto APIs is a complex and innovative infrastructure layer that radically simplifies the development of any Blockchain and Crypto related applications. Organized around REST, Crypto APIs can assist both novice Bitcoin/Ethereum enthusiasts and crypto experts with the development of their blockchain applications. Crypto APIs provides unified endpoints and data, raw data, automatic tokens and coins forwardings, callback functionalities, and much more.
 *
 * The version of the OpenAPI document: 2021-03-20
 * Contact: developers@cryptoapis.io
 * Generated by: https://openapi-generator.tech
 */

/// DecodeRawTransactionHexRisb22 : Binance Smart Chain



#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DecodeRawTransactionHexRisb22 {
    /// Defines the approximate fee value. When isConfirmed is True - Defines the amount of the transaction fee When isConfirmed is False - For ETH-based blockchains this attribute represents the max fee value.
    #[serde(rename = "approximateFee", skip_serializing_if = "Option::is_none")]
    pub approximate_fee: Option<String>,
    /// Defines the approximate minimum fee that is required for the transaction.
    #[serde(rename = "approximateMinimumRequiredFee", skip_serializing_if = "Option::is_none")]
    pub approximate_minimum_required_fee: Option<String>,
    /// Represents the amount of gas used by this specific transaction alone.
    #[serde(rename = "gasLimit")]
    pub gas_limit: String,
    /// Represents the amount of gas paid for the data in the transaction.
    #[serde(rename = "gasPaidForData", skip_serializing_if = "Option::is_none")]
    pub gas_paid_for_data: Option<String>,
    /// Represents the price offered to the miner to purchase this amount of gas.
    #[serde(rename = "gasPrice", skip_serializing_if = "Option::is_none")]
    pub gas_price: Option<String>,
    /// Represents additional information that is required for the transaction.
    #[serde(rename = "inputData", skip_serializing_if = "Option::is_none")]
    pub input_data: Option<String>,
    /// Represents the sequential running number for an address, starting from 0 for the first transaction. E.g., if the nonce of a transaction is 10, it would be the 11th transaction sent from the sender's address.
    #[serde(rename = "nonce")]
    pub nonce: i32,
    /// Represents output of an ECDSA signature.
    #[serde(rename = "r", skip_serializing_if = "Option::is_none")]
    pub r: Option<String>,
    /// The address which receives this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one recipient.
    #[serde(rename = "recipient")]
    pub recipient: String,
    /// Represents output of an ECDSA signature.
    #[serde(rename = "s", skip_serializing_if = "Option::is_none")]
    pub s: Option<String>,
    /// Represents the address which sends this transaction. In UTXO-based protocols like Bitcoin there could be several senders while in account-based protocols like Ethereum there is always only one sender.
    #[serde(rename = "sender")]
    pub sender: String,
    /// Specifies the transaction type as one from three options: if response returns a `\"0\"` it means the raw transaction includes legacy transaction data, if it is `\"1\"` - includes access lists for EIP2930, and if it is `\"2\"` - EIP1559 data.
    #[serde(rename = "type")]
    pub _type: i32,
    /// Defines the the recovery id.
    #[serde(rename = "v", skip_serializing_if = "Option::is_none")]
    pub v: Option<String>,
    /// Represents the sent/received amount.
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<String>,
}

impl DecodeRawTransactionHexRisb22 {
    /// Binance Smart Chain
    pub fn new(gas_limit: String, nonce: i32, recipient: String, sender: String, _type: i32) -> DecodeRawTransactionHexRisb22 {
        DecodeRawTransactionHexRisb22 {
            approximate_fee: None,
            approximate_minimum_required_fee: None,
            gas_limit,
            gas_paid_for_data: None,
            gas_price: None,
            input_data: None,
            nonce,
            r: None,
            recipient,
            s: None,
            sender,
            _type,
            v: None,
            value: None,
        }
    }
}