Skip to content

Commit

Permalink
evm: simplifies WormholeRelayer verification script
Browse files Browse the repository at this point in the history
  • Loading branch information
scnale committed Jan 12, 2024
1 parent 0cf0a76 commit 5a9361f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions ethereum/ts-scripts/relayer/shell/verifyWormholeRelayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ set scan_tokens_file $_flag_scan_tokens

set chains_file "ts-scripts/relayer/config/$ENV/chains.json"
set contracts_file "ts-scripts/relayer/config/$ENV/contracts.json"
# TODO: add implementation addresses to `contracts.json` to allow using it instead of lastrun.json
set last_run_file "ts-scripts/relayer/output/$ENV/deployWormholeRelayer/lastrun.json"
if not test -e $last_run_file
echo "$last_run_file does not exist. Delivery provider addresses are read from this file."
exit 1
end

set chain_ids (string split \n --no-empty -- (jq '.chains[] | .chainId' $chains_file))

Expand All @@ -36,8 +30,8 @@ for chain in $chain_ids
end

# We need addresses to be unquoted when passed to `cast` and `forge verify-contract`
set implementation_address (jq --raw-output ".wormholeRelayerImplementations[] | select(.chainId == $chain) | .address" $last_run_file)
set proxy_address (jq --raw-output ".wormholeRelayerProxies[] | select(.chainId == $chain) | .address" $last_run_file)
set implementation_address (jq --raw-output ".wormholeRelayerImplementations[] | select(.chainId == $chain) | .address" $contracts_file)
set proxy_address (jq --raw-output ".wormholeRelayers[] | select(.chainId == $chain) | .address" $contracts_file)
set create2_factory_address (jq --raw-output ".create2Factories[] | select(.chainId == $chain) | .address" $contracts_file)
# TODO: actually consult this from `worm` CLI
# Perhaps the value present in the chains file can be used as a fallback when the current version of the `worm` program doesn't know about
Expand Down

0 comments on commit 5a9361f

Please sign in to comment.