Enum iota_types::effects::TransactionEffects
source · pub enum TransactionEffects {
V1(TransactionEffectsV1),
}
Expand description
The response from processing a transaction or a certified transaction
Variants§
V1(TransactionEffectsV1)
Implementations§
source§impl TransactionEffects
impl TransactionEffects
sourcepub fn new_from_execution_v1(
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_v1( 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_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§impl From<TransactionEffects> for TransactionEffects
impl From<TransactionEffects> for TransactionEffects
source§fn from(value: TransactionEffects) -> Self
fn from(value: TransactionEffects) -> Self
source§impl Message for TransactionEffects
impl Message for TransactionEffects
type DigestType = TransactionEffectsDigest
const SCOPE: IntentScope = IntentScope::TransactionEffects
fn digest(&self) -> Self::DigestType
fn scope(&self) -> IntentScope
source§impl PartialEq for TransactionEffects
impl PartialEq for TransactionEffects
source§fn eq(&self, other: &TransactionEffects) -> bool
fn eq(&self, other: &TransactionEffects) -> bool
self
and other
values to be equal, and is used
by ==
.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.
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.
Returns all root shared objects (i.e. not child object) that are read-only 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 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 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_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, )
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> ConvertTo<T> for Twhere
T: Send,
impl<T> ConvertTo<T> for Twhere
T: Send,
fn convert(self) -> Result<T, Error>
fn convert_unchecked(self) -> T
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
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<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>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§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
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
§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.