Datum.

Custom data attached to an eUTxO. Acts as the “state” of a smart contract output.

Think of it as

Memory attached to a box. The box knows what it is for; the validator can read that memory before deciding to unlock.

In depth

A Datum is arbitrary data stored alongside a UTxO at a script address. When the UTxO is consumed, the validator sees the Datum and uses it together with the Redeemer and Script Context to decide whether to permit the spend. Think of it as a note pinned to a banknote that says what it is for.

Example

A vesting UTxO’s Datum may be { beneficiary: "addr1...alice", unlockSlot: 90000000 } so the validator can later check whether Alice is claiming it after the unlock time.

Next on this path

  1. Redeemer Data supplied by the spender of an eUTxO. The “action” passed into the validator.
  2. Inline datum A datum stored directly inside the UTxO it belongs to, instead of as a hash that the spender has to resolve.