|new 0.7.0||Oct 13, 2020|
|0.6.2||Aug 17, 2020|
|0.6.1||May 12, 2020|
|0.6.0||Mar 26, 2020|
|0.1.1||Apr 24, 2019|
#21 in Build Utils
227 downloads per month
Cargo plugin for
A CLI tool for helping setting up and managing WebAssembly smart contracts written with ink!.
rustup component add rust-src
- wasm-opt: https://github.com/WebAssembly/binaryen#tools
Install latest version from crates.io
cargo install cargo-contract
cargo-contract 0.7.0 Utilities to develop Wasm smart contracts. USAGE: cargo contract <SUBCOMMAND> OPTIONS: -h, --help Prints help information -V, --version Prints version information SUBCOMMANDS: new Setup and create a new smart contract project build Compiles the smart contract generate-metadata Generate contract metadata artifacts test Test the smart contract off-chain deploy Upload the smart contract code to the chain instantiate Instantiate a deployed smart contract help Prints this message or the help of the given subcommand(s)
cargo contract build must be run using the
nightly toolchain. If you have
rustup installed, the simplest way to do so is
cargo +nightly contract build.
To avoid having to add
+nightly you can also create a
rust-toolchain file in your local directory containing
nightly. Read more about how to specify the rustup toolchain.
The latest version of
cargo-contract supports all nightlies after
2020-07-30, because of a change in the directory
structure of the
instantiate subcommands are disabled by default, since they are not fully stable yet and increase the build time.
If you want to try them, you need to enable the
cargo install --git https://github.com/paritytech/cargo-contract cargo-contract --features extrinsics --force
Once they are stable and the compilation time is acceptable, we will consider removing the