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
 */

/// DryrunState : Stores the TEAL eval step data

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DryrunState {
    /// Evaluation error if any
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// Line number
    #[serde(rename = "line")]
    pub line: u64,
    /// Program counter
    #[serde(rename = "pc")]
    pub pc: u64,
    #[serde(rename = "scratch", skip_serializing_if = "Option::is_none")]
    pub scratch: Option<Vec<crate::models::TealValue>>,
    #[serde(rename = "stack")]
    pub stack: Vec<crate::models::TealValue>,
}

impl DryrunState {
    /// Stores the TEAL eval step data
    pub fn new(line: u64, pc: u64, stack: Vec<crate::models::TealValue>) -> DryrunState {
        DryrunState {
            error: None,
            line,
            pc,
            scratch: None,
            stack,
        }
    }
}