multiversx-sdk 0.16.1

SDK for interacting with the MultiversX blockchain
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use serde::{Deserialize, Serialize};

/// Simplified decode of [`TxCostResponseData`](https://github.com/multiversx/mx-chain-proxy-go/blob/master/data/transaction.go)
/// used when only the gas cost is needed from the `/transaction/cost` endpoint.
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SimulateGasTransactionData {
    pub tx_gas_units: u64,
}

/// Simplified response envelope for the `/transaction/cost` endpoint when only gas units are needed.
/// For the full response, use [`ResponseTxCost`](super::tx_cost::ResponseTxCost).
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct SimulateGasTransactionResponse {
    pub error: String,
    pub code: String,
    pub data: Option<SimulateGasTransactionData>,
}