com.r3corda.core.contracts / 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
notary | `abstract val notary: Party` Identity of the notary that ensures this state is not used as an input to a transaction more than once

### Extension Functions

hash | `fun ContractState.hash(): SecureHash` Returns the SHA-256 hash of the serialised contents of this state (not cached)
label | `infix fun ContractState.label(label: String): LabeledOutput`

### Inheritors

LinearState | `interface LinearState : ContractState` A state that evolves by superseding itself, all of which share the common "thread"
OwnableState | `interface OwnableState : ContractState` A contract state that can have a single owner.
State | `class State : ContractState`