メインコンテンツまでスキップ

Validator

The on-chain script that decides whether a transaction may spend a UTXO, mint a token or perform another scripted action. On Cardano, a smart contract is a validator.

On Cardano's EUTXO model, smart contract logic lives in validators. A validator is a pure function that receives the datum stored with the output, the redeemer supplied by the spending transaction and the full transaction context, and answers true or false. If any validator in a transaction says no, the whole transaction is rejected and only the collateral is charged.

The same mechanism covers more than spending. A validator can guard minting and burning under a policy ID, stake certificates, reward withdrawals and, since Plutus V3, governance votes and proposals. Which purpose applies is part of the context the script sees.

Developers write validators in Plinth or Aiken, which compile to Plutus Core for execution. The hash of the compiled script becomes the script address or policy ID, so funds sent there can only move when the validator agrees. Simpler conditions such as multi-signature or time locks can also be expressed as native scripts, which need no Plutus at all.

Explore next