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
Name | Type | Description |
---|---|---|
sender | address | The account that initiated the swap |
amount0 | uint256 | The amount of token0 that was sent to output destination |
amount1 | uint256 | The amount of token1 that was sent to output destination |
data | bytes | The calldata that instructs the destination contract how to respond to the swap |