Compile contract CLI
Overview
This guide provides instructions how to compile a value contract using the command line interface (CLI).
Pre-requirements
- You have the source of the contract saved in a local folder, e.g.
./tutorials/inrcrud/
For details on how to create your first contract follow the inrcrud contract tutorial.
Procedure
Follow the following steps to compile your contract.
Navigate to the inrcrud folder in examples
./tutorials/inrcrud
. You should see theinrcrud.cpp
file.Run the following commands:
inery-cpp inrcrud.cpp -o inrcrud.wasm
Where:
inery-cpp
= Is theinery-cpp
tool.inrcrud.cpp
= Is the input cpp source file to be compiled.-o inrcrud.wasm
= It instructs theinery-cpp
tool who to name the output wasm file.- ABI file will be automaticaly generated if the name of the contrat class and name of cpp file are the same, like in this example
Verify the following two files were generated:
- the compiled binary wasm:
inrcrud.wasm
, - and the generated ABI file:
inrcrud.abi
.
Summary
In conclusion, the above instructions show how to compile a value contract using the command line interface (CLI).