1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Aptos Node API
*
* The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
*
* The version of the OpenAPI document: 1.2.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// BlockEpilogueTransaction : A block epilogue transaction
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BlockEpilogueTransaction {
/// A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
#[serde(rename = "version")]
pub version: String,
#[serde(rename = "hash")]
pub hash: String,
#[serde(rename = "state_change_hash")]
pub state_change_hash: String,
#[serde(rename = "event_root_hash")]
pub event_root_hash: String,
#[serde(rename = "state_checkpoint_hash", skip_serializing_if = "Option::is_none")]
pub state_checkpoint_hash: Option<String>,
/// A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
#[serde(rename = "gas_used")]
pub gas_used: String,
/// Whether the transaction was successful
#[serde(rename = "success")]
pub success: bool,
/// The VM status of the transaction, can tell useful information in a failure
#[serde(rename = "vm_status")]
pub vm_status: String,
#[serde(rename = "accumulator_root_hash")]
pub accumulator_root_hash: String,
/// Final state of resources changed by the transaction
#[serde(rename = "changes")]
pub changes: Vec<models::WriteSetChange>,
/// A string containing a 64-bit unsigned integer. We represent u64 values as a string to ensure compatibility with languages such as JavaScript that do not parse u64s in JSON natively.
#[serde(rename = "timestamp")]
pub timestamp: String,
#[serde(rename = "block_end_info", skip_serializing_if = "Option::is_none")]
pub block_end_info: Option<Box<models::BlockEndInfo>>,
}
impl BlockEpilogueTransaction {
/// A block epilogue transaction
pub fn new(version: String, hash: String, state_change_hash: String, event_root_hash: String, gas_used: String, success: bool, vm_status: String, accumulator_root_hash: String, changes: Vec<models::WriteSetChange>, timestamp: String) -> BlockEpilogueTransaction {
BlockEpilogueTransaction {
version,
hash,
state_change_hash,
event_root_hash,
state_checkpoint_hash: None,
gas_used,
success,
vm_status,
accumulator_root_hash,
changes,
timestamp,
block_end_info: None,
}
}
}