中文 / English
The important part of developing Dapp is the front end. The sample will use hardhat combined with react and MetaMask to show how to develop Dapp front end page, the process of developing and the calling of interface. Developers will get the point of the sample code when they have ability to use react.
Put your private key in .env for easy access, formatted with "PRIVATE_KEY=xxxx".
-
Install dependencies
npm install
-
Deploy contracts
npx hardhat run scripts/deploy.js --network kovan
-
Startup react
cd frontend npm install npm start
-
Try to init a ERC20 transaction in the page and watch the change of account tokens balance.