You can see this Demo on vercel.
The main idea of this project is to use it as a frontend in Next.js base, to interact with one or several smart contracts defined within the project. It is necessary to make its corresponding deploy in hardhat to be consumed through this frontend. The entire boilerplate is already configured. Currently the project supports connecting to a wallet to start the communication between this frontend and the blockchain.
-
Install all dependencies
npm i
-
Follow this tutorial consider the goerli network
-
Update your contracts/.env file
GOERLI_URL=https://eth-goerli.g.alchemy.com/v2/api-key PRIVATE_KEY=your-metamask-account-private-key ETHERSCAN_API_KEY=your-etherscan-api-key
-
Install all dependencies
npm i
-
Update your web/.env.local file
NEXT_PUBLIC_API_URI=http://localhost:3000/ NEXT_PUBLIC_CONTRACT_ADDRESS=your-contract-address NEXT_PUBLIC_INFURA_ID=your-infura-id NEXT_PUBLIC_GOERLI_URL=your-goerli-url-project
-
Run your project
npm run dev