Skip to main content

IButtonswapCallee

Functions

buttonswapCall

This method is called during {ButtonswapPair-swap} if calldata is supplied. This allows the swap output destination to be a contract that then acts upon receipt of the tokens.

function buttonswapCall(address sender, uint256 amount0, uint256 amount1, bytes calldata data) external;

Parameters

NameTypeDescription
senderaddressThe account that initiated the swap
amount0uint256The amount of token0 that was sent to output destination
amount1uint256The amount of token1 that was sent to output destination
databytesThe calldata that instructs the destination contract how to respond to the swap