Rootstock Development 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.
-
Participating in a Rootstock Hackathon or Workshop?
-
Visit the Hackathon Resources section for details.
-
Resources:
- Explore the Developer Tools section for a full list of tools and resources.
Software Requirements:
Set up the necessary software for a seamless development experience:
-
Solidity Version:
- Supported compiler version:
solc 0.8.19
. - Use compatible versions to avoid deployment errors.
- Supported compiler version:
-
Node RPC Access:
- Interact with Rootstock using its RPC API.
- Get an API Key and configure it in your applications.
-
Hardhat:
-
Install Hardhat to streamline contract development and testing:
npm install --save-dev hardhat
RecommendedFor added convenience, install shorthand globally
- 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 (Optional):
- Install Foundry as an alternative to Hardhat for building, deploying, and testing contracts:
curl -L https://foundry.paradigm.xyz | bash
- Run
foundryup
to install tools likeforge
,cast
,chisel
andanvil
.
- Install Foundry as an alternative to Hardhat for building, deploying, and testing contracts:
Wallet Configuration:
Set up your wallet to connect with Rootstock networks:
-
MetaMask Integration:
- Configure MetaMask with the necessary values to connect to the Rootstock Mainnet or Testnet.
- Refer to the MetaMask Wallet Configuration guide for detailed steps.
-
Derivation Paths:
- Use these paths for BIP-44-compatible wallets:
- Mainnet:
m/44'/137'/0'/0/N
- Testnet:
m/44'/37310'/0'/0/N
- Mainnet:
- Use these paths for BIP-44-compatible wallets:
See the Account-Based Addresses section for guidance on address verification.
See Account based addresses section for more information or how to verify address ownership.
Contract Addresses
Understand and reference key contract addresses for development:
- Access the full list of Rootstock Contract Addresses.
Development Environments:
Choose one of the following environments to build and deploy your contracts:
-
Hardhat:
- A popular framework for managing smart contract development and testing.
- Use the Hardhat Starter Kit to jumpstart your project.
-
Foundry:
-
A lightweight, fast alternative to Hardhat.
-
Install and manage using
foundryup
.
-
Command Line Tools
Boost productivity with these CLI 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.
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