diff --git a/test/integration/arbitrum/FinalizeRequest.t.sol b/test/integration/arbitrum/FinalizeRequest.t.sol index 9ab3912..40970c1 100644 --- a/test/integration/arbitrum/FinalizeRequest.t.sol +++ b/test/integration/arbitrum/FinalizeRequest.t.sol @@ -117,9 +117,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); - // Pass the response dispute window - vm.warp(_responseCreatedAt + responseDisputeWindow - responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); @@ -174,9 +171,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); - // Pass the response dispute window - vm.warp(_responseCreatedAt + responseDisputeWindow - responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); @@ -234,9 +228,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); - // Pass the response dispute window - vm.warp(_responseCreatedAt + responseDisputeWindow - responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); @@ -278,16 +269,10 @@ contract IntegrationFinalizeRequest is IntegrationBase { uint256 _responseCreatedAt = oracle.responseCreatedAt(_responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Revert if the request is finalized without response when a response without dispute exists vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); - // Pass the response dispute window - vm.warp(_responseCreatedAt + responseDisputeWindow - responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); @@ -341,9 +326,6 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(abi.encodeWithSelector(IOracle.Oracle_FinalizableResponseExists.selector, _responseId)); _finalizeRequest(_requestId, 0); - // Pass the response dispute window - vm.warp(_responseCreatedAt + responseDisputeWindow - responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); @@ -389,12 +371,12 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); + // Pass the response deadline + vm.warp(_requestCreatedAt + responseDeadline); + // TODO: What if the request is finalized without response, after a response has been disputed but before // its bond escalation settlement or dispute arbitration? @@ -443,14 +425,13 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); // TODO: What if the request is finalized without response, after a response has been disputed but before // its bond escalation settlement or dispute arbitration? + // Pass the response deadline + vm.warp(_requestCreatedAt + responseDeadline); // Finalize the request without response _finalizeRequest(_requestId, 0); @@ -497,12 +478,12 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); + // Pass the response deadline + vm.warp(_requestCreatedAt + responseDeadline); + // TODO: What if the request is finalized without response, after a response has been disputed but before // its bond escalation settlement or dispute arbitration? @@ -552,12 +533,12 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); + // Pass the response deadline + vm.warp(_requestCreatedAt + responseDeadline); + // TODO: What if the request is finalized without response, after a response has been disputed but before // its bond escalation settlement or dispute arbitration? @@ -610,12 +591,12 @@ contract IntegrationFinalizeRequest is IntegrationBase { vm.expectRevert(IBondedResponseModule.BondedResponseModule_InvalidReleaseParameters.selector); _releaseUnfinalizableResponseBond(_requestId, _responseId); - // Pass the response deadline - vm.warp(_requestCreatedAt + responseDeadline); - // Dispute the response bytes32 _disputeId = _disputeResponse(_requestId, _responseId); + // Pass the response deadline + vm.warp(_requestCreatedAt + responseDeadline); + // TODO: What if the request is finalized without response, after a response has been disputed but before // its bond escalation settlement or dispute arbitration?