Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix proxy + adapter deployment #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# 1. Build the contracts
# 2. Stage build output
# 2. Lint and stage style improvements
yarn build && npx lint-staged
yarn test
10 changes: 1 addition & 9 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ bracket_spacing = false
int_types = 'long'
quote_style = 'single'
number_underscore = 'thousands'
multiline_func_header = 'params_first_multi'
multiline_func_header = 'params_first'
sort_imports = true

[profile.default]
Expand All @@ -26,11 +26,3 @@ src = 'src/interfaces/'

[fuzz]
runs = 1000

[rpc_endpoints]
mainnet = "${ETHEREUM_RPC}"
optimism = "${OPTIMISM_RPC}"
base = "${BASE_RPC}"

[etherscan]
mainnet = { key = "${ETHERSCAN_API_KEY}", chain = "mainnet" }
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"migrate:mainnet:broadcast": "forge clean && dotenv -e .env -- sh -c 'forge script script/MigrateToNative.s.sol --broadcast --via-ir --rpc-url $ETHEREUM_RPC'",
"migrate:testnet": "forge clean && dotenv -e .env.testnet -- sh -c 'forge script script/MigrateToNative.s.sol --via-ir --rpc-url $ETHEREUM_RPC'",
"migrate:testnet:broadcast": "forge clean && dotenv -e .env.testnet -- sh -c 'forge script script/MigrateToNative.s.sol --broadcast --via-ir --rpc-url $ETHEREUM_RPC'",
"prepare": "husky init",
"prepare": "husky",
"test": "forge test -vvv",
"test:fuzz": "echidna test/invariants/fuzz/OpUSDC.t.sol --config test/invariants/fuzz/OpUsdc.yaml --contract FuzzOpUsdc",
"test:integration": "forge test --match-contract Integration -vvv",
Expand Down
6 changes: 4 additions & 2 deletions script/DeployProtocol.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ contract DeployProtocol is Script {
address public immutable BRIDGED_USDC_IMPLEMENTATION = vm.envAddress('BRIDGED_USDC_IMPLEMENTATION');
address public immutable L1_MESSENGER = vm.envAddress('L1_MESSENGER');
string public chainName = vm.envString('CHAIN_NAME');
address public owner = vm.rememberKey(vm.envUint('PRIVATE_KEY'));
address public owner = vm.rememberKey(vm.envUint('DEPLOYER_PRIVATE_KEY'));

function run() public {
function run() public returns (address, address, address) {
vm.startBroadcast(owner);

// NOTE: We have these hardcoded to default values, if used in production you will need to change them
Expand Down Expand Up @@ -45,5 +45,7 @@ contract DeployProtocol is Script {
console.log('L1 Adapter:', _l1Adapter);
console.log('L2 Deploy:', _l2Deploy);
console.log('L2 Adapter:', _l2Adapter);

return (_l1Adapter, _l2Deploy, _l2Adapter);
}
}