Skip to main content

Argument

open class Argument : Disposable, AutoCloseable, ArgumentInterface

An argument to a programmable transaction command

BCS

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

argument    =  argument-gas
=/ argument-input
=/ argument-result
=/ argument-nested-result

argument-gas = %d00
argument-input = %d01 u16
argument-result = %d02 u16
argument-nested-result = %d03 u16 u16

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
equalsopen operator override fun equals(other: Any?): Boolean
getNestedResultopen override fun getNestedResult(ix: UShort): Argument?
Get the nested result for this result at the given index. Returns None if this is not a Result.
toStringopen override fun toString(): String

Companion object functions

NameSummary
newGasfun newGas(): Argument
The gas coin. The gas coin can only be used by-ref, except for with TransferObjects, which can use it by-value.
newInputfun newInput(input: UShort): Argument
One of the input objects or primitive values (from ProgrammableTransaction inputs)
newNestedResultfun newNestedResult(commandIndex: UShort, subresultIndex: UShort): Argument
Like a Result but it accesses a nested result. Currently, the only usage of this is to access a value from a Move call with multiple return values.
newResultfun newResult(result: UShort): Argument
The result of another command (from ProgrammableTransaction commands)