Use Hardhat
Prerequisites
Let's create a basic sample project
mkdir hardhat && cd hardhat
yarn add hardhat
yarn hardhat888 888 888 888 888
888 888 888 888 888
888 888 888 888 888
8888888888 8888b. 888d888 .d88888 88888b. 8888b. 888888
888 888 "88b 888P" d88" 888 888 "88b "88b 888
888 888 .d888888 888 888 888 888 888 .d888888 888
888 888 888 888 888 Y88b 888 888 888 888 888 Y88b.
888 888 "Y888888 888 "Y88888 888 888 "Y888888 "Y888
Welcome to Hardhat v2.6.8
✔ What do you want to do? · Create a basic sample project
✔ Hardhat project root: · /home/.../hardhat
✔ Do you want to add a .gitignore? (Y/n) · y
✔ Do you want to install this sample project's dependencies with yarn (@nomiclabs/hardhat-waffle ethereum-waffle chai @nomiclabs/hardhat-ethers ethers)? (Y/n) · yAdd the RPC nodes
To compile it, simply run:
You can run your tests with:
Next, to deploy the contract we will use a Hardhat script:
Going beyond and reading the on-chain data
Last updated
Was this helpful?