Skip to content

Commit

Permalink
refactor: delete disputeEscalated
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Nov 6, 2023
1 parent e93760e commit 5499d76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
5 changes: 3 additions & 2 deletions solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,14 @@ contract Oracle is IOracle {
}

/// @inheritdoc IOracle
function escalateDispute(Request calldata _request, Dispute calldata _dispute) external {
function escalateDispute(Request calldata _request, Response calldata _response, Dispute calldata _dispute) external {
bytes32 _requestId = _getId(_request);
bytes32 _disputeId = _getId(_dispute);

if (_dispute.requestId != _requestId || disputeOf[_dispute.responseId] != _disputeId) {
revert Oracle_InvalidDisputeId(_disputeId);
}

if (disputeStatus[_disputeId] != DisputeStatus.Active) {
revert Oracle_CannotEscalate(_disputeId);
}
Expand All @@ -207,7 +208,7 @@ contract Oracle is IOracle {
disputeStatus[_disputeId] = DisputeStatus.Escalated;

// Notify the dispute module about the escalation
IDisputeModule(_request.disputeModule).disputeEscalated(_disputeId, _dispute);
IDisputeModule(_request.disputeModule).onDisputeStatusChange(_disputeId, _request, _response, _dispute);

emit DisputeEscalated(msg.sender, _disputeId, block.number);

Expand Down
2 changes: 1 addition & 1 deletion solidity/interfaces/IOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ interface IOracle {
/**
* @notice Escalates a dispute, sending it to the resolution module
*/
function escalateDispute(Request calldata _request, Dispute calldata _dispute) external;
function escalateDispute(Request calldata _request, Response calldata _response, Dispute calldata _dispute) external;

/**
* @notice Resolves a dispute
Expand Down
6 changes: 0 additions & 6 deletions solidity/interfaces/modules/dispute/IDisputeModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,4 @@ interface IDisputeModule is IModule {
IOracle.Response calldata _response,
IOracle.Dispute calldata _dispute
) external;

/**
* @notice Called by the oracle when a dispute has been escalated.
* @param _disputeId The ID of the dispute being escalated
*/
function disputeEscalated(bytes32 _disputeId, IOracle.Dispute calldata _dispute) external;
}

0 comments on commit 5499d76

Please sign in to comment.