Root of amount of coins owned by contract after transaction execution.
stateRoot
byte[32]
State root of contract after transaction execution.
Transaction is invalid if:
inputIndex >= tx.inputsCount
tx.inputs[inputIndex].type != InputType.Contract
Icon InfoCircle
Note: when signing a transaction, balanceRoot and stateRoot are set to zero.
Note: when verifying a predicate, balanceRoot and stateRoot are initialized to zero.
Note: when executing a script, balanceRoot and stateRoot are initialized to the balance root and state root of the contract with ID tx.inputs[inputIndex].contractID.
The balance root balanceRoot is the root of the SMT of balance leaves. Each balance is a uint64, keyed by asset ID (a byte[32]).
The state root stateRoot is the root of the SMT of storage slots. Each storage slot is a byte[32], keyed by a byte[32].
any other output has type OutputType.OutputChange and asset ID asset_id (i.e. only one change output per asset ID is allowed)
Icon InfoCircle
Note: when signing a transaction, amount is set to zero.
Note: when verifying a predicate or executing a script, amount is initialized to zero.
This output type indicates that the output's amount may vary based on transaction execution, but is otherwise identical to a Coin output. An amount of zero after transaction execution indicates that the output is unspendable and can be pruned from the UTXO set.
Note: when signing a transaction, to, amount, and asset_id are set to zero.
Note: when verifying a predicate or executing a script, to, amount, and asset_id are initialized to zero.
This output type indicates that the output's amount and owner may vary based on transaction execution, but is otherwise identical to a Coin output. An amount of zero after transaction execution indicates that the output is unspendable and can be pruned from the UTXO set.