aptos_client_icp/models/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 ScriptWriteSet {
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}
22
23impl ScriptWriteSet {
24 pub fn new(execute_as: String, script: models::ScriptPayload) -> ScriptWriteSet {
25 ScriptWriteSet {
26 execute_as,
27 script: Box::new(script),
28 }
29 }
30}
31