Fetch Network
Jenesis
Working with contracts
How to compile contracts
JenesisSmartContractsBlockchainCompileContractsTutorial

How to compile contracts

You can compile your contracts by running the following command inside your project's directory:

jenesis compile [--optimize] [--rebuild] [--no-log]

This will compile all packages in your project's contracts directory and output the wasm code under the artifacts directory.

If you are using a cargo workspace, jenesis will automatically detect this and the compiled contracts will appear in the contracts/artifacts/. Otherwise, they will go to the artifacts directory under the individual contracts.

The contracts are simply compiled and not optimized by default. For an optimized build, use the flag --optimize or -o.

In case you need to force a rebuild, use the flag --rebuild or -r. To suppress contract compilation logs, use the flag --no-log.

In case of compilation failure, the logs will show by default.

ℹī¸

jenesis compile requires that docker to be running and configured with permissions for your user.

Was this page helpful?