What is a smart contract?
Smart contracts on Cardano are simple programs often referred to as validator scripts in which users define custom logic. They are automatically executed by each Cardano node validating the transaction when the transaction attempts to move funds from the script's address. The address of each script is derived from the hash-sum of the compiled script.
Once deployed, smart contracts become immutable, which means they cannot be changed. They are distributable and tamper-proof, fast, and cost-effective, as there is no intermediary, which saves both money and time.
Tooling and languages
Cardano introduced smart contract support in 2021. As a multi-functional environment, Cardano now supports the development and deployment of smart contracts using such programming languages as:
- Plutus — a purpose-built smart contract development and execution platform. Plutus contracts consist of parts that run on the blockchain (on-chain code) and parts that run on a user’s machine (off-chain or client code). Plutus draws from modern language research to provide a safe, full-stack programming environment based on Haskell, the leading functional programming language.
- Aiken - a language and toolchain favoring developer experience. Aiken is used for on-chain validator scripts only.
- OpShin - a programming language based on Python for generic smart contracts for Cardano.
- plu-ts - TypeScript-embedded smart contract programming language and a transaction creation library.