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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
* Algod REST API.
*
* API endpoint for algod operations.
*
* The version of the OpenAPI document: 0.0.1
* Contact: contact@algorand.com
*
* NOTE: This struct was originally generated by openapi-generator and
* has been extended by hand to cover the simulate-endpoint power-pack
* fields the upstream spec at HEAD now publishes (see ADR
* `simulaterequest-model-needs-power-pack-fields`). Re-running the
* generator must preserve these additive fields.
*/
/// SimulateRequest : Request type for simulation endpoint.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SimulateRequest {
/// The transaction groups to simulate.
#[serde(rename = "txn-groups")]
pub txn_groups: Vec<crate::models::SimulateRequestTransactionGroup>,
/// Lift the per-app log-call and per-app log-size limits during the
/// simulation. The response echoes the override in
/// `eval-overrides.max-log-calls` / `max-log-size`.
#[serde(rename = "allow-more-logging", skip_serializing_if = "Option::is_none")]
pub allow_more_logging: Option<bool>,
/// Allow transactions without signatures to be simulated as if they
/// were properly signed.
#[serde(
rename = "allow-empty-signatures",
skip_serializing_if = "Option::is_none"
)]
pub allow_empty_signatures: Option<bool>,
/// Allow access to (and reporting on) unnamed resources for
/// foreign-app / foreign-asset / account references.
#[serde(
rename = "allow-unnamed-resources",
skip_serializing_if = "Option::is_none"
)]
pub allow_unnamed_resources: Option<bool>,
/// Apply extra opcode budget for every transaction group call.
#[serde(
rename = "extra-opcode-budget",
skip_serializing_if = "Option::is_none"
)]
pub extra_opcode_budget: Option<u64>,
/// Execution trace configuration to apply across the simulation.
#[serde(rename = "exec-trace-config", skip_serializing_if = "Option::is_none")]
pub exec_trace_config: Option<Box<crate::models::SimulateTraceConfig>>,
/// Simulate the transaction(s) at a specific past round. Omit to use
/// the most recently committed round.
#[serde(rename = "round", skip_serializing_if = "Option::is_none")]
pub round: Option<u64>,
/// If a transaction is rejected because its sender is rekeyed,
/// replay it with the auth-address (rather than failing).
#[serde(rename = "fix-signers", skip_serializing_if = "Option::is_none")]
pub fix_signers: Option<bool>,
}
impl SimulateRequest {
/// Request type for simulation endpoint.
pub fn new(txn_groups: Vec<crate::models::SimulateRequestTransactionGroup>) -> SimulateRequest {
SimulateRequest {
txn_groups,
allow_more_logging: None,
allow_empty_signatures: None,
allow_unnamed_resources: None,
extra_opcode_budget: None,
exec_trace_config: None,
round: None,
fix_signers: None,
}
}
}