IAsyncSwapAMM
Inherits: IAsyncSwapOrder
Title: Async Swap AMM Interface
Author: Async Labs
This interface defines the functions for the Async CSMM (Constant Sum Market Maker) contract.
Functions
executeOrder
Fill an async order in an Async Swap AMM.
function executeOrder(AsyncOrder calldata order, bytes calldata fillerData)
external
returns (Currency currencyFill, uint256 amountOut);
Parameters
| Name | Type | Description |
|---|---|---|
order | AsyncOrder | The async order to be filled. |
fillerData | bytes | ABI-encoded (address filler, uint256 amountOut). |
Returns
| Name | Type | Description |
|---|---|---|
currencyFill | Currency | The currency the filler must settle into the PoolManager. |
amountOut | uint256 | The amount of currencyFill to settle. |
withdraw
function withdraw(PoolKey memory key, bool zeroForOne, uint256 amount, address user) external;
batch
function batch(
AsyncOrder[] memory buys,
AsyncOrder[] memory sells,
bytes[] calldata buysData,
bytes[] calldata sellsData
) external;
Structs
UserParams
Struct representing the user parameters for executing an async order.
struct UserParams {
address user;
address executor;
}
Properties
| Name | Type | Description |
|---|---|---|
user | address | |
executor | address |