Skip to content

Commit

Permalink
fix(hardhat): remove double forking tests
Browse files Browse the repository at this point in the history
Fixes regression with nightly foundry
  • Loading branch information
xykota committed Dec 14, 2023
1 parent 69df19a commit 13c6e12
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 17 deletions.
4 changes: 1 addition & 3 deletions packages/hardhat/test/foundry/Curve.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ contract CurveTest is FacetTest, CurveHelpers, ILibStarVault {
ICurve internal facet;

function setUp() public override {
vm.createSelectFork(StdChains.getChain(1).rpcUrl, 17853419);

super.setUp();
setUpOn(Mainnet.CHAIN_ID, 17853419);

IDiamondCut.FacetCut[] memory facetCuts = new IDiamondCut.FacetCut[](1);

Expand Down
4 changes: 1 addition & 3 deletions packages/hardhat/test/foundry/StarVault.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ contract StarVaultTest is FacetTest {
}

function setUp() public override {
vm.createSelectFork(StdChains.getChain(1).rpcUrl, 17853419);

super.setUp();
setUpOn(Mainnet.CHAIN_ID, 17853419);

// Add StarVault to diamond
IDiamondCut.FacetCut[] memory facetCuts = new IDiamondCut.FacetCut[](1);
Expand Down
3 changes: 1 addition & 2 deletions packages/hardhat/test/foundry/Stargate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ abstract contract StargateTestBase is FacetTest {
contract StargateMainnetTest is StargateTestBase {
function setUp() public override {
// NOTE: This is the same block number as the WarpLink Stargate tests

super.setUpOn(1, 18331782);
setUpOn(Mainnet.CHAIN_ID, 18331782);
}

function testFork_stargateJumpTokens_Usdc() public {
Expand Down
4 changes: 2 additions & 2 deletions packages/hardhat/test/foundry/UniV2LikeFacet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ contract UniV2LikeFacetTestBase is FacetTest {

contract UniV2LikeFacetTest is UniV2LikeFacetTestBase {
function setUp() public override {
super.setUpOn(1, 17853419);
setUpOn(Mainnet.CHAIN_ID, 17853419);
}

function testFork_uniswapV2LikeExactInputSingle_sushiEthToUsdc() public {
Expand Down Expand Up @@ -402,7 +402,7 @@ contract UniV2LikeFacetTest is UniV2LikeFacetTestBase {

contract UniV2LikeFacetArbitrumTest is UniV2LikeFacetTestBase {
function setUp() public override {
super.setUpOn(42161, 130346515);
setUpOn(Arbitrum.CHAIN_ID, 130346515);
}

function testFork_uniswapV2LikeExactInputSingle() public {
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/test/foundry/UniV2RouterFacet.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ contract UniV2RouterFacetTestBase is FacetTest, ILibStarVault {

contract UniV2RouterFacetTest is UniV2RouterFacetTestBase {
function setUp() public override {
super.setUpOn(1, 17853419);
setUpOn(Mainnet.CHAIN_ID, 17853419);
}

function testFork_uniswapV2ExactInputSingle_EthForUsdc_PositiveSlippage() public {
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/test/foundry/UniV3Like.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ abstract contract UniV3LikeTestBase is FacetTest {

contract UniV3LikeMainnetTest is UniV3LikeTestBase {
function setUp() public override {
super.setUpOn(1, 17853419);
setUpOn(Mainnet.CHAIN_ID, 17853419);
}

function testFork_uniswapV3LikeExactInputSingle_UsdcToUsdt() public {
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/test/foundry/WarpLink/Arbitrum.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {WarpLinkTestBase} from './TestBase.sol';

contract WarpLinkArbitrumTest is WarpLinkTestBase {
function setUp() public override {
setUpOn(42161, 130346515);
setUpOn(Arbitrum.CHAIN_ID, 130346515);
}

function testFork_warpLinkEngage_Wrap() public {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {WarpLinkTestBase} from './TestBase.sol';

contract WarpLinkMainnet17853419Test is WarpLinkTestBase, CurveHelpers {
function setUp() public override {
setUpOn(1, 17853419);
setUpOn(Mainnet.CHAIN_ID, 17853419);
}

function testFork_warpLinkEngage_Wrap() public {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {WarpLinkTestBase} from './TestBase.sol';

contract WarpLinkMainnet18069811Test is WarpLinkTestBase {
function setUp() public override {
setUpOn(1, 18069811);
setUpOn(Mainnet.CHAIN_ID, 18069811);
}

function testFork_warpLinkEngagePermit_paraswapVector() public {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {IStargateComposer} from '../helpers/IStargateComposer.sol';
// Stargate switched to requiring the composer
contract WarpLinkMainnet18240282Test is WarpLinkTestBase {
function setUp() public override {
setUpOn(1, 18240282);
setUpOn(Mainnet.CHAIN_ID, 18240282);
}

function testFork_warpLinkEngage_jumpStargate_EthToUsdc() public {
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat/test/foundry/WarpLink/Polygon.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {WarpLinkTestBase} from './TestBase.sol';

contract WarpLinkPolygonTest is WarpLinkTestBase {
function setUp() public override {
setUpOn(137, 47436715);
setUpOn(Polygon.CHAIN_ID, 47436715);
}

function testFork_Wrap() public {
Expand Down

0 comments on commit 13c6e12

Please sign in to comment.