fireblocks-sdk 2026.3.27

Rust implementation of the Fireblocks SDK
Documentation
// 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,
        }
    }
}