Skip to main content
Version: 1.2.0

Introduction to LIGO

Ligo, a SmartContract Language built for Tezos

LIGO is a programming language for writing smart contracts, compiling in Michelson and deployable on Tezos blockchain.

Our hope is to have a simple, strongly typed language with a low footprint. Most useful smart contracts can express their core functionality in under a thousand lines of code.

Ligo, for newcomers or confirmed developpers

Even if LIGO currently offers two syntaxes, you'll need to choose only one :

  • JsLIGO, ideal for web developers, is a TypeScript/JavaScript inspired syntax without unnecessary complexity, which is not helpful in smart contract development. A quick way to produce your first dApp!
type storage = string;
@entry
const store_hello = (delta: int, store: storage): [list<operation>, storage] =>
[list([]), "Hello"];
  • CameLIGO, is designed for functional developers like tezos core devs. An OCaml-inspired syntax allows you to write in a functional style.
type storage = string
[@entry]
let store_hello (delta : int) (store : storage) : operation list * storage = [], "Hello"

A significant advantage of the multi-syntax feature is to share knowledge, toolings, and modules (like libraries onto registry) in a larger community.

Ligo, designed to be cost-effective

Unlike desktop, mobile, or web application development, smart contracts cannot rely on cheap CPU time and memory. All resources contracts use are expensive and tracked as 'gas costs'.

Ligo compiler will generate optimized Michelson code, which will be cost-effective on tezos.

Ligo, designed for your security

Tezos smart contract live on the blockchain forever if a bug exists, they can't be patched or amended. Smart contracts often directly control money or assets, which if stolen, could be a large financial loss to the contracts and their users.

Ligo will bring people to web3 and by design reduce the risk that your smart contract will lose its balance to an avoidable exploit.

But compiler design is insufficient, ligo use static analysis to encourage people to write simple code, avoid anti-patterns, and use the robust test framework which can simulate tezos blockchain and offer mutation tests

For critical code, LIGO also keeps its compiled output unbloated making possible to formally verify the compiled output using a project like Mi-Cho-Coq.

A set of tools already available


Where to start

Do you want to try Ligo ?

For a quick overview, get-started is a good choice. Webide can be used to avoid installation onto your laptop.

Do you want to learn Ligo ?

Your choice to learn Ligo is already available :

Do you want to build a production-ready project ?

You will need a deeper comprehension :

Go deeper

In the end, maybe you will want to :

Consult Advanced topics section.