@@ -10,35 +10,43 @@ cat /opt/.env
1010
1111# Extract GraphTallyCollector address from horizon.json
1212stdbuf -oL echo " 🔍 DEBUG: Extracting GraphTallyCollector address from horizon.json..."
13- GRAPH_TALLY_VERIFIER=$( jq -r ' ."1337".GraphTallyCollector.address' /opt/horizon.json)
14- stdbuf -oL echo " 🔍 DEBUG: GraphTallyCollector address: $GRAPH_TALLY_VERIFIER "
1513
16- TAP_VERIFIER=$( jq -r ' ."1337".TAPVerifier.address' /opt/contracts.json)
17- stdbuf -oL echo " 🔍 DEBUG: TAPVerifier address: $TAP_VERIFIER "
14+ subgraph_service=$( jq -r ' ."1337".SubgraphService.address' /opt/subgraph-service.json)
15+
16+ # Handle mixed format - try with .address first, fallback to direct value
17+ graph_tally_verifier=$( jq -r ' ."1337".GraphTallyCollector.address // ."1337".GraphTallyCollector' /opt/horizon.json)
18+ stdbuf -oL echo " 🔍 DEBUG: GraphTallyCollector address: $graph_tally_verifier "
19+
20+ # For your indexer-agent script, update the extraction:
21+ tap_verifier=$( jq -r ' ."1337".TAPVerifier' /opt/contracts.json)
22+ stdbuf -oL echo " 🔍 DEBUG: TAPVerifier address: $tap_verifier "
23+
24+ allocation_id_tracker=$( jq -c ' ."1337".AllocationIDTracker' /opt/contracts.json)
25+ escrow=$( jq -c ' ."1337".Escrow' /opt/contracts.json)
1826
1927# Override with test values taken from test-assets/src/lib.rs
2028ALLOCATION_ID=" 0xfa44c72b753a66591f241c7dc04e8178c30e13af" # ALLOCATION_ID_0
2129
2230# Get network subgraph deployment ID
2331stdbuf -oL echo " 🔍 DEBUG: Fetching network subgraph deployment ID..."
24- NETWORK_DEPLOYMENT =$( curl -s --max-time 10 " http://graph-node:8000/subgraphs/name/graph-network" \
32+ network_deployment =$( curl -s --max-time 10 " http://graph-node:8000/subgraphs/name/graph-network" \
2533 -H ' content-type: application/json' \
2634 -d ' {"query": "{ _meta { deployment } }"}' | jq -r ' .data._meta.deployment' 2> /dev/null)
27- stdbuf -oL echo " 🔍 DEBUG: Network deployment result: $NETWORK_DEPLOYMENT "
35+ stdbuf -oL echo " 🔍 DEBUG: Network deployment result: $network_deployment "
2836
2937# Get escrow subgraph deployment ID
3038stdbuf -oL echo " 🔍 DEBUG: Fetching escrow subgraph deployment ID..."
31- ESCROW_DEPLOYMENT =$( curl -s --max-time 10 " http://graph-node:8000/subgraphs/name/semiotic/tap" \
39+ escrow_deployment =$( curl -s --max-time 10 " http://graph-node:8000/subgraphs/name/semiotic/tap" \
3240 -H ' content-type: application/json' \
3341 -d ' {"query": "{ _meta { deployment } }"}' | jq -r ' .data._meta.deployment' 2> /dev/null)
34- stdbuf -oL echo " 🔍 DEBUG: Escrow deployment result: $ESCROW_DEPLOYMENT "
42+ stdbuf -oL echo " 🔍 DEBUG: Escrow deployment result: $escrow_deployment "
3543
3644# Run basic connectivity tests
3745stdbuf -oL echo " Testing graph-node endpoints..."
3846curl -s " http://graph-node:8000" > /dev/null && stdbuf -oL echo " Query endpoint OK" || stdbuf -oL echo " Query endpoint FAILED"
3947curl -s " http://graph-node:8030/graphql" > /dev/null && stdbuf -oL echo " Status endpoint OK" || stdbuf -oL echo " Status endpoint FAILED"
4048
41- stdbuf -oL echo " Using GraphTallyCollector address: $GRAPH_TALLY_VERIFIER "
49+ stdbuf -oL echo " Using GraphTallyCollector address: $graph_tally_verifier "
4250stdbuf -oL echo " Using test Indexer address: $RECEIVER_ADDRESS "
4351stdbuf -oL echo " Using test Account0 address: $ACCOUNT0_ADDRESS "
4452
@@ -56,20 +64,20 @@ query_url = "http://graph-node:8000"
5664status_url = "http://graph-node:8030/graphql"
5765
5866[subgraphs.network]
59- query_url = "http://graph-node:8000/subgraphs/name/graph-network"$( if [ -n " $NETWORK_DEPLOYMENT " ] && [ " $NETWORK_DEPLOYMENT " != " null" ]; then echo "
60- deployment_id = \" $NETWORK_DEPLOYMENT \" " ; fi)
67+ query_url = "http://graph-node:8000/subgraphs/name/graph-network"$( if [ -n " $network_deployment " ] && [ " $network_deployment " != " null" ]; then echo "
68+ deployment_id = \" $network_deployment \" " ; fi)
6169recently_closed_allocation_buffer_secs = 60
6270syncing_interval_secs = 30
6371
6472[subgraphs.escrow]
65- query_url = "http://graph-node:8000/subgraphs/name/semiotic/tap"$( if [ -n " $ESCROW_DEPLOYMENT " ] && [ " $ESCROW_DEPLOYMENT " != " null" ]; then echo "
66- deployment_id = \" $ESCROW_DEPLOYMENT \" " ; fi)
73+ query_url = "http://graph-node:8000/subgraphs/name/semiotic/tap"$( if [ -n " $escrow_deployment " ] && [ " $escrow_deployment " != " null" ]; then echo "
74+ deployment_id = \" $escrow_deployment \" " ; fi)
6775syncing_interval_secs = 30
6876
6977[blockchain]
7078chain_id = 1337
71- receipts_verifier_address = "${TAP_VERIFIER } "
72- receipts_verifier_address_v2 ="${GRAPH_TALLY_VERIFIER } "
79+ receipts_verifier_address = "${tap_verifier } "
80+ receipts_verifier_address_v2 ="${graph_tally_verifier } "
7381
7482[service]
7583free_query_auth_token = "freestuff"
@@ -108,6 +116,7 @@ ${ACCOUNT0_ADDRESS} = "http://tap-aggregator:${TAP_AGGREGATOR}"
108116# - If Horizon contracts not detected: Remain in legacy mode (V1 receipts only)
109117# When disabled: Pure legacy mode, no Horizon detection performed
110118enabled = true
119+ subgraph_service_address = "${subgraph_service} "
111120EOF
112121
113122stdbuf -oL echo " Starting indexer-service with config:"
0 commit comments