Skip to main content

aptos_client_icp/models/
write_set_script_write_set.rs

1/*
2 * Aptos Node API
3 *
4 * The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
5 *
6 * The version of the OpenAPI document: 1.2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct WriteSetScriptWriteSet {
16    /// A hex encoded 32 byte Aptos account address.  This is represented in a string as a 64 character hex string, sometimes shortened by stripping leading 0s, and adding a 0x.  For example, address 0x0000000000000000000000000000000000000000000000000000000000000001 is represented as 0x1. 
17    #[serde(rename = "execute_as")]
18    pub execute_as: String,
19    #[serde(rename = "script")]
20    pub script: Box<models::ScriptPayload>,
21    #[serde(rename = "type")]
22    pub r#type: Type,
23}
24
25impl WriteSetScriptWriteSet {
26    pub fn new(execute_as: String, script: models::ScriptPayload, r#type: Type) -> WriteSetScriptWriteSet {
27        WriteSetScriptWriteSet {
28            execute_as,
29            script: Box::new(script),
30            r#type,
31        }
32    }
33}
34/// 
35#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
36pub enum Type {
37    #[serde(rename = "script_write_set")]
38    ScriptWriteSet,
39}
40
41impl Default for Type {
42    fn default() -> Type {
43        Self::ScriptWriteSet
44    }
45}
46