pub trait TransactionEffectsAPI {
Show 36 methods
// Required methods
fn status(&self) -> &ExecutionStatus;
fn into_status(self) -> ExecutionStatus;
fn executed_epoch(&self) -> EpochId;
fn modified_at_versions(&self) -> Vec<(ObjectID, SequenceNumber)>;
fn move_abort(&self) -> Option<(MoveLocation, u64)>;
fn lamport_version(&self) -> SequenceNumber;
fn old_object_metadata(&self) -> Vec<(ObjectRef, Owner)>;
fn accessed_consensus_objects(&self) -> Vec<InputConsensusObject>;
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 transferred_from_consensus(&self) -> Vec<ObjectRef> ⓘ;
fn transferred_to_consensus(&self) -> Vec<ObjectRef> ⓘ;
fn consensus_owner_changed(&self) -> Vec<ObjectRef> ⓘ;
fn object_changes(&self) -> Vec<ObjectChange>;
fn published_packages(&self) -> Vec<ObjectID>;
fn written(&self) -> Vec<ObjectRef> ⓘ;
fn accumulator_events(&self) -> Vec<AccumulatorEvent>;
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_consensus_objects(
&self,
) -> Vec<(ObjectID, UnchangedConsensusKind)>;
fn accumulator_updates(&self) -> Vec<(ObjectID, AccumulatorWriteV1)>;
fn status_mut_for_testing(&mut self) -> &mut ExecutionStatus;
fn gas_cost_summary_mut_for_testing(&mut self) -> &mut GasCostSummary;
fn transaction_digest_mut_for_testing(&mut self) -> &mut TransactionDigest;
fn dependencies_mut_for_testing(&mut self) -> &mut Vec<TransactionDigest>;
fn unsafe_add_input_consensus_object_for_testing(
&mut self,
kind: InputConsensusObject,
);
fn unsafe_add_deleted_live_object_for_testing(&mut self, obj_ref: ObjectRef);
fn unsafe_add_object_tombstone_for_testing(&mut self, obj_ref: ObjectRef);
// Provided method
fn stream_ended_mutably_accessed_consensus_objects(&self) -> Vec<ObjectID> { ... }
}Required Methods§
fn status(&self) -> &ExecutionStatus
fn into_status(self) -> ExecutionStatus
fn executed_epoch(&self) -> EpochId
fn modified_at_versions(&self) -> Vec<(ObjectID, SequenceNumber)>
fn move_abort(&self) -> Option<(MoveLocation, u64)>
Sourcefn lamport_version(&self) -> SequenceNumber
fn lamport_version(&self) -> SequenceNumber
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. This API is only available on effects v2 and above.
Sourcefn accessed_consensus_objects(&self) -> Vec<InputConsensusObject>
fn accessed_consensus_objects(&self) -> Vec<InputConsensusObject>
Returns the consensus objects the transaction read or wrote, with the version and digest resolved during execution (the transaction itself only carries the object ID for consensus objects; version and digest are known only after sequencing). Each entry’s kind indicates whether the object was mutated or read-only.
This includes system objects (e.g. the accumulator root) read during execution but not declared as sequenced inputs — they are recorded as read-only so nodes executing from effects can reproduce the read, and are indistinguishable here from genuinely-sequenced read-only inputs. Callers that need only the transaction’s declared inputs must filter using the transaction’s own input set. It does not include per epoch config objects, since they do not require sequencing.
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 transferred_from_consensus(&self) -> Vec<ObjectRef> ⓘ
fn transferred_to_consensus(&self) -> Vec<ObjectRef> ⓘ
fn consensus_owner_changed(&self) -> Vec<ObjectRef> ⓘ
fn object_changes(&self) -> Vec<ObjectChange>
fn published_packages(&self) -> Vec<ObjectID>
Sourcefn written(&self) -> Vec<ObjectRef> ⓘ
fn written(&self) -> Vec<ObjectRef> ⓘ
The set of object refs written by this transaction, including deleted and wrapped objects. Unlike object_changes(), returns no information about the starting state of the object.
fn accumulator_events(&self) -> Vec<AccumulatorEvent>
Sourcefn gas_object(&self) -> Option<(ObjectRef, Owner)>
fn gas_object(&self) -> Option<(ObjectRef, Owner)>
Returns the gas object ref and owner. When the gas object was deleted (e.g. send_funds
consuming the gas coin), the object ID is preserved, the digest is set to
ObjectDigest::OBJECT_DIGEST_DELETED and the owner is set to a dummy address.
fn events_digest(&self) -> Option<&TransactionEventsDigest>
fn dependencies(&self) -> &[TransactionDigest]
fn transaction_digest(&self) -> &TransactionDigest
fn gas_cost_summary(&self) -> &GasCostSummary
Sourcefn unchanged_consensus_objects(&self) -> Vec<(ObjectID, UnchangedConsensusKind)>
fn unchanged_consensus_objects(&self) -> Vec<(ObjectID, UnchangedConsensusKind)>
Returns all root consensus objects (i.e. not child object) that are read-only in the transaction.
Sourcefn accumulator_updates(&self) -> Vec<(ObjectID, AccumulatorWriteV1)>
fn accumulator_updates(&self) -> Vec<(ObjectID, AccumulatorWriteV1)>
Returns all accumulator updates in the transaction.