diff --git a/abis/IStakingStitched.json b/abis/IStakingStitched.json index 7d93729d..991a8212 100644 --- a/abis/IStakingStitched.json +++ b/abis/IStakingStitched.json @@ -1045,6 +1045,67 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "_allocationID", + "type": "address" + } + ], + "name": "getAllocation", + "outputs": [ + { + "components": [ + { + "internalType": "address", + "name": "indexer", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "subgraphDeploymentID", + "type": "bytes32" + }, + { + "internalType": "uint256", + "name": "tokens", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "createdAtEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "closedAtEpoch", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "collectedFees", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "effectiveAllocation", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accRewardsPerAllocatedToken", + "type": "uint256" + } + ], + "internalType": "struct IStakingData.Allocation", + "name": "", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { diff --git a/src/mappings/staking.ts b/src/mappings/staking.ts index db5cd22f..5056c547 100644 --- a/src/mappings/staking.ts +++ b/src/mappings/staking.ts @@ -586,7 +586,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()