Version: 0.41.0
CLI Commands
Contracts written in LIGO can be compiled using the ligo
executable.
#
Compiling a contractCompile your contract with a specific entry point.
ligo compile contract SOURCE_FILE --entry-point ENTRY_POINT
#
Exampleligo compile contract examples/counter.ligo --entry-point main
#
Defining the initial storageIf your contract implements a sophisticated storage, you can compile a LIGO expression into a Michelson value quite easily.
ligo compile storage SOURCE_FILE EXPRESSION --entry-point ENTRY_POINT
#
Exampleligo compile storage examples/counter.ligo 5 --entry-point main
# Outputs: 5
#
Invoking the contract with a parameterligo compile parameter SOURCE_FILE EXPRESSION --entry-point ENTRY_POINT
#
Exampleligo compile parameter examples/counter.ligo "Increment(5)" --entry-point main
# Outputs: (Right 5)