TransactionKindExt

Trait TransactionKindExt 

Source
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§

Source

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.

Source

fn contains_shared_object(&self) -> bool

Returns true if the transaction contains at least one shared object.

Source

fn shared_input_objects(&self) -> impl Iterator<Item = SharedObjectRef> + '_

Returns an iterator of all shared input objects used by this transaction.

Source

fn move_calls(&self) -> Vec<(&ObjectID, &str, &str)>

Returns the move calls made by this transaction as a list of (package, module, function) tuples.

Source

fn receiving_objects(&self) -> Vec<ObjectRef>

Returns the objects received by this transaction.

Source

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.

Source

fn validity_check(&self, config: &ProtocolConfig) -> UserInputResult

Validates the transaction against the given protocol config.

Source

fn iter_commands(&self) -> impl Iterator<Item = &Command>

Returns an iterator over the commands in this transaction.

Source

fn name(&self) -> &'static str

Returns a human-readable name for this transaction kind.

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.

Implementors§