aptos_client_icp/models/move_script_bytecode.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/// MoveScriptBytecode : Move script bytecode
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct MoveScriptBytecode {
17 /// All bytes (Vec<u8>) data is represented as hex-encoded string prefixed with `0x` and fulfilled with two hex digits per byte. Unlike the `Address` type, HexEncodedBytes will not trim any zeros.
18 #[serde(rename = "bytecode")]
19 pub bytecode: String,
20 #[serde(rename = "abi", skip_serializing_if = "Option::is_none")]
21 pub abi: Option<Box<models::MoveFunction>>,
22}
23
24impl MoveScriptBytecode {
25 /// Move script bytecode
26 pub fn new(bytecode: String) -> MoveScriptBytecode {
27 MoveScriptBytecode {
28 bytecode,
29 abi: None,
30 }
31 }
32}
33