How to Setup Your Development Environment to Create Smart Contracts with Rust on Elrond Blockchain Network

Henry Ton
4 min readNov 30, 2021

💝💝💝 Please Follow us on Twitter for our NFT Drop 💝💝💝

Elrond blockchain network

One way to developing on Smart Contracts on the Elrond Devnet Network is by using the following:

  1. Python 3 Environment
  2. erdpy : Command Line Interface (CLI) Tool and Python SDK for interacting with the Smart Contracts on the Blockchain.
  3. Rust Programming Language : the language used to develop the Smart Contracts.
  4. Visual Studio Code (VSCode) : Integrated Development Environment (IDE) and install 2 extensions: Elrond IDE & Rust.

1. Setup Python 3 Environment

Python 3 environment is a prerequisities for erdpy to run (since it uses the Python sdk)

Python SDK— erdpy prerequisities requirements
Figure 1: Python SDK — erdpy prerequisities requirements

Check if you have python 3 by running the following command in the CLI:

elrond — check if python is installed

If not, here is how to:

  1. Install it on a Mac: https://docs.python-guide.org/starting/install3/osx/
  2. Install it on Linus: https://docs.python-guide.org/starting/install3/linux/

2. Setup erdpy

erdpy is supported on Linux and MacOS, and may work on Windows, but not recommended.

2.1. Install erdpy using the following CLI command:

wget -O erdpy-up.py https://raw.githubusercontent.com/ElrondNetwork/elrond-sdk-erdpy/master/erdpy-up.py

2.2. Configure erdpy using the following CLI command (execute each command in that order individually):

For more info, here is the Elrond install erdpy URL: https://docs.elrond.com/sdk-and-tools/erdpy/installing-erdpy/

3. Setup Rust Programming Language

Rust Programming Language for Elrond

Rust is the language that a lot of the Smart Contract examples are written by the Elrond team. So we choose it for the language of choice to use.

Here is how to install it in the CLI (execute each command in that order individually):

For more info, here is the Rust install URL:
https://www.rust-lang.org/tools/install

4. Setup Visual Source Code (VSCode)

VisualStudioCode (VSCode) for Elrond

VSCode is the Integrated Development Environment (IDE) that you will use to write, compile, deploy, and test Smart Contracts.

Here is how to install it: https://code.visualstudio.com

Once VSCode is installed on your machine, there are 2 IDE Extension that you would need:
4.1. Elrond IDE Extension
4.2. Rust Extension

4.1. Install Elrond IDE Extension

Elrond IDE is an extension for Visual Studio Code that offers development support for Elrond Smart Contracts.

Here is how to install it:

  1. Open up VSCode
  2. Go to the Extension Tab ( (Tab with 4 cubes and the upper right cube is detached)

3. In the “Search Extensions in Marketplace” search bar, enter in “Elrond IDE”

4. Select the “Elrond IDE” and Click the “Install” button.

4.2. Install Rust Programming Language

  1. Open up VSCode
  2. Go to the Extension Tab (Tab with 4 cubes and the upper right cube is detached)

3. In the “Search Extensions in Marketplace” search bar, enter in “Rust”

4. Select the “Rust” and Click the “Install” button.

The Elrond Network Smart Contract Learning Series

This is a whole series that we are creating to show how to setup your development environment to creating, deploying, and interact with the smart contracts. Please comment if you have any questions.

Here are the other articles in this series:

  1. How to Setup Your Development Environment to Create Smart Contracts with Rust on Elrond Blockchain Network
  2. How to Create a Crypto Wallet & Generating a PEM File on the Elrond Devnet Network
  3. The Basic “Hello World” Smart Contract using Rust Programming Language — Compile, Deploy, and Interact with Contract on the Elrond Network Blockchain

--

--