Trait TransactionEffectsAPI

Source
pub trait TransactionEffectsAPI {
Show 22 methods // Required methods fn status(&self) -> &ExecutionStatus; fn into_status(self) -> ExecutionStatus; fn executed_epoch(&self) -> EpochId; fn modified_at_versions(&self) -> Vec<(ObjectId, Version)>; fn lamport_version(&self) -> Version; fn old_object_metadata(&self) -> Vec<(ObjectRef, Owner)>; fn sequenced_input_shared_objects(&self) -> Vec<InputSharedObject>; fn created(&self) -> Vec<(ObjectRef, Owner)>; fn mutated(&self) -> Vec<(ObjectRef, Owner)>; fn unwrapped(&self) -> Vec<(ObjectRef, Owner)>; fn deleted(&self) -> Vec<ObjectRef>; fn unwrapped_then_deleted(&self) -> Vec<ObjectRef>; fn wrapped(&self) -> Vec<ObjectRef>; fn object_changes(&self) -> Vec<ObjectChange>; fn gas_object(&self) -> Option<(ObjectRef, Owner)>; fn events_digest(&self) -> Option<&TransactionEventsDigest>; fn dependencies(&self) -> &[TransactionDigest]; fn transaction_digest(&self) -> &TransactionDigest; fn gas_cost_summary(&self) -> &GasCostSummary; fn unchanged_shared_objects(&self) -> Vec<(ObjectId, UnchangedSharedKind)>; // Provided methods fn removed_object_refs_post_version( &self, ) -> Box<dyn Iterator<Item = ObjectRef>> { ... } fn deleted_mutably_accessed_shared_objects(&self) -> Vec<ObjectId> { ... }
}
Expand description

Common interface for all transaction effect versions.

This trait is inherited from Sui’s monorepo and is here for legacy reasons.

Required Methods§

Source

fn status(&self) -> &ExecutionStatus

Source

fn into_status(self) -> ExecutionStatus

Source

fn executed_epoch(&self) -> EpochId

Source

fn modified_at_versions(&self) -> Vec<(ObjectId, Version)>

Source

fn lamport_version(&self) -> Version

The version assigned to all output objects (apart from packages).

Source

fn old_object_metadata(&self) -> Vec<(ObjectRef, Owner)>

Metadata of objects prior to modification. This includes any object that exists in the store prior to this transaction and is modified in this transaction. It includes objects that are mutated, wrapped and deleted. This API is only available on effects v2 and above.

Source

fn sequenced_input_shared_objects(&self) -> Vec<InputSharedObject>

Returns the list of sequenced shared objects used in the input. This is needed in effects because in transaction we only have object ID for shared objects. Their version and digest can only be figured out after sequencing. Also provides the use kind to indicate whether the object was mutated or read-only. It does not include per epoch config objects since they do not require sequencing.

Source

fn created(&self) -> Vec<(ObjectRef, Owner)>

Source

fn mutated(&self) -> Vec<(ObjectRef, Owner)>

Source

fn unwrapped(&self) -> Vec<(ObjectRef, Owner)>

Source

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

Source

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

Source

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

Source

fn object_changes(&self) -> Vec<ObjectChange>

Source

fn gas_object(&self) -> Option<(ObjectRef, Owner)>

Source

fn events_digest(&self) -> Option<&TransactionEventsDigest>

Source

fn dependencies(&self) -> &[TransactionDigest]

Source

fn transaction_digest(&self) -> &TransactionDigest

Source

fn gas_cost_summary(&self) -> &GasCostSummary

Source

fn unchanged_shared_objects(&self) -> Vec<(ObjectId, UnchangedSharedKind)>

Returns all root shared objects (i.e. not child object) that are read-only in the transaction.

Provided Methods§

Source

fn removed_object_refs_post_version( &self, ) -> Box<dyn Iterator<Item = ObjectRef>>

All objects references that are inaccessible after this transaction.

The union of all deleted, wrapped or unwrapped-then-deleted objects.

Source

fn deleted_mutably_accessed_shared_objects(&self) -> Vec<ObjectId>

Implementations on Foreign Types§

Source§

impl TransactionEffectsAPI for TransactionEffects

Source§

impl TransactionEffectsAPI for TransactionEffectsV1

Source§

impl TransactionEffectsAPI for TransactionEffectsV2

Implementors§