diff --git a/test/plugins/individual-collateral/aave-v3/common.ts b/test/plugins/individual-collateral/aave-v3/common.ts index f9f22f6a21..77e11f1be0 100644 --- a/test/plugins/individual-collateral/aave-v3/common.ts +++ b/test/plugins/individual-collateral/aave-v3/common.ts @@ -210,7 +210,6 @@ export const makeTests = (defaultCollateralOpts: CollateralParams, altParams: Al itChecksRefPerTokDefault: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itIsPricedByPeg: true, chainlinkDefaultAnswer: 1e8, itChecksPriceChanges: it, diff --git a/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts b/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts index bd6c9e5185..48eca43423 100644 --- a/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts +++ b/test/plugins/individual-collateral/aerodrome/AerodromeStableCollateral.test.ts @@ -450,7 +450,6 @@ all.forEach((curr: AeroStablePoolEnumeration) => { itChecksRefPerTokDefault: it.skip, itChecksPriceChanges: it.skip, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it.skip, itHasRevenueHiding: it.skip, resetFork, collateralName: curr.testName, diff --git a/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts b/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts index ed9bae870c..8a3a07a83f 100644 --- a/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/ankr/AnkrEthCollateralTestSuite.test.ts @@ -291,7 +291,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'AnkrStakedETH', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts b/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts index 6dea339bce..cd35ee5c0c 100644 --- a/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts +++ b/test/plugins/individual-collateral/cbeth/CBETHCollateral.test.ts @@ -248,7 +248,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'CBEthCollateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts b/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts index 7e1a28744c..a4a9c32425 100644 --- a/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts +++ b/test/plugins/individual-collateral/cbeth/CBETHCollateralL2.test.ts @@ -279,7 +279,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'CBEthCollateralL2', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/collateralTests.ts b/test/plugins/individual-collateral/collateralTests.ts index 51fc9f5bc6..d9e20bacd8 100644 --- a/test/plugins/individual-collateral/collateralTests.ts +++ b/test/plugins/individual-collateral/collateralTests.ts @@ -93,7 +93,6 @@ export default function fn( itChecksRefPerTokDefault, itChecksPriceChanges, itChecksNonZeroDefaultThreshold, - itChecksMainChainlinkOracleRevert, itHasRevenueHiding, itIsPricedByPeg, itHasOracleRefPerTok, @@ -401,32 +400,29 @@ export default function fn( ) // within 1-part-in-1-thousand }) - itChecksMainChainlinkOracleRevert( - 'reverts if Chainlink feed reverts or runs out of gas, maintains status', - async () => { - const InvalidMockV3AggregatorFactory = await ethers.getContractFactory( - 'InvalidMockV3Aggregator' - ) - const invalidChainlinkFeed = ( - await InvalidMockV3AggregatorFactory.deploy(8, chainlinkDefaultAnswer) - ) + it('reverts if Chainlink feed reverts or runs out of gas, maintains status', async () => { + const InvalidMockV3AggregatorFactory = await ethers.getContractFactory( + 'InvalidMockV3Aggregator' + ) + const invalidChainlinkFeed = ( + await InvalidMockV3AggregatorFactory.deploy(8, chainlinkDefaultAnswer) + ) - const invalidCollateral = await deployCollateral({ - erc20: ctx.tok.address, - chainlinkFeed: invalidChainlinkFeed.address, - }) + const invalidCollateral = await deployCollateral({ + erc20: ctx.tok.address, + chainlinkFeed: invalidChainlinkFeed.address, + }) - // Reverting with no reason - await invalidChainlinkFeed.setSimplyRevert(true) - await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() - expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) + // Reverting with no reason + await invalidChainlinkFeed.setSimplyRevert(true) + await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() + expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) - // Runnning out of gas (same error) - await invalidChainlinkFeed.setSimplyRevert(false) - await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() - expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) - } - ) + // Runnning out of gas (same error) + await invalidChainlinkFeed.setSimplyRevert(false) + await expect(invalidCollateral.refresh()).to.be.revertedWithoutReason() + expect(await invalidCollateral.status()).to.equal(CollateralStatus.SOUND) + }) it('decays price over priceTimeout period', async () => { await collateral.refresh() diff --git a/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts b/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts index 5b5c7ba6f0..c0062e93db 100644 --- a/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts +++ b/test/plugins/individual-collateral/compoundv3/CometTestSuite.test.ts @@ -384,7 +384,6 @@ allTests.forEach((curr: CTokenV3Enumeration) => { itChecksRefPerTokDefault: it.skip, // implemented in this file itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file itIsPricedByPeg: true, resetFork: getResetFork(getForkBlock(curr.tokenName)), diff --git a/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts b/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts index 52549b7041..2919f0ebc4 100644 --- a/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/dsr/SDaiCollateralTestSuite.test.ts @@ -215,7 +215,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, resetFork, collateralName: 'SDaiCollateral', diff --git a/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts b/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts index 6a6528d9f9..9624aaa70a 100644 --- a/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/ethena/USDeFiatCollateral.test.ts @@ -211,7 +211,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, collateralName: 'USDe Fiat Collateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts b/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts index b3c3804801..10b4da87c3 100644 --- a/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts +++ b/test/plugins/individual-collateral/ethx/ETHxCollateral.test.ts @@ -282,7 +282,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'Stader ETHx', diff --git a/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts b/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts index eabfa12690..180a889352 100644 --- a/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/flux-finance/FTokenFiatCollateral.test.ts @@ -258,7 +258,6 @@ all.forEach((curr: FTokenEnumeration) => { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: curr.testName, diff --git a/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts b/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts index b25608382a..b15e1df41e 100644 --- a/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/frax-eth/SFrxEthTestSuite.test.ts @@ -311,7 +311,6 @@ const opts = { itChecksPriceChanges: it, itHasRevenueHiding: it.skip, // implemented in this file itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, resetFork, collateralName: 'SFraxEthCollateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts b/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts index e9ec2b3e2b..2ed9bc5e4d 100644 --- a/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/frax/SFraxCollateralTestSuite.test.ts @@ -195,7 +195,6 @@ const opts = { itChecksTargetPerRefDefault: it, itChecksTargetPerRefDefaultUp: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itHasRevenueHiding: it.skip, diff --git a/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts b/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts index 7ac7956e28..184b1090aa 100644 --- a/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/lido/L2LidoStakedEthTestSuite.test.ts @@ -278,7 +278,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK_BASE), collateralName: 'L2LidoStakedETH', diff --git a/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts b/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts index 09bb47a51f..366c8c81c2 100644 --- a/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts +++ b/test/plugins/individual-collateral/lido/LidoStakedEthTestSuite.test.ts @@ -269,7 +269,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'LidoStakedETH', diff --git a/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts b/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts index 05429c1535..f8138befb4 100644 --- a/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/meta-morpho/MetaMorphoFiatCollateral.test.ts @@ -175,7 +175,6 @@ const makeFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), targetNetwork: defaultCollateralOpts.forkNetwork, diff --git a/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts b/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts index 44b009bd61..d243ec85aa 100644 --- a/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts +++ b/test/plugins/individual-collateral/meta-morpho/MetaMorphoSelfReferentialCollateral.test.ts @@ -171,7 +171,6 @@ const makeFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it.skip, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), targetNetwork: defaultCollateralOpts.forkNetwork, diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts index 27f971c04b..9a9b94fad7 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVEFiatCollateral.test.ts @@ -368,7 +368,6 @@ const makeAaveFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), collateralName, diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts index e846ec7e87..937ec99e70 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVENonFiatCollateral.test.ts @@ -229,7 +229,6 @@ const makeAaveNonFiatCollateralTestSuite = ( itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itIsPricedByPeg: true, resetFork: getResetFork(FORK_BLOCK), diff --git a/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts b/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts index 71100d2a38..81404fe208 100644 --- a/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts +++ b/test/plugins/individual-collateral/morpho-aave/MorphoAAVESelfReferentialCollateral.test.ts @@ -229,7 +229,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it.skip, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork: getResetFork(FORK_BLOCK), collateralName: 'MorphoAAVEV2SelfReferentialCollateral - WETH', diff --git a/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts b/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts index 3605c491a5..570c60345f 100644 --- a/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts +++ b/test/plugins/individual-collateral/mountain/USDMCollateral.test.ts @@ -311,7 +311,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file collateralName: 'USDM Collateral', chainlinkDefaultAnswer, diff --git a/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts b/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts index e49008c64e..db143ad603 100644 --- a/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts +++ b/test/plugins/individual-collateral/pirex-eth/ApxEthCollateral.test.ts @@ -378,7 +378,6 @@ const opts = { itChecksRefPerTokDefault: it.skip, // implemented in this file itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it.skip, // implemented in this file resetFork, collateralName: 'ApxETH', diff --git a/test/plugins/individual-collateral/pluginTestTypes.ts b/test/plugins/individual-collateral/pluginTestTypes.ts index d65722bf84..837e5a258d 100644 --- a/test/plugins/individual-collateral/pluginTestTypes.ts +++ b/test/plugins/individual-collateral/pluginTestTypes.ts @@ -106,9 +106,6 @@ export interface CollateralTestSuiteFixtures // toggle on or off: tests that check that defaultThreshold is not zero itChecksNonZeroDefaultThreshold: Mocha.TestFunction | Mocha.PendingTestFunction - // toggle on or off: tests that check when the main chainlink feed reverts (not always used) - itChecksMainChainlinkOracleRevert: Mocha.TestFunction | Mocha.PendingTestFunction - // does the peg price matter for the results of tryPrice()? itIsPricedByPeg?: boolean diff --git a/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts b/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts index 48017d2648..f766a3bc08 100644 --- a/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts +++ b/test/plugins/individual-collateral/rocket-eth/RethCollateralTestSuite.test.ts @@ -276,7 +276,6 @@ const opts = { itChecksRefPerTokDefault: it, itChecksPriceChanges: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, resetFork, collateralName: 'RocketPoolETH', diff --git a/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED b/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED index f3e64455d8..009ffdf1a8 100644 --- a/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED +++ b/test/plugins/individual-collateral/stargate/StargateUSDCTestSuite.test.ts_DEPRECATED @@ -316,7 +316,6 @@ export const stableOpts = { itChecksTargetPerRefDefaultUp: it, itChecksRefPerTokDefault: it, itChecksNonZeroDefaultThreshold: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itIsPricedByPeg: true, chainlinkDefaultAnswer: 1e8, diff --git a/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts b/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts index 9b34573b70..22017205a9 100644 --- a/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts +++ b/test/plugins/individual-collateral/yearnv2/YearnV2CurveFiatCollateral.test.ts @@ -260,7 +260,6 @@ tests.forEach((test: CurveFiatTest) => { itChecksTargetPerRefDefault: it, itChecksTargetPerRefDefaultUp: it, itChecksRefPerTokDefault: it, - itChecksMainChainlinkOracleRevert: it, itHasRevenueHiding: it, itClaimsRewards: it.skip, isMetapool: false,