diff --git a/.github/workflows/testinparallel.yml b/.github/workflows/testinparallel.yml index 8ae97b9a4..4766cfd71 100644 --- a/.github/workflows/testinparallel.yml +++ b/.github/workflows/testinparallel.yml @@ -56,10 +56,11 @@ jobs: RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} CHAIN_ID: ${{ secrets.CHAIN_ID }} - - name: Run integration mainnet fork tests - run: forge test --match-contract Integration - env: - FOUNDRY_PROFILE: "forktest" - RPC_MAINNET: ${{ secrets.RPC_MAINNET }} - RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} - CHAIN_ID: ${{ secrets.CHAIN_ID }} \ No newline at end of file + # TODO: uncomment this item once we've added the proper upgrade tests + # - name: Run integration mainnet fork tests + # run: forge test --match-contract Integration + # env: + # FOUNDRY_PROFILE: "forktest" + # RPC_MAINNET: ${{ secrets.RPC_MAINNET }} + # RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }} + # CHAIN_ID: ${{ secrets.CHAIN_ID }} \ No newline at end of file diff --git a/src/test/integration/README.md b/src/test/integration/README.md index 992d2a326..37cbf23d1 100644 --- a/src/test/integration/README.md +++ b/src/test/integration/README.md @@ -62,7 +62,7 @@ function testFuzz_deposit_delegate_EXAMPLE(uint24 _random) public { **If you want to know about the time travel**, there's a few things to note: -The main feature we're using is foundry's `cheats.snapshot()` and `cheats.revertTo(snapshot)` to zip around in time. You can look at the [Cheatcodes Reference](https://book.getfoundry.sh/cheatcodes/#cheatcodes-interface) to get some idea, but the docs aren't actually correct. The best thing to do is look through our tests and see how it's being used. If you see an assertion called `assert_Snap_...`, that's using the `TimeMachine` under the hood. +The main feature we're using is foundry's `cheats.snapshotState()` and `cheats.revertToState(snapshot)` to zip around in time. You can look at the [Cheatcodes Reference](https://book.getfoundry.sh/cheatcodes/#cheatcodes-interface) to get some idea, but the docs aren't actually correct. The best thing to do is look through our tests and see how it's being used. If you see an assertion called `assert_Snap_...`, that's using the `TimeMachine` under the hood. Speaking of, the `TimeMachine` is a global contract that controls the time, fate, and destiny of all who use it. * `Users` use the `TimeMachine` to snapshot chain state *before* every action they perform. (see the [`User.createSnapshot`](https://github.com/layr-labs/eigenlayer-contracts/blob/c5193f7bff00903a4323be2a1500cbf7137a83e9/src/test/integration/User.t.sol#L43-L46) modifier). diff --git a/src/test/integration/TimeMachine.t.sol b/src/test/integration/TimeMachine.t.sol index bf5a1e4de..616f56423 100644 --- a/src/test/integration/TimeMachine.t.sol +++ b/src/test/integration/TimeMachine.t.sol @@ -11,7 +11,7 @@ contract TimeMachine is Test { uint lastSnapshot; function createSnapshot() public returns (uint) { - uint snapshot = cheats.snapshot(); + uint snapshot = cheats.snapshotState(); lastSnapshot = snapshot; pastExists = true; return snapshot; @@ -22,12 +22,12 @@ contract TimeMachine is Test { // so we don't accidentally prevent our own births assertTrue(pastExists, "Global.warpToPast: invalid usage, past does not exist"); - curState = cheats.snapshot(); - cheats.revertTo(lastSnapshot); + curState = cheats.snapshotState(); + cheats.revertToState(lastSnapshot); return curState; } function warpToPresent(uint curState) public { - cheats.revertTo(curState); + cheats.revertToState(curState); } }