Skip to content
LogoLogo

AsyncOrderLibrary

Git Source

Title: AsyncOrderLibrary

Helpers attached to AsyncOrder for identity and pricing.

Functions

orderId

Stable identifier for an order, derived from its addressing fields.

(chainId, poolId, owner, zeroForOne, salt) uniquely identifies one open order.

  • block.chainid keeps ids unique across chains where the same PoolKey can be deployed (for example Unichain mainnet and Sepolia).
  • salt is contract-assigned at create time and stored off-chain (in the event log) so the maker can pass it back when calling cancel / updatePrice / fill. view (not pure) because block.chainid reads EVM context.
function orderId(AsyncOrder calldata order) internal view returns (bytes32);

Parameters

NameTypeDescription
orderAsyncOrder

Returns

NameTypeDescription
<none>bytes32