Skip to content

Commit

Permalink
get all tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
julianmrodri committed Sep 26, 2024
1 parent c47001e commit debc02d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useEnv } from '#/utils/env'
import { whileImpersonating } from '../../../utils/impersonation'
import { advanceTime, advanceBlocks } from '../../../utils/time'
import { allTests, allocateToken, enableRewardsAccrual, mintWcToken } from './helpers'
import { forkNetwork, getForkBlock, COMP, REWARDS, getHolder } from './constants'
import { getForkBlock, COMP, REWARDS, getHolder } from './constants'
import { getResetFork } from '../helpers'
import {
ERC20Mock,
Expand All @@ -19,8 +19,6 @@ import { networkConfig } from '../../../../common/configuration'
import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers'
import { MAX_UINT256, ZERO_ADDRESS } from '../../../../common/constants'

const itL1 = forkNetwork != 'base' && forkNetwork != 'arbitrum' ? it : it.skip

for (const curr of allTests) {
const describeFork =
useEnv('FORK') && useEnv('FORK_NETWORK') === curr.forkNetwork ? describe : describe.skip
Expand Down Expand Up @@ -610,7 +608,7 @@ for (const curr of allTests) {
const baseIndexScale = await cTokenV3.baseIndexScale()
const expectedExchangeRate = totalsBasic.baseSupplyIndex.mul(bn('1e6')).div(baseIndexScale)
expect(await cTokenV3.balanceOf(wcTokenV3.address)).to.equal(0)
expect(await wcTokenV3.exchangeRate()).to.be.closeTo(expectedExchangeRate, 5)
expect(await wcTokenV3.exchangeRate()).to.be.closeTo(expectedExchangeRate, 10)
})

it('returns the correct exchange rate with a positive balance', async () => {
Expand Down Expand Up @@ -752,7 +750,9 @@ for (const curr of allTests) {

// In this forked block, rewards accrual is not yet enabled in Comet
// Only applies to Mainnet forks (L1)
itL1('claims no rewards when rewards accrual is not enabled', async () => {
it('claims no rewards when rewards accrual is not enabled', async () => {
await enableRewardsAccrual(cTokenV3, bn(0))

const compToken = <ERC20Mock>await ethers.getContractAt('ERC20Mock', COMP)
await advanceTime(1000)
await wcTokenV3.connect(bob).claimTo(bob.address, bob.address)
Expand Down
2 changes: 1 addition & 1 deletion test/plugins/individual-collateral/compoundv3/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const USDC_FORK_BLOCKS: { [key: string]: number } = {
const USDT_FORK_BLOCKS: { [key: string]: number } = {
'1': 20814000,
'8453': 12292893, // not used
'42161': 247293528,
'42161': 237293528,
}

export const FORK_BLOCKS: { [key: string]: { [chainId: string]: number } } = {
Expand Down

0 comments on commit debc02d

Please sign in to comment.