Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
I reorganized the preprequisite page to look much better and improve the readability of this page.
  • Loading branch information
wise4rmgodroot committed Nov 19, 2024
1 parent 00ff0dc commit 2cc2c3c
Showing 1 changed file with 97 additions and 69 deletions.
166 changes: 97 additions & 69 deletions docs/02-developers/02-requirements/index.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,128 @@
---
sidebar_label: Development Prerequisites
sidebar_label: Rootstock Development Prerequisites
sidebar_position: 2
title: Prerequisites
title: Rootstock Development Prerequisites
tags: [rsk, rootstock, prerequisites, setup, requirements]
description: "Minimum hardware requirements for Rootstock."
---

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](/dev-tools/) section for a list of tools to build on Rootstock.
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.

:::tip[Hackathon Info]

Participating in a Rootstock hackathon or Workshop? View the [Hackathon Resources](/resources/hackathon/) section.

:::tip[Hackathons & Workshops]

:::

## Solidity Version
- Supported solc version: `0.8.19`
- Participating in a Rootstock Hackathon or Workshop?
- Visit the [Hackathon Resources](/resources/hackathon/) section for details.

## Node RPC
- Interact with Rootstock using the [RPC API](https://rpc.rootstock.io/)
- **Resources:**
- Explore the [Developer Tools](/dev-tools/) section for a full list of tools and resources.

:::tip[Get an API Key]
See how to setup the RPC API and get an [API Key](/developers/rpc-api/rootstock/setup/).
:::

## Connecting to a Wallet

Fill these values to connect to the Rootstock Mainnet or Testnet in MetaMask.

- See [Configure MetaMask Wallet for Rootstock](/dev-tools/wallets/metamask/)

## Contract Addresses

* See the List of [Contract Addresses on Rootstock](/developers/smart-contracts/contract-addresses)

### Derivation path

When using [BIP-44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki "Multi-Account Hierarchy for Deterministic Wallets")-compatible
wallet software, you will need to specify a derivation path.

```text
Mainnet: m/44'/137'/0'/0/N
Testnet: m/44'/37310'/0'/0/N
```

<Steps>
<Step title="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.

- **Node RPC Access:**
- Interact with Rootstock using its RPC API.
- [Get an API Key](/developers/rpc-api/rootstock/setup/) and configure it in your applications.

- **Hardhat:**
- Install Hardhat to streamline contract development and testing:
```bash
npm install --save-dev hardhat
```
:::tip[Recommended]
For added convenience, install shorthand globally
- Install `hh` autocomplete to use `hh` shorthand globally.
```bash
npm i -g hardhat-shorthand
```

- Use the [Hardhat Starter Kit](/developers/quickstart/hardhat)

- Learn how to write, interact, deploy, and test smart contracts on Rootstock using [Hardhat](/developers/smart-contracts/hardhat) or [Foundry](/developers/smart-contracts/foundry/).

:::

- **Foundry (Optional):**
- Install Foundry as an alternative to Hardhat for building, deploying, and testing contracts:
```bash
curl -L https://foundry.paradigm.xyz | bash
```
- Run `foundryup` to install tools like `forge`, `cast`, and `anvil`.
</Step>

<Step title="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](#configure-metamask-wallet) 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`

*See the [Account-Based Addresses](#account-based-addresses) section for guidance on address verification.*
:::info[Info]
See [Account based addresses](/concepts/account-based-addresses/) section for more information or [how to verify address ownership](/developers/smart-contracts/verify-address-ownership/).
:::

## Install Hardhat
</Step>

```bash
npm install --save-dev hardhat
```
<Step title="Contract Addresses">

Understand and reference key contract addresses for development:
- Access the full list of **[Rootstock Contract Addresses](#contract-addresses)**.

:::tip[Recommended]
</Step>

- Install `hh` autocomplete to use `hh` shorthand globally.
```bash
npm i -g hardhat-shorthand
```
<Step title="Development Environments:">

Choose one of the following environments to build and deploy your contracts:

- Use the [Hardhat Starter Kit](/developers/quickstart/hardhat)
- **Hardhat:**
- A popular framework for managing smart contract development and testing.
- Use the [Hardhat Starter Kit](#hardhat-starter-kit) to jumpstart your project.

- Learn how to write, interact, deploy, and test smart contracts on Rootstock using [Hardhat](/developers/smart-contracts/hardhat) or [Foundry](/developers/smart-contracts/foundry/).
- **Foundry:**
- A lightweight, fast alternative to Hardhat.
- Install and manage using `foundryup`.

:::

## Install Foundry

:::note[Development Environments]
You don't need to use both development environments (Hardhat and Foundry) together, you can use your favorite one.
:::
Learn how to write, interact, deploy, and test smart contracts on Rootstock using [Hardhat](/developers/smart-contracts/hardhat) or [Foundry](/developers/smart-contracts/foundry/).

To install Foundry in your system, run the following command:
```bash
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```.

:::note[Windows Users]
If you’re using Windows, you’ll need to install and use [Git BASH](https://gitforwindows.org/) or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) as your terminal, since Foundryup currently doesn’t support Powershell or Command Prompt (Cmd).
💡 *You don’t need to use both (Hardhat and Foundry); pick the one that suits your workflow.*
:::
</Step>

<Step title="Command Line Tools">

## Command Line Tools
Boost productivity with these CLI tools:

### POSIX Compliant Shell
> POSIX Compliant Shell

<Tabs>
<TabItem value="windows" label="Windows">
Standard terminals like `cmd` or PowerShell may not support some commands. We recommended installing [Git for Windows](https://gitforwindows.org/) for Git Bash, which provides a more UNIX-like experience. Here's a [tutorial on Git Bash](https://www.atlassian.com/git/tutorials/git-bash).
Standard terminals like `cmd` or PowerShell may not support some commands. We recommended installing [Git for Windows](https://gitforwindows.org/) for Git Bash, which provides a more UNIX-like experience.

Here's a [tutorial on Git Bash](https://www.atlassian.com/git/tutorials/git-bash).
</TabItem>
<TabItem value="macos" label="MacOS/Linux">
<TabItem value="macos" label="MacOS">
Standard terminal.
</TabItem>
<TabItem value="Linux" label="Linux">
Standard terminal.
</TabItem>
</Tabs>
Expand Down Expand Up @@ -125,8 +155,6 @@ If you’re using Windows, you’ll need to install and use [Git BASH](https://g
4. Check versions in the terminal with `node -v` and `npm -v`
</TabItem>
</Tabs>

## Optional Setup

- [Foundry](/developers/smart-contracts/foundry)
- [Remix](https://remix.ethereum.org/)
</Step>
</Steps>

0 comments on commit 2cc2c3c

Please sign in to comment.