diff --git a/subgraphs/isolated-pools/tests/integration/checkEntities.ts b/subgraphs/isolated-pools/tests/integration/checkEntities.ts index e3e8fafc..6fb8594b 100644 --- a/subgraphs/isolated-pools/tests/integration/checkEntities.ts +++ b/subgraphs/isolated-pools/tests/integration/checkEntities.ts @@ -4,6 +4,8 @@ import { ethers } from 'hardhat'; import createSubgraphClient from '../../subgraph-client'; +const { getAddress } = ethers.utils; + const subgraphClient = createSubgraphClient( 'http://graph-node:8000/subgraphs/name/venusprotocol/venus-isolated-pools', ); @@ -28,18 +30,18 @@ export const checkMarket = async (marketAddress: string) => { expect(market?.cashMantissa).to.equal(await vToken.getCash()); expect(market?.reservesMantissa).to.equal(await vToken.totalReserves()); - expect(market?.pool.id).to.equal(await vToken.comptroller()); + expect(getAddress(market?.pool.id)).to.equal(await vToken.comptroller()); expect(market?.isListed).to.equal(comptroller.markets(marketAddress).isListed); expect(market?.collateralFactorMantissa).to.equal( comptroller.markets(marketAddress).collateralFactorMantissa, ); expect(market?.exchangeRateMantissa).to.equal(vToken?.exchangeRateStored); - expect(market?.interestRateModelAddress).to.equal(vToken?.interestRateModel.toLowerCase()); + expect(getAddress(market?.interestRateModelAddress)).to.equal(vToken?.interestRateModel()); expect(market?.name).to.equal(vToken?.name()); expect(market?.reservesMantissa).to.equal(vToken?.totalReserves()); expect(market?.supplyRateMantissa).to.equal(vToken?.supplyRatePerBlock()); expect(market?.symbol).to.equal(await vToken.symbol()); - expect(market?.underlyingAddress).to.equal(vToken?.underlyingAddress.toLowerCase()); + expect(getAddress(market?.underlyingAddress)).to.equal(vToken?.underlyingAddress()); expect(market?.borrowCapMantissa).to.equal(vToken?.borrowCaps(marketAddress)); expect(market?.supplyCapMantissa).to.equal(vToken?.supplyCaps(marketAddress)); expect(market?.accrualBlockNumber).to.equal(vToken?.accrualBlockNumber());