This project leverages Foundry to manage dependencies, 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.
forge install
To compile your contracts, run:
forge compile
forge clean
forge test --ffi
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 clean
forge script script/deploy_bridge.s.sol --rpc-url <<alias>> --broadcast --verify --ffi
Local deployment
forge clean
forge script script/deploy_bridge.s.sol --fork-url anvil --broadcast --ffi
All deployments are saved in the broadcast
directory.