- For more details check our technical docs
Using:
- Synthetix Router Proxy architecture
- Hardhat Toolbox
- Any NPM dependencies (like OpenZeppelin contracts)
- Any Foundry libs (like solmate contracts)
- Hardhat Cannon
- Setup .env:
RPC_MUMBAI="your rpc for integration tests"
DEPLOYER_PRIVATE_KEY="your pk for integration tests"
LOCAL_PRIVATE_KEY="your pk for local tests"
POLYGON_ETHERSCAN_API_KEY="your etherscan api key for verifying deployed contracts"- Use Foundry:
forge install
forge test- Use Hardhat:
npm install
npx hardhat test --network hardhat
REPORT_GAS=true npx hardhat test --network hardhat- Use both:
npm test- Run coverage:
npx hardhat coverage --network hardhat- Generate docs:
forge doc
forge doc -b -s -p 4000- Use cannon:
npx hardhat cannon:build --network hardhatWhenever 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.