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