Skip to content

Commit

Permalink
feat: pass response to resolution module's function
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Nov 7, 2023
1 parent b2fafb1 commit 981f825
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ contract Oracle is IOracle {

if (address(_request.resolutionModule) != address(0)) {
// Initiate the resolution
IResolutionModule(_request.resolutionModule).startResolution(_disputeId, _request, _dispute);
IResolutionModule(_request.resolutionModule).startResolution(_disputeId, _response, _request, _dispute);
}
}

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

Expand All @@ -236,7 +236,7 @@ contract Oracle is IOracle {
revert Oracle_NoResolutionModule(_disputeId);
}

IResolutionModule(_request.resolutionModule).resolveDispute(_disputeId, _request, _dispute);
IResolutionModule(_request.resolutionModule).resolveDispute(_disputeId, _request, _response, _dispute);

emit DisputeResolved(msg.sender, _disputeId, block.number);
}
Expand Down
2 changes: 2 additions & 0 deletions solidity/interfaces/modules/resolution/IResolutionModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ interface IResolutionModule is IModule {
function startResolution(
bytes32 _disputeId,
IOracle.Request calldata _request,
IOracle.Response calldata _response,
IOracle.Dispute calldata _dispute
) external;

Expand All @@ -50,6 +51,7 @@ interface IResolutionModule is IModule {
function resolveDispute(
bytes32 _disputeId,
IOracle.Request calldata _request,
IOracle.Response calldata _response,
IOracle.Dispute calldata _dispute
) external;
}

0 comments on commit 981f825

Please sign in to comment.