Skip to content

Step 2: Compile the Contract

Back to Quickstart

Overview

bash
./target/release/neo-solc MyStorage.sol -I devpack -O2 -o build/MyStorage

Flags explained:

FlagPurpose
MyStorage.solInput Solidity source file
-I devpackAdd the devpack/ directory as an import search path (provides Neo N3 library interfaces)
-O2Optimization level 2 (standard optimization: inlining, peephole, DCE, constant folding)
-o build/MyStorageOutput prefix -- generates build/MyStorage.nef and build/MyStorage.manifest.json

Verbose output (with -v) is diagnostic and may add or reorder lines between compiler releases. Current output reports the resolved inputs, selected optimization level, emitted artifacts, manifest processing, and any warnings:

bash
./target/release/neo-solc MyStorage.sol -I devpack -O2 -v -o build/MyStorage

You should end the command with both artifacts present:

bash
ls build/MyStorage.nef build/MyStorage.manifest.json

MIT Licensed