From ea10feec8c723b81c36c9efd29ef82d597675f54 Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 6 Jan 2025 15:03:12 -0300 Subject: [PATCH] feat: add declared calls for events with multiple external calls --- subgraphs/venus/template.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/subgraphs/venus/template.yaml b/subgraphs/venus/template.yaml index 96fa23f5..34a968be 100644 --- a/subgraphs/venus/template.yaml +++ b/subgraphs/venus/template.yaml @@ -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) @@ -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 }}