diff --git a/subgraphs/venus/config/index.ts b/subgraphs/venus/config/index.ts index 0f89b0cc..0d63790e 100644 --- a/subgraphs/venus/config/index.ts +++ b/subgraphs/venus/config/index.ts @@ -26,7 +26,7 @@ const main = () => { network: 'chapel', comptrollerAddress: bscTestnetCoreDeployments.addresses.Unitroller, startBlock: '2802485', - vwbETHAddress: bscTestnetCoreDeployments.addresses.vWBETH, + wbETHAddress: '0xf9f98365566f4d55234f24b99caa1afbe6428d44', vTRXAddress: '0x369fea97f6fb7510755dca389088d9e2e2819278', vTUSDOldAddress: '0x3a00d9b02781f47d033bad62edc55fbf8d083fb0', }, diff --git a/subgraphs/venus/src/constants/addresses.ts b/subgraphs/venus/src/constants/addresses.ts index f51f54a6..47438173 100644 --- a/subgraphs/venus/src/constants/addresses.ts +++ b/subgraphs/venus/src/constants/addresses.ts @@ -2,7 +2,7 @@ import { Address } from '@graphprotocol/graph-ts'; import { comptrollerAddress as comptrollerAddressString, - vwbETHAddress as vwbETHAddressString, + wbETHAddress as wbETHAddressString, vTRXAddress as vTRXAddressString, vTUSDOldAddress as vTUSDOldAddressString, } from './config'; @@ -14,8 +14,8 @@ export const nullAddress = Address.fromString(nullAddressString); export const nativeAddress = Address.fromString('0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE'); -export const vwbETHAddress = Address.fromString( - vwbETHAddressString.length > 0 ? vwbETHAddressString : nullAddressString, +export const wbETHAddress = Address.fromString( + wbETHAddressString.length > 0 ? wbETHAddressString : nullAddressString, ); export const vTRXAddressAddress = Address.fromString( diff --git a/subgraphs/venus/src/constants/config-template b/subgraphs/venus/src/constants/config-template index c380e719..9efa34a9 100644 --- a/subgraphs/venus/src/constants/config-template +++ b/subgraphs/venus/src/constants/config-template @@ -2,7 +2,7 @@ export const comptrollerAddress = '{{ comptrollerAddress }}'; -export const vwbETHAddress = '{{ vwbETHAddress }}'; +export const wbETHAddress = '{{ wbETHAddress }}'; export const vTRXAddress = '{{ vTRXAddress }}'; diff --git a/subgraphs/venus/src/operations/getOrCreate.ts b/subgraphs/venus/src/operations/getOrCreate.ts index 8cdda6df..2d4eef79 100644 --- a/subgraphs/venus/src/operations/getOrCreate.ts +++ b/subgraphs/venus/src/operations/getOrCreate.ts @@ -11,7 +11,7 @@ import { VToken } from '../../generated/templates/VToken/VToken'; import { zeroBigInt32 } from '../constants'; import { nativeAddress, - vwbETHAddress, + wbETHAddress, vTRXAddressAddress, vTUSDOldAddress, } from '../constants/addresses'; @@ -186,7 +186,7 @@ export function getOrCreateToken(asset: Address): Token { let tokenEntity = Token.load(getTokenId(asset)); if (!tokenEntity) { - if (asset.equals(vwbETHAddress)) { + if (asset.equals(wbETHAddress)) { return getOrCreateWrappedEthToken(); } else { const erc20 = BEP20.bind(asset); diff --git a/subgraphs/venus/tests/scripts/checkMarketPositions.ts b/subgraphs/venus/tests/scripts/checkMarketPositions.ts index 61741e20..778677ae 100644 --- a/subgraphs/venus/tests/scripts/checkMarketPositions.ts +++ b/subgraphs/venus/tests/scripts/checkMarketPositions.ts @@ -23,7 +23,7 @@ const checkMarketPositions = async ( assert.equal( marketPosition.vTokenBalanceMantissa, accountBalance.toString(), - `incorrect supply balance for account ${marketPosition.account.id} in market ${MarketPosition.market.symbol} ${MarketPosition.market.id}. Subgraph Value: ${ + `incorrect supply balance for account ${marketPosition.account.id} in market ${marketPosition.market.symbol} ${marketPosition.market.id}. Subgraph Value: ${ marketPosition.vTokenBalanceMantissa }, contractValue: ${accountBalance.toString()}`, ); @@ -45,7 +45,7 @@ const checkMarketPositions = async ( updatedSubgraphValue, borrowBalanceStored.toString(), ` - incorrect borrow balance on account ${marketPosition.account.id} on market ${MarketPosition.market.symbol} ${MarketPosition.market.id}, accountBorrowIndex: ${MarketPosition.borrowIndex}, marketBorrowIndex ${MarketPosition.market.borrowIndex} subgraphValue: ${MarketPosition.storedBorrowBalanceMantissa} contractValue: ${borrowBalanceStored}`, + incorrect borrow balance on account ${marketPosition.account.id} on market ${marketPosition.market.symbol} ${marketPosition.market.id}, accountBorrowIndex: ${marketPosition.borrowIndex}, marketBorrowIndex ${marketPosition.market.borrowIndex} subgraphValue: ${marketPosition.storedBorrowBalanceMantissa} contractValue: ${borrowBalanceStored}`, ); } catch (e) { console.log(e.message);