File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,15 @@ get_contract_address() {
1616 echo " Error: File $file not found"
1717 exit 1
1818 fi
19- local address=$( jq -r " .\" 1337\" .$contract .address" " $file " )
19+
20+ # Try to get address directly first (tap-contracts.json format)
21+ local address=$( jq -r " .\" 1337\" .$contract " " $file " 2> /dev/null)
22+
23+ # If that gives us an object, try to get the .address field (horizon.json format)
24+ if [[ " $address " =~ ^\{ ]]; then
25+ address=$( jq -r " .\" 1337\" .$contract .address" " $file " 2> /dev/null)
26+ fi
27+
2028 if [ " $address " == " null" ] || [ -z " $address " ]; then
2129 echo " Error: Could not find $contract address in $file "
2230 exit 1
3442
3543# Get contract addresses - Updated paths to local-network directory
3644GRAPH_TOKEN=$( get_contract_address " ../contrib/local-network/horizon.json" " L2GraphToken" )
37- TAP_ESCROW_V1=$( get_contract_address " ../contrib/local-network/tap-contracts.json" " TAPEscrow " )
45+ TAP_ESCROW_V1=$( get_contract_address " ../contrib/local-network/tap-contracts.json" " Escrow " )
3846PAYMENTS_ESCROW_V2=$( get_contract_address " ../contrib/local-network/horizon.json" " PaymentsEscrow" )
3947GRAPH_TALLY_COLLECTOR_V2=$( get_contract_address " ../contrib/local-network/horizon.json" " GraphTallyCollector" )
4048
@@ -227,4 +235,3 @@ echo "Note: V2 escrow balance can be verified via the TAP V2 subgraph"
227235
228236echo " "
229237echo " ✅ Successfully funded both V1 and V2 escrows!"
230-
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ fund_escrow() {
7575
7676 # Use L2GraphToken from horizon.json for horizon upgrade
7777 GRAPH_TOKEN=$( jq -r ' ."1337".L2GraphToken.address' local-network/horizon.json)
78- TAP_ESCROW=$( jq -r ' ."1337".TAPEscrow.address ' local-network/tap-contracts.json)
78+ TAP_ESCROW=$( jq -r ' ."1337".Escrow ' local-network/tap-contracts.json)
7979
8080 if [ -z " $GRAPH_TOKEN " ] || [ -z " $TAP_ESCROW " ] || [ " $GRAPH_TOKEN " == " null" ] || [ " $TAP_ESCROW " == " null" ]; then
8181 echo " Error: Could not read contract addresses from horizon.json or tap-contracts.json"
You can’t perform that action at this time.
0 commit comments