From 23d1f3fc6f559f4bd394749698de7da79614bc50 Mon Sep 17 00:00:00 2001 From: Soil King <157099073+soilking@users.noreply.github.com> Date: Fri, 12 Apr 2024 12:29:26 -0700 Subject: [PATCH] correct inaccuracy --- projects/subgraph-bean/src/BeanstalkHandler.ts | 4 ++-- projects/subgraph-bean/subgraph.yaml | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/subgraph-bean/src/BeanstalkHandler.ts b/projects/subgraph-bean/src/BeanstalkHandler.ts index 7d7b86f835..65f8454d4e 100644 --- a/projects/subgraph-bean/src/BeanstalkHandler.ts +++ b/projects/subgraph-bean/src/BeanstalkHandler.ts @@ -122,7 +122,7 @@ export function handleSunrise(event: Sunrise): void { // Update price, liquidity, and deltaB in the pool updatePoolValues( - BEAN_3CRV.toHexString(), + bean.pools[i], event.block.timestamp, event.block.number, ZERO_BI, @@ -130,7 +130,7 @@ export function handleSunrise(event: Sunrise): void { liquidity.minus(pool.liquidityUSD), deltaB ); - updatePoolPrice(BEAN_3CRV.toHexString(), event.block.timestamp, event.block.number, price); + updatePoolPrice(bean.pools[i], event.block.timestamp, event.block.number, price); weightedPrice = weightedPrice.plus(price.times(liquidity)); totalLiquidity = totalLiquidity.plus(liquidity); diff --git a/projects/subgraph-bean/subgraph.yaml b/projects/subgraph-bean/subgraph.yaml index 6af1e181e8..afded7e82c 100644 --- a/projects/subgraph-bean/subgraph.yaml +++ b/projects/subgraph-bean/subgraph.yaml @@ -100,6 +100,14 @@ dataSources: file: ../subgraph-core/abis/BeanstalkPrice.json - name: CurvePrice file: ../subgraph-core/abis/CurvePrice.json + - name: UniswapV2Pair + file: ../subgraph-core/abis/UniswapV2Pair.json + - name: Bean3CRV + file: ../subgraph-core/abis/Bean3CRV.json + - name: CalculationsCurve + file: ../subgraph-core/abis/CalculationsCurve.json + - name: ERC20 + file: ../subgraph-core/abis/ERC20.json eventHandlers: - event: Sunrise(indexed uint256) handler: handleSunrise