Skip to content

Commit

Permalink
chore: pin block by test
Browse files Browse the repository at this point in the history
The pin of blocks in foundry.toml affects scripts.
It was also not taking into account the different chains.
Now the pin of block is done in each forked test.
  • Loading branch information
obatirou authored and oguimbal committed Jan 8, 2024
1 parent c204602 commit 84133f2
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ remappings = [
"forge-std=lib/forge-std/src/",
"foundry-huff=lib/foundry-huff/src/",
]
fork_block_number = 17024124 # pin block number for forked tests

[profile.default.rpc_endpoints]
eth = 'https://eth-mainnet.g.alchemy.com/v2/${ALCHEMY_KEY}'
Expand Down
2 changes: 1 addition & 1 deletion test/forked/Aave.fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract AaveTests is Test {
ILendingPool lendingPool = ILendingPool(0x7d2768dE32b0b80b7a3454c06BdAc94A69DDc7A9);

function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/DoubleSwap.fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract DoubleSwapTests is Test {
bytes doubleswapHyvmBytecode;

function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/GMX.fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ contract GMXTest is Test {

// ===== Set up =====
function setUp() public {
vm.createSelectFork(vm.rpcUrl("arbi"));
vm.createSelectFork(vm.rpcUrl("arbi"), 163870012);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/Morpho.fork.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ contract MorphoTests is Test {
ILens lens = ILens(0x930f1b46e1D081Ec1524efD95752bE3eCe51EF67);

function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/limits/Absurd.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract LimitSwapsTest is Test {

// ===== Set up =====
function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/limits/Jumps.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract LimitSwapsTest is Test {

// ===== Set up =====
function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down
2 changes: 1 addition & 1 deletion test/forked/limits/Swaps.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract LimitSwapsTest is Test {

// ===== Set up =====
function setUp() public {
vm.createSelectFork(vm.rpcUrl("eth"));
vm.createSelectFork(vm.rpcUrl("eth"), 18868834);
owner = address(this);
hyvm = HuffDeployer.config().with_evm_version("paris").deploy("HyVM");
callHyvm = new CallHyvm();
Expand Down

0 comments on commit 84133f2

Please sign in to comment.