File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -7,17 +7,21 @@ rpcUrls["arbitrum"]=$(mesc url arbitrum_alchemy)
7
7
rpcUrls[" arbitrumSepolia" ]=$( mesc url arbitrumSepolia_alchemy)
8
8
rpcUrls[" arbitrumSepoliaDevnet" ]=$( mesc url arbitrumSepolia_alchemy)
9
9
10
+ # event Initialized(uint64 version);
11
+ eventTopic=0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2
12
+
10
13
for c in arbitrum arbitrumSepolia arbitrumSepoliaDevnet; do
14
+ echo " --------------------------------"
11
15
echo " $c "
16
+ echo " --------------------------------"
12
17
for f in " $SCRIPT_DIR " /../deployments/" $c " /* _Proxy.json; do
13
18
address=$( jq -r .address " $f " )
14
19
block=$( jq -r .receipt.blockNumber " $f " )
15
20
basename " $f "
16
- results=$( cast logs --from-block " $block " --to-block latest 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2 --address " $address " --rpc-url " ${rpcUrls[$c]} " --json | jq -r .[].data)
17
- for result in $results ; do
18
- cast --to-dec " $result "
19
- done
21
+ results=$( cast logs --from-block " $block " --to-block latest $eventTopic --address " $address " --rpc-url " ${rpcUrls[$c]} " --json | jq -r .[].data)
22
+ initializer= $( cast --to-dec " $( echo " $results " | tail -n1 ) " )
23
+ version= $( cast call --rpc-url " ${rpcUrls[$c]} " " $address " " version()(string) " --json 2> /dev/null | jq -r ' .[0] ' )
24
+ echo " $initializer " @v " $version "
20
25
echo
21
26
done
22
- echo " --------------------------------"
23
27
done
You can’t perform that action at this time.
0 commit comments