Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@
],
},
{
"matchUpdateTypes": ["minor", "patch"],
"matchUpdateTypes": ["patch"],
"automerge": true
},
{
"matchUpdateTypes": ["minor"],
"matchCurrentVersion": "!/^0/",
"automerge": true
},
Expand Down
32 changes: 32 additions & 0 deletions graphql/allocations.query.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# AllocationsQuery
#
# This query retrieves allocations for a specified indexer in The Graph's Indexer TAP system.
#
# Input Variables:
# - $indexer (ID!): The unique identifier of the Indexer whose allocations are being queried.
# - $closedAtThreshold (Int!): The threshold timestamp used to filter closed allocations.
# - $block (Block_height): The block height at which to query allocations (optional).
# - $first (Int!): The maximum number of allocations to return (used for pagination).
# - $last (ID!): The ID of the last allocation from a previous query (used for pagination).
#
# Query Logic:
# - Fetches block metadata (number, hash, timestamp) using the provided `$block` height.
# - Retrieves allocations filtered by:
# - Allocations with `id > $last` (for pagination).
# - Allocations where the indexer has the provided `$indexer` ID.
# - Allocations that are either `Active`, or `Closed` but closed after `$closedAtThreshold`.
# - Results are sorted by `id` in ascending order and limited to `$first` number of entries.
#
# Fragment: AllocationFragment
# - Returns detailed information about each allocation, including:
# - Allocation ID.
# - Indexer ID.
# - Number of allocated tokens.
# - Block and epoch when the allocation was created.
# - Epoch when the allocation was closed.
# - Subgraph deployment ID and denial status.
#
# Example Use Case:
# This query helps Indexers monitor their allocations, filter out inactive or irrelevant allocations,
# and retrieve allocation data for specific block heights or timeframes.

query AllocationsQuery(
$indexer: ID!,
$closedAtThreshold: Int!,
Expand Down
22 changes: 22 additions & 0 deletions graphql/escrow_account.query.graphql
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
# EscrowAccountQuery
#
# This query is used to retrieve escrow account information related to The Graph's Indexer
# TAP (Token Allocation Program) payment system.
#
# Input Variables:
# - $indexer (ID!): The unique ID of the Indexer whose escrow accounts are being queried.
# - $thawEndTimestamp (BigInt!): A timestamp used to filter signers whose thaw period has ended or is about to end.
#
# Query Logic:
# - Fetches escrow accounts where the `receiver` is the provided $indexer.
# - Returns the following information for each escrow account:
# - `balance`: The current balance of the escrow account.
# - `totalAmountThawing`: The total amount currently thawing in the escrow.
# - Retrieves the sender of the funds and filters the sender's `signers` based on the following:
# - `thawEndTimestamp_lte`: Only includes signers whose thaw end timestamp is less than or equal to the provided $thawEndTimestamp.
# - `isAuthorized: true`: Only includes signers that are authorized.
#
# Example Use Case:
# This query helps Indexers track escrow payments, including which funds are in the process of
# thawing and which signers are eligible to authorize transactions based on thaw end timestamps.

query EscrowAccountQuery($indexer: ID!, $thawEndTimestamp: BigInt!) {
escrowAccounts(where: { receiver_: { id: $indexer } }) {
balance
Expand Down
Loading