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
/*
* Algod REST API.
*
* Hand-written model added in support of ADR
* `simulaterequest-model-needs-power-pack-fields`. Matches the
* `SimulateTraceConfig` definition in algod's `algod.oas3.json`.
*/
/// SimulateTraceConfig : An object that configures simulation execution
/// trace.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct SimulateTraceConfig {
/// Master switch — when `Some(true)` the response includes execution
/// traces. The individual `*_change` toggles are no-ops unless this
/// is enabled.
#[serde(rename = "enable", skip_serializing_if = "Option::is_none")]
pub enable: Option<bool>,
/// Emit stack changes (push / pop counts plus pushed values) in
/// each opcode trace unit.
#[serde(rename = "stack-change", skip_serializing_if = "Option::is_none")]
pub stack_change: Option<bool>,
/// Emit scratch-slot writes alongside stack changes.
#[serde(rename = "scratch-change", skip_serializing_if = "Option::is_none")]
pub scratch_change: Option<bool>,
/// Emit application-state changes (global / local / box writes and
/// deletes).
#[serde(rename = "state-change", skip_serializing_if = "Option::is_none")]
pub state_change: Option<bool>,
}
impl SimulateTraceConfig {
pub fn new() -> SimulateTraceConfig {
SimulateTraceConfig::default()
}
}