From 89ae9954b5bb4d99176c548ca9314aa6c56f610a Mon Sep 17 00:00:00 2001 From: Simon Berens Date: Fri, 15 Nov 2024 23:55:17 +0000 Subject: [PATCH] working --- .husky/pre-commit | 5 +---- foundry.toml | 10 +--------- package.json | 2 +- script/DeployProtocol.s.sol | 6 ++++-- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index b8f47040..53e066ff 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -# 1. Build the contracts -# 2. Stage build output -# 2. Lint and stage style improvements -yarn build && npx lint-staged \ No newline at end of file +yarn test diff --git a/foundry.toml b/foundry.toml index 9bbdcffb..fa7fa11c 100644 --- a/foundry.toml +++ b/foundry.toml @@ -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] @@ -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" } diff --git a/package.json b/package.json index 5afb3fb9..f652d1a8 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/script/DeployProtocol.s.sol b/script/DeployProtocol.s.sol index 2271b90a..a12fd267 100644 --- a/script/DeployProtocol.s.sol +++ b/script/DeployProtocol.s.sol @@ -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 @@ -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); } }