CasperLabs Smart Contract Examples
Each subdirectory contains an example of a smart contract definition and a companion contract that calls it.
rustup, run the following commands from the root of this repo:
rustup toolchain install $(cat rust-toolchain) rustup target add --toolchain $(cat rust-toolchain) wasm32-unknown-unknown
To build all the contracts:
cargo build --release
To build a specific contract and its companion:
cargo build --release -p hello-define cargo build --release -p hello-call
After building a contract, you will find the corresponding wasm file in
--release flag is currently necessary in order to build optimized wasm files that can be deployed from a CasperLabs Node.
To deploy a compiled contract to a CasperLabs node, please see the CasperLabs Developer Documentation.