Skip to content

Commit

Permalink
test: run fork test against mainnet deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
smol-ninja committed Dec 7, 2024
1 parent ba8c67a commit 2a22503
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/fork/Fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ pragma solidity >=0.8.22;

import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import { SablierFlow } from "src/SablierFlow.sol";

import { Base_Test } from "../Base.t.sol";

Expand Down Expand Up @@ -37,11 +38,16 @@ abstract contract Fork_Test is Base_Test {
//////////////////////////////////////////////////////////////////////////*/

function setUp() public virtual override {
// Fork Ethereum Mainnet at a specific block number. The block number is for the `OCT_1_2024` date.
vm.createSelectFork({ blockNumber: 20_866_919, urlOrAlias: "mainnet" });
// Fork Ethereum Mainnet at a block number during the Sablier deployment.
vm.createSelectFork({ blockNumber: 21_330_577, urlOrAlias: "mainnet" });

// The base is set up after the fork is selected so that the base test contracts are deployed on the fork.
Base_Test.setUp();
// Load mainnet address of flow.
flow = SablierFlow(0x2D9221a63E12AA796619cb381Ec4A71b201281f5);

// Label the flow contract.
vm.label(address(flow), "Flow");

resetPrank(users.sender);

// Label the tokens.
for (uint256 i = 0; i < tokens.length; ++i) {
Expand Down

0 comments on commit 2a22503

Please sign in to comment.