This is a simple test of hardhat bc mainfork.
The contract deployed on mumbai, i forked mumbai and i called with simple ABI.
It's powerful feature !
- install dependencies
npm install
- create .env file
touch .env
-
get api_key from alchemy of mumbai node.
-
configure .env file, add URL_MUMBAI = https://polygon-mumbai.g.alchemy.com/v2/API_KEY
-
run test
npx hardhat test