A friendly Smart Contract Language for Tezos
Smart contracts were never so easy
- PascaLIGO
- CameLIGO
- ReasonLIGO
type storage is inttype parameter isIncrement of int| Decrement of int| Resettype return is list (operation) * storage// Two entrypointsfunction add (const store : storage; const delta : int) : storage isstore + deltafunction sub (const store : storage; const delta : int) : storage isstore - delta(* Main access point that dispatches to the entrypoints according tothe smart contract parameter. *)function main (const action : parameter; const store : storage) : return is((nil : list (operation)), // No operationscase action ofIncrement (n) -> add (store, n)| Decrement (n) -> sub (store, n)| Reset -> 0end)
type storage = inttype parameter =Increment of int| Decrement of int| Resettype return = operation list * storage// Two entrypointslet add (store, delta : storage * int) : storage = store + deltalet sub (store, delta : storage * int) : storage = store - delta(* Main access point that dispatches to the entrypoints according tothe smart contract parameter. *)let main (action, store : parameter * storage) : return =([] : operation list), // No operations(match action withIncrement (n) -> add (store, n)| Decrement (n) -> sub (store, n)| Reset -> 0)
type storage = int;type parameter =Increment (int)| Decrement (int)| Reset;type return = (list (operation), storage);(* Two entrypoints *)let add = ((store, delta) : (storage, int)) : storage => store + delta;let sub = ((store, delta) : (storage, int)) : storage => store - delta;(* Main access point that dispatches to the entrypoints according tothe smart contract parameter. *)let main = ((action, store) : (parameter, storage)) : return => {(([] : list (operation)), // No operations(switch (action) {| Increment (n) => add ((store, n))| Decrement (n) => sub ((store, n))| Reset => 0}))};
Strong, Static Type System
Write types, then code. Benefit from the safety of type systems.
Polyglot
Code in your language. Write PascaLIGO, CameLIGO, ReasonLIGO or add your own syntax.
Easy Integration
You can use LIGO as a Node.js library with Truffle.