This project leverages Foundry to manage dependencies (via soldeer), contract compilation, testing, deployment, and on chain interactions via Solidity scripting.
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.
Note The OZ foundry upgrades library uses node to verify upgrade safety. Make sure you have node version 18.17 or higher as well as npm version 10.4 or higher installed.
To install the project dependencies, run:
forge soldeer update
To compile your contracts, run:
forge compile
forge test
forge coverage
Note Make sure the deployment config file for the target chain is created in the
deploy_configs
folder. The file should be named<chainID>.json
and should have the same fields and in the same order (alphabetical) as theexample.json
.
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.