Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IRefundOutputBuilder

Git Source

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

NameTypeDescription
appContractaddressThe application contract address
inputSenderaddressThe input sender
inputPayloadbytesThe input payload

Returns

NameTypeDescription
outputbytesThe refund output