pub trait TransactionKindExt: Sized + Sealed {
// Required methods
fn get_advance_epoch_tx_gas_summary(&self) -> Option<(u64, u64)>;
fn contains_shared_object(&self) -> bool;
fn shared_input_objects(&self) -> impl Iterator<Item = SharedObjectRef> + '_;
fn move_calls(&self) -> Vec<(&ObjectID, &str, &str)>;
fn receiving_objects(&self) -> Vec<ObjectRef>;
fn input_objects(&self) -> UserInputResult<Vec<InputObjectKind>>;
fn validity_check(&self, config: &ProtocolConfig) -> UserInputResult;
fn iter_commands(&self) -> impl Iterator<Item = &Command>;
fn name(&self) -> &'static str;
}Required Methods§
Sourcefn get_advance_epoch_tx_gas_summary(&self) -> Option<(u64, u64)>
fn get_advance_epoch_tx_gas_summary(&self) -> Option<(u64, u64)>
If this is an advance epoch transaction, returns (total gas charged,
total gas rebated). TODO: We should use GasCostSummary directly in
ChangeEpoch struct, and return that directly.
Returns true if the transaction contains at least one shared object.
Returns an iterator of all shared input objects used by this transaction.
Sourcefn move_calls(&self) -> Vec<(&ObjectID, &str, &str)>
fn move_calls(&self) -> Vec<(&ObjectID, &str, &str)>
Returns the move calls made by this transaction as a list of (package, module, function) tuples.
Sourcefn receiving_objects(&self) -> Vec<ObjectRef>
fn receiving_objects(&self) -> Vec<ObjectRef>
Returns the objects received by this transaction.
Sourcefn input_objects(&self) -> UserInputResult<Vec<InputObjectKind>>
fn input_objects(&self) -> UserInputResult<Vec<InputObjectKind>>
Return the metadata of each of the input objects for the transaction.
For a Move object, we attach the object reference;
for a Move package, we provide the object id only since they never
change on chain. TODO: use an iterator over references here instead
of a Vec to avoid allocations.
Sourcefn validity_check(&self, config: &ProtocolConfig) -> UserInputResult
fn validity_check(&self, config: &ProtocolConfig) -> UserInputResult
Validates the transaction against the given protocol config.
Sourcefn iter_commands(&self) -> impl Iterator<Item = &Command>
fn iter_commands(&self) -> impl Iterator<Item = &Command>
Returns an iterator over the commands in this transaction.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.