Skip to content

Commit ebb0f17

Browse files
committed
Merge branch 'main' of https://github.com/graphprotocol/indexer-rs into shiyasmohd/update-example-test-endpoints
2 parents 8043ca7 + f0e39d3 commit ebb0f17

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

.github/renovate.json5

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@
9898
],
9999
},
100100
{
101-
"matchUpdateTypes": ["minor", "patch"],
101+
"matchUpdateTypes": ["patch"],
102+
"automerge": true
103+
},
104+
{
105+
"matchUpdateTypes": ["minor"],
102106
"matchCurrentVersion": "!/^0/",
103107
"automerge": true
104108
},

graphql/allocations.query.graphql

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
# AllocationsQuery
2+
#
3+
# This query retrieves allocations for a specified indexer in The Graph's Indexer TAP system.
4+
#
5+
# Input Variables:
6+
# - $indexer (ID!): The unique identifier of the Indexer whose allocations are being queried.
7+
# - $closedAtThreshold (Int!): The threshold timestamp used to filter closed allocations.
8+
# - $block (Block_height): The block height at which to query allocations (optional).
9+
# - $first (Int!): The maximum number of allocations to return (used for pagination).
10+
# - $last (ID!): The ID of the last allocation from a previous query (used for pagination).
11+
#
12+
# Query Logic:
13+
# - Fetches block metadata (number, hash, timestamp) using the provided `$block` height.
14+
# - Retrieves allocations filtered by:
15+
# - Allocations with `id > $last` (for pagination).
16+
# - Allocations where the indexer has the provided `$indexer` ID.
17+
# - Allocations that are either `Active`, or `Closed` but closed after `$closedAtThreshold`.
18+
# - Results are sorted by `id` in ascending order and limited to `$first` number of entries.
19+
#
20+
# Fragment: AllocationFragment
21+
# - Returns detailed information about each allocation, including:
22+
# - Allocation ID.
23+
# - Indexer ID.
24+
# - Number of allocated tokens.
25+
# - Block and epoch when the allocation was created.
26+
# - Epoch when the allocation was closed.
27+
# - Subgraph deployment ID and denial status.
28+
#
29+
# Example Use Case:
30+
# This query helps Indexers monitor their allocations, filter out inactive or irrelevant allocations,
31+
# and retrieve allocation data for specific block heights or timeframes.
32+
133
query AllocationsQuery(
234
$indexer: ID!,
335
$closedAtThreshold: Int!,

graphql/escrow_account.query.graphql

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# EscrowAccountQuery
2+
#
3+
# This query is used to retrieve escrow account information related to The Graph's Indexer
4+
# TAP (Token Allocation Program) payment system.
5+
#
6+
# Input Variables:
7+
# - $indexer (ID!): The unique ID of the Indexer whose escrow accounts are being queried.
8+
# - $thawEndTimestamp (BigInt!): A timestamp used to filter signers whose thaw period has ended or is about to end.
9+
#
10+
# Query Logic:
11+
# - Fetches escrow accounts where the `receiver` is the provided $indexer.
12+
# - Returns the following information for each escrow account:
13+
# - `balance`: The current balance of the escrow account.
14+
# - `totalAmountThawing`: The total amount currently thawing in the escrow.
15+
# - Retrieves the sender of the funds and filters the sender's `signers` based on the following:
16+
# - `thawEndTimestamp_lte`: Only includes signers whose thaw end timestamp is less than or equal to the provided $thawEndTimestamp.
17+
# - `isAuthorized: true`: Only includes signers that are authorized.
18+
#
19+
# Example Use Case:
20+
# This query helps Indexers track escrow payments, including which funds are in the process of
21+
# thawing and which signers are eligible to authorize transactions based on thaw end timestamps.
22+
123
query EscrowAccountQuery($indexer: ID!, $thawEndTimestamp: BigInt!) {
224
escrowAccounts(where: { receiver_: { id: $indexer } }) {
325
balance

0 commit comments

Comments
 (0)