algonaut_algod 0.5.0

API endpoint for algod operations.
Documentation
/*
 * Algod REST API.
 *
 * API endpoint for algod operations.
 *
 * The version of the OpenAPI document: 0.0.1
 * Contact: contact@algorand.com
 * Generated by: https://openapi-generator.tech
 */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SimulateTransaction200Response {
    /// The round immediately preceding this simulation. State changes through this round were used to run this simulation.
    #[serde(rename = "last-round")]
    pub last_round: u64,
    /// A result object for each transaction group that was simulated.
    #[serde(rename = "txn-groups")]
    pub txn_groups: Vec<crate::models::SimulateTransactionGroupResult>,
    /// The version of this response object.
    #[serde(rename = "version")]
    pub version: u64,
    /// Indicates whether the simulated transactions would have succeeded during an actual submission. If any transaction fails or is missing a signature, this will be false.
    #[serde(rename = "would-succeed")]
    pub would_succeed: bool,
}

impl SimulateTransaction200Response {
    pub fn new(
        last_round: u64,
        txn_groups: Vec<crate::models::SimulateTransactionGroupResult>,
        version: u64,
        would_succeed: bool,
    ) -> SimulateTransaction200Response {
        SimulateTransaction200Response {
            last_round,
            txn_groups,
            version,
            would_succeed,
        }
    }
}