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, typically at a Plutus 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. Plutus V1 and V2 validators cannot spend an output without one, since Plutus V3 (CIP-69) the datum is optional. Native scripts never use datums. 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", unlockTime: 1767225600000 } (POSIX time in milliseconds) 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.