Skip to content

Commit d16cf29

Browse files
committed
feat: fix getAllocation
1 parent 41d49c9 commit d16cf29

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

schema.graphql

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type GraphNetwork @entity {
4343
totalTaxedQueryFees: BigInt!
4444

4545
# It is hard to separate the unclaimed and rebates lost
46-
"Total unclaimed rebates. Includes unclaimed rebates and rebates lost in cobbs douglas "
46+
"Total unclaimed rebates. Includes unclaimed rebates and rebates lost in rebate mechanism "
4747
totalUnclaimedQueryFeeRebates: BigInt!
4848

4949
# Indexing rewards globals
@@ -386,10 +386,10 @@ type SubgraphDeployment @entity {
386386
"Total query fees earned by this Subgraph Deployment, without curator query fees"
387387
queryFeesAmount: BigInt!
388388

389-
"Total query fee rebates for indexers earned from the protocol, through the cobbs douglas formula."
389+
"Total query fee rebates for indexers earned from the protocol, through the rebate mechanism formula."
390390
queryFeeRebates: BigInt!
391391

392-
"Total query fee rebates for delegators earned from the protocol, through the cobbs douglas formula."
392+
"Total query fee rebates for delegators earned from the protocol, through the rebate mechanism formula."
393393
delegatorQueryFees: BigInt!
394394

395395
"Total curator rewards from fees"
@@ -479,7 +479,7 @@ type Indexer @entity {
479479
"Total query fees collected. Includes the portion given to delegators"
480480
queryFeesCollected: BigInt!
481481

482-
"Query fee rebate amount claimed from the protocol through cobbs douglas. Does not include portion given to delegators"
482+
"Query fee rebate amount claimed from the protocol through rebate mechanism. Does not include portion given to delegators"
483483
queryFeeRebates: BigInt!
484484

485485
"Total indexing rewards earned by this indexer from inflation. Including delegation rewards"
@@ -619,12 +619,12 @@ type Allocation @entity {
619619
"Fees this allocation collected from query fees upon closing. Excludes curator reward and protocol tax"
620620
queryFeesCollected: BigInt!
621621

622-
"Query fee rebate amount claimed from the protocol through cobbs douglas. Does not include portion given to delegators"
622+
"Query fee rebate amount claimed from the protocol through rebates mechanism. Does not include portion given to delegators"
623623
queryFeeRebates: BigInt!
624624

625625
"Query fee rebates collected from the protocol. Can differ from queryFeeRebates if multiple vouchers per allocation are allowed."
626626
distributedRebates: BigInt!
627-
627+
628628
"Curator rewards deposited to the curating bonding curve"
629629
curatorRewards: BigInt!
630630

@@ -682,7 +682,7 @@ type Pool @entity {
682682
"Total query fees collected in this epoch"
683683
totalQueryFees: BigInt!
684684

685-
"Total query fees claimed in this epoch. Can be smaller than totalFees because of cobbs douglas function "
685+
"Total query fees claimed in this epoch. Can be smaller than totalFees because of rebate mechanism function "
686686
claimedFees: BigInt!
687687

688688
"Total rewards from query fees deposited to all curator bonding curves during the epoch"
@@ -1297,10 +1297,10 @@ type SubgraphDeploymentDailyData @entity {
12971297
"[CUMULATIVE] Total query fees earned by this Subgraph Deployment, without curator query fees"
12981298
queryFeesAmount: BigInt!
12991299

1300-
"[CUMULATIVE] Total query fee rebates for indexers earned from the protocol, through the cobbs douglas formula."
1300+
"[CUMULATIVE] Total query fee rebates for indexers earned from the protocol, through the rebate mechanism formula."
13011301
queryFeeRebates: BigInt!
13021302

1303-
"[CUMULATIVE] Total query fee rebates for delegators earned from the protocol, through the cobbs douglas formula."
1303+
"[CUMULATIVE] Total query fee rebates for delegators earned from the protocol, through the rebate mechanism formula."
13041304
delegatorQueryFees: BigInt!
13051305

13061306
"[CUMULATIVE] Total curator rewards from fees"
@@ -1359,7 +1359,7 @@ type GraphNetworkDailyData @entity {
13591359
totalTaxedQueryFees: BigInt!
13601360

13611361
# It is hard to separate the unclaimed and rebates lost
1362-
"[CUMULATIVE] Total unclaimed rebates. Includes unclaimed rebates and rebates lost in cobbs douglas "
1362+
"[CUMULATIVE] Total unclaimed rebates. Includes unclaimed rebates and rebates lost in rebate mechanism "
13631363
totalUnclaimedQueryFeeRebates: BigInt!
13641364

13651365
# Indexing rewards globals

src/mappings/staking.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ export function handleAllocationClosedCobbDouglas(event: AllocationClosed1): voi
634634
// We must call the contract directly to see how many fees are getting closed in this
635635
// allocation. The event does not emit this information
636636
let staking = Staking.bind(event.address)
637-
let contractAlloc = staking.getAllocation(event.params.allocationID)
637+
let contractAlloc = staking.getAllocation1(event.params.allocationID)
638638
pool.totalQueryFees = pool.totalQueryFees.plus(contractAlloc.collectedFees)
639639
pool.save()
640640

0 commit comments

Comments
 (0)