Skip to main content
Version: 1.7.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] =>
[[], "Hello"];
  • CameLIGO is designed for developers with a background in functional programming, in particular OCaml. 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'.

The LIGO compiler generates optimised 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 cannot 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, and LIGO uses 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:

Dig deeper

In the end, maybe you will want to: