wormhole/ethereum/simulate_upgrades

33 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -euo pipefail
ANVIL_PID=""
function clean_up () {
ARG=$?
[ -n "$ANVIL_PID" ] && kill "$ANVIL_PID"
exit $ARG
}
trap clean_up EXIT
echo "🍴 Forking mainnet..."
anvil --base-fee 0 --fork-url "$(worm rpc mainnet ethereum)" --mnemonic "myth like bonus scare over problem client lizard pioneer submit female collect" > /dev/null &
ANVIL_PID=$!
sleep 10
echo "========================= Updating core contract #1 ============================"
./simulate_upgrade -m bridge -c ethereum -d
echo "========================= Updating core contract #2 ============================"
./simulate_upgrade -m bridge -c ethereum -d
echo "===================== Updating token bridge contract #1 ========================"
./simulate_upgrade -m token_bridge -c ethereum -d
echo "===================== Updating token bridge contract #2 ========================"
./simulate_upgrade -m token_bridge -c ethereum -d
echo "====================== Updating NFT bridge contract #1 ========================="
./simulate_upgrade -m nft_bridge -c ethereum -d
echo "====================== Updating NFT bridge contract #2 ========================="
./simulate_upgrade -m nft_bridge -c ethereum -d