Skip to main content

aptos_client_icp/models/
transaction_payload_entry_function_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 TransactionPayloadEntryFunctionPayload {
16    /// Entry function id is string representation of a entry function defined on-chain.  Format: `{address}::{module name}::{function name}`  Both `module name` and `function name` are case-sensitive. 
17    #[serde(rename = "function")]
18    pub function: String,
19    /// Type arguments of the function
20    #[serde(rename = "type_arguments")]
21    pub type_arguments: Vec<String>,
22    /// Arguments of the function
23    #[serde(rename = "arguments")]
24    pub arguments: Vec<serde_json::Value>,
25    #[serde(rename = "type")]
26    pub r#type: Type,
27}
28
29impl TransactionPayloadEntryFunctionPayload {
30    pub fn new(function: String, type_arguments: Vec<String>, arguments: Vec<serde_json::Value>, r#type: Type) -> TransactionPayloadEntryFunctionPayload {
31        TransactionPayloadEntryFunctionPayload {
32            function,
33            type_arguments,
34            arguments,
35            r#type,
36        }
37    }
38}
39/// 
40#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
41pub enum Type {
42    #[serde(rename = "entry_function_payload")]
43    EntryFunctionPayload,
44}
45
46impl Default for Type {
47    fn default() -> Type {
48        Self::EntryFunctionPayload
49    }
50}
51