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
/*
* 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
*/
use algonaut_model::transaction::ApiSignedTransaction;
/// DryrunRequest : Request data type for dryrun endpoint. Given the Transactions and simulated ledger state upload, run TEAL scripts and return debugging information.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DryrunRequest {
#[serde(rename = "accounts")]
pub accounts: Vec<crate::models::Account>,
#[serde(rename = "apps")]
pub apps: Vec<crate::models::Application>,
/// LatestTimestamp is available to some TEAL scripts. Defaults to the latest confirmed timestamp this algod is attached to.
#[serde(rename = "latest-timestamp")]
pub latest_timestamp: u64,
/// ProtocolVersion specifies a specific version string to operate under, otherwise whatever the current protocol of the network this algod is running in.
#[serde(rename = "protocol-version")]
pub protocol_version: String,
/// Round is available to some TEAL scripts. Defaults to the current round on the network this algod is attached to.
#[serde(rename = "round")]
pub round: u64,
#[serde(rename = "sources")]
pub sources: Vec<crate::models::DryrunSource>,
#[serde(rename = "txns")]
pub txns: Vec<ApiSignedTransaction>,
}
impl DryrunRequest {
/// Request data type for dryrun endpoint. Given the Transactions and simulated ledger state upload, run TEAL scripts and return debugging information.
pub fn new(
accounts: Vec<crate::models::Account>,
apps: Vec<crate::models::Application>,
latest_timestamp: u64,
protocol_version: String,
round: u64,
sources: Vec<crate::models::DryrunSource>,
txns: Vec<ApiSignedTransaction>,
) -> DryrunRequest {
DryrunRequest {
accounts,
apps,
latest_timestamp,
protocol_version,
round,
sources,
txns,
}
}
}