From 1368ea43a7de0db84ab827aeb62d4b78d376444b Mon Sep 17 00:00:00 2001 From: Corey Rice Date: Mon, 2 Dec 2024 12:09:02 -0300 Subject: [PATCH] fix: update eth underlying address on sepolia --- subgraphs/isolated-pools/config/index.ts | 2 ++ subgraphs/isolated-pools/src/constants/addresses.ts | 4 ++++ subgraphs/isolated-pools/src/constants/config-template | 6 ++++++ subgraphs/isolated-pools/src/operations/create.ts | 6 ++++++ 4 files changed, 18 insertions(+) diff --git a/subgraphs/isolated-pools/config/index.ts b/subgraphs/isolated-pools/config/index.ts index 0052876a..e0b9d374 100644 --- a/subgraphs/isolated-pools/config/index.ts +++ b/subgraphs/isolated-pools/config/index.ts @@ -52,6 +52,8 @@ const main = () => { network: 'sepolia', poolRegistryAddress: sepoliaDeployments.addresses.PoolRegistry, startBlock: '3930059', + vWETHLiquidStakedETHAddress: sepoliaDeployments.addresses.VToken_vWETH_LiquidStakedETH, + vWETHCoreAddress: sepoliaDeployments.addresses.VToken_vWETH_Core, }, chapel: { network: 'chapel', diff --git a/subgraphs/isolated-pools/src/constants/addresses.ts b/subgraphs/isolated-pools/src/constants/addresses.ts index 5c8001b6..982b7ff3 100644 --- a/subgraphs/isolated-pools/src/constants/addresses.ts +++ b/subgraphs/isolated-pools/src/constants/addresses.ts @@ -8,6 +8,8 @@ import { vankrBNBLiquidStakedBNBAddress as vankrBNBLiquidStakedBNBAddressString, vankrBNBDeFiAddress as vankrBNBDeFiAddressString, vSnBNBAddress as vSnBNBAddressString, + vWETHLiquidStakedETHAddress as vWETHLiquidStakedETHAddressString, + vWETHCoreAddress as vWETHCoreAddressString, } from './config'; export const poolRegistryAddress = Address.fromString(poolRegistryAddressString); @@ -22,3 +24,5 @@ export const vankrBNBLiquidStakedBNBAddress = Address.fromString( ); export const vankrBNBDeFiAddress = Address.fromString(vankrBNBDeFiAddressString); export const vSnBNBAddress = Address.fromString(vSnBNBAddressString); +export const vWETHLiquidStakedETHAddress = Address.fromString(vWETHLiquidStakedETHAddressString); +export const vWETHCoreAddress = Address.fromString(vWETHCoreAddressString); diff --git a/subgraphs/isolated-pools/src/constants/config-template b/subgraphs/isolated-pools/src/constants/config-template index 90c6af44..04c243de 100644 --- a/subgraphs/isolated-pools/src/constants/config-template +++ b/subgraphs/isolated-pools/src/constants/config-template @@ -13,3 +13,9 @@ export const vankrBNBLiquidStakedBNBAddress = '{{ vankrBNBLiquidStakedBNBAddress export const vankrBNBDeFiAddress = '{{ vankrBNBDeFiAddress }}' || '0x0000000000000000000000000000000000000000' // @ts-ignore When the template is created this will fallback to a null string export const vSnBNBAddress = '{{ vSnBNBAddress }}' || '0x0000000000000000000000000000000000000000' +// @ts-ignore When the template is created this will fallback to a null string +export const vWETHLiquidStakedETHAddress = '{{ vWETHLiquidStakedETHAddress }}' || '0x0000000000000000000000000000000000000000' +// @ts-ignore When the template is created this will fallback to a null string +export const vWETHCoreAddress = '{{ vWETHCoreAddress }}' || '0x0000000000000000000000000000000000000000' + + diff --git a/subgraphs/isolated-pools/src/operations/create.ts b/subgraphs/isolated-pools/src/operations/create.ts index 5e051e33..ad77d507 100644 --- a/subgraphs/isolated-pools/src/operations/create.ts +++ b/subgraphs/isolated-pools/src/operations/create.ts @@ -34,6 +34,8 @@ import { vagEURAddress, vankrBNBDeFiAddress, vankrBNBLiquidStakedBNBAddress, + vWETHLiquidStakedETHAddress, + vWETHCoreAddress, } from '../constants/addresses'; import { getTokenPriceInCents, valueOrNotAvailableIntIfReverted } from '../utilities'; import { @@ -188,6 +190,10 @@ export function createMarket( market.symbol = 'vslisBNB_LiquidStakedBNB'; } + if (vTokenAddress.equals(vWETHLiquidStakedETHAddress) || vTokenAddress.equals(vWETHCoreAddress)) { + market.underlyingAddress = Address.fromHexString('0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9'); + } + market.save(); return market; }