pub enum TransactionEffects {
    V1(TransactionEffectsV1),
    V2(TransactionEffectsV2),
}Expand description
The response from processing a transaction or a certified transaction
Variants§
Implementations§
Source§impl TransactionEffects
 
impl TransactionEffects
Sourcepub fn new_from_execution_v1(
    status: ExecutionStatus,
    executed_epoch: EpochId,
    gas_used: GasCostSummary,
    modified_at_versions: Vec<(ObjectID, SequenceNumber)>,
    shared_objects: Vec<ObjectRef>,
    transaction_digest: TransactionDigest,
    created: Vec<(ObjectRef, Owner)>,
    mutated: Vec<(ObjectRef, Owner)>,
    unwrapped: Vec<(ObjectRef, Owner)>,
    deleted: Vec<ObjectRef>,
    unwrapped_then_deleted: Vec<ObjectRef>,
    wrapped: Vec<ObjectRef>,
    gas_object: (ObjectRef, Owner),
    events_digest: Option<TransactionEventsDigest>,
    dependencies: Vec<TransactionDigest>,
) -> Self
 
pub fn new_from_execution_v1( status: ExecutionStatus, executed_epoch: EpochId, gas_used: GasCostSummary, modified_at_versions: Vec<(ObjectID, SequenceNumber)>, shared_objects: Vec<ObjectRef>, transaction_digest: TransactionDigest, created: Vec<(ObjectRef, Owner)>, mutated: Vec<(ObjectRef, Owner)>, unwrapped: Vec<(ObjectRef, Owner)>, deleted: Vec<ObjectRef>, unwrapped_then_deleted: Vec<ObjectRef>, wrapped: Vec<ObjectRef>, gas_object: (ObjectRef, Owner), events_digest: Option<TransactionEventsDigest>, dependencies: Vec<TransactionDigest>, ) -> Self
Creates a TransactionEffects message from the results of execution, choosing the correct format for the current protocol version.
Sourcepub fn new_from_execution_v2(
    status: ExecutionStatus,
    executed_epoch: EpochId,
    gas_used: GasCostSummary,
    shared_objects: Vec<SharedInput>,
    loaded_per_epoch_config_objects: BTreeSet<ObjectID>,
    transaction_digest: TransactionDigest,
    lamport_version: SequenceNumber,
    changed_objects: BTreeMap<ObjectID, EffectsObjectChange>,
    gas_object: Option<ObjectID>,
    events_digest: Option<TransactionEventsDigest>,
    dependencies: Vec<TransactionDigest>,
) -> Self
 
pub fn new_from_execution_v2( status: ExecutionStatus, executed_epoch: EpochId, gas_used: GasCostSummary, shared_objects: Vec<SharedInput>, loaded_per_epoch_config_objects: BTreeSet<ObjectID>, transaction_digest: TransactionDigest, lamport_version: SequenceNumber, changed_objects: BTreeMap<ObjectID, EffectsObjectChange>, gas_object: Option<ObjectID>, events_digest: Option<TransactionEventsDigest>, dependencies: Vec<TransactionDigest>, ) -> Self
Creates a TransactionEffects message from the results of execution, choosing the correct format for the current protocol version.
pub fn execution_digests(&self) -> ExecutionDigests
pub fn estimate_effects_size_upperbound_v1( num_writes: usize, num_mutables: usize, num_deletes: usize, num_deps: usize, ) -> usize
pub fn estimate_effects_size_upperbound_v2( num_writes: usize, num_modifies: usize, num_deps: usize, ) -> usize
Sourcepub fn all_changed_objects(&self) -> Vec<(ObjectRef, Owner, WriteKind)>
 
pub fn all_changed_objects(&self) -> Vec<(ObjectRef, Owner, WriteKind)>
Return an iterator that iterates through all changed objects, including mutated, created and unwrapped objects. In other words, all objects that still exist in the object state after this transaction. It doesn’t include deleted/wrapped objects.
Sourcepub fn all_removed_objects(&self) -> Vec<(ObjectRef, ObjectRemoveKind)>
 
pub fn all_removed_objects(&self) -> Vec<(ObjectRef, ObjectRemoveKind)>
Return all objects that existed in the state prior to the transaction but no longer exist in the state after the transaction. It includes deleted and wrapped objects, but does not include unwrapped_then_deleted objects.
Sourcepub fn all_tombstones(&self) -> Vec<(ObjectID, SequenceNumber)>
 
pub fn all_tombstones(&self) -> Vec<(ObjectID, SequenceNumber)>
Returns all objects that will become a tombstone after this transaction. This includes deleted, unwrapped_then_deleted and wrapped objects.
Sourcepub fn mutated_excluding_gas(&self) -> Vec<(ObjectRef, Owner)>
 
pub fn mutated_excluding_gas(&self) -> Vec<(ObjectRef, Owner)>
Return an iterator of mutated objects, but excluding the gas object.
pub fn summary_for_debug(&self) -> TransactionEffectsDebugSummary
Trait Implementations§
Source§impl Clone for TransactionEffects
 
impl Clone for TransactionEffects
Source§fn clone(&self) -> TransactionEffects
 
fn clone(&self) -> TransactionEffects
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransactionEffects
 
impl Debug for TransactionEffects
Source§impl Default for TransactionEffects
 
impl Default for TransactionEffects
Source§impl<'de> Deserialize<'de> for TransactionEffects
 
impl<'de> Deserialize<'de> for TransactionEffects
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Source§impl From<TransactionEffects> for TransactionEffects
 
impl From<TransactionEffects> for TransactionEffects
Source§fn from(value: TransactionEffects) -> Self
 
fn from(value: TransactionEffects) -> Self
Source§impl From<TransactionEffectsV1> for TransactionEffects
 
impl From<TransactionEffectsV1> for TransactionEffects
Source§fn from(v: TransactionEffectsV1) -> TransactionEffects
 
fn from(v: TransactionEffectsV1) -> TransactionEffects
Source§impl From<TransactionEffectsV2> for TransactionEffects
 
impl From<TransactionEffectsV2> for TransactionEffects
Source§fn from(v: TransactionEffectsV2) -> TransactionEffects
 
fn from(v: TransactionEffectsV2) -> TransactionEffects
Source§impl Merge<&TransactionEffects> for TransactionEffects
 
impl Merge<&TransactionEffects> for TransactionEffects
fn merge(&mut self, source: &TransactionEffects, mask: &FieldMaskTree)
fn merge_from(source: T, mask: &FieldMaskTree) -> Selfwhere
    Self: Default,
Source§impl Message for TransactionEffects
 
impl Message for TransactionEffects
const SCOPE: IntentScope = IntentScope::TransactionEffects
type DigestType = TransactionEffectsDigest
fn digest(&self) -> Self::DigestType
fn scope(&self) -> IntentScope
Source§impl PartialEq for TransactionEffects
 
impl PartialEq for TransactionEffects
Source§impl Serialize for TransactionEffects
 
impl Serialize for TransactionEffects
Source§impl TransactionEffectsAPI for TransactionEffects
 
impl TransactionEffectsAPI for TransactionEffects
Source§fn lamport_version(&self) -> SequenceNumber
 
fn lamport_version(&self) -> SequenceNumber
The version assigned to all output objects (apart from packages).
Source§fn 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.
Source§fn input_consensus_objects(&self) -> Vec<InputConsensusObject>
 
fn input_consensus_objects(&self) -> Vec<InputConsensusObject>
Returns the list of sequenced consensus objects used in the input. This is needed in effects because in transaction we only have object ID for consensus 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 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.
Source§fn 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.
Source§fn accumulator_updates(&self) -> Vec<(ObjectID, AccumulatorWriteV1)>
 
fn accumulator_updates(&self) -> Vec<(ObjectID, AccumulatorWriteV1)>
Returns all accumulator updates in the transaction.
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 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 accumulator_events(&self) -> Vec<AccumulatorEvent>
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 stream_ended_mutably_accessed_consensus_objects(&self) -> Vec<ObjectID>
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, __enum_dispatch_arg_0: InputConsensusObject, )
fn unsafe_add_deleted_live_object_for_testing( &mut self, __enum_dispatch_arg_0: ObjectRef, )
fn unsafe_add_object_tombstone_for_testing( &mut self, __enum_dispatch_arg_0: ObjectRef, )
Source§impl TryFrom<TransactionEffects> for TransactionEffects
 
impl TryFrom<TransactionEffects> for TransactionEffects
Source§impl TryFrom<TransactionEffects> for TransactionEffects
 
impl TryFrom<TransactionEffects> for TransactionEffects
Source§type Error = SdkTypeConversionError
 
type Error = SdkTypeConversionError
impl Eq for TransactionEffects
impl StructuralPartialEq for TransactionEffects
Auto Trait Implementations§
impl Freeze for TransactionEffects
impl RefUnwindSafe for TransactionEffects
impl Send for TransactionEffects
impl Sync for TransactionEffects
impl Unpin for TransactionEffects
impl UnwindSafe for TransactionEffects
Blanket Implementations§
§impl<U> As for U
 
impl<U> As for U
§fn as_<T>(self) -> Twhere
    T: CastFrom<U>,
 
fn as_<T>(self) -> Twhere
    T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read more§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
    T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
 
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
    T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Conv for T
 
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
 
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
 
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
 
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
    Self: Binary,
 
fn fmt_binary(self) -> FmtBinary<Self>where
    Self: Binary,
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
    Self: Display,
 
fn fmt_display(self) -> FmtDisplay<Self>where
    Self: Display,
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
    Self: LowerExp,
 
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
    Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
    Self: LowerHex,
 
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
    Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
    Self: Octal,
 
fn fmt_octal(self) -> FmtOctal<Self>where
    Self: Octal,
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
    Self: Pointer,
 
fn fmt_pointer(self) -> FmtPointer<Self>where
    Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
    Self: UpperExp,
 
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
    Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
    Self: UpperHex,
 
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
    Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.§fn fmt_list(self) -> FmtList<Self>where
    &'a Self: for<'a> IntoIterator,
 
fn fmt_list(self) -> FmtList<Self>where
    &'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
T in a Request§impl<T> IntoRequest<T> for T
 
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
 
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
 
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
    L: Layer<S>,
 
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
    L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
    T: ?Sized,
 
impl<T> Pipe for Twhere
    T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
    Self: Sized,
 
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
    Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
    R: 'a,
 
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
    R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
    R: 'a,
 
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
    R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
 
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
    &'a mut self,
    func: impl FnOnce(&'a mut B) -> R,
) -> R
 
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
 
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
 
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
 
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
    T: ?Sized,
 
impl<T> PolicyExt for Twhere
    T: ?Sized,
Source§impl<T> SignableBytes for Twhere
    T: BcsSignable,
 
impl<T> SignableBytes for Twhere
    T: BcsSignable,
§impl<T> Tap for T
 
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
 
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
 
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
 
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
 
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
 
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
 
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
 
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
 
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
 
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
 
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
 
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
 
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
 
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.