This is a Dapp boilerplate built using React and Hardhat. It allows you to generate contract state when the connect wallet button is clicked. It also uses the Rainbow kit for the connect wallet component.
To get started with the Dapp boilerplate, follow these steps:
- Install Vite by running the following command:
npm create vite@latest react-app -- --template react
- Navigate to the react-app directory and install dependencies:
cd react-app npm install
- Install Hardhat:
npm install --save-dev hardhat npx hardhat
- Install dotenv:
npm i dotenv
- Create a
.env
file with the following contents:Replace the empty strings with the relevant values.SEPOLIA_PRIVATE_KEY = "" ALCHEMY_SEPOLIA_API_KEY ="" OWNER_ADDRESS = "" CONTRACT_ADDRESS = "" ETHERSCAN_API_KEY = ""
- Deploy the contract:
npx hardhat run --network sepolia scripts/deploy.js
- Verify the contract:
Replace
npx hardhat verify --network sepolia <address>
<address>
with the contract address. - Install Rainbow kit for the connect wallet component:
npm init @rainbow-me/rainbowkit@latest
- Run the server:
npm run dev
If you have any suggestions or find any bugs, feel free to open an issue or submit a pull request.