pub trait TransactionEffectsAPI: Sealed {
Show 21 methods
// Required methods
fn status(&self) -> &ExecutionStatus;
fn into_status(self) -> ExecutionStatus;
fn 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 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) -> (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 method
fn deleted_mutably_accessed_shared_objects(&self) -> Vec<ObjectId> { ... }
}Expand description
Version-agnostic accessors for TransactionEffects.
Sealed; implemented for the enum and each version struct. The enum impl dispatches to the active variant.
Required Methods§
Sourcefn into_status(self) -> ExecutionStatus
fn into_status(self) -> ExecutionStatus
Consume self and return the owned status of the transaction.
Sourcefn modified_at_versions(&self) -> Vec<(ObjectId, Version)>
fn modified_at_versions(&self) -> Vec<(ObjectId, Version)>
Return the (ObjectId, Version) pair, at their pre-execution version,
of every object that existed in the store before this transaction
and was modified by it (mutated, wrapped, or deleted).
Sourcefn lamport_version(&self) -> Version
fn lamport_version(&self) -> Version
The version assigned to all output objects (apart from packages).
Sourcefn old_object_metadata(&self) -> Vec<(ObjectRef, Owner)>
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.
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. TODO: Rename this function to indicate sequencing requirement.
Sourcefn created(&self) -> Vec<(ObjectRef, Owner)>
fn created(&self) -> Vec<(ObjectRef, Owner)>
Objects (Move objects and packages) newly created by this transaction, paired with their owner. Excludes objects that were created and then wrapped within the same transaction.
Sourcefn mutated(&self) -> Vec<(ObjectRef, Owner)>
fn mutated(&self) -> Vec<(ObjectRef, Owner)>
Objects that existed before this transaction and whose contents were
updated by it (in-place mutations and system package upgrades),
reported at their post-execution (ObjectRef, Owner).
Sourcefn unwrapped(&self) -> Vec<(ObjectRef, Owner)>
fn unwrapped(&self) -> Vec<(ObjectRef, Owner)>
Objects that were wrapped inside another object before this transaction and have been promoted back to top-level objects in the store by it.
Sourcefn deleted(&self) -> Vec<ObjectRef>
fn deleted(&self) -> Vec<ObjectRef>
Objects that existed before this transaction and were deleted by it.
References use the post-execution version and the
TransactionEffectsDigest::OBJECT_DELETED tombstone digest.
Sourcefn unwrapped_then_deleted(&self) -> Vec<ObjectRef>
fn unwrapped_then_deleted(&self) -> Vec<ObjectRef>
Objects that were unwrapped and then deleted within this same
transaction (i.e. did not exist as top-level objects either before
or after). References use the post-execution version and the
TransactionEffectsDigest::OBJECT_DELETED tombstone digest.
Sourcefn wrapped(&self) -> Vec<ObjectRef>
fn wrapped(&self) -> Vec<ObjectRef>
Objects that existed as top-level objects before this transaction and
have been wrapped inside another object by it (i.e. no longer visible
in the object store as top-level). References use the post-execution
version and the TransactionEffectsDigest::OBJECT_WRAPPED tombstone
digest.
Sourcefn object_changes(&self) -> Vec<ObjectChange>
fn object_changes(&self) -> Vec<ObjectChange>
Returns a flattened view of every object change recorded in these
effects: for each touched object, the input and output version/digest
(when present) together with the IDOperation describing whether
the ID was created, deleted, or unchanged.
Sourcefn gas_object(&self) -> (ObjectRef, Owner)
fn gas_object(&self) -> (ObjectRef, Owner)
Returns the post-execution reference and owner of the gas object.
Sourcefn events_digest(&self) -> Option<&TransactionEventsDigest>
fn events_digest(&self) -> Option<&TransactionEventsDigest>
Digest of the events emitted by this transaction, or None if it
emitted no events.
Sourcefn dependencies(&self) -> &[TransactionDigest] ⓘ
fn dependencies(&self) -> &[TransactionDigest] ⓘ
Digests of the transactions this one depends on, i.e. transactions that must be executed before this one for its inputs to be available.
Sourcefn transaction_digest(&self) -> &TransactionDigest
fn transaction_digest(&self) -> &TransactionDigest
Digest of the transaction that produced these effects.
Sourcefn gas_cost_summary(&self) -> &GasCostSummary
fn gas_cost_summary(&self) -> &GasCostSummary
Return the gas cost summary of the transaction.
Returns all root shared objects (i.e. not child object) that are read-only in the transaction.
Provided Methods§
IDs of shared objects that were declared as mutable inputs by the transaction but had already been deleted at the time of execution.