Skip to content

Commit

Permalink
Add amount skipped metric to subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
boyuanx committed Dec 25, 2023
1 parent 154fdcd commit 95dd3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions subgraph/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ type TTEvent @entity(immutable: true) {
feesCharged: BigInt
pendingAmountClaimable: BigInt
batchId: BigInt
amountSkipped: BigInt
}

type TTUV2InstanceMetadata @entity {
Expand Down
3 changes: 3 additions & 0 deletions subgraph/src/token-table-unlocker-v-2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ export function handleActualCreated(event: ActualCreatedEvent): void {
entity.batchId = event.params.batchId
entity.recipient = event.params.recipient
entity.recipientId = event.params.recipientId
entity.amountSkipped = TokenTableUnlockerV2.bind(event.address)
.actuals(event.params.actualId)
.getAmountClaimed()
entity.projectId = context.getString('projectId')
entity.save()

Expand Down

0 comments on commit 95dd3fc

Please sign in to comment.