Recording on Youtube:

Dial in Information is at: https://casperlabs.atlassian.net/wiki/spaces/REL/pages/136544674/Weekly%2BWorkshops%2BHome

Participants

During this workshop, we will show users how to use the CasperLabs contracts crate to set up a new smart contract project, and how to leverage the test infrastructure.

Goals

Step by Step Plan

These instructions are also available on GitHub at: https://github.com/CasperLabs/CasperLabs/tree/dev/execution-engine/cargo-casperlabs

  1. Install the SDK

cargo install cargo-casperlabs --force

2. Create your project & name it as you wish.

cargo casperlabs my_project

3. Set up your build environment

cd my_project/contract
rustup install $(cat rust-toolchain)
rustup target add --toolchain=$(cat rust-toolchain) wasm32-unknown-unknown

4. Now let’s build the empty project

cargo build --release

Your contract will be built to:  my_project/contract/target/wasm32-unknown-unknown/release/contract.wasm.

5. Next we can run the test that comes with the SDK. This framework will run the contract within the execution engine with the tests.

cd my_project/tests
cargo test

6. Next we can open the project inside an IDE and observe the structure of the empty contract.

Software Version (GitHash)

CasperLabs Client 0.14.0 (2b8ccb3ac758484e44ff236be381b2d947c9c099)

What you need to know:

Notes:

Outcome:

Help!

Go to Discord- we will help you there: https://discord.gg/mpZ9AYD

Decisions