cargo build --all
cargo +nightly fmt
cargo clippy --all --all-targets --release
TEST_CONFIG=test_config_example.json cargo test --all
cargo contract new [contract name]
To build a contract, execute this command with the path of Cargo.toml
in the contract folder to build.
Build simple_counter
with the cargo command and then upload and instantiate .contract
file in target/ink/your_contract/
on Polkadot js Apps
cargo +nightly contract build --manifest-path ./simple_counter/Cargo.toml
To test specific contract, execute cargo +nightly contract test
with --manifest-path
with the path of Cargo.toml
.
e.g. Test simple_counter
with this command.
cargo +nightly contract test --manifest-path ./simple_counter/Cargo.toml