diff --git a/.env b/.env index e5f1393f..73ac230d 100644 --- a/.env +++ b/.env @@ -32,7 +32,7 @@ COMPOSE_PROFILES=block-oracle,explorer # indexer components versions GRAPH_NODE_VERSION=v0.42.1 -INDEXER_AGENT_VERSION=v0.25.9 +INDEXER_AGENT_VERSION=v0.25.10 INDEXER_SERVICE_RS_VERSION=v2.1.0 INDEXER_TAP_AGENT_VERSION=v2.1.0 @@ -53,8 +53,6 @@ ELIGIBILITY_ORACLE_COMMIT=84710857394d3419f83dcbf6687a91f415cc1625 BLOCK_ORACLE_COMMIT=3a3a425ff96130c3842cee7e43d06bbe3d729aed CONTRACTS_COMMIT=511cd70563593122f556c7b35469ec185574769a NETWORK_SUBGRAPH_COMMIT=5b6c22089a2e55db16586a19cbf6e1d73a93c7b9 -TAP_CONTRACTS_COMMIT=e3351e70b3e5d9821bc0aaa90bb2173ca2a77af7 -TAP_SUBGRAPH_COMMIT=cf7279f60433bf9a9d897ec2548c13c0607234cc # service ports CHAIN_RPC_PORT=8545 diff --git a/CHEATSHEET.md b/CHEATSHEET.md index 119a9388..e1ae4e14 100644 --- a/CHEATSHEET.md +++ b/CHEATSHEET.md @@ -130,26 +130,3 @@ curl "http://localhost:7700/api/subgraphs/id/BFr2mx7FgkJ36Y6pE5BiXs1KmNUmVDCnL82 docker exec -it redpanda rpk topic consume gateway_client_query_results --brokers="localhost:9092" ``` -### TAP subgraph - -- subgraph: http://localhost:8000/subgraphs/name/semiotic/tap - - ```graphql - { - escrowAccounts { - balance - sender { - id - } - receiver { - id - } - } - _meta { - block { - number - } - deployment - } - } - ``` diff --git a/containers/core/gateway/run.sh b/containers/core/gateway/run.sh index bdc8cd95..6b299f2e 100755 --- a/containers/core/gateway/run.sh +++ b/containers/core/gateway/run.sh @@ -6,7 +6,6 @@ set -eu cd /opt graph_tally_verifier=$(contract_addr GraphTallyCollector.address horizon) -tap_verifier=$(contract_addr TAPVerifier tap-contracts) dispute_manager=$(contract_addr DisputeManager.address subgraph-service) subgraph_service=$(contract_addr SubgraphService.address subgraph-service) echo "Waiting for network subgraph..." >&2 diff --git a/containers/core/graph-contracts/Dockerfile b/containers/core/graph-contracts/Dockerfile index 5e05903d..ec5723c2 100644 --- a/containers/core/graph-contracts/Dockerfile +++ b/containers/core/graph-contracts/Dockerfile @@ -2,7 +2,6 @@ # (see .github/actions/setup/action.yml in the contracts repo). FROM node:24-bookworm-slim ARG CONTRACTS_COMMIT -ARG TAP_CONTRACTS_COMMIT # libudev-dev / libusb-1.0-0-dev: required by contracts repo's pnpm install # (native deps of hardhat-secure-accounts / ledger toolchain). Upstream CI @@ -30,14 +29,12 @@ RUN git clone https://github.com/graphprotocol/contracts && \ cd contracts && git checkout ${CONTRACTS_COMMIT} && \ pnpm install --frozen-lockfile && pnpm build -# 2. TAP contracts (separate repo, yarn-based — pin yarn here, not globally) -RUN corepack prepare yarn@1.22.22 --activate && \ - git clone https://github.com/semiotic-ai/timeline-aggregation-protocol-contracts && \ - cd timeline-aggregation-protocol-contracts && git checkout ${TAP_CONTRACTS_COMMIT} && \ - yarn && forge build - -# DataEdge (packages/data-edge in the contracts workspace) is built by the -# Phase 1 `pnpm build` above; deploy happens at runtime from /opt/contracts. +# 2. DataEdge contracts (fixed commit, for block-oracle setup) +RUN git clone https://github.com/graphprotocol/contracts contracts-data-edge && \ + cd contracts-data-edge && git checkout bdc66135e7700e9a4dcd6a4beac585337fdb9c21 && \ + cd packages/data-edge && pnpm install && \ + sed -i "s/localhost/chain/g" hardhat.config.ts && \ + pnpm build COPY --chmod=755 ./run.sh /opt/run.sh ENTRYPOINT ["bash", "/opt/run.sh"] diff --git a/containers/core/graph-contracts/run.sh b/containers/core/graph-contracts/run.sh index 3aa1e236..541c356d 100644 --- a/containers/core/graph-contracts/run.sh +++ b/containers/core/graph-contracts/run.sh @@ -4,7 +4,7 @@ set -eu . /opt/shared/lib.sh # -- Ensure config files exist (empty JSON on first run) -- -for f in horizon.json subgraph-service.json issuance.json tap-contracts.json block-oracle.json; do +for f in horizon.json subgraph-service.json issuance.json block-oracle.json; do [ -f "/opt/config/$f" ] || echo '{}' > "/opt/config/$f" done @@ -98,79 +98,25 @@ fi echo "==== Phase 1 complete ====" # ============================================================ -# Phase 2: TAP contracts +# Phase 2: DataEdge contract # ============================================================ -echo "==== Phase 2: TAP contracts ====" +echo "==== Phase 2: DataEdge contract ====" # -- Idempotency check -- phase2_skip=false -escrow_address=$(jq -r '."1337".Escrow // empty' /opt/config/tap-contracts.json 2>/dev/null || true) -if [ -n "$escrow_address" ]; then - code_check=$(cast code --rpc-url="http://chain:${CHAIN_RPC_PORT}" "$escrow_address" 2>/dev/null || echo "0x") - if [ "$code_check" != "0x" ]; then - echo "TAP contracts already deployed (Escrow at $escrow_address)" - echo "SKIP: Phase 2" - phase2_skip=true - else - echo "TAP contract addresses are stale (no code at Escrow $escrow_address), redeploying..." - fi -fi - -if [ "$phase2_skip" = "false" ]; then - cd /opt/timeline-aggregation-protocol-contracts - - staking=$(contract_addr HorizonStaking.address horizon) - graph_token=$(contract_addr L2GraphToken.address horizon) - - # Note: forge may output alloy log lines to stdout after the JSON; sed extracts only the JSON object - forge create --broadcast --json --rpc-url="http://chain:${CHAIN_RPC_PORT}" --mnemonic="${MNEMONIC}" \ - src/AllocationIDTracker.sol:AllocationIDTracker \ - | tee allocation_tracker.json - allocation_tracker="$(sed -n '/^{/,/^}/p' allocation_tracker.json | jq -r '.deployedTo')" - - forge create --broadcast --json --rpc-url="http://chain:${CHAIN_RPC_PORT}" --mnemonic="${MNEMONIC}" \ - src/TAPVerifier.sol:TAPVerifier --constructor-args 'TAP' '1' \ - | tee verifier.json - verifier="$(sed -n '/^{/,/^}/p' verifier.json | jq -r '.deployedTo')" - - forge create --broadcast --json --rpc-url="http://chain:${CHAIN_RPC_PORT}" --mnemonic="${MNEMONIC}" \ - src/Escrow.sol:Escrow --constructor-args "${graph_token}" "${staking}" "${verifier}" "${allocation_tracker}" 10 15 \ - | tee escrow.json - escrow="$(sed -n '/^{/,/^}/p' escrow.json | jq -r '.deployedTo')" - - cat < /opt/config/tap-contracts.json -{ - "1337": { - "AllocationIDTracker": "$allocation_tracker", - "TAPVerifier": "$verifier", - "Escrow": "$escrow" - } -} -EOF -fi - -echo "==== Phase 2 complete ====" - -# ============================================================ -# Phase 3: DataEdge contract -# ============================================================ -echo "==== Phase 3: DataEdge contract ====" - -# -- Idempotency check -- -phase3_skip=false data_edge=$(jq -r '."1337".DataEdge // empty' /opt/config/block-oracle.json 2>/dev/null || true) if [ -n "$data_edge" ]; then code_check=$(cast code --rpc-url="http://chain:${CHAIN_RPC_PORT}" "$data_edge" 2>/dev/null || echo "0x") if [ "$code_check" != "0x" ]; then echo "DataEdge contract already deployed at $data_edge" - echo "SKIP: Phase 3" - phase3_skip=true + echo "SKIP: Phase 2" + phase2_skip=true else echo "DataEdge address stale (no code at $data_edge), redeploying..." fi fi -if [ "$phase3_skip" = "false" ]; then +if [ "$phase2_skip" = "false" ]; then cd /opt/contracts/packages/data-edge # hardhat.config.ts hardcodes `localhost:8545` for the ganache network and # the standard test mnemonic; patch both for the local-network stack. @@ -203,15 +149,15 @@ ADDR_EOF fi fi -echo "==== Phase 3 complete ====" +echo "==== Phase 2 complete ====" # ============================================================ -# Phase 4: Rewards Eligibility Oracle (REO) +# Phase 3: Rewards Eligibility Oracle (REO) # ============================================================ if [ "${REO_ENABLED:-0}" != "1" ]; then - echo "==== Phase 4: Rewards Eligibility Oracle (SKIPPED — REO_ENABLED not set) ====" + echo "==== Phase 3: Rewards Eligibility Oracle (SKIPPED — REO_ENABLED not set) ====" else -echo "==== Phase 4: Rewards Eligibility Oracle ====" +echo "==== Phase 3: Rewards Eligibility Oracle ====" # Ensure NetworkOperator in issuance address book (required by configure step) TEMP_JSON=$(jq --arg op "${ACCOUNT0_ADDRESS}" \ @@ -225,20 +171,20 @@ printf '%s\n' "$TEMP_JSON" > /opt/config/issuance.json # (OPERATOR). So we only run hardhat deploy for initial deployment; on # re-runs where the REO proxy already exists on-chain, skip straight to # the idempotent configuration below. -phase4_deploy_skip=false +phase3_deploy_skip=false reo_address=$(jq -r '.["1337"].RewardsEligibilityOracle.address // empty' /opt/config/issuance.json 2>/dev/null || true) if [ -n "$reo_address" ]; then code_check=$(cast code --rpc-url="http://chain:${CHAIN_RPC_PORT}" "$reo_address" 2>/dev/null || echo "0x") if [ "$code_check" != "0x" ]; then echo "REO already deployed at $reo_address" echo "SKIP: hardhat deploy (configuration handled below)" - phase4_deploy_skip=true + phase3_deploy_skip=true else echo "REO address stale (no code at $reo_address), redeploying..." fi fi -if [ "$phase4_deploy_skip" = "false" ]; then +if [ "$phase3_deploy_skip" = "false" ]; then cd /opt/contracts/packages/deployment # Clean any stale governance TX batches from partial runs @@ -344,7 +290,7 @@ for ab in horizon.json subgraph-service.json; do fi done -echo "==== Phase 4 complete ====" +echo "==== Phase 3 complete ====" fi # REO_ENABLED echo "==== All contract deployments complete ====" diff --git a/containers/core/subgraph-deploy/Dockerfile b/containers/core/subgraph-deploy/Dockerfile index 6196e49b..611fcafd 100644 --- a/containers/core/subgraph-deploy/Dockerfile +++ b/containers/core/subgraph-deploy/Dockerfile @@ -1,6 +1,5 @@ FROM node:23.11-bookworm-slim ARG NETWORK_SUBGRAPH_COMMIT -ARG TAP_SUBGRAPH_COMMIT ARG BLOCK_ORACLE_COMMIT RUN apt-get update \ @@ -24,11 +23,7 @@ RUN git clone https://github.com/graphprotocol/graph-network-subgraph && \ cd graph-network-subgraph && git checkout ${NETWORK_SUBGRAPH_COMMIT} && \ pnpm install && pnpm add -D ts-node -# 2. TAP subgraph -RUN git clone https://github.com/semiotic-ai/timeline-aggregation-protocol-subgraph --recursive && \ - cd timeline-aggregation-protocol-subgraph && git checkout ${TAP_SUBGRAPH_COMMIT} && yarn - -# 3. Block oracle subgraph +# 2. Block oracle subgraph RUN git clone https://github.com/graphprotocol/block-oracle && \ cd block-oracle && git checkout ${BLOCK_ORACLE_COMMIT} && \ cd packages/subgraph && yarn diff --git a/containers/core/subgraph-deploy/run.sh b/containers/core/subgraph-deploy/run.sh index 3349812a..0d3d08ab 100644 --- a/containers/core/subgraph-deploy/run.sh +++ b/containers/core/subgraph-deploy/run.sh @@ -40,34 +40,6 @@ deploy_network() { echo "==== Network subgraph done ====" } -deploy_tap() { - echo "==== TAP subgraph ====" - if curl -s "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/semiotic/tap" \ - -H 'content-type: application/json' \ - -d '{"query": "{ _meta { deployment } }" }' | grep -q "_meta" - then - echo "SKIP: TAP subgraph already deployed" - return - fi - - escrow=$(contract_addr Escrow tap-contracts) - - cd /opt/timeline-aggregation-protocol-subgraph - sed -i "s/127.0.0.1:5001/ipfs:${IPFS_RPC_PORT}/g" package.json - sed -i "s/127.0.0.1:8020/graph-node:${GRAPH_NODE_ADMIN_PORT}/g" package.json - yq ".dataSources[].source.address=\"${escrow}\"" -i subgraph.yaml - yq ".dataSources[].network |= \"hardhat\"" -i subgraph.yaml - yarn codegen - yarn build - yarn create-local - yarn deploy-local | tee deploy.txt - deployment_id="$(grep "Build completed: " deploy.txt | awk '{print $3}' | sed -e 's/\x1b\[[0-9;]*m//g')" - curl -s "http://graph-node:${GRAPH_NODE_ADMIN_PORT}" \ - -H 'content-type: application/json' \ - -d "{\"jsonrpc\":\"2.0\",\"id\":\"1\",\"method\":\"subgraph_reassign\",\"params\":{\"node_id\":\"default\",\"ipfs_hash\":\"${deployment_id}\"}}" - echo "==== TAP subgraph done ====" -} - deploy_block_oracle() { echo "==== Block-oracle subgraph ====" if curl -s "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/block-oracle" \ @@ -102,18 +74,15 @@ deploy_block_oracle() { echo "==== Block-oracle subgraph done ====" } -# Launch all three in parallel +# Launch in parallel deploy_network & pid_network=$! -deploy_tap & -pid_tap=$! deploy_block_oracle & pid_oracle=$! # Wait for all, fail if any fails failed=0 wait $pid_network || { echo "FAILED: Network subgraph"; failed=1; } -wait $pid_tap || { echo "FAILED: TAP subgraph"; failed=1; } wait $pid_oracle || { echo "FAILED: Block-oracle subgraph"; failed=1; } if [ "$failed" -ne 0 ]; then diff --git a/containers/indexer/indexer-agent/dev/run-override.sh b/containers/indexer/indexer-agent/dev/run-override.sh index 52631a97..07d5cba6 100755 --- a/containers/indexer/indexer-agent/dev/run-override.sh +++ b/containers/indexer/indexer-agent/dev/run-override.sh @@ -25,7 +25,6 @@ fi export INDEXER_AGENT_HORIZON_ADDRESS_BOOK=/opt/config/horizon.json export INDEXER_AGENT_SUBGRAPH_SERVICE_ADDRESS_BOOK=/opt/config/subgraph-service.json -export INDEXER_AGENT_TAP_ADDRESS_BOOK=/opt/config/tap-contracts.json export INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/block-oracle" export INDEXER_AGENT_GATEWAY_ENDPOINT="http://gateway:${GATEWAY_PORT}" export INDEXER_AGENT_GRAPH_NODE_QUERY_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}" @@ -46,7 +45,6 @@ export INDEXER_AGENT_POSTGRES_PORT="${POSTGRES_PORT}" export INDEXER_AGENT_POSTGRES_USERNAME=postgres export INDEXER_AGENT_POSTGRES_PASSWORD= export INDEXER_AGENT_PUBLIC_INDEXER_URL="http://indexer-service:${INDEXER_SERVICE_PORT}" -export INDEXER_AGENT_TAP_SUBGRAPH_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/semiotic/tap" export INDEXER_AGENT_MAX_PROVISION_INITIAL_SIZE=200000 export INDEXER_AGENT_CONFIRMATION_BLOCKS=1 export INDEXER_AGENT_LOG_LEVEL=trace diff --git a/containers/indexer/indexer-agent/run.sh b/containers/indexer/indexer-agent/run.sh index 5c2e7a1c..4bf148e8 100755 --- a/containers/indexer/indexer-agent/run.sh +++ b/containers/indexer/indexer-agent/run.sh @@ -39,7 +39,6 @@ fi export INDEXER_AGENT_HORIZON_ADDRESS_BOOK=/opt/config/horizon.json export INDEXER_AGENT_SUBGRAPH_SERVICE_ADDRESS_BOOK=/opt/config/subgraph-service.json -export INDEXER_AGENT_TAP_ADDRESS_BOOK=/opt/config/tap-contracts.json export INDEXER_AGENT_EPOCH_SUBGRAPH_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/block-oracle" export INDEXER_AGENT_GATEWAY_ENDPOINT="http://gateway:${GATEWAY_PORT}" export INDEXER_AGENT_GRAPH_NODE_QUERY_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}" @@ -60,7 +59,6 @@ export INDEXER_AGENT_POSTGRES_PORT="${POSTGRES_PORT}" export INDEXER_AGENT_POSTGRES_USERNAME=postgres export INDEXER_AGENT_POSTGRES_PASSWORD= export INDEXER_AGENT_PUBLIC_INDEXER_URL="http://indexer-service:${INDEXER_SERVICE_PORT}" -export INDEXER_AGENT_TAP_SUBGRAPH_ENDPOINT="http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/semiotic/tap" export INDEXER_AGENT_MAX_PROVISION_INITIAL_SIZE=200000 export INDEXER_AGENT_CONFIRMATION_BLOCKS=1 export INDEXER_AGENT_LOG_LEVEL=trace diff --git a/containers/indexer/indexer-service/run.sh b/containers/indexer/indexer-service/run.sh index b9e8a26d..08ab7a92 100755 --- a/containers/indexer/indexer-service/run.sh +++ b/containers/indexer/indexer-service/run.sh @@ -4,7 +4,6 @@ set -eu . /opt/shared/lib.sh -tap_verifier=$(contract_addr TAPVerifier tap-contracts) graph_tally_verifier=$(contract_addr GraphTallyCollector.address horizon) subgraph_service=$(contract_addr SubgraphService.address subgraph-service) @@ -25,10 +24,6 @@ query_url = "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/graph-n recently_closed_allocation_buffer_secs = 60 syncing_interval_secs = 30 -[subgraphs.escrow] -query_url = "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/semiotic/tap" -syncing_interval_secs = 30 - [blockchain] chain_id = 1337 receipts_verifier_address_v2 = "${graph_tally_verifier}" diff --git a/containers/indexer/start-indexing/run.sh b/containers/indexer/start-indexing/run.sh index 5d183ebd..24b5c71d 100755 --- a/containers/indexer/start-indexing/run.sh +++ b/containers/indexer/start-indexing/run.sh @@ -22,7 +22,7 @@ then signal_per_dep="1000000000000000000000" # 1000 GRT per deployment added=0 - for subgraph_name in graph-network block-oracle semiotic/tap; do + for subgraph_name in graph-network block-oracle; do dep_id="$(curl -s "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/${subgraph_name}" \ -H 'content-type: application/json' \ -d '{"query": "{ _meta { deployment } }" }' | jq -r '.data._meta.deployment')" @@ -77,11 +77,9 @@ get_deployment() { network_deployment="$(get_deployment graph-network)" block_oracle_deployment="$(get_deployment block-oracle)" -tap_deployment="$(get_deployment semiotic/tap)" elapsed "network_deployment=${network_deployment}" elapsed "block_oracle_deployment=${block_oracle_deployment}" -elapsed "tap_deployment=${tap_deployment}" # -- Publish subgraphs to GNS (required for allocations) -- subgraph_count=$(curl -s "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/graph-network" \ @@ -92,7 +90,7 @@ if [ "${subgraph_count:-0}" -ge 3 ]; then else gns=$(contract_addr L2GNS.address subgraph-service) all_dep_hexes="" - for dep_name in network tap block_oracle; do + for dep_name in network block_oracle; do eval dep_id=\$${dep_name}_deployment dep_hex="$(curl -s -X POST "http://ipfs:${IPFS_RPC_PORT}/api/v0/cid/format?arg=${dep_id}&b=base16" | jq -r '.Formatted')" dep_hex="${dep_hex#f01701220}" @@ -128,11 +126,10 @@ fi graph-indexer indexer connect "http://indexer-agent:${INDEXER_MANAGEMENT_PORT}" graph-indexer indexer --network=hardhat rules set "${network_deployment}" decisionBasis always -o json graph-indexer indexer --network=hardhat rules set "${block_oracle_deployment}" decisionBasis always -o json -graph-indexer indexer --network=hardhat rules set "${tap_deployment}" decisionBasis always -o json # -- Resume subgraphs that may have been paused by indexer-agent -- elapsed "Resuming subgraphs..." -for dep in "${network_deployment}" "${block_oracle_deployment}" "${tap_deployment}"; do +for dep in "${network_deployment}" "${block_oracle_deployment}"; do curl -s -X POST "http://graph-node:${GRAPH_NODE_ADMIN_PORT}/" -H 'content-type: application/json' \ -d "{\"jsonrpc\": \"2.0\", \"method\": \"subgraph_resume\", \"params\": {\"deployment\": \"${dep}\"}, \"id\": 1}" done diff --git a/containers/query-payments/tap-agent/run.sh b/containers/query-payments/tap-agent/run.sh index f2fb142f..2dcd0f68 100755 --- a/containers/query-payments/tap-agent/run.sh +++ b/containers/query-payments/tap-agent/run.sh @@ -5,7 +5,6 @@ set -eu . /opt/shared/lib.sh cd /opt -tap_verifier=$(contract_addr TAPVerifier tap-contracts) graph_tally_verifier=$(contract_addr GraphTallyCollector.address horizon) subgraph_service=$(contract_addr SubgraphService.address subgraph-service) @@ -30,10 +29,6 @@ query_url = "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/graph-n recently_closed_allocation_buffer_secs = 60 syncing_interval_secs = 30 -[subgraphs.escrow] -query_url = "http://graph-node:${GRAPH_NODE_GRAPHQL_PORT}/subgraphs/name/semiotic/tap" -syncing_interval_secs = 30 - [blockchain] chain_id = 1337 receipts_verifier_address_v2 = "${graph_tally_verifier}" diff --git a/containers/query-payments/tap-aggregator/run.sh b/containers/query-payments/tap-aggregator/run.sh index 26185222..862e3ab9 100755 --- a/containers/query-payments/tap-aggregator/run.sh +++ b/containers/query-payments/tap-aggregator/run.sh @@ -4,13 +4,11 @@ set -eu . /opt/shared/lib.sh -tap_verifier=$(contract_addr TAPVerifier tap-contracts) graph_tally_verifier=$(contract_addr GraphTallyCollector.address horizon) export TAP_PORT="${TAP_AGGREGATOR_PORT}" export TAP_PRIVATE_KEY="${ACCOUNT1_SECRET}" export TAP_DOMAIN_CHAIN_ID=1337 -export TAP_DOMAIN_VERIFYING_CONTRACT="${tap_verifier}" export TAP_DOMAIN_VERIFYING_CONTRACT_V2="${graph_tally_verifier}" tap_aggregator diff --git a/tests/src/graphql.rs b/tests/src/graphql.rs index 22c03f97..52beceae 100644 --- a/tests/src/graphql.rs +++ b/tests/src/graphql.rs @@ -139,15 +139,15 @@ impl TestNetwork { /// Query the TAP subgraph for escrow accounts. pub async fn query_tap_escrow_accounts(&self) -> Result { - let query = r#"{ escrowAccounts(first: 10) { + let query = r#"{ paymentsEscrowAccounts(first: 10) { balance - sender { id } + payer { id } receiver { id } } }"#; // TAP subgraph may be empty — treat GraphQL errors as empty result - let resp = self.graphql_post(&self.tap_subgraph_url, query, None).await; + let resp = self.graphql_post(&self.subgraph_url, query, None).await; match resp { - Ok(v) => Ok(v["data"]["escrowAccounts"].clone()), + Ok(v) => Ok(v["data"]["paymentsEscrowAccounts"].clone()), Err(_) => Ok(Value::Array(vec![])), } } diff --git a/tests/src/lib.rs b/tests/src/lib.rs index cda8b73e..5a947f84 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -23,7 +23,6 @@ pub struct TestNetwork { pub rpc_url: String, pub subgraph_url: String, pub block_oracle_subgraph_url: String, - pub tap_subgraph_url: String, pub gateway_url: String, pub management_url: String, pub gateway_api_key: String, @@ -98,8 +97,6 @@ impl TestNetwork { let subgraph_url = format!("http://{graph_host}:{graph_port}/subgraphs/name/graph-network"); let block_oracle_subgraph_url = format!("http://{graph_host}:{graph_port}/subgraphs/name/block-oracle"); - let tap_subgraph_url = - format!("http://{graph_host}:{graph_port}/subgraphs/name/semiotic/tap"); let gateway_url = format!("http://{gateway_host}:{gateway_port}"); let management_url = format!("http://{mgmt_host}:{mgmt_port}"); @@ -143,7 +140,6 @@ impl TestNetwork { rpc_url, subgraph_url, block_oracle_subgraph_url, - tap_subgraph_url, gateway_url, management_url, gateway_api_key, diff --git a/tests/src/polling.rs b/tests/src/polling.rs index 0d669c77..034675b2 100644 --- a/tests/src/polling.rs +++ b/tests/src/polling.rs @@ -206,7 +206,7 @@ impl TestNetwork { .subgraph_url .replace(":8000/subgraphs/name/graph-network", ":8020/"); let client = reqwest::Client::new(); - for name in ["graph-network", "block-oracle", "semiotic/tap"] { + for name in ["graph-network", "block-oracle"] { // Get the deployment ID for this subgraph let meta_url = self.subgraph_url.replace("graph-network", name); let meta_resp = client diff --git a/tests/tests/query_fees.rs b/tests/tests/query_fees.rs index e7c86990..2624948c 100644 --- a/tests/tests/query_fees.rs +++ b/tests/tests/query_fees.rs @@ -64,10 +64,10 @@ async fn tap_escrow_state_observable() -> Result<()> { if count > 0 { for acc in accounts.as_array().unwrap() { - let sender = acc["sender"]["id"].as_str().unwrap_or("?"); + let payer = acc["payer"]["id"].as_str().unwrap_or("?"); let receiver = acc["receiver"]["id"].as_str().unwrap_or("?"); let balance = acc["balance"].as_str().unwrap_or("0"); - eprintln!(" sender={sender} receiver={receiver} balance={balance}"); + eprintln!(" payer={payer} receiver={receiver} balance={balance}"); } } else { eprintln!(" NOTE: No escrow accounts yet — TAP escrow manager may need time to process");