diff --git a/package.json b/package.json index 2e2e4ff7..3a191166 100644 --- a/package.json +++ b/package.json @@ -56,5 +56,6 @@ "solhint-plugin-defi-wonderland": "1.1.2", "sort-package-json": "2.4.1", "standard-version": "9.5.0" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/solidity/contracts/modules/dispute/BondEscalationModule.sol b/solidity/contracts/modules/dispute/BondEscalationModule.sol index 84226026..26b62cd2 100644 --- a/solidity/contracts/modules/dispute/BondEscalationModule.sol +++ b/solidity/contracts/modules/dispute/BondEscalationModule.sol @@ -57,9 +57,6 @@ contract BondEscalationModule is Module, IBondEscalationModule { // Only the first dispute of a request should go through the bond escalation // Consecutive disputes should be handled by the resolution module if (_escalation.status == BondEscalationStatus.None) { - if (block.timestamp > ORACLE.disputeCreatedAt(_disputeId) + _params.bondEscalationDeadline) { - revert BondEscalationModule_BondEscalationOver(); - } _escalation.status = BondEscalationStatus.Active; _escalation.disputeId = _disputeId; emit BondEscalationStatusUpdated(_dispute.requestId, _disputeId, BondEscalationStatus.Active); diff --git a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol index 219cb8f6..79effdd7 100644 --- a/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol +++ b/solidity/test/unit/modules/dispute/BondEscalationModule.t.sol @@ -464,55 +464,6 @@ contract BondEscalationModule_Unit_DisputeResponse is BaseTest { bondEscalationModule.disputeResponse(mockRequest, mockResponse, mockDispute); } - /** - * @notice Tests that disputeResponse succeeds if someone dispute after the bond escalation deadline is over - */ - function test_succeedIfDisputeAfterBondingEscalationDeadline( - uint256 _timestamp, - IBondEscalationModule.RequestParameters memory _params - ) public assumeFuzzable(address(_params.accountingExtension)) { - _timestamp = bound(_timestamp, block.timestamp, type(uint128).max); - - // update mock timestamp - responseCreatedAt = _timestamp; - - // Set deadline to timestamp so we are still in the bond escalation period - _params.bondEscalationDeadline = 3 days; - _params.disputeWindow = 5 days; - mockRequest.disputeModuleData = abi.encode(_params); - - bytes32 _requestId = _getId(mockRequest); - mockResponse.requestId = _requestId; - - bytes32 _responseId = _getId(mockResponse); - mockDispute.responseId = _responseId; - mockDispute.requestId = _requestId; - - // Mock and expect IOracle.responseCreatedAt to be called - _mockAndExpect( - address(oracle), abi.encodeCall(IOracle.responseCreatedAt, (_responseId)), abi.encode(responseCreatedAt) - ); - _mockAndExpect( - address(oracle), abi.encodeCall(IOracle.disputeCreatedAt, (_getId(mockDispute))), abi.encode(_timestamp) - ); - - // Mock and expect the accounting extension to be called - _mockAndExpect( - address(_params.accountingExtension), - abi.encodeWithSignature( - 'bond(address,bytes32,address,uint256)', mockDispute.disputer, _requestId, _params.bondToken, _params.bondSize - ), - abi.encode(true) - ); - - vm.warp(_timestamp + _params.bondEscalationDeadline + 1); - - // Check: does it revert if the bond escalation is over? - vm.expectRevert(IBondEscalationModule.BondEscalationModule_BondEscalationOver.selector); - vm.prank(address(oracle)); - bondEscalationModule.disputeResponse(mockRequest, mockResponse, mockDispute); - } - /** * @notice Tests that disputeResponse succeeds in starting the bond escalation mechanism when someone disputes * the first propose before the bond escalation deadline is over. @@ -551,10 +502,6 @@ contract BondEscalationModule_Unit_DisputeResponse is BaseTest { address(oracle), abi.encodeCall(IOracle.responseCreatedAt, (_responseId)), abi.encode(responseCreatedAt) ); - _mockAndExpect( - address(oracle), abi.encodeCall(IOracle.disputeCreatedAt, (_disputeId)), abi.encode(disputeCreatedAt) - ); - vm.expectEmit(true, true, true, true, address(bondEscalationModule)); emit ResponseDisputed({ _requestId: _requestId, @@ -605,11 +552,6 @@ contract BondEscalationModule_Unit_DisputeResponse is BaseTest { address(oracle), abi.encodeCall(IOracle.responseCreatedAt, (_responseId)), abi.encode(responseCreatedAt) ); - // Mock and expect IOracle.responseCreatedAt to be called - _mockAndExpect( - address(oracle), abi.encodeCall(IOracle.disputeCreatedAt, (_disputeId)), abi.encode(disputeCreatedAt) - ); - // Mock and expect the accounting extension to be called _mockAndExpect( address(_params.accountingExtension),