This project leverages Foundry to manage dependencies (via soldeer), contract compilation, testing, deployment, and on chain interactions via Solidity scripting.
Note The OZ foundry upgrades library uses node to verify upgrade safety. Make sure you have node version 18.17 or higher and npm version 10.4 or higher installed.
Duplicate rename the .env.example
file to .env
. You'll need accounts and api keys for Infura and Etherscan as well as the necessary RPC URLs. Be sure to add the required values in your newly created .env
file.
To install the project dependencies, run:
forge soldeer update
To compile your contracts, run:
forge compile
forge test
Note: In case of "Failed to run upgrade safety validation" Run:
forge clean
forge coverage
forge script script/deploy_bridge.s.sol --rpc-url <<alias>> --broadcast --verify
Local deployment
forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast
All deployments are saved in the broadcast
directory.