| 1234567891011121314151617181920212223242526272829303132 |
- #!/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
|