AsyncOrder
Represents an async order for a swap in the Uniswap V4 pool.
struct AsyncOrder {
PoolKey key;
address owner;
bool zeroForOne;
uint256 amountIn;
uint256 amountOutMin;
uint256 priorityFee;
uint160 sqrtPrice;
bytes32 salt;
}Properties
| Name | Type | Description |
|---|---|---|
| key | PoolKey | The Uniswap V4 PoolKey identifying the pool the order is placed against. |
| owner | address | The maker who supplied amountIn of the input currency at order submission. |
| zeroForOne | bool | Direction of the order. true => input is currency0, output is currency1. |
| amountIn | uint256 | Amount of input currency the maker escrowed. Direct matching may partially fill it; unused input is returned when the maker's minimum output is satisfied. |
| amountOutMin | uint256 | Minimum amount of output currency the maker accepts. The implicit limit price isamountOutMin / amountIn. A filler or direct match must satisfy the live minimumfor the amount it consumes. |
| priorityFee | uint256 | Optional non-refundable USDC bid for equal-price priority. Zero is valid; a nonzero bid must be at least $0.10, or 0.1% of the order's USDC notional when that is less. Matched portions, and the remainder on a fill, cancel or dust closure, go to the protocol FeeVault. |
| sqrtPrice | uint160 | Sqrt-price limit passed to PoolManager.swap on submission. The hook consumesthe whole input in beforeSwap, so the pool never trades against it. |
| salt | bytes32 | Contract-assigned salt that disambiguates orders. The hook computes this at create time from keccak256(timestamp, block.number, msg.sender, owner, amountIn,<br/>amountOutMin, priorityFee) and emits it in AsyncOrderCreated so the maker can reference theorder in cancel / updatePrice. Submitters pass bytes32(0) on create — the valuein this slot is only read on cancel / updatePrice / fill paths. |