Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IAsyncSwapAMM

Git Source

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 userParams) external;

Parameters

NameTypeDescription
orderAsyncOrderThe async order to be filled.
userParamsbytesdata contains address of the filler.

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

NameTypeDescription
useraddress
executoraddress