Skip to main content

After Pay Callback

Functions#

afterPay#

function afterPay(
address sender,
address token,
uint256 amount,
bytes calldata data
) external

An interface that accepts a payment from a payee in order to execute any arbitrary code in a smart contract

Parameters:#

NameTypeDescription
senderaddressthe address of the payee making the payment
tokenaddressthe contract address of the token being used
amountuint256the amount of tokenAmount sent
databytesany aribitrary data needed to execute the Flash App

Interface#

interface ISfpyCallback {
/// @dev An interface that accepts a payment from a payee in order to execute
/// @dev any arbitrary code in a smart contract
/// @param sender the address of the payee making the payment
/// @param token the contract address of the token being used
/// @param amount the amount of tokenAmount sent
/// @param data any aribitrary data needed to execute the Flash App
function afterPay(address sender, address token, uint256 amount, bytes calldata data) external;
}