From d16cf2981456409de78c164a095b9f7cdd318820 Mon Sep 17 00:00:00 2001 From: juanmardefago Date: Wed, 15 Nov 2023 02:36:29 -0300 Subject: [PATCH] feat: fix getAllocation --- schema.graphql | 20 ++++++++++---------- src/mappings/staking.ts | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/schema.graphql b/schema.graphql index 81f9115..b8e6b24 100644 --- a/schema.graphql +++ b/schema.graphql @@ -43,7 +43,7 @@ type GraphNetwork @entity { totalTaxedQueryFees: BigInt! # It is hard to separate the unclaimed and rebates lost - "Total unclaimed rebates. Includes unclaimed rebates and rebates lost in cobbs douglas " + "Total unclaimed rebates. Includes unclaimed rebates and rebates lost in rebate mechanism " totalUnclaimedQueryFeeRebates: BigInt! # Indexing rewards globals @@ -386,10 +386,10 @@ type SubgraphDeployment @entity { "Total query fees earned by this Subgraph Deployment, without curator query fees" queryFeesAmount: BigInt! - "Total query fee rebates for indexers earned from the protocol, through the cobbs douglas formula." + "Total query fee rebates for indexers earned from the protocol, through the rebate mechanism formula." queryFeeRebates: BigInt! - "Total query fee rebates for delegators earned from the protocol, through the cobbs douglas formula." + "Total query fee rebates for delegators earned from the protocol, through the rebate mechanism formula." delegatorQueryFees: BigInt! "Total curator rewards from fees" @@ -479,7 +479,7 @@ type Indexer @entity { "Total query fees collected. Includes the portion given to delegators" queryFeesCollected: BigInt! - "Query fee rebate amount claimed from the protocol through cobbs douglas. Does not include portion given to delegators" + "Query fee rebate amount claimed from the protocol through rebate mechanism. Does not include portion given to delegators" queryFeeRebates: BigInt! "Total indexing rewards earned by this indexer from inflation. Including delegation rewards" @@ -619,12 +619,12 @@ type Allocation @entity { "Fees this allocation collected from query fees upon closing. Excludes curator reward and protocol tax" queryFeesCollected: BigInt! - "Query fee rebate amount claimed from the protocol through cobbs douglas. Does not include portion given to delegators" + "Query fee rebate amount claimed from the protocol through rebates mechanism. Does not include portion given to delegators" queryFeeRebates: BigInt! "Query fee rebates collected from the protocol. Can differ from queryFeeRebates if multiple vouchers per allocation are allowed." distributedRebates: BigInt! - + "Curator rewards deposited to the curating bonding curve" curatorRewards: BigInt! @@ -682,7 +682,7 @@ type Pool @entity { "Total query fees collected in this epoch" totalQueryFees: BigInt! - "Total query fees claimed in this epoch. Can be smaller than totalFees because of cobbs douglas function " + "Total query fees claimed in this epoch. Can be smaller than totalFees because of rebate mechanism function " claimedFees: BigInt! "Total rewards from query fees deposited to all curator bonding curves during the epoch" @@ -1297,10 +1297,10 @@ type SubgraphDeploymentDailyData @entity { "[CUMULATIVE] Total query fees earned by this Subgraph Deployment, without curator query fees" queryFeesAmount: BigInt! - "[CUMULATIVE] Total query fee rebates for indexers earned from the protocol, through the cobbs douglas formula." + "[CUMULATIVE] Total query fee rebates for indexers earned from the protocol, through the rebate mechanism formula." queryFeeRebates: BigInt! - "[CUMULATIVE] Total query fee rebates for delegators earned from the protocol, through the cobbs douglas formula." + "[CUMULATIVE] Total query fee rebates for delegators earned from the protocol, through the rebate mechanism formula." delegatorQueryFees: BigInt! "[CUMULATIVE] Total curator rewards from fees" @@ -1359,7 +1359,7 @@ type GraphNetworkDailyData @entity { totalTaxedQueryFees: BigInt! # It is hard to separate the unclaimed and rebates lost - "[CUMULATIVE] Total unclaimed rebates. Includes unclaimed rebates and rebates lost in cobbs douglas " + "[CUMULATIVE] Total unclaimed rebates. Includes unclaimed rebates and rebates lost in rebate mechanism " totalUnclaimedQueryFeeRebates: BigInt! # Indexing rewards globals diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index be4d48e..03803d8 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -634,7 +634,7 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi // We must call the contract directly to see how many fees are getting closed in this // allocation. The event does not emit this information let staking = Staking.bind(event.address) - let contractAlloc = staking.getAllocation(event.params.allocationID) + let contractAlloc = staking.getAllocation1(event.params.allocationID) pool.totalQueryFees = pool.totalQueryFees.plus(contractAlloc.collectedFees) pool.save()