Yolc

A safe, expressive, fun language for Ethereum

mint :: OmniFn (ADDR -> U256 -> ())
mint = $lfn $ ylvm'pv
  \to amount -> LVM.do
    Ur balanceBefore <- ycall balanceOf (ver to)
    Ur newAmount <- ywithrv_1 (balanceBefore, ver amount)
                    (\x y -> x + y)
    -- ⚠️ NOTE: DATA VERSIONING AT COMPILE-TIME:
    -- update balance must happen before external calls.
    balances #-> to <<:= newAmount
    -- call **untrusted** external contract onTokenMinted
    ycall (to @-> onTokenMinted) (ver to) (ver amount)

Safe

Yolc is purely functional with compile-time data versioning made for the Ethereum virtual machine.

What does data versioning mean here?

Expressive

Yolc embeds itself in the Haskell language before being compiled into Solidity/Yul code.

What does embedding mean here to expressiveness?

Fun

Yolc allows you to write safe code in production, a joyful experience for super coders.

How can I get started?