Skip to main content

TransactionEffectsV1

TransactionEffectsV1

struct TransactionEffectsV1

Version 1 of TransactionEffects

BCS

The BCS serialized form for this type is defined by the following ABNF:

effects-v1 = execution-status
u64 ; epoch
gas-cost-summary
digest ; transaction digest
(option u32) ; gas object index
(option digest) ; events digest
(vector digest) ; list of transaction dependencies
u64 ; lamport version
(vector changed-object)
(vector unchanged-shared-object)
(option digest) ; auxiliary data digest

init(status:epoch:gasCostSummary:transactionDigest:gasObjectIndex:eventsDigest:dependencies:lamportVersion:changedObjects:unchangedSharedObjects:auxiliaryDataDigest:)

init(status: ExecutionStatus, epoch: UInt64, gasCostSummary: GasCostSummary, transactionDigest: TransactionDigest, gasObjectIndex: UInt32? = nil, eventsDigest: TransactionEventsDigest? = nil, dependencies: [TransactionDigest], lamportVersion: Version, changedObjects: [ChangedObject], unchangedSharedObjects: [UnchangedSharedObject], auxiliaryDataDigest: EffectsAuxDataDigest? = nil)

auxiliaryDataDigest

var auxiliaryDataDigest: EffectsAuxDataDigest?

Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately. Storing it separately allows us to avoid bloating the effects with data that are not critical. It also provides more flexibility on the format and type of the data.

changedObjects

var changedObjects: [ChangedObject]

Objects whose state are changed in the object store.

dependencies

var dependencies: [TransactionDigest]

The set of transaction digests this transaction depends on.

epoch

var epoch: UInt64

The epoch when this transaction was executed.

eventsDigest

var eventsDigest: TransactionEventsDigest?

The digest of the events emitted during execution, can be None if the transaction does not emit any event.

gasCostSummary

var gasCostSummary: GasCostSummary

The gas used by this transaction

gasObjectIndex

var gasObjectIndex: UInt32?

The updated gas object reference, as an index into the changed_objects vector. Having a dedicated field for convenient access. System transaction that don't require gas will leave this as None.

lamportVersion

var lamportVersion: Version

The version number of all the written Move objects by this transaction.

status

var status: ExecutionStatus

The status of the execution

transactionDigest

var transactionDigest: TransactionDigest

The transaction digest

unchangedSharedObjects

var unchangedSharedObjects: [UnchangedSharedObject]

Shared objects that are not mutated in this transaction. Unlike owned objects, read-only shared objects' version are not committed in the transaction, and in order for a node to catch up and execute it without consensus sequencing, the version needs to be committed in the effects.