@@ -15,6 +15,7 @@ import { ReturnAssetExploit } from "../__mocks/ReturnAssetExploit.sol";
15
15
16
16
struct Network {
17
17
string rpcUrl;
18
+ uint256 blockNumber;
18
19
address USDC;
19
20
address masterMinterUSDC;
20
21
address USDCVault;
@@ -66,6 +67,7 @@ contract EulerIntegrationTest is BaseTest {
66
67
uint256 lBefore = vm.snapshotState ();
67
68
Network memory lNetwork = _networks[i];
68
69
_setupRPC (lNetwork);
70
+ require (block .number == lNetwork.blockNumber, "vm not at pinned block " );
69
71
_;
70
72
require (vm.revertToStateAndDelete (lBefore), "revertToStateAndDelete failed " );
71
73
}
@@ -75,7 +77,7 @@ contract EulerIntegrationTest is BaseTest {
75
77
Fork memory lFork = _forks[aNetwork.rpcUrl];
76
78
77
79
if (lFork.created == false ) {
78
- uint256 lForkId = vm.createFork (aNetwork.rpcUrl);
80
+ uint256 lForkId = vm.createFork (aNetwork.rpcUrl, aNetwork.blockNumber );
79
81
80
82
lFork = Fork (true , lForkId);
81
83
_forks[aNetwork.rpcUrl] = lFork;
@@ -140,6 +142,7 @@ contract EulerIntegrationTest is BaseTest {
140
142
_networks.push (
141
143
Network (
142
144
getChain ("mainnet " ).rpcUrl,
145
+ 21272382 , // pin to this block number
143
146
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 ,
144
147
0xE982615d461DD5cD06575BbeA87624fda4e3de17 ,
145
148
0x797DD80692c3b2dAdabCe8e30C07fDE5307D48a9 , // Euler Prime USDC vault
0 commit comments