Skip to content

Commit

Permalink
feat: add declared calls for events with multiple external calls
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Jan 6, 2025
1 parent 05941bd commit ea10fee
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions subgraphs/venus/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ templates:
handler: handleLiquidateBorrow
- event: AccrueInterest(uint256,uint256,uint256,uint256)
handler: handleAccrueInterest
calls:
getCash: VToken[event.address].getCash()
borrowRatePerBlock: VToken[event.address].borrowRatePerBlock()
supplyRatePerBlock: VToken[event.address].supplyRatePerBlock()
exchangeRateStored: VToken[event.address].exchangeRateStored()
totalReserves: VToken[event.address].totalReserves()
- event: NewReserveFactor(uint256,uint256)
handler: handleNewReserveFactor
- event: Transfer(indexed address,indexed address,uint256)
Expand All @@ -139,8 +145,16 @@ templates:
handler: handleNewMarketInterestRateModel
- event: ReservesAdded(address,uint256,uint256)
handler: handleReservesAdded
calls:
borrowRatePerBlock: VToken[event.address].borrowRatePerBlock()
supplyRatePerBlock: VToken[event.address].supplyRatePerBlock()
exchangeRateStored: VToken[event.address].exchangeRateStored()
- event: ReservesReduced(address,uint256,uint256)
handler: handleReservesReduced
calls:
borrowRatePerBlock: VToken[event.address].borrowRatePerBlock()
supplyRatePerBlock: VToken[event.address].supplyRatePerBlock()
exchangeRateStored: VToken[event.address].exchangeRateStored()
- name: VTokenUpdatedEvents
kind: ethereum/contract
network: {{ network }}
Expand Down

0 comments on commit ea10fee

Please sign in to comment.