Skip to main content

aptos_client_icp/models/
transaction_payload_script_payload.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 TransactionPayloadScriptPayload {
16    #[serde(rename = "code")]
17    pub code: Box<models::MoveScriptBytecode>,
18    /// Type arguments of the function
19    #[serde(rename = "type_arguments")]
20    pub type_arguments: Vec<String>,
21    /// Arguments of the function
22    #[serde(rename = "arguments")]
23    pub arguments: Vec<serde_json::Value>,
24    #[serde(rename = "type")]
25    pub r#type: Type,
26}
27
28impl TransactionPayloadScriptPayload {
29    pub fn new(code: models::MoveScriptBytecode, type_arguments: Vec<String>, arguments: Vec<serde_json::Value>, r#type: Type) -> TransactionPayloadScriptPayload {
30        TransactionPayloadScriptPayload {
31            code: Box::new(code),
32            type_arguments,
33            arguments,
34            r#type,
35        }
36    }
37}
38/// 
39#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
40pub enum Type {
41    #[serde(rename = "script_payload")]
42    ScriptPayload,
43}
44
45impl Default for Type {
46    fn default() -> Type {
47        Self::ScriptPayload
48    }
49}
50