Hardhat tests

Linagee Resolver Hardhat Repo

Install dependencies

npm install

Add your API keys

  • Create a .env file in the root folder and add your Alchemy API key (use .env.example as a template)
  • Also add the ETHERSCAN_API_KEY (if you want to verify the contract on Etherscan)

Compile the contract

npx hardhat compile

Run tests

npx hardhat test
npx hardhat test --network hardhat
REPORT_GAS=true npx hardhat test

Deploy the contract

npx hardhat run scripts/deploy.js
npx hardhat run --network <desired-network> scripts/deploy.js

Verify the contract on Etherscan

npx hardhat verify --network <desired-network> <address> <constructor argument 1> <constructor argument 2> ...

Other commands

npx hardhat help
npx hardhat node