From 8a241fa9febf95956638135cb1d550c74412fb7a Mon Sep 17 00:00:00 2001 From: Roderik van der Veer Date: Fri, 6 Dec 2024 12:09:44 +0100 Subject: [PATCH] fix: force upgrade elliptic --- Dockerfile | 2 +- lib/forge-std/src/StdCheats.sol | 4 ++-- lib/forge-std/src/Vm.sol | 18 ++++++++++++++++++ lib/forge-std/test/Vm.t.sol | 2 +- package.json | 3 ++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8b73c26..8f26eb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:22.11.0 AS build +FROM node:22.12.0 AS build COPY --from=oven/bun:1.1.38-debian --chmod=0777 /usr/local/bin/bun /bin/bun ENV BUN_RUNTIME_TRANSPILER_CACHE_PATH=0 diff --git a/lib/forge-std/src/StdCheats.sol b/lib/forge-std/src/StdCheats.sol index 95850d1..051ef71 100644 --- a/lib/forge-std/src/StdCheats.sol +++ b/lib/forge-std/src/StdCheats.sol @@ -645,11 +645,11 @@ abstract contract StdCheats is StdCheatsSafe { // Skip forward or rewind time by the specified number of seconds function skip(uint256 time) internal virtual { - vm.warp(block.timestamp + time); + vm.warp(vm.getBlockTimestamp() + time); } function rewind(uint256 time) internal virtual { - vm.warp(block.timestamp - time); + vm.warp(vm.getBlockTimestamp() - time); } // Setup a prank from an address that has some ether diff --git a/lib/forge-std/src/Vm.sol b/lib/forge-std/src/Vm.sol index 9216369..ce3f356 100644 --- a/lib/forge-std/src/Vm.sol +++ b/lib/forge-std/src/Vm.sol @@ -2182,6 +2182,24 @@ interface Vm is VmSafe { /// Expects an error from reverter address on next call, that exactly matches the revert data. function expectRevert(bytes calldata revertData, address reverter) external; + /// Expects `count` number of reverts from the upcoming calls with any revert data or reverter. + function expectRevert(uint64 count) external; + + /// Expects `count` number of reverts from the upcoming calls that match the revert data. + function expectRevert(bytes4 revertData, uint64 count) external; + + /// Expects `count` number of reverts from the upcoming calls that exactly match the revert data. + function expectRevert(bytes calldata revertData, uint64 count) external; + + /// Expects `count` number of reverts from the upcoming calls from the reverter address. + function expectRevert(address reverter, uint64 count) external; + + /// Expects `count` number of reverts from the upcoming calls from the reverter address that match the revert data. + function expectRevert(bytes4 revertData, address reverter, uint64 count) external; + + /// Expects `count` number of reverts from the upcoming calls from the reverter address that exactly match the revert data. + function expectRevert(bytes calldata revertData, address reverter, uint64 count) external; + /// Only allows memory writes to offsets [0x00, 0x60) ∪ [min, max) in the current subcontext. If any other /// memory is written to, the test will fail. Can be called multiple times to add more ranges to the set. function expectSafeMemory(uint64 min, uint64 max) external; diff --git a/lib/forge-std/test/Vm.t.sol b/lib/forge-std/test/Vm.t.sol index f1c37bd..7958a6d 100644 --- a/lib/forge-std/test/Vm.t.sol +++ b/lib/forge-std/test/Vm.t.sol @@ -9,7 +9,7 @@ import {Vm, VmSafe} from "../src/Vm.sol"; // added to or removed from Vm or VmSafe. contract VmTest is Test { function test_VmInterfaceId() public pure { - assertEq(type(Vm).interfaceId, bytes4(0x21af9696), "Vm"); + assertEq(type(Vm).interfaceId, bytes4(0xbe425eb2), "Vm"); } function test_VmSafeInterfaceId() public pure { diff --git a/package.json b/package.json index 6d81fd7..f13691e 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,8 @@ }, "overrides": { "@graphprotocol/graph-cli": "0.91.0", - "@graphprotocol/graph-ts": "0.36.0" + "@graphprotocol/graph-ts": "0.36.0", + "elliptic": "6.6.1" }, "trustedDependencies": [ "canvas",