Smart Contract Language for the Future
ErgoScript is a powerful, secure smart contract language built on Sigma protocols and the extended UTXO model. Create complex financial contracts with built-in privacy, predictable fees, and mathematical guarantees.
Built for security, privacy, and developer productivity with cutting-edge cryptographic features
Built-in zero-knowledge proofs for privacy and complex multi-party contracts
Extended UTXO model with data and logic attached to boxes for enhanced security
Immutable data structures and functional paradigms for safer smart contracts
Native oracle support for real-world data integration without external dependencies
Complex contracts that evolve through multiple stages with different conditions
Know exact execution costs before deployment with deterministic fee calculation
Explore ErgoScript through practical examples and interactive tutorials
{
// Simple payment to a public key
val recipientPK = PK("9f4QF8AD1nQ3nJahQVkMj8hFSVVzVom77b52JU7EW71Zexg6N8v")
// Check that the output goes to the recipient
val validRecipient = OUTPUTS(0).propositionBytes == recipientPK.propBytes
// Check minimum amount
val validAmount = OUTPUTS(0).value >= 1000000L // 0.001 ERG
sigmaProp(validRecipient && validAmount)
}This basic contract ensures that funds can only be spent to a specific recipient with a minimum amount.
Step-by-step guides to master ErgoScript development