Prerequisites
This guide provides clear instructions for developers on the supported Solidity versions and the necessary configurations needed to ensure your smart contracts are deployed on the Rootstock network. See the developer tools section for a list of tools to build on Rootstock.
Participating in a Rootstock hackathon or Workshop? View the Hackathon Resources section.
Solidity Version
- Supported solc version:
0.8.19
Node RPC
- Interact with Rootstock using the RPC API
See how to setup the RPC API and get an API Key.
Connecting to a Wallet
Fill these values to connect to the Rootstock Mainnet or Testnet in MetaMask.
Contract Addresses
- See the List of Contract Addresses on Rootstock
Derivation path
When using BIP-44-compatible wallet software, you will need to specify a derivation path.
Mainnet: m/44'/137'/0'/0/N
Testnet: m/44'/37310'/0'/0/N
See Account based addresses section for more information or how to verify address ownership.
Install Hardhat
npm install --save-dev hardhat
- Install
hh
autocomplete to usehh
shorthand globally.
npm i -g hardhat-shorthand
-
Use the Hardhat Starter Kit
-
Learn how to write, interact, deploy, and test smart contracts on Rootstock using Hardhat or Foundry.
Install Foundry
You don't need to use both development environments (Hardhat and Foundry) together, you can use your favorite one.
To install Foundry in your system, run the following command:
curl -L https://foundry.paradigm.xyz | bash
This will install Foundryup. Simply follow the on-screen instructions, and the foundryup
command will become available in your CLI.
Running foundryup
will automatically install the latest (nightly) versions of the precompiled binaries
: forge
, cast
, anvil
, and chisel
. For additional options, such as installing a specific version or commit, run foundryup --help
.
Command Line Tools
POSIX Compliant Shell
- Windows
- MacOS/Linux
Standard terminals like cmd
or PowerShell may not support some commands. We recommended installing Git for Windows for Git Bash, which provides a more UNIX-like experience. Here's a tutorial on Git Bash.
Standard terminal.
Installing Node.js and NPM
- NVM
- Windows
- MacOS
- Linux
- Node v18 or later.
- For installation, use NVM install script.
- Download the Node.js Installer from Node.js Downloads.
- Run the installer and follow the on-screen instructions.
- Open Command Prompt or PowerShell and check versions with
node -v
andnpm -v
.- See Posix Compliant Shell.
- Install Homebrew (if not installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)
- Install Node.js and npm with
brew install node
- Check versions in Terminal with
node -v
andnpm -v
- Open a terminal.
- Update package manager with sudo apt update
- Install Node.js and npm with sudo apt install nodejs npm
- Check versions in the terminal with
node -v
andnpm -v