Template repository for getting started quickly with Hardhat and Foundry in one project
yarn i
yarn build
forge test
yarn test -vvvv
forge fork test
source envs/eth.env
yarn test -vvvv --fork-url $PROVIDER
hardhat test
yarn testh
hardhat coverage test
yarn testc
source envs/eth.env
source envs/bsc.env
source envs/pol.env
PRIVATE_KEY=
SCAN_API_KEY=
PROVIDER=
NETWORK_ID=
ENV_FILE=envs/eth.env
yarn run env-cmd -f $ENV_FILE yarn run hardhat contract:deploy --name Token --gas-price 3 --args '[]' --network $NETWORK_ID
yarn run env-cmd -f $ENV_FILE yarn run hardhat upgradeableContract:deploy --name TokenUpgradeable --gas-price 3 --args '[]' --network $NETWORK_ID
yarn run env-cmd -f $ENV_FILE yarn run hardhat upgradeableContract:upgrade --proxy-name TokenUpgradeable --impl-name TokenUpgradeable --gas-price 3 --network $NETWORK_ID
yarn run env-cmd -f $ENV_FILE yarn run hardhat contract:verify --name Token --args '[]' --network $NETWORK_ID
yarn run env-cmd -f $ENV_FILE yarn run hardhat upgradeableContract:verify --name TokenUpgradeable --args '[]' --network $NETWORK_ID
Whenever you install new libraries using Foundry, make sure to update your remappings.txt
file by running forge remappings > remappings.txt
. This is required because we use hardhat-preprocessor
and the remappings.txt
file to allow Hardhat to resolve libraries you install with Foundry.