Skip to main content

TransactionEffectsV1

TransactionEffectsV1​

class TransactionEffectsV1

Version 1 of TransactionEffects

BCS

The BCS serialized form of this type is specified in bcs-schema.abnf.

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

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

debugDescription​

var debugDescription: String { get }

A textual representation of this instance, suitable for debugging.

Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the String(reflecting:) initializer. This initializer works with any type, and uses the custom debugDescription property for types that conform to CustomDebugStringConvertible:

struct Point: CustomDebugStringConvertible {
let x: Int, y: Int

var debugDescription: String {
return "(\(x), \(y))"
}
}

let p = Point(x: 21, y: 30)
let s = String(reflecting: p)
print(s)
// Prints "(21, 30)"

The conversion of p to a string in the assignment to s uses the Point type's debugDescription property.

allChangedObjects()​

func allChangedObjects() -> [ChangedObjectWrite]

Every object still in the store after this transaction, tagged with how it got there.

allRemovedObjects()​

func allRemovedObjects() -> [RemovedObject]

Every object that was in the store before this transaction and is not after it, tagged with why.

auxiliaryDataDigest()​

func auxiliaryDataDigest() -> EffectsAuxDataDigest?

Auxiliary data generated as part of the effects but stored separately.

changedObjects()​

func changedObjects() -> [ChangedObject]

Objects whose state changed in the object store.

created()​

func created() -> [OwnedObjectReference]

Objects newly created by this transaction, paired with their owner.

deleted()​

func deleted() -> [ObjectReference]

Objects that existed before this transaction and that it deleted.

dependencies()​

func dependencies() -> [TransactionDigest]

The transactions this one depends on.

epoch()​

func epoch() -> UInt64

The epoch when this transaction was executed.

eventsDigest()​

func eventsDigest() -> TransactionEventsDigest?

The digest of the events emitted during execution, or None if the transaction emitted none.

gasCostSummary()​

func gasCostSummary() -> GasCostSummary

The gas used by this transaction.

gasObject()​

func gasObject() -> OwnedObjectReference?

The post-transaction reference and owner of the gas object, or None for a system transaction, which pays no gas.

gasObjectIndex()​

func gasObjectIndex() -> UInt32?

The updated gas object, as an index into changed_objects. None for a system transaction, which pays no gas.

inputSharedObjects()​

func inputSharedObjects() -> [InputSharedObject]

The shared objects this transaction was sequenced against, whether or not it changed them.

lamportVersion()​

func lamportVersion() -> Version

The version this transaction assigned to every output object other than packages.

modifiedAtVersions()​

func modifiedAtVersions() -> [ObjectVersion]

The id and pre-transaction version of every object that existed before this transaction and was modified by it.

mutated()​

func mutated() -> [OwnedObjectReference]

Objects that existed before this transaction and whose contents it updated, at their post-transaction reference and owner.

oldObjectMetadata()​

func oldObjectMetadata() -> [OwnedObjectReference]

The reference and owner, before this transaction, of every object it modified.

status()​

func status() -> ExecutionStatus

The status of the execution.

toBcs()​

func toBcs() throws -> Data

Convert this type to BCS encoded bytes.

toDisplayString()​

func toDisplayString() -> String

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

toJson()​

func toJson() throws -> String

Convert this type to a JSON encoded string.

transactionDigest()​

func transactionDigest() -> TransactionDigest

The transaction digest.

unchangedSharedObjects()​

func unchangedSharedObjects() -> [UnchangedSharedObject]

Shared objects this transaction was sequenced against without changing.

unwrapped()​

func unwrapped() -> [OwnedObjectReference]

Objects that were wrapped inside another object before this transaction and that it restored to the store.

unwrappedThenDeleted()​

func unwrappedThenDeleted() -> [ObjectReference]

Objects unwrapped and then deleted within this same transaction.

wrapped()​

func wrapped() -> [ObjectReference]

Objects that this transaction wrapped inside another object.

fromBcs(bcs:)​

static func fromBcs(bcs: Data) throws -> TransactionEffectsV1

Create this type from BCS encoded bytes.

fromJson(json:)​

static func fromJson(json: String) throws -> TransactionEffectsV1

Create this type from a JSON encoded string.

!=(_:_:)​

static func != (lhs: Self, rhs: Self) -> Bool

Returns a Boolean value indicating whether two values are not equal.

Inequality is the inverse of equality. For any values a and b, a != b implies that a == b is false.

This is the default implementation of the not-equal-to operator (!=) for any type that conforms to Equatable.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.

==(_:_:)​

static func == (self: TransactionEffectsV1, other: TransactionEffectsV1) -> Bool

Returns a Boolean value indicating whether two values are equal.

Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

  • Parameters:
    • lhs: A value to compare.
    • rhs: Another value to compare.