From f294cd682eb9ad722df5cad14345846484afee1a Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:55:14 -0800 Subject: [PATCH 1/4] update expected l1 gateway addr --- scripts/DeployStandardBridge.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/DeployStandardBridge.s.sol b/scripts/DeployStandardBridge.s.sol index 9ccbc07..61db6dd 100644 --- a/scripts/DeployStandardBridge.s.sol +++ b/scripts/DeployStandardBridge.s.sol @@ -43,7 +43,7 @@ contract DeployL1Gateway is Script, Create2Deployer { function run() external { // Note this addr is dependant on values given to contract constructor - address expectedAddr = 0x38b7e046bd971B4123974Bc78DcB0D7C680d85d2; + address expectedAddr = 0xE3e28fFC8A90EE85db78815D22b33CbEe7E64A1d; if (isContractDeployed(expectedAddr)) { console.log("Standard bridge gateway on l1 already deployed to:", expectedAddr); From ea578249396a65ef8298c3204fac8cb7e85d8572 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 30 Jan 2024 21:55:43 -0800 Subject: [PATCH 2/4] container handling for both types of gateway --- Dockerfile | 1 + entrypoint.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/Dockerfile b/Dockerfile index f3f1c4f..ba16fc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ ARG PRIVATE_KEY ARG CHAIN_ID ARG DEPLOY_TYPE ARG HYP_ERC20_ADDR +ARG RELAYER_ADDR RUN chmod +x entrypoint.sh diff --git a/entrypoint.sh b/entrypoint.sh index 6b83e0f..e420a30 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,4 +26,20 @@ elif [ "$DEPLOY_TYPE" = "whitelist" ]; then fi echo "Deploying whitelist contract" HYP_ERC20_ADDR="$HYP_ERC20_ADDR" $FORGE_BIN_PATH script ${SCRIPT_PATH_PREFIX}DeployScripts.s.sol:DeployWhitelist --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --chain-id $CHAIN_ID -vvvv --use 0.8.23 $ROOT_OPTION + +elif [ "$DEPLOY_TYPE" = "settlement-gateway" ]; then + if [ -z "$RELAYER_ADDR" ]; then + echo "RELAYER_ADDR not specified" + exit 1 + fi + echo "Deploying gateway contract on settlement chain" + RELAYER_ADDR="$RELAYER_ADDR" $FORGE_BIN_PATH script ${SCRIPT_PATH_PREFIX}DeployStandardBridge.s.sol:DeploySettlementGateway --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --chain-id $CHAIN_ID -vvvv --use 0.8.23 $ROOT_OPTION + +elif [ "$DEPLOY_TYPE" = "l1-gateway" ]; then + if [ -z "$RELAYER_ADDR" ]; then + echo "RELAYER_ADDR not specified" + exit 1 + fi + echo "Deploying gateway contract on L1" + RELAYER_ADDR="$RELAYER_ADDR" $FORGE_BIN_PATH script ${SCRIPT_PATH_PREFIX}DeployStandardBridge.s.sol:DeployL1Gateway --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --chain-id $CHAIN_ID -vvvv --use 0.8.23 $ROOT_OPTION fi From e2c092f96ad74b555ddb2959ea1a5716d688e2e3 Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Tue, 30 Jan 2024 22:34:58 -0800 Subject: [PATCH 3/4] different expected addr for settlement gateway --- scripts/DeployStandardBridge.s.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/DeployStandardBridge.s.sol b/scripts/DeployStandardBridge.s.sol index 61db6dd..a80eb52 100644 --- a/scripts/DeployStandardBridge.s.sol +++ b/scripts/DeployStandardBridge.s.sol @@ -9,7 +9,7 @@ contract DeploySettlementGateway is Script, Create2Deployer { function run() external { // Note this addr is dependant on values given to contract constructor - address expectedAddr = 0x0D70A44c81a27f33a36C334bFEA8bBBD8A7d58AA; + address expectedAddr = 0xd7c994692d5ac39F1d3a4E653e576C346820F226; if (isContractDeployed(expectedAddr)) { console.log("Standard bridge gateway on settlement chain already deployed to:", expectedAddr); From 640af07ce5d136438e9e86cb6429a0f127d86bfa Mon Sep 17 00:00:00 2001 From: Shawn <44221603+shaspitz@users.noreply.github.com> Date: Wed, 31 Jan 2024 22:47:52 -0800 Subject: [PATCH 4/4] Update DeployStandardBridge.s.sol --- scripts/DeployStandardBridge.s.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/DeployStandardBridge.s.sol b/scripts/DeployStandardBridge.s.sol index a80eb52..9ccbc07 100644 --- a/scripts/DeployStandardBridge.s.sol +++ b/scripts/DeployStandardBridge.s.sol @@ -9,7 +9,7 @@ contract DeploySettlementGateway is Script, Create2Deployer { function run() external { // Note this addr is dependant on values given to contract constructor - address expectedAddr = 0xd7c994692d5ac39F1d3a4E653e576C346820F226; + address expectedAddr = 0x0D70A44c81a27f33a36C334bFEA8bBBD8A7d58AA; if (isContractDeployed(expectedAddr)) { console.log("Standard bridge gateway on settlement chain already deployed to:", expectedAddr); @@ -43,7 +43,7 @@ contract DeployL1Gateway is Script, Create2Deployer { function run() external { // Note this addr is dependant on values given to contract constructor - address expectedAddr = 0xE3e28fFC8A90EE85db78815D22b33CbEe7E64A1d; + address expectedAddr = 0x38b7e046bd971B4123974Bc78DcB0D7C680d85d2; if (isContractDeployed(expectedAddr)) { console.log("Standard bridge gateway on l1 already deployed to:", expectedAddr);