Skip to main content

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.

  1. Navigate to the inrcrud folder in examples ./tutorials/inrcrud. You should see the inrcrud.cpp file.

  2. Run the following commands:

    inery-cpp inrcrud.cpp -o inrcrud.wasm 

    Where:

    • inery-cpp = Is the inery-cpp tool.
    • inrcrud.cpp = Is the input cpp source file to be compiled.
    • -o inrcrud.wasm = It instructs the inery-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
  3. 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).