This project demonstrates Hardhat use case. It comes with a FundMe
contract, a test for that contract both unit testing and staging testing, and a script that incract with fund()
and withdraw()
function in that contract. The contract is deployed by using hardhat-deploy.
Try running some of the following tasks:
-
To deploy contract:
Localy:
yarn hardhat deploy
Testnet:
yarn hardhat deploy --network goerli
Mainnet:
yarn hardhat deploy --network mainnet
-
To run Tests:
Unit test:
yarn test
Staging test:
yarn test:staging
-
To run scripts: fund()
yarn hardhat run scripts/fund.js
withdraw()
yarn hardhat run scripts/withdraw.js
yarn hardhat --help
REPORT_GAS=true yarn hardhat test
yarn hardhat node