Skip to content

Commit 124f235

Browse files
committed
chore: flag to overwrite CREATE2 address for EVM
1 parent 626f7e6 commit 124f235

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

evm/sh/deployExecutor.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,19 @@ if [ "${EVM_CHAIN_ID}X" == "X" ]; then
2222
EVM_CHAIN_ID=1337
2323
fi
2424

25+
if [ -n "${CREATE2_ADDRESS}" ]; then
26+
CREATE2_FLAG="--create2-deployer ${CREATE2_ADDRESS}"
27+
echo "Using custom CREATE2 deployer at: ${CREATE2_ADDRESS}"
28+
else
29+
CREATE2_FLAG=""
30+
echo "Using default CREATE2 deployer"
31+
fi
32+
2533
forge script ./script/DeployExecutor.s.sol:DeployExecutor \
2634
--sig "run(uint16)" $OUR_CHAIN_ID \
2735
--rpc-url "$RPC_URL" \
2836
--private-key "$MNEMONIC" \
37+
$CREATE2_FLAG \
2938
--broadcast ${FORGE_ARGS}
3039

3140
returnInfo=$(cat ./broadcast/DeployExecutor.s.sol/$EVM_CHAIN_ID/run-latest.json)

0 commit comments

Comments
 (0)