Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: set fork block number #228

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions test/e2e/Helper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {SwapEncoder} from "test/libraries/encoders/SwapEncoder.sol";
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
address constant BALANCER_VAULT = 0xBA12222222228d8Ba445958a75a0704d566BF2C8;

uint256 constant FORK_BLOCK_NUMBER = 20913563;

interface IAuthorizer {
function grantRole(bytes32, address) external;
function canPerform(bytes32 actionId, address account, address where) external view returns (bool);
Expand Down Expand Up @@ -71,7 +73,6 @@ abstract contract Helper is Test {

function setUp() public virtual {
if (isForked) {
uint256 blockNumber = vm.envUint("FORK_BLOCK_NUMBER");
string memory forkUrl;

try vm.envString("FORK_URL") returns (string memory url) {
Expand All @@ -80,7 +81,7 @@ abstract contract Helper is Test {
forkUrl = "https://eth.merkle.io";
}

forkId = vm.createSelectFork(forkUrl, blockNumber);
forkId = vm.createSelectFork(forkUrl, FORK_BLOCK_NUMBER);
weth = WETH9(payable(WETH));
} else {
weth = new WETH9();
Expand Down
Loading