IRefundOutputBuilder
Inherits: IRefundOutputBuilderErrors, IVersionGetter
Functions
buildRefundOutput
Build an output that, when executed by the application contract, reverts
an unprocessed deposit by transferring the asset(s) back to the original sender
account. This function will be called via the STATICCALL opcode, so any state
changes such as contract creations, log emissions, storage writes, Ether transfers
and self-destructions will revert the call and abort the execution of the refund
output. These state-changing constraints are already checked by the Solidity
compiler when implementing this function as either view or pure.
If the input sender is a contract, the refund output may revert depending on the
asset type (such as Ether, ERC-721, ERC-1155) and whether the depositor contract
implements the necessary receiver entrypoint appropriately.
This function assumes the input box of the application indeed contains an
input with such a sender and payload. May raise UnknownInputSender.
function buildRefundOutput(
address appContract,
address inputSender,
bytes calldata inputPayload
) external view returns (bytes memory output);
Parameters
| Name | Type | Description |
|---|---|---|
appContract | address | The application contract address |
inputSender | address | The input sender |
inputPayload | bytes | The input payload |
Returns
| Name | Type | Description |
|---|---|---|
output | bytes | The refund output |