This repository aims to show how to connect and interact with blockchain contracts on Polygon Network with javascript frontend web app.
This project demonstrates the basic use of Hardhat. It contains a Message Contract with get and set function, a test file for it as well as a deployment script for it,
Contract ABI's are located inside artifacts folders after compiling the contracts for frontend web app dependency.
Try running some of the following tasks:
// Compile solidty contracts, produces an artifacts
npx hardhat compile
// Run contracts test files
npx hardhat test
// Start local blockchain
npx hardhat node
// Deploy the contracts on local blockchain
npx hardhat run scripts/deploy.js --network localhost
// Deploy the contracts on mumbai(polygon testnet) blockchain
npx hardhat run scripts/deploy.js --network mumbai
View Message Contract at Polygonscan explorer: 0xf7AC055eA1628c6ACb34753437d364265A017a98
This project built with Next.js for frontend consuming and interacting with the functions at the deployed smart contracts on blockchain
To run the development server:
npm run dev
To build the app:
npm run build
Open http://localhost:3000 with your browser to see the result.
Visit https://dapp-web.onrender.com to test tha app in production