Skip to content

Commit 5d8e55a

Browse files
committed
ops: fix struct name in escrow regex
1 parent 9c20305 commit 5d8e55a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

integration-tests/fund_escrow.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff 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
@@ -34,7 +42,7 @@ fi
3442

3543
# Get contract addresses - Updated paths to local-network directory
3644
GRAPH_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")
3846
PAYMENTS_ESCROW_V2=$(get_contract_address "../contrib/local-network/horizon.json" "PaymentsEscrow")
3947
GRAPH_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

228236
echo ""
229237
echo "✅ Successfully funded both V1 and V2 escrows!"
230-

setup-test-network.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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"

0 commit comments

Comments
 (0)