# Environment Setup
As a smart contract developer, you will need to write, compile, upload, and test your contracts before deploying them to be used on the Columbus mainnet. As this development process can involve manually juggling multiple moving parts over many iterations, it is helpful to first set up a specialized environment to streamline development.
# Install Terra Core locally
Follow the instructions here to install the latest version of Terra Core to obtain a working version of
terracli. You will need this to connect to your local Terra test network, for working with smart contracts.
# Download localterra
In order to work with Terra Smart Contracts, you should have access to a Terra network that includes the WASM integration.
In this tutorial, we will be using localterra, a package that enables you to easily spin up a local, WASM-enabled private testnet. This reduces the friction of development by giving you complete control of a private Terra blockchain with the possibility to easily reset the world state.
git clone https://github.com/terra-project/localterra cd localterra docker build -t terracore localterra-terracore docker-compose up
You should now have a local testnet running on your machine, with the following configurations:
- Node listening on RPC port
- LCD running on port
- Swagger Documentation at http://localhost:1317/swagger-ui/
The account with the following mnemonic is the sole validator on the network and has enough funds to get started with smart contracts.
satisfy adjust timber high purchase tuition stool faith fine install that you unaware feed domain license impose boss human eager hat rent enjoy dawn
# Install Rust
While WASM smart contracts can theoretically be written in any programming language, we currently only recommend using 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
cargo-generate, which we will need for bootstrapping new CosmWasm smart contracts via a template.
cargo install cargo-generate --features vendored-openssl