Version: Next
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]
#
Exampleligo compile-contract examples/counter.ligo 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 ENTRY_POINT EXPRESSION
#
Exampleligo compile-storage examples/counter.ligo main 5
# Outputs: 5
#
Invoking the contract with a parameterligo compile-parameter SOURCE_FILE ENTRY_POINT EXPRESSION
#
Exampleligo compile-parameter examples/counter.ligo main "Increment(5)"
# Outputs: (Right 5)