Skip to content

Commit 75d92b4

Browse files
committed
types: add CheckpointData
1 parent 3094b49 commit 75d92b4

File tree

2 files changed

+29
-3
lines changed

2 files changed

+29
-3
lines changed

src/types/checkpoint.rs

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ use super::CheckpointContentsDigest;
22
use super::CheckpointDigest;
33
use super::Digest;
44
use super::GasCostSummary;
5+
use super::Object;
6+
use super::SignedTransaction;
57
use super::TransactionDigest;
8+
use super::TransactionEffects;
69
use super::TransactionEffectsDigest;
10+
use super::TransactionEvents;
711
use super::UserSignature;
812
use super::ValidatorAggregatedSignature;
913
use super::ValidatorCommitteeMember;
@@ -76,6 +80,7 @@ pub struct CheckpointSummary {
7680
pub version_specific_data: Vec<u8>,
7781
}
7882

83+
#[derive(Clone, Debug, PartialEq)]
7984
#[cfg_attr(
8085
feature = "serde",
8186
derive(serde_derive::Serialize, serde_derive::Deserialize)
@@ -99,6 +104,27 @@ pub struct CheckpointTransactionInfo {
99104
pub signatures: Vec<UserSignature>,
100105
}
101106

107+
#[derive(Clone, Debug)]
108+
pub struct CheckpointData {
109+
pub checkpoint_summary: SignedCheckpointSummary,
110+
pub checkpoint_contents: CheckpointContents,
111+
pub transactions: Vec<CheckpointTransaction>,
112+
}
113+
114+
#[derive(Clone, Debug)]
115+
pub struct CheckpointTransaction {
116+
/// The input Transaction
117+
pub transaction: SignedTransaction,
118+
/// The effects produced by executing this transaction
119+
pub effects: TransactionEffects,
120+
/// The events, if any, emitted by this transaciton during execution
121+
pub events: Option<TransactionEvents>,
122+
/// The state of all inputs to this transaction as they were prior to execution.
123+
pub input_objects: Vec<Object>,
124+
/// The state of all output objects created or mutated by this transaction.
125+
pub output_objects: Vec<Object>,
126+
}
127+
102128
#[cfg(feature = "serde")]
103129
#[cfg_attr(doc_cfg, doc(cfg(feature = "serde")))]
104130
mod serialization {

src/types/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ mod u256;
1414

1515
pub use address::Address;
1616
pub use checkpoint::{
17-
CheckpointCommitment, CheckpointContents, CheckpointSequenceNumber, CheckpointSummary,
18-
CheckpointTimestamp, CheckpointTransactionInfo, EndOfEpochData, EpochId, ProtocolVersion,
19-
SignedCheckpointSummary, StakeUnit,
17+
CheckpointCommitment, CheckpointContents, CheckpointData, CheckpointSequenceNumber,
18+
CheckpointSummary, CheckpointTimestamp, CheckpointTransaction, CheckpointTransactionInfo,
19+
EndOfEpochData, EpochId, ProtocolVersion, SignedCheckpointSummary, StakeUnit,
2020
};
2121
pub use crypto::{
2222
AddressSeed, Bls12381PrivateKey, Bls12381PublicKey, Bls12381Signature, Claim,

0 commit comments

Comments
 (0)