This project demonstrates FundMe Hardhat use case. It comes with FundMe contract, a test for that contract, and a script that deploys that contract.
If You want to run this project on "GOERLI" testnet and don't know how to get Ready Your Project to work with "GOERLI TESTNET" and Having ETH fund/balance Issue. click here
-
GOERLI_RPC_URL=your-rpc-from-alchemy-app
-
METAMASK_PRIVATE_KEY=your-metamask-private-key
-
COINMARKETCAP_API_KEY=your-coinmarketcap-api-key
-
ETHERSCAN_API_KEY=your-etherscan-api-key
if you don't have etherscan api key then Go here and signup/login here. After signing up or logging in click on 'API KEYS' then click on 'Add' you would've your etherscan api key.
if you don't have coinmarketcap api key then Go here and signup/login here. After signing up or logging in you would've your coinmarketcap api key.
Follow Steps below if You are running your project on vs code otherwise open your terminal / shell / bash / cmd, with admin privileges then go to your project's directory i.e. as on windows "C:/users/username/documents/your_project/" and then paste and run commands given below in sequence.
npm install --force
npx hardhat help
npx hardhat test
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat node
npx hardhat run scripts/fund.js
npx hardhat run scripts/withdraw.js
npx hardhat run scripts/fund.js --network goerli
npx hardhat run scripts/withdraw.js --network goerli
npx hardhat