Skip to content

Commit

Permalink
refactor: ResponseDisputed arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Nov 6, 2023
1 parent 8040b16 commit 01089b2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ contract Oracle is IOracle {

IDisputeModule(_request.disputeModule).disputeResponse(_request, _response, _dispute);

emit ResponseDisputed(msg.sender, _responseId, _disputeId, _dispute, block.number);
emit ResponseDisputed(_responseId, _disputeId, _dispute, block.number);

if (disputeStatus[_disputeId] != DisputeStatus.Active) {
IDisputeModule(_request.disputeModule).onDisputeStatusChange(_disputeId, _request, _response, _dispute);
Expand Down
10 changes: 3 additions & 7 deletions solidity/interfaces/IOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,13 @@ interface IOracle {

/**
* @notice Emitted when a response is disputed
* @param _disputer The address of the user who started the dispute
* @param _responseId The id of the response being disputed
* @param _disputeId The id of the dispute
* @param _blockNumber The block number of the dispute
* @param _dispute The dispute that has been created
* @param _blockNumber The current block number
*/
event ResponseDisputed(
address indexed _disputer,
bytes32 indexed _responseId,
bytes32 indexed _disputeId,
Dispute _dispute,
uint256 _blockNumber
bytes32 indexed _responseId, bytes32 indexed _disputeId, Dispute _dispute, uint256 _blockNumber
);

/**
Expand Down
10 changes: 6 additions & 4 deletions solidity/interfaces/modules/dispute/IDisputeModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ interface IDisputeModule is IModule {

/**
* @notice Emitted when a response is disputed
* @param _requestId The id of the request created
* @param _responseId The id of the response disputed
* @param _disputer The address of the disputed
* @param _proposer The address of the proposer
* @param _disputeId The id of the dispute
* @param _dispute The dispute that is being created
* @param _blockNumber The current block number
*/
event ResponseDisputed(bytes32 indexed _requestId, bytes32 _responseId, address _disputer, address _proposer);
event ResponseDisputed(
bytes32 indexed _responseId, bytes32 indexed _disputeId, IOracle.Dispute _dispute, uint256 _blockNumber
);

/**
* @notice Emitted when a dispute status is updated
Expand Down

0 comments on commit 01089b2

Please sign in to comment.