Skip to main content

ISwapCallback

Git Source

This interface should be implemented by anyone wishing to use callbacks in the swap, borrow, and borrowLiquidity functions in the IAmmalgamPair interface.

Functions

ammalgamSwapCallV1

Handles a swap call in the Ammalgam protocol.

Callback passed as calldata to swap functions in IAmmalgamPair.

function ammalgamSwapCallV1(
address sender,
uint256 amountXAssets,
uint256 amountYAssets,
bytes calldata data
) external;

Parameters

NameTypeDescription
senderaddressThe address of the sender initiating the swap call.
amountXAssetsuint256The amount of token X involved in the swap.
amountYAssetsuint256The amount of token Y involved in the swap.
databytesThe calldata provided to the swap function.