| Crates.io | cargo-eosiocontract |
| lib.rs | cargo-eosiocontract |
| version | 0.17.0 |
| created_at | 2022-06-25 11:05:02.673854+00 |
| updated_at | 2022-06-25 11:05:02.673854+00 |
| description | Setup and deployment tool for developing eosio smart contracts |
| homepage | https://www.parity.io/ |
| repository | https://github.com/paritytech/cargo-contract |
| max_upload_size | |
| id | 612968 |
| size | 324,652 |
cargo-eosiocontractis a CLI tool which helps you develop EOS smart contracts.
Step 1: rustup component add rust-src.
Step 2: Install binaryen in a version >= 99:
apt-get install binaryenbrew install binaryenpacman -S binaryenThere's only an old version in your distributions package manager? Just use a binary release.
Step 3: cargo install --force cargo-eosiocontract.
You can always use cargo eosiocontract help to print information on available
commands and their usage.
For each command there is also a --help flag with info on additional parameters,
e.g. cargo eosiocontract new --help.
cargo eosiocontract new my_contractCreates an initial smart contract with some scaffolding code into a new
folder my_contract .
The contract contains the source code for the Flipper
contract, which is about the simplest "smart" contract you can build ‒ a bool which gets flipped
from true to false through the flip() function.
cargo +nightly contract buildCompiles the contract into optimized WebAssembly bytecode, generates metadata for it,
and bundles both together in a <name>.contract file, which you can use for
deploying the contract on-chain.
cargo eosiocontract 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 always add +nightly you can also set nightly as the default
toolchain of a directory by executing rustup override set nightly in it.
cargo eosiocontract checkChecks that the code builds as WebAssembly. This command does not output any <name>.contract
artifact to the target/ directory.
The entire code within this repository is licensed under the GPLv3.