The state of a Marlowe Contract is stored in the blockchain and contains the information required to move the contract forward via computeTransaction

See

Section 2.1.8 and appendix E.14 of the Marlowe spec

Hierarchy

  • MarloweState

Properties

accounts: Accounts

The Marlowe model allows for a contract to store assets. All participants of the contract implicitly own an account identified with an AccountId.

All assets stored in the contract must be in an internal account for one of the parties; this way, when the contract is closed, all remaining assets can be redeemed by their respective owners. These accounts are local: they only exist (and are accessible) within the contract.

boundValues: AssocMap<string, bigint>

This is a Map of the values that were bound to the contract using the Let construct.

choices: AssocMap<ChoiceId, bigint>

This is a Map of the choices that were made by the participants of the contract using the Choice action.

minTime: bigint

Transactions have a validity time interval (startTime, endTime) which gives us a proxy for real time. It is up to the blockchain implementation to make sure that startTime <= now <= endTime. The variable minTime is the biggest known startTime. That allow us to trim a time interval and ensure that startTime does not decrease between transactions.