Environment Setup

As a smart contract developer, you will need to write, compile, upload, and test your contracts before deploying them on the Dimension mainnet. The first step is to set up a specialized environment to streamline development.

Install XPLA Chain Core Locally

Visit build XPLA Chain core to install the latest version of XPLA Chain Core to obtain a working version of xplad. You will need this to connect to your local XPLA Chain test network to work with smart contracts.

Install Rust

While WASM smart contracts can theoretically be written in any programming language, it is currently only recommended to use Rust as it is the only language for which mature libraries and tooling exist for CosmWasm. For this tutorial, you’ll need to also install the latest version of Rust by following the instructions here.

Once you’ll installed Rust and its toolchain (cargo et al.), you’ll need to add the wasm32-unknown-unknown compilation target.

rustup default stable
rustup target add wasm32-unknown-unknown

Next, install cargo-run-script, which is required to optimize smart contracts.

cargo install cargo-run-script