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

AsyncOrder

Git Source

Represents an async order for a swap in the Uniswap V4 pool.

struct AsyncOrder {
PoolKey key;
address owner;
bool zeroForOne;
uint256 amountIn;
uint256 minAmountOut;
uint256 maxAmountIn;
uint160 sqrtPrice;
uint256 deadline;
}

Properties

NameTypeDescription
keyPoolKeyThe Uniswap V4 PoolKey that identifies the pool.
owneraddressThe owner of the order, who can claim the order.
zeroForOneboolWhether the order is for a swap from currency0 to currency1 (true) or currency1 to currency0 (false).
amountInuint256The amount of the order that is being filled.
minAmountOutuint256The minimum amount of output tokens the user is willing to accept (slippage protection).
maxAmountInuint256The maximum amount of input tokens the user is willing to pay (for exact output swaps).
sqrtPriceuint160The square root price of the pool at the time of the order.
deadlineuint256The timestamp after which the order cannot be executed.