Liquidity is a high-level language to program Smart Contracts for Tezos. It is a fully typed functional language, it uses the syntax of OCaml, and strictly complies with Michelson security restrictions.
A formal-method framework for Liquidity is under development, to prove the correctness of smart-contracts written in Liquidity.
The Liquidity language provides the following features:
Liquidity already covers 100% of the Michelson features, and contracts generated with Liquidity can be submitted on the current mainnet and zeronet.
Liquidity editors will soon be available to program online and submit contracts on Tezos testnet. For now, you can use our Try Liquidity Site to get a taste of the upcoming environment.
A typical example is:
[%%version 0.4] type storage = (string, int) map let%init initial_votes (myname : string) = Map.add myname 0 (Map ["ocaml", 0; "pro", 0]) let%entry main (choice : string) votes = let amount = Current.amount() in if amount < 5.00tz then Current.failwith "Not enough money, at least 5tz to vote" else match Map.find choice votes with | None -> Current.failwith "Bad vote" | Some x -> let votes = Map.add choice (x+1) votes in ( ( : operation list), votes )
The current roadmap is: