Skip to content

Commit

Permalink
fix: update eth underlying address on sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyar committed Dec 4, 2024
1 parent f2aa4ba commit ad8ed3b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions subgraphs/isolated-pools/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 4 additions & 0 deletions subgraphs/isolated-pools/src/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
6 changes: 6 additions & 0 deletions subgraphs/isolated-pools/src/constants/config-template
Original file line number Diff line number Diff line change
Expand Up @@ -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'


6 changes: 6 additions & 0 deletions subgraphs/isolated-pools/src/operations/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import {
vagEURAddress,
vankrBNBDeFiAddress,
vankrBNBLiquidStakedBNBAddress,
vWETHLiquidStakedETHAddress,
vWETHCoreAddress,
} from '../constants/addresses';
import { getTokenPriceInCents, valueOrNotAvailableIntIfReverted } from '../utilities';
import {
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ad8ed3b

Please sign in to comment.