Skip to content

Commit

Permalink
Merge pull request #31 from kilnfi/mortimr/eth-445-add-totalunderlyin…
Browse files Browse the repository at this point in the history
…gsupply-field-to-erc20balancesnapshots

feat: add totalUnderlyingSupply to erc20 balance snapshots
  • Loading branch information
mortimr authored Oct 17, 2023
2 parents a16dd69 + 6d6ceea commit 0a3b6de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1128,6 +1128,7 @@ type ERC20BalanceSnapshot @entity {
staker: Bytes!
sharesBalance: BigInt!
totalSupply: BigInt!
totalUnderlyingSupply: BigInt!

createdAt: BigInt!
createdAtBlock: BigInt!
Expand Down
1 change: 1 addition & 0 deletions src/ERC20.mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function snapshotBalance(event: ethereum.Event, staker: Address): void {
balanceSnapshot.createdAt = ts;
balanceSnapshot.createdAtBlock = blockId;
balanceSnapshot.totalSupply = integration!.totalSupply;
balanceSnapshot.totalUnderlyingSupply = integration!.totalUnderlyingSupply;
balanceSnapshot.save();
}

Expand Down

0 comments on commit 0a3b6de

Please sign in to comment.