This repository contains a project for developing, testing, and deploying a smart contract using the Hardhat framework, tailored for the Rootstock network. The project follows a step-by-step approach, each represented by a specific commit in the repository.
For detailed steps, see the getting started guide
By following the guide, you will learn:
- How to set up a Hardhat project and configure it for the Rootstock network
- How to create, compile, test, and deploy a simple ERC20 token contract using Hardhat and OpenZeppelin
- How to interact with your deployed contract using Remix and MetaMask
- How to connect your smart contract with a web front-end using ethers.js
- How to debug and troubleshoot common issues in Web3 development
- How to use various tools and libraries to enhance your Web3 development experience
Before you start, you should have the following prerequisite
Start by cloning this repository to your local machine.
After cloning this repository, navigate to the root directory and run:
npm install
From the root directory, navigate to the frontend directory to install the frontend dependencies:
cd frontend
npm install
Please be aware that required steps like creating, deploying, and testing a smart contract must be completed prior to frontend integration. These steps are included in this repository. For a comprehensive guide covering all steps, refer to the getting started guide to run and test the application at each development phase.
Each commit represents a significant step in the project development.
-
Step 1: Creating a Hardhat Project
For more detailed steps, see Set up Environment.
-
Step 2: Configuring Hardhat for Rootstock Mainnet and Testnet
See configure Hardhat for Rootstock Mainnet and Testnet for detailed steps.
-
Step 3: Creating a Smart Contract
See Building the Project for detailed steps.
-
Step 4: Deploying the Contract
See Deploying the Contract for detailed steps.
-
Step 5: Testing the Contract
See Testing and Deployment on Rootstock Network for detailed steps.
-
Step 6: Integrating with Front-end Applications
See Integrating with Front-end Applications for detailed steps.
This repository is not just a codebase but a learning tool. Feel free to experiment with the code at different stages to better understand how Ethereum smart contracts and the Rootstock network operate.
For common issues and solutions in Rootstock and Hardhat development, see the troubleshooting guide
Contributions to this project are welcome! Whether it's improving the documentation, adding new features, or reporting issues, your input is valued. Please feel free to fork the repository and submit pull requests.
This project is open source and available under the MIT License.