core / ContractState

ContractState

interface ContractState

A contract state (or just "state") contains opaque data used by a contract program. It can be thought of as a disk file that the program can use to persist data across transactions. States are immutable: once created they are never updated, instead, any changes must generate a new successor state.



Properties

contract abstract val contract: Contract

Contract by which the state belongs

Extension Functions

hash fun ContractState.hash(): SecureHash

Returns the SHA-256 hash of the serialised contents of this state (not cached)

Inheritors

LinearState interface LinearState : ContractState

A state that evolves by superseding itself, all of which share the common "thread"

OwnableState interface OwnableState : ContractState
State data class State : ContractState
State class State : ContractState