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
/*
* 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_encoding::Bytes;
/// DryrunSource : DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into transactions or application state.
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct DryrunSource {
#[serde(rename = "app-index")]
pub app_index: u64,
/// FieldName is what kind of sources this is. If lsig then it goes into the transactions[this.TxnIndex].LogicSig. If approv or clearp it goes into the Approval Program or Clear State Program of application[this.AppIndex].
#[serde(rename = "field-name")]
pub field_name: String,
/// TEAL program binary
#[serde(rename = "source")]
pub source: Bytes,
#[serde(rename = "txn-index")]
pub txn_index: u64,
}
impl DryrunSource {
/// DryrunSource is TEAL source text that gets uploaded, compiled, and inserted into transactions or application state.
pub fn new(app_index: u64, field_name: String, source: Bytes, txn_index: u64) -> DryrunSource {
DryrunSource {
app_index,
field_name,
source,
txn_index,
}
}
}