diff --git a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol index 21d7a8bd..d4274386 100644 --- a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol +++ b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol @@ -413,7 +413,7 @@ contract BondEscalationModule_Unit_DisputeResponse is BaseTest { mockDispute.responseId = _responseId; // Warp to a time after the disputeWindow is over. - vm.warp(block.timestamp + _disputeWindow + 1); + vm.roll(block.number + _disputeWindow + 1); // Mock and expect IOracle.createdAt to be called _mockAndExpect(address(oracle), abi.encodeCall(IOracle.createdAt, (_responseId)), abi.encode(1)); diff --git a/solidity/test/unit/modules/response/BondedResponseModule.t.sol b/solidity/test/unit/modules/response/BondedResponseModule.t.sol index 30c2133c..f402a180 100644 --- a/solidity/test/unit/modules/response/BondedResponseModule.t.sol +++ b/solidity/test/unit/modules/response/BondedResponseModule.t.sol @@ -246,7 +246,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest { _disputeWindow = bound(_disputeWindow, 61, 365 days); // Check correct calls are made if deadline has passed - uint256 _deadline = block.timestamp; + uint256 _deadline = block.number; mockRequest.responseModuleData = abi.encode(accounting, _token, _bondSize, _deadline, _disputeWindow); bytes32 _requestId = _getId(mockRequest); mockResponse.requestId = _requestId; @@ -258,9 +258,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest { ); // Mock and expect IOracle.createdAt to be called - _mockAndExpect( - address(oracle), abi.encodeCall(IOracle.createdAt, (_getId(mockResponse))), abi.encode(block.timestamp) - ); + _mockAndExpect(address(oracle), abi.encodeCall(IOracle.createdAt, (_getId(mockResponse))), abi.encode(block.number)); // Mock and expect IAccountingExtension.release to be called _mockAndExpect( @@ -273,7 +271,7 @@ contract BondedResponseModule_Unit_FinalizeRequest is BaseTest { vm.expectEmit(true, true, true, true, address(bondedResponseModule)); emit RequestFinalized({_requestId: _getId(mockRequest), _response: mockResponse, _finalizer: address(this)}); - vm.warp(block.timestamp + _disputeWindow); + vm.roll(block.number + _disputeWindow); vm.prank(address(oracle)); bondedResponseModule.finalizeRequest(mockRequest, mockResponse, address(this));