Skip to main content
Version: Next

michelson

module contract

let run: <a, b>(_: (_: a) => b) => (_: a) => michelson_program

Run a function on an input, all in Michelson. More concretely: a) compiles the function argument to Michelson `f_mich`; b) compiles the value argument (which was evaluated already) to Michelson `v_mich`; c) runs the Michelson interpreter on the code `f_mich` with starting stack `[v_mich]`.

let eval: <a>(_: a) => michelson_program

Compile a LIGO value to Michelson. Currently it is a renaming of `compile_value`.

let decompile: <a>(_: michelson_program) => a

Decompile a Michelson value to LIGO, following the (mandatory) type annotation. Note: This operation can fail at run-time, in case that the `michelson_program` given cannot be decompiled to something compatible with the annotated type.

let parse: (_: string) => michelson_program

Parses Michelson (as string) into a `michelson_program`.