Skip to content

ErgoScript#

ErgoScript is a super-simple subset of Scala. It is a top-level language translated into a low-level language called ErgoTree, which is translated during execution into cryptographic protocol. That's how Ergo supports ring and threshold signatures and much more crypto protocols with no special cases made in the core!

ErgoScript is built considering Bitcoin’s security and privacy to make all kinds of complex financial contracts accessible. In comparison, Bitcoin’s design doesn’t allow loops or building any complex smart contracts on top of it. ErgoScript allows for self-replication; therefore, we can use it to create Turing-Complete processes in a blockchain.

Sigma Protocols

Ergo's support for sigma-protocols (aka generalized Schnorr proofs) are truly unique as building blocks for composable statements. Schnorr protocols and proof-of-Diffie-Hellman-tuples are supported by default, with more options available that the community can add via soft forks.

Simple Example#

if (HEIGHT < 100000) alicePubKey else bobPubKey
  1. Allows Only Alice to spend a box before a certain height
  2. Allows Only Bob to spend the box after that.

Getting Started

Please see this Quick Primer on ErgoScript for an overview of key concepts and some basic examples.

Resources#

Playgrounds#

Courses#
Tutorials#
Advanced Tutorials#
Explanations#
References#
Examples#
Visual#
Box#

Here is a box to experiment with

This address will create an output at this box.