Skip to content

Commit

Permalink
feat: add releaseUnutilizedResponse to the response module (#23)
Browse files Browse the repository at this point in the history
* feat: add `releaseUnutilizedResponse` to the response module

* fix: mock response module

* fix: wording

Co-authored-by: moebius <[email protected]>

---------

Co-authored-by: moebius <[email protected]>
  • Loading branch information
gas1cent and 0xmoebius authored Dec 15, 2023
1 parent 25cd6c0 commit f88b32e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions solidity/interfaces/modules/response/IResponseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,12 @@ interface IResponseModule is IModule {
* @param _sender The creator of the response
*/
function propose(IOracle.Request calldata _request, IOracle.Response calldata _response, address _sender) external;

/**
* @notice Refunds the proposer for a valid and unutilized response
*
* @param _request The request
* @param _response The unutilized response
*/
function releaseUnutilizedResponse(IOracle.Request calldata _request, IOracle.Response calldata _response) external;
}
1 change: 1 addition & 0 deletions solidity/test/mocks/contracts/MockResponseModule.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ contract MockResponseModule is Module, IMockResponseModule {

function deleteResponse(bytes32 _requestId, bytes32 _responseId, address _proposer) external {}
function moduleName() external view returns (string memory _moduleName) {}
function releaseUnutilizedResponse(IOracle.Request calldata _request, IOracle.Response calldata _response) external {}
}

0 comments on commit f88b32e

Please sign in to comment.