For the complete documentation index, see llms.txt. This page is also available as Markdown.

Build

Before we compile your smart contract, make sure to take a look at what an ink! contract consists of in the documentation.

To build your ink! smart contract, make sure you are inside your ink! smart contract directory and run the following command:

pop build

or

pop build --release

Build options

Most common flags:

Flag
Description

PATH / --path <path>

Project directory (defaults to the current directory).

-r, --release

Build in release mode. Conflicts with --profile.

`--profile <debug

release

--features <list>

Comma-separated feature list.

--metadata <spec>

Choose the contract metadata spec (run pop build --help for supported values).

--verifiable

Build a verifiable contract (deterministic release build). Conflicts with --release and --profile.

--image <image>

Use a custom image for verifiable builds (requires --verifiable).

JSON output

Use global --json for structured output in scripts:

pop --json build --path ./my_contract --profile release

[!NOTE] Verifiable builds require Docker to be running.

Need help?

Ask on Polkadot Stack Exchange (tag it pop) or drop by our Telegram. We're here to help!

Last updated