Skip to content

Commit

Permalink
fix: proposeResponse call and ResponseDisputed event
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Nov 10, 2023
1 parent 2b1511b commit 8c86c7b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion solidity/contracts/modules/dispute/CircuitResolverModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ contract CircuitResolverModule is Module, ICircuitResolverModule {

emit DisputeStatusChanged({_disputeId: _disputeId, _dispute: _dispute, _status: IOracle.DisputeStatus.Won});

ORACLE.proposeResponse(_dispute.disputer, _request, _newResponse);
ORACLE.proposeResponse(_request, _newResponse);
ORACLE.finalize(_request, _newResponse);
} else {
emit DisputeStatusChanged({_disputeId: _disputeId, _dispute: _dispute, _status: IOracle.DisputeStatus.Lost});
Expand Down Expand Up @@ -79,6 +79,7 @@ contract CircuitResolverModule is Module, ICircuitResolverModule {

// TODO: call ORACLE.updateDisputeStatus
emit ResponseDisputed({
_requestId: _response.requestId,
_responseId: _dispute.responseId,
_disputeId: _getId(_dispute),
_dispute: _dispute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ contract BaseTest is Test, Helpers {
// Events
event DisputeStatusChanged(bytes32 _disputeId, IOracle.Dispute _dispute, IOracle.DisputeStatus _status);
event ResponseDisputed(
bytes32 indexed _responseId, bytes32 indexed _disputeId, IOracle.Dispute _dispute, uint256 _blockNumber
bytes32 indexed _requestId,
bytes32 indexed _responseId,
bytes32 indexed _disputeId,
IOracle.Dispute _dispute,
uint256 _blockNumber
);

/**
Expand Down Expand Up @@ -162,6 +166,7 @@ contract CircuitResolverModule_Unit_DisputeResponse is BaseTest {
// Check: is the event emitted?
vm.expectEmit(true, true, true, true, address(circuitResolverModule));
emit ResponseDisputed({
_requestId: mockResponse.requestId,
_responseId: mockDispute.responseId,
_disputeId: _getId(mockDispute),
_dispute: mockDispute,
Expand Down

0 comments on commit 8c86c7b

Please sign in to comment.