Getting Started

Installing Juvix

Please see the README.

Writing your first smart contract

Copy the following to a file named identity.ju:

open Prelude
open Prelude.Michelson

sig cons-pair : list operation -> int -> pair (list operation) int
let cons-pair = %Michelson.pair

sig nil : list operation
let nil = %Michelson.nil

sig car : pair int int -> int
let car =

sig main : pair int int -> pair (list operation) int
let main = \params ->
  cons-pair nil (car params)

Then run:

juvix compile identity.ju

Open to inspect your compiled contract; it should look like:

parameter int;
storage int;
code { { DIG 0;
         DUG 1;
         NIL operation;
         DIP { DROP } } };

Deploying the contract to Tezos

The .tz Michelson output of Juvix can be deployed using standard procedures outlined in the Tezos documentation. Direct integration with the Juvix toolchain is coming soon.