Skip to content

Commit

Permalink
refactor: remove requestId from propose arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
gas1cent committed Nov 6, 2023
1 parent 2254a67 commit 8dcf816
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 1 addition & 1 deletion solidity/contracts/Oracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ contract Oracle is IOracle {

_responseId = _getId(_response);
_participants[_requestId] = abi.encodePacked(_participants[_requestId], _proposer);
IResponseModule(_request.responseModule).propose(_requestId, _request, _response, msg.sender);
IResponseModule(_request.responseModule).propose(_request, _response, msg.sender);
_responseIds[_requestId] = abi.encodePacked(_responseIds[_requestId], _responseId);
createdAt[_responseId] = uint128(block.timestamp);

Expand Down
18 changes: 2 additions & 16 deletions solidity/interfaces/modules/response/IResponseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,9 @@ import {IOracle} from '../../IOracle.sol';
* @notice Common interface for all response modules
*/
interface IResponseModule is IModule {
// TODO: natspec
/**
* @notice Creates a new response for a given request
*/
function propose(
bytes32 _requestId,
IOracle.Request calldata _request,
IOracle.Response calldata _response,
address _sender
) external;

/**
* @notice Deletes a response
*
* @dev In most cases, deleting a disputed response should not be allowed
* @param _requestId The ID of the request to delete the response from
* @param _responseId The ID of the response to delete
* @param _proposer The address of the proposer
*/
function deleteResponse(bytes32 _requestId, bytes32 _responseId, address _proposer) external;
function propose(IOracle.Request calldata _request, IOracle.Response calldata _response, address _sender) external;
}
1 change: 0 additions & 1 deletion solidity/test/mocks/contracts/MockResponseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ contract MockResponseModule is Module, IMockResponseModule {
constructor(IOracle _oracle) Module(_oracle) {}

function propose(
bytes32 _requestId,
IOracle.Request calldata _request,
IOracle.Response calldata _response,
address _sender
Expand Down

0 comments on commit 8dcf816

Please sign in to comment.