Skip to content

OrderBook functions

← Browse all contracts

Spot active and passive order book. Router-deployed ERC-1967/UUPS proxy; atomically initialized.

This page lists every ABI-exposed function: 63 total, comprising 17 user functions, 29 state-changing, and 34 read-only calls.

User functions are state-changing calls expected from wallets, SDKs, traders, market makers, builders, or relayers. Internal settlement, deployment, governance, keeper, proxy, and maintenance calls remain available under the other filters.

About public and external visibility

The ABI proves that every function below is externally callable. It does not retain whether Solidity declared an individual function public or external, so the page does not invent a per-function visibility label.

Showing all 63 functions

State-changing functions

These payable and nonpayable calls can change protocol or contract state. Check the caller, requirements, effects, events, and errors before integrating one.

__applyPostFillHookDecision((uint40,uint8,bool,uint256,uint256,uint256))

state-changing ABI callable self-call-only 0x5502b84c

Applies replenishment/replacement words returned by a post-fill hook; any failure is caught by the outer flow.

Parameters and behavior

Inputs

  • refresh — struct OrderBookHooks.PostFillRefresh. Structured struct OrderBookHooks.PostFillRefresh; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: The OrderBook itself via the guarded external self-call used by fail-open hook handling.
  • Requirements: msg.sender == address(this); hook decision and slot expectations are revalidated.
  • State effects: Applies replenishment/replacement words returned by a post-fill hook; any failure is caught by the outer flow.
  • Units and rounding: Hook packed quotes use price, size, and min-size-after-block fields documented in the hook codec.
  • Event families: Accepted hook actions are captured by the outer action's BookUpdatesPacked and AccountCore SpotReserveUpdated; this self-call declares no dedicated event.
  • Expected errors: Unauthorized plus packed quote, slot/order ID, price/size/notional, balance/reserve, and queue errors.

Exact call data

__applyPostFillHookDecision((uint40,uint8,bool,uint256,uint256,uint256))
  • Selector: 0x5502b84c
  • Mutability: nonpayable
  • Semantic rule: spot-book.hook-self-apply
  • Call path: self-call-only

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],(address,uint32))

state-changing user function ABI callable trader/integrator 0xed7dc4d7

Batched cancel/order entrypoint with an approved builder fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • orders — struct ISpotOrderBook.NativeOrder[]. Array in ABI order; each element: Structured struct ISpotOrderBook.NativeOrder[]; field-level units are defined in the type catalog and tuple metadata.
  • cancelSlotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.
  • builderConfig — struct ISpotOrderBook.BuilderConfig. Structured struct ISpotOrderBook.BuilderConfig; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder must have live root approval.
  • Requirements: Cancellation allowed unless hard-paused; any new order requires ACTIVE market; account/signature, array, tick/notional/TIF, slot, reserve, and builder constraints.
  • State effects: Cancels requested slots, matches native orders, settles fills, reserves resting orders, and writes new L3 slots/FIFO queue state.
  • Units and rounding: Price units use pricePrecision; quantity uses sizePrecision; fees parts-per-10,000,000; reserve/notional rounding is conservative.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market state, authorization/account, length/slot/order ID, tick/price/size/notional/TIF/FOK/post-only, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],(address,uint32))
  • Selector: 0xed7dc4d7
  • Mutability: nonpayable
  • Semantic rule: spot-book.batch
  • Call path: trader/integrator

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],bytes32,(address,uint32))

state-changing user function ABI callable trader/integrator 0x2975ed7e

Batched cancel/order entrypoint with client id and approved builder fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • orders — struct ISpotOrderBook.NativeOrder[]. Array in ABI order; each element: Structured struct ISpotOrderBook.NativeOrder[]; field-level units are defined in the type catalog and tuple metadata.
  • cancelSlotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.
  • clientOrderId — bytes32. Opaque 32-byte client correlation identifier; zero means no client correlation.
  • builderConfig — struct ISpotOrderBook.BuilderConfig. Structured struct ISpotOrderBook.BuilderConfig; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder must have live root approval.
  • Requirements: Cancellation allowed unless hard-paused; any new order requires ACTIVE market; account/signature, array, tick/notional/TIF, slot, reserve, and builder constraints.
  • State effects: Cancels requested slots, matches native orders, settles fills, reserves resting orders, and writes new L3 slots/FIFO queue state.
  • Units and rounding: Price units use pricePrecision; quantity uses sizePrecision; fees parts-per-10,000,000; reserve/notional rounding is conservative.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market state, authorization/account, length/slot/order ID, tick/price/size/notional/TIF/FOK/post-only, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],bytes32,(address,uint32))
  • Selector: 0x2975ed7e
  • Mutability: nonpayable
  • Semantic rule: spot-book.batch
  • Call path: trader/integrator

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],bytes32)

state-changing user function ABI callable trader/integrator 0x6947f147

Batched cancel/order entrypoint with caller-supplied client id for events.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • orders — struct ISpotOrderBook.NativeOrder[]. Array in ABI order; each element: Structured struct ISpotOrderBook.NativeOrder[]; field-level units are defined in the type catalog and tuple metadata.
  • cancelSlotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.
  • clientOrderId — bytes32. Opaque 32-byte client correlation identifier; zero means no client correlation.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder must have live root approval.
  • Requirements: Cancellation allowed unless hard-paused; any new order requires ACTIVE market; account/signature, array, tick/notional/TIF, slot, reserve, and builder constraints.
  • State effects: Cancels requested slots, matches native orders, settles fills, reserves resting orders, and writes new L3 slots/FIFO queue state.
  • Units and rounding: Price units use pricePrecision; quantity uses sizePrecision; fees parts-per-10,000,000; reserve/notional rounding is conservative.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market state, authorization/account, length/slot/order ID, tick/price/size/notional/TIF/FOK/post-only, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[],bytes32)
  • Selector: 0x6947f147
  • Mutability: nonpayable
  • Semantic rule: spot-book.batch
  • Call path: trader/integrator

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[])

state-changing user function ABI callable trader/integrator 0x0a7e0c6f

Cancels selected slots and executes native orders for a user.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • orders — struct ISpotOrderBook.NativeOrder[]. Array in ABI order; each element: Structured struct ISpotOrderBook.NativeOrder[]; field-level units are defined in the type catalog and tuple metadata.
  • cancelSlotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder must have live root approval.
  • Requirements: Cancellation allowed unless hard-paused; any new order requires ACTIVE market; account/signature, array, tick/notional/TIF, slot, reserve, and builder constraints.
  • State effects: Cancels requested slots, matches native orders, settles fills, reserves resting orders, and writes new L3 slots/FIFO queue state.
  • Units and rounding: Price units use pricePrecision; quantity uses sizePrecision; fees parts-per-10,000,000; reserve/notional rounding is conservative.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market state, authorization/account, length/slot/order ID, tick/price/size/notional/TIF/FOK/post-only, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

batch(uint40,(uint8,uint96,uint32,uint8,uint8,uint32)[],uint8[])
  • Selector: 0x0a7e0c6f
  • Mutability: nonpayable
  • Semantic rule: spot-book.batch
  • Call path: trader/integrator

batchMintPassiveLiquidity(uint40,(uint32,uint128,uint128,uint128)[],uint64)

state-changing user function ABI callable liquidity-provider 0xf84b79de

Mints passive liquidity for multiple bands with per-entry slippage protection.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • mints — struct ISpotOrderBook.PassiveMintParams[]. Array in ABI order; each element: Structured struct ISpotOrderBook.PassiveMintParams[]; field-level units are defined in the type catalog and tuple metadata.
  • deadline — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Returns

  • results — struct ISpotOrderBook.PassiveMintResult[]. Array in ABI order; each element: Structured struct ISpotOrderBook.PassiveMintResult[]; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Account owner or live signer with trade permission for userId.
  • Requirements: ACTIVE market and live deadline. Each element clips inventory legs that would violate the active BBO; a fully clipped/zero element returns zero IDs/amounts without an event. Each retained leg must pass tick/band, balance, share, and minimum-share checks; any revert rolls back the batch.
  • State effects: Processes mints in input order, locking only clipped baseUsed/quoteUsed, updating bands, and creating one position for each nonzero result.
  • Units and rounding: Per-element low price uses market units; inventory raw base/quote; shares band-local; deadline Unix seconds; valuation rounds down.
  • Event families: For each nonzero result: AccountCore SpotReserveUpdated, then PassiveLiquidityMinted and PassiveBandUpdated; fully clipped elements emit none.
  • Expected errors: Market/auth/account, InvalidExpireTime, price/tick, balance, SlippageExceeded, band/capacity/configuration, numeric, and reentrancy errors.

Exact call data

batchMintPassiveLiquidity(uint40,(uint32,uint128,uint128,uint128)[],uint64)
  • Selector: 0xf84b79de
  • Mutability: nonpayable
  • Semantic rule: spot-book.passive-mint.batch-mint-passive-liquidity
  • Call path: liquidity-provider

burnPassiveLiquidity(uint40,uint64,uint128)

state-changing user function ABI callable liquidity-provider 0x7c72a4f8

Burns passive liquidity shares and returns principal plus claimable fees.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • positionId — uint64. Passive-liquidity position ID (uint64); zero is not a live position.
  • sharesToBurn — uint128. Dimensionless passive-liquidity share units (uint128 accounting scale local to the band).

Returns

  • basePrincipalOut — uint128. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quotePrincipalOut — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • baseFeeOut — uint128. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quoteFeeOut — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Position owner or live trade-authorized signer for userId.
  • Requirements: Existing owned position; nonzero burn not above position shares; band exists and accounting remains representable. Available in paused markets.
  • State effects: Realizes pro-rata principal and fee growth, reduces or deletes the position/band shares, credits outputs to AccountCore free balances, and updates passive queue ticks.
  • Units and rounding: Shares are dimensionless band-local units; principal and fees are raw base/quote units; pro-rata divisions round down.
  • Event families: AccountCore SpotReserveUpdated for nonzero outputs, then PassiveBandUpdated and PassiveLiquidityBurned.
  • Expected errors: Authorization/account/position, ZeroAmount, InsufficientBalance, band/invariant, numeric overflow, and reentrancy errors.

Exact call data

burnPassiveLiquidity(uint40,uint64,uint128)
  • Selector: 0x7c72a4f8
  • Mutability: nonpayable
  • Semantic rule: spot-book.passive-exit.burn-passive-liquidity
  • Call path: liquidity-provider

cancelAllOrders(uint40)

state-changing user function ABI callable trader 0xfbe0be54

Cancels all live orders for a user.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission.
  • Requirements: Allowed in ACTIVE or SOFT_PAUSED, blocked by HARD_PAUSED; registered account.
  • State effects: Cancels every allocated maker slot and releases residual base/quote reserve.
  • Units and rounding: All 62 real slots are scanned; raw token reserve is released exactly.
  • Event families: In log order: possible first-use MakerRegistered, AccountCore SpotReserveUpdated release snapshots, then final BookUpdatesPacked when any slot changed.
  • Expected errors: MarketStateError, authorization/account, reserve consistency, and reentrancy errors.

Exact call data

cancelAllOrders(uint40)
  • Selector: 0xfbe0be54
  • Mutability: nonpayable
  • Semantic rule: spot-book.user-cancel
  • Call path: trader

claimPassiveFees(uint40,uint64)

state-changing user function ABI callable liquidity-provider 0xd9f7df36

Claims fees accrued by a passive liquidity position.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • positionId — uint64. Passive-liquidity position ID (uint64); zero is not a live position.

Returns

  • baseFeeOut — uint128. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quoteFeeOut — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Position owner or live trade-authorized signer for userId.
  • Requirements: Existing owned nonzero-share position and live band; zero accrued fees are allowed. Available in paused markets.
  • State effects: Computes accrued fee growth over all position shares, advances both checkpoints, and credits any nonzero base/quote fees to AccountCore; principal and shares are unchanged.
  • Units and rounding: Fees are raw token units; Q128 growth multiplication rounds down.
  • Event families: AccountCore SpotReserveUpdated only for nonzero fee outputs, then PassiveFeesClaimed even when both outputs are zero.
  • Expected errors: Authorization/account/position, band/invariant, numeric overflow, and reentrancy errors.

Exact call data

claimPassiveFees(uint40,uint64)
  • Selector: 0xd9f7df36
  • Mutability: nonpayable
  • Semantic rule: spot-book.passive-exit.claim-passive-fees
  • Call path: liquidity-provider

initialize(address,address,address,address,uint96,uint32,uint32,uint32,uint96,uint96,uint256,uint256)

state-changing ABI callable proxy-initialization 0x8fbe6a0a

Initializes a spot orderbook proxy with market parameters and dependencies.

Parameters and behavior

Inputs

  • _owner — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • _spotBalanceAccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • _baseToken — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • _quoteToken — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • _sizePrecision — uint96. Base-size scaling denominator; human base quantity = integer base size or lots / sizePrecision.
  • _pricePrecision — uint32. Price scaling denominator; human quote/base price = integer price / pricePrecision.
  • _tickSize — uint32. Minimum price increment in integer price units; valid order prices are multiples of this value.
  • _passiveSpreadTicks — uint32. Count of discrete market ticks (unitless integer count).
  • _minQuoteNotional — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • _maxQuoteNotional — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • _takerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • _makerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Returns

  • No return value.

Access and behavior

  • Who can call: Any caller only while the proxy is uninitialized; SpotRouter must initialize atomically at deployment.
  • Requirements: Nonzero balance account/owner; distinct enabled base and quote assets; positive precisions/tick/passive spread and valid notional/fee configuration; initializer guard.
  • State effects: Initializes packed active-book owner/market parameters, Spot fees/hook threshold, custody/token pointers, quote decimals, and passive spread.
  • Units and rounding: Precisions/tick/spread are integer market scales; notionals raw quote units; fees PPS; addresses exact.
  • Event families: Initialized; packed owner initialization emits no OwnershipTransferred event.
  • Expected errors: AlreadyInitialized, ZeroAddress, InvalidCollateral, SpotTokenNotEnabled, InvalidMarketConfig, MarketSizeError, MarketFeeError, tick/precision/metadata errors.

Exact call data

initialize(address,address,address,address,uint96,uint32,uint32,uint32,uint96,uint96,uint256,uint256)
  • Selector: 0x8fbe6a0a
  • Mutability: nonpayable
  • Semantic rule: lifecycle.initialize
  • Call path: proxy-initialization

mintPassiveLiquidity(uint40,uint32,uint128,uint128,uint128,uint64)

state-changing user function ABI callable liquidity-provider 0xcd31da8f

Mints passive liquidity shares with minimum output and deadline protection.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • lowPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • baseAmount — uint128. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quoteAmount — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • minSharesOut — uint128. Dimensionless passive-liquidity share units (uint128 accounting scale local to the band).
  • deadline — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Returns

  • positionId — uint64. Passive-liquidity position ID (uint64); zero is not a live position.
  • sharesOut — uint128. Dimensionless passive-liquidity share units (uint128 accounting scale local to the band).

Access and behavior

  • Who can call: Account owner or live signer with trade permission for userId.
  • Requirements: ACTIVE market; deadline not expired; at least one nonzero inventory leg; valid noncrossing band tick/range; free balances sufficient; computed shares nonzero and at least minSharesOut.
  • State effects: Locks the supplied base/quote inventory, updates or creates the passive band, creates one position with current Q128 fee checkpoints, and enforces caller share slippage.
  • Units and rounding: Low price is market price units; inventory raw base/quote units; shares band-local uint128; deadline Unix seconds; existing-band valuation rounds down.
  • Event families: AccountCore SpotReserveUpdated for nonzero locked legs, then PassiveLiquidityMinted and PassiveBandUpdated.
  • Expected errors: Market/auth/account, InvalidExpireTime, ZeroAmount, price/tick/band-crossing, balance, SlippageExceeded, capacity/configuration, numeric, and reentrancy errors.

Exact call data

mintPassiveLiquidity(uint40,uint32,uint128,uint128,uint128,uint64)
  • Selector: 0xcd31da8f
  • Mutability: nonpayable
  • Semantic rule: spot-book.passive-mint.mint-passive-liquidity
  • Call path: liquidity-provider

mintPassiveLiquidity(uint40,uint32,uint128,uint128)

state-changing user function ABI callable liquidity-provider 0x85a88d95

Mints passive liquidity shares for a band.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • lowPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • baseAmount — uint128. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quoteAmount — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Returns

  • positionId — uint64. Passive-liquidity position ID (uint64); zero is not a live position.
  • sharesOut — uint128. Dimensionless passive-liquidity share units (uint128 accounting scale local to the band).

Access and behavior

  • Who can call: Account owner or live signer with trade permission for userId.
  • Requirements: ACTIVE market; at least one nonzero inventory leg; valid low band tick/range that does not cross protected active BBO; free balances sufficient; computed shares nonzero. This overload uses no deadline and no minimum-share constraint.
  • State effects: Locks the supplied base/quote inventory, updates or creates the passive band, creates one position with current Q128 fee checkpoints, and mints conservatively valued shares.
  • Units and rounding: Low price is market price units; inventory raw base/quote units; shares band-local uint128; existing-band share valuation rounds down.
  • Event families: AccountCore SpotReserveUpdated for nonzero locked legs, then PassiveLiquidityMinted and PassiveBandUpdated.
  • Expected errors: Market/auth/account, ZeroAmount, price/tick/band-crossing, balance, share/capacity/configuration, numeric, and reentrancy errors.

Exact call data

mintPassiveLiquidity(uint40,uint32,uint128,uint128)
  • Selector: 0x85a88d95
  • Mutability: nonpayable
  • Semantic rule: spot-book.passive-mint.mint-passive-liquidity
  • Call path: liquidity-provider

primeMakerPage(uint40,uint8)

state-changing ABI callable trader-maintenance 0x1f386456

Pre-initializes empty maker slots.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • slotsToPrime — uint8. Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.

Returns

  • primedCount — uint8. Unitless integer count or zero-based index, as named.

Access and behavior

  • Who can call: Account owner or live signer with trade permission for userId.
  • Requirements: Account access must resolve; requested slots are bounded by maker-page capacity; reentrancy guard.
  • State effects: Pre-initializes up to slotsToPrime free maker slots for that account; it places no order and moves no balance.
  • Units and rounding: Account ID is uint40; slot request/result are unitless slot counts.
  • Event families: Possible first-use MakerRegistered, then MakerPagePrimed with resolved account ID and actual primed count.
  • Expected errors: Authorization/account, slot-capacity/storage, and reentrancy errors.

Exact call data

primeMakerPage(uint40,uint8)
  • Selector: 0x1f386456
  • Mutability: nonpayable
  • Semantic rule: spot-book.prime.prime-maker-page
  • Call path: trader-maintenance

primeQueuePages(uint32,uint8,uint8)

state-changing ABI callable permissionless-maintenance 0x67631e16

Pre-initializes queue pages around centerPrice.

Parameters and behavior

Inputs

  • centerPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • groupsAround — uint8. Unitless integer count or zero-based index, as named.
  • wordsPerGroup — uint8. Unitless integer count or zero-based index, as named.

Returns

  • pagesPrimed — uint16. Unitless integer count or zero-based index, as named.
  • wordsPrimed — uint32. Unitless integer count or zero-based index, as named.

Access and behavior

  • Who can call: Any caller.
  • Requirements: Center price must be a valid tick; group/word ranges must remain within queue page bounds; reentrancy guard.
  • State effects: Pre-initializes price-queue bitmap/storage pages around one center tick; it places no order and moves no balance.
  • Units and rounding: Center is market price units; groups, words, pages, and results are integer counts.
  • Event families: QueuePagesPrimed with caller, request, and actual page/word counts.
  • Expected errors: PriceError, TickSizeError, range/size/storage, and reentrancy errors.

Exact call data

primeQueuePages(uint32,uint8,uint8)
  • Selector: 0x67631e16
  • Mutability: nonpayable
  • Semantic rule: spot-book.prime.prime-queue-pages
  • Call path: permissionless-maintenance

protocolCancelBySlots(uint40,uint8[],bytes32)

state-changing ABI callable emergency/ops/governance 0xa0f7a922

Cancels live orders in specific slots and tags events with a client id.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • slotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.
  • clientOrderId — bytes32. Opaque 32-byte client correlation identifier; zero means no client correlation.

Returns

  • No return value.

Access and behavior

  • Who can call: Emergency, ops, or governance role.
  • Requirements: Nonzero existing account ID and valid slots; available regardless of market state.
  • State effects: Cancels the requested maker slots and releases reserves.
  • Units and rounding: Slot indices are uint8, valid real slots are 0..61; amounts raw token units.
  • Event families: In log order: AccountCore SpotReserveUpdated release snapshots, then final BookUpdatesPacked when any slot changed.
  • Expected errors: Unauthorized, InvalidAuthority, invalid account/slot, reserve consistency, and reentrancy errors.

Exact call data

protocolCancelBySlots(uint40,uint8[],bytes32)
  • Selector: 0xa0f7a922
  • Mutability: nonpayable
  • Semantic rule: spot-book.protocol-cancel
  • Call path: emergency/ops/governance

protocolCancelBySlots(uint40,uint8[])

state-changing ABI callable emergency/ops/governance 0x7df0733b

Cancels live orders in specific slots via protocol permissions.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • slotIdxs — uint8[]. Array in ABI order; each element: Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.

Returns

  • No return value.

Access and behavior

  • Who can call: Emergency, ops, or governance role.
  • Requirements: Nonzero existing account ID and valid slots; available regardless of market state.
  • State effects: Cancels the requested maker slots and releases reserves.
  • Units and rounding: Slot indices are uint8, valid real slots are 0..61; amounts raw token units.
  • Event families: In log order: AccountCore SpotReserveUpdated release snapshots, then final BookUpdatesPacked when any slot changed.
  • Expected errors: Unauthorized, InvalidAuthority, invalid account/slot, reserve consistency, and reentrancy errors.

Exact call data

protocolCancelBySlots(uint40,uint8[])
  • Selector: 0x7df0733b
  • Mutability: nonpayable
  • Semantic rule: spot-book.protocol-cancel
  • Call path: emergency/ops/governance

replaceBySlotPacked(uint40,bytes,(address,uint32))

state-changing user function ABI callable market-maker/integrator 0x78307f3c

Packed replace entrypoint with an approved builder fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • packedOps — bytes. Opaque ABI or protocol-packed bytes; the function/type-specific codec defines its fields.
  • builderConfig — struct ISpotOrderBook.BuilderConfig. Structured struct ISpotOrderBook.BuilderConfig; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market; packed payload multiple of 32 bytes; each word obeys slot/flag/cancel/price/size/tick/notional rules; duplicate slots invalid.
  • State effects: Atomically cancels/replaces named slots, matches crossing replacements, re-reserves balances, allocates fresh order IDs, and moves every live replacement to FIFO tail.
  • Units and rounding: Packed word: slot bits 7:0, flags 15:8, price 47:16, size 143:48, min-size-after block 175:144; upper bits ignored by Spot; market scales apply.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market/auth, malformed packed data, duplicate/invalid slot/flags, tick/price/size/notional, ALO/crossing, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

replaceBySlotPacked(uint40,bytes,(address,uint32))
  • Selector: 0x78307f3c
  • Mutability: nonpayable
  • Semantic rule: spot-book.replace-packed
  • Call path: market-maker/integrator

replaceBySlotPacked(uint40,bytes,bytes32,(address,uint32))

state-changing user function ABI callable market-maker/integrator 0x112fa5b0

Packed replace entrypoint tagged with a client id and approved builder fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • packedOps — bytes. Opaque ABI or protocol-packed bytes; the function/type-specific codec defines its fields.
  • clientOrderId — bytes32. Opaque 32-byte client correlation identifier; zero means no client correlation.
  • builderConfig — struct ISpotOrderBook.BuilderConfig. Structured struct ISpotOrderBook.BuilderConfig; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market; packed payload multiple of 32 bytes; each word obeys slot/flag/cancel/price/size/tick/notional rules; duplicate slots invalid.
  • State effects: Atomically cancels/replaces named slots, matches crossing replacements, re-reserves balances, allocates fresh order IDs, and moves every live replacement to FIFO tail.
  • Units and rounding: Packed word: slot bits 7:0, flags 15:8, price 47:16, size 143:48, min-size-after block 175:144; upper bits ignored by Spot; market scales apply.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market/auth, malformed packed data, duplicate/invalid slot/flags, tick/price/size/notional, ALO/crossing, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

replaceBySlotPacked(uint40,bytes,bytes32,(address,uint32))
  • Selector: 0x112fa5b0
  • Mutability: nonpayable
  • Semantic rule: spot-book.replace-packed
  • Call path: market-maker/integrator

replaceBySlotPacked(uint40,bytes,bytes32)

state-changing user function ABI callable market-maker/integrator 0xcbc7ab05

Packed replace entrypoint tagged with a client id.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • packedOps — bytes. Opaque ABI or protocol-packed bytes; the function/type-specific codec defines its fields.
  • clientOrderId — bytes32. Opaque 32-byte client correlation identifier; zero means no client correlation.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market; packed payload multiple of 32 bytes; each word obeys slot/flag/cancel/price/size/tick/notional rules; duplicate slots invalid.
  • State effects: Atomically cancels/replaces named slots, matches crossing replacements, re-reserves balances, allocates fresh order IDs, and moves every live replacement to FIFO tail.
  • Units and rounding: Packed word: slot bits 7:0, flags 15:8, price 47:16, size 143:48, min-size-after block 175:144; upper bits ignored by Spot; market scales apply.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market/auth, malformed packed data, duplicate/invalid slot/flags, tick/price/size/notional, ALO/crossing, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

replaceBySlotPacked(uint40,bytes,bytes32)
  • Selector: 0xcbc7ab05
  • Mutability: nonpayable
  • Semantic rule: spot-book.replace-packed
  • Call path: market-maker/integrator

replaceBySlotPacked(uint40,bytes)

state-changing user function ABI callable market-maker/integrator 0x6ea6986c

Replaces orders by slot using the packed replace format.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • packedOps — bytes. Opaque ABI or protocol-packed bytes; the function/type-specific codec defines its fields.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market; packed payload multiple of 32 bytes; each word obeys slot/flag/cancel/price/size/tick/notional rules; duplicate slots invalid.
  • State effects: Atomically cancels/replaces named slots, matches crossing replacements, re-reserves balances, allocates fresh order IDs, and moves every live replacement to FIFO tail.
  • Units and rounding: Packed word: slot bits 7:0, flags 15:8, price 47:16, size 143:48, min-size-after block 175:144; upper bits ignored by Spot; market scales apply.
  • Event families: In log order: possible first-use MakerRegistered; AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; final TradesPacked; then final BookUpdatesPacked. Omit conditional/empty families.
  • Expected errors: Market/auth, malformed packed data, duplicate/invalid slot/flags, tick/price/size/notional, ALO/crossing, balance/reserve, builder/fee, queue/tree, and reentrancy errors.

Exact call data

replaceBySlotPacked(uint40,bytes)
  • Selector: 0x6ea6986c
  • Mutability: nonpayable
  • Semantic rule: spot-book.replace-packed
  • Call path: market-maker/integrator

setAuthority(address)

state-changing ABI callable owner 0x7a9e5e4b

Replaces this contract's authority pointer; does not propagate the pointer to already deployed children.

Parameters and behavior

Inputs

  • newAuthority — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Returns

  • No return value.

Access and behavior

  • Who can call: Contract owner.
  • Requirements: New authority must be nonzero and expose nonzero governance, ops, and emergency roles.
  • State effects: Replaces this contract's authority pointer; does not propagate the pointer to already deployed children.
  • Units and rounding: Address only; no rounding.
  • Event families: AuthorityUpdated.
  • Expected errors: Unauthorized, ZeroAddress, InvalidAuthority.

Exact call data

setAuthority(address)
  • Selector: 0x7a9e5e4b
  • Mutability: nonpayable
  • Semantic rule: access.authority
  • Call path: owner

setPostFillHook(uint40,address)

state-changing user function ABI callable market-maker 0xda99fd10

Sets a post-fill hook for a maker.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • hook — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or signer with the hook-registration permission enforced by the book.
  • Requirements: userId == 0 resolves and may auto-register msg.sender; a nonzero ID requires live trade permission. Hook may be zero to remove; reentrancy guard.
  • State effects: Stores the synchronous fail-open post-fill hook address in the maker page.
  • Units and rounding: Address only.
  • Event families: Possible AccountCore AccountRegistered, then possible first-use MakerRegistered, then PostFillHookUpdated.
  • Expected errors: Authorization/account/slot storage and reentrancy errors.

Exact call data

setPostFillHook(uint40,address)
  • Selector: 0xda99fd10
  • Mutability: nonpayable
  • Semantic rule: spot-book.hook-user
  • Call path: market-maker

setPostFillHookGasLimit(uint64)

state-changing ABI callable governance 0x4a8b156a

Sets the gas limit forwarded to post-fill hooks.

Parameters and behavior

Inputs

  • gasLimit — uint64. EVM gas units.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: No minimum or maximum is enforced by this setter; the supplied uint64 is stored exactly.
  • State effects: Replaces the gas stipend used for synchronous fail-open maker post-fill hook calls.
  • Units and rounding: gasLimit is EVM gas units.
  • Event families: PostFillHookGasLimitUpdated with old and new gas limits.
  • Expected errors: Unauthorized, InvalidAuthority.

Exact call data

setPostFillHookGasLimit(uint64)
  • Selector: 0x4a8b156a
  • Mutability: nonpayable
  • Semantic rule: spot-book.hook-config.set-post-fill-hook-gas-limit
  • Call path: governance

setPostFillHookMinQuoteNotional(uint96)

state-changing ABI callable governance 0x2c0958fd

Sets the minimum quote notional required for post-fill hook-generated orders.

Parameters and behavior

Inputs

  • newMinQuoteNotional — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: New threshold must be strictly above market minQuoteNotional and at most maxQuoteNotional.
  • State effects: Replaces the quote-notional threshold below which maker post-fill hooks are skipped.
  • Units and rounding: Raw atomic quote-token units.
  • Event families: PostFillHookMinQuoteNotionalUpdated with old and new thresholds.
  • Expected errors: Unauthorized, InvalidAuthority, MarketSizeError.

Exact call data

setPostFillHookMinQuoteNotional(uint96)
  • Selector: 0x2c0958fd
  • Mutability: nonpayable
  • Semantic rule: spot-book.hook-config.set-post-fill-hook-min-quote-notional
  • Call path: governance

swap(uint40,bool,uint128,uint128,uint64,(address,uint32))

state-changing user function ABI callable taker/integrator 0x3aca1f38

Swaps an exact input amount with an approved builder fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • minAmountOut — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • deadline — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • builderConfig — struct ISpotOrderBook.BuilderConfig. Structured struct ISpotOrderBook.BuilderConfig; field-level units are defined in the type catalog and tuple metadata.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market, unexpired deadline, nonzero input, output slippage, sufficient balance, valid builder fee; available liquidity and market bounds.
  • State effects: Consumes active FIFO and passive liquidity at exact input, settles AccountCore balances/fees, and returns aggregate output/fill data.
  • Units and rounding: Input/output raw token units; prices market units; fees parts-per-10,000,000; debits/fees round conservatively.
  • Event families: In log order: AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; SpotSwap; final TradesPacked; then final BookUpdatesPacked. Synchronous hook calls can add settlement/packed records but the hook callback itself emits no hook event.
  • Expected errors: Market/auth/deadline, amount/slippage/liquidity, balance, price/tick/notional, builder/fee, settlement, and reentrancy errors.

Exact call data

swap(uint40,bool,uint128,uint128,uint64,(address,uint32))
  • Selector: 0x3aca1f38
  • Mutability: nonpayable
  • Semantic rule: spot-book.swap
  • Call path: taker/integrator

swap(uint40,bool,uint128,uint128,uint64)

state-changing user function ABI callable taker/integrator 0x9d49a2c5

Swaps an exact input amount through active FIFO liquidity and passive bands.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • minAmountOut — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • deadline — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Account owner or signer with trade permission; optional builder approval.
  • Requirements: ACTIVE market, unexpired deadline, nonzero input, output slippage, sufficient balance, valid builder fee; available liquidity and market bounds.
  • State effects: Consumes active FIFO and passive liquidity at exact input, settles AccountCore balances/fees, and returns aggregate output/fill data.
  • Units and rounding: Input/output raw token units; prices market units; fees parts-per-10,000,000; debits/fees round conservatively.
  • Event families: In log order: AccountCore SpotReserveUpdated and conditional BuilderFeeAccrued during settlement; PassiveBandUpdated after each passive fill; SpotSwap; final TradesPacked; then final BookUpdatesPacked. Synchronous hook calls can add settlement/packed records but the hook callback itself emits no hook event.
  • Expected errors: Market/auth/deadline, amount/slippage/liquidity, balance, price/tick/notional, builder/fee, settlement, and reentrancy errors.

Exact call data

swap(uint40,bool,uint128,uint128,uint64)
  • Selector: 0x9d49a2c5
  • Mutability: nonpayable
  • Semantic rule: spot-book.swap
  • Call path: taker/integrator

toggleMarket(uint8)

state-changing ABI callable owner/router 0x732295ca

Changes ACTIVE/SOFT_PAUSED/HARD_PAUSED execution state.

Parameters and behavior

Inputs

  • state — enum IActiveOrderBook.MarketState. Numeric Solidity enum enum IActiveOrderBook.MarketState; member values are listed in types and constants.

Returns

  • No return value.

Access and behavior

  • Who can call: Book owner (normally SpotRouter).
  • Requirements: Requested state must differ from current state.
  • State effects: Changes ACTIVE/SOFT_PAUSED/HARD_PAUSED execution state.
  • Units and rounding: MarketState enum (uint8).
  • Event families: MarketStateUpdated.
  • Expected errors: Unauthorized, MarketStateError.

Exact call data

toggleMarket(uint8)
  • Selector: 0x732295ca
  • Mutability: nonpayable
  • Semantic rule: spot-book.market-state
  • Call path: owner/router

transferOwnership(address)

state-changing ABI callable owner 0xf2fde38b

Transfers direct upgrade/administrative ownership.

Parameters and behavior

Inputs

  • newOwner — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Returns

  • No return value.

Access and behavior

  • Who can call: Current owner.
  • Requirements: New owner must be nonzero.
  • State effects: Transfers direct upgrade/administrative ownership.
  • Units and rounding: Address only; no rounding.
  • Event families: OwnershipTransferred.
  • Expected errors: Unauthorized and zero/new-owner errors.

Exact call data

transferOwnership(address)
  • Selector: 0xf2fde38b
  • Mutability: nonpayable
  • Semantic rule: ownership.transfer
  • Call path: owner

upgradeToAndCall(address,bytes)

payable ABI callable owner-upgrade 0x4f1ef286

Changes the proxy implementation and optionally delegatecalls migration data.

Parameters and behavior

Inputs

  • newImplementation — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • data — bytes. Opaque ABI or protocol-packed bytes; the function/type-specific codec defines its fields.

Returns

  • No return value.

Access and behavior

  • Who can call: Contract owner through the active ERC-1967 proxy.
  • Requirements: UUPS proxy context, compatible proxiableUUID, owner authorization; migration calldata executes atomically.
  • State effects: Changes the proxy implementation and optionally delegatecalls migration data.
  • Units and rounding: Raw calldata; no protocol arithmetic.
  • Event families: ERC-1967 Upgraded; optional migration data may emit any events of the explicitly invoked implementation selector, which cannot be statically narrowed from arbitrary bytes.
  • Expected errors: Unauthorized, UUPS call-context/UUID errors, zero-code/invalid implementation, and delegated migration errors.

Exact call data

upgradeToAndCall(address,bytes)
  • Selector: 0x4f1ef286
  • Mutability: payable
  • Semantic rule: upgrade.uups
  • Call path: owner-upgrade

Read-only functions

These view and pure calls expose configuration or protocol state without mutating it.

accountCore()

view ABI callable public-read 0x15b5b207

Returns the configured AccountCore contract.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — contract IAccountCore. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: contract IAccountCore — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

accountCore()
  • Selector: 0x15b5b207
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

authority()

view ABI callable public-read 0xbf7e214f

Returns the shared protocol-authority contract.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

authority()
  • Selector: 0xbf7e214f
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

baseToken()

view ABI callable public-read 0xc55dae63

Returns the market's base-token address.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: address — EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

baseToken()
  • Selector: 0xc55dae63
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

bestBidAsk()

view ABI callable public-read 0xb4de8b70

Returns best visible bid and ask prices, or zero where absent.

Parameters and behavior

Inputs

  • None.

Returns

  • bid — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • ask — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns bid: uint32 — Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.; ask: uint32 — Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required. Returns best visible bid and ask prices, or zero where absent.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

bestBidAsk()
  • Selector: 0xb4de8b70
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

estimateSwap(bool,uint128,uint32)

view ABI callable public-read 0x4392ba6c

Estimates an exact-input swap with a builder fee applied to output.

Parameters and behavior

Inputs

  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • builderFeePps — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns result: struct ISpotOrderBook.SwapResult — Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap with a builder fee applied to output.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

estimateSwap(bool,uint128,uint32)
  • Selector: 0x4392ba6c
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

estimateSwap(bool,uint128)

view ABI callable public-read 0x45e03e20

Estimates an exact-input swap without changing state.

Parameters and behavior

Inputs

  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns result: struct ISpotOrderBook.SwapResult — Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap without changing state.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

estimateSwap(bool,uint128)
  • Selector: 0x45e03e20
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

estimateSwap(uint40,bool,uint128,uint32)

view ABI callable public-read 0x83e97886

Estimates an exact-input swap for a specific account id with a builder fee applied to output.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • builderFeePps — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns result: struct ISpotOrderBook.SwapResult — Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap for a specific account id with a builder fee applied to output.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

estimateSwap(uint40,bool,uint128,uint32)
  • Selector: 0x83e97886
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

estimateSwap(uint40,bool,uint128)

view ABI callable public-read 0x94eac407

Estimates an exact-input swap for a specific account id's effective taker fee.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • isBuy — bool. Boolean flag named isBuy.
  • amountIn — uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Returns

  • result — struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns result: struct ISpotOrderBook.SwapResult — Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap for a specific account id's effective taker fee.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

estimateSwap(uint40,bool,uint128)
  • Selector: 0x94eac407
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getL2Book(uint256)

view ABI callable public-read 0xb4cc4b1a

Returns aggregated visible bid and ask depth for up to levels price levels.

Parameters and behavior

Inputs

  • levels — uint256. Unitless integer count or zero-based index, as named.

Returns

  • bidPrices — uint32[]. Array in ABI order; each element: Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • bidSizes — uint96[]. Array in ABI order; each element: Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • askPrices — uint32[]. Array in ABI order; each element: Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.
  • askSizes — uint96[]. Array in ABI order; each element: Integer base-token/base-size units; human base quantity = value / market sizePrecision.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns bidPrices: uint32[] — Array in ABI order; each element: Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.; bidSizes: uint96[] — Array in ABI order; each element: Integer base-token/base-size units; human base quantity = value / market sizePrecision.; askPrices: uint32[] — Array in ABI order; each element: Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.; askSizes: uint96[] — Array in ABI order; each element: Integer base-token/base-size units; human base quantity = value / market sizePrecision. Returns aggregated visible bid and ask depth for up to levels price levels.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getL2Book(uint256)
  • Selector: 0xb4cc4b1a
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getMarketParams()

view ABI callable public-read 0x90c9427c

Returns market precision, notional, and fee parameters.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. Price scaling denominator; human quote/base price = integer price / pricePrecision.
  • result1 — uint96. Base-size scaling denominator; human base quantity = integer size / sizePrecision.
  • result2 — uint32. Minimum price increment in integer price units.
  • result3 — uint96. Minimum raw quote-token notional accepted for a requested order.
  • result4 — uint96. Maximum raw quote-token notional accepted for an order.
  • result5 — uint256. Taker fee in parts per 10,000,000 (PPS).
  • result6 — uint256. Maker fee in parts per 10,000,000 (PPS).

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint32 — Price scaling denominator; human quote/base price = integer price / pricePrecision.; _: uint96 — Base-size scaling denominator; human base quantity = integer size / sizePrecision.; _: uint32 — Minimum price increment in integer price units.; _: uint96 — Minimum raw quote-token notional accepted for a requested order.; _: uint96 — Maximum raw quote-token notional accepted for an order.; _: uint256 — Taker fee in parts per 10,000,000 (PPS).; _: uint256 — Maker fee in parts per 10,000,000 (PPS). Returns market precision, notional, and fee parameters.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getMarketParams()
  • Selector: 0x90c9427c
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getOrderId(uint40,uint8)

view ABI callable public-read 0x471bccbb

Returns the current order id stored in a maker slot.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • slotIdx — uint8. Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.

Returns

  • orderId — uint64. Order ID (uint64); zero is empty, and uint64.max is ANY_ORDER_ID only in the trading wallet.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns orderId: uint64 — Order ID (uint64); zero is empty, and uint64.max is ANY_ORDER_ID only in the trading wallet. Returns the current order id stored in a maker slot.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getOrderId(uint40,uint8)
  • Selector: 0x471bccbb
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getOrderMinSizeAfterBlock(uint40,uint8)

view ABI callable public-read 0x261f2f5f

Returns the min-size-after-block constraint for an order slot.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • slotIdx — uint8. Maker slot index/count; live order slots are 0..61 and higher reserved values are not user slots.

Returns

  • minSizeAfterBlock — uint32. Absolute EVM block-number threshold for stale-size protection; zero disables the threshold.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns minSizeAfterBlock: uint32 — Absolute EVM block-number threshold for stale-size protection; zero disables the threshold. Returns the min-size-after-block constraint for an order slot.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getOrderMinSizeAfterBlock(uint40,uint8)
  • Selector: 0x261f2f5f
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPassiveBand(uint32)

view ABI callable public-read 0x9b692302

Returns aggregate state for a passive band keyed by low price.

Parameters and behavior

Inputs

  • lowPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.

Returns

  • band — struct ISpotOrderBook.PassiveBandView. Structured struct ISpotOrderBook.PassiveBandView; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns band: struct ISpotOrderBook.PassiveBandView — Structured struct ISpotOrderBook.PassiveBandView; field-level units are defined in the type catalog and tuple metadata. Returns aggregate state for a passive band keyed by low price.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getPassiveBand(uint32)
  • Selector: 0x9b692302
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPassivePosition(uint64)

view ABI callable public-read 0xb03aee0d

Returns state for one passive liquidity position.

Parameters and behavior

Inputs

  • positionId — uint64. Passive-liquidity position ID (uint64); zero is not a live position.

Returns

  • position — struct ISpotOrderBook.PassivePositionView. Structured struct ISpotOrderBook.PassivePositionView; field-level units are defined in the type catalog and tuple metadata.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns position: struct ISpotOrderBook.PassivePositionView — Structured struct ISpotOrderBook.PassivePositionView; field-level units are defined in the type catalog and tuple metadata. Returns state for one passive liquidity position.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getPassivePosition(uint64)
  • Selector: 0xb03aee0d
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPostFillHook(uint40)

view ABI callable public-read 0x4befb5a6

Returns a maker's post-fill hook, if configured.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.

Returns

  • hook — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns hook: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics. Returns a maker's post-fill hook, if configured.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

getPostFillHook(uint40)
  • Selector: 0x4befb5a6
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

lastTradeObservation()

view ABI callable public-read 0xa4ab0548

Returns the last trade price scaled by 1e8 and its timestamp.

Parameters and behavior

Inputs

  • None.

Returns

  • priceX8 — uint64. Observed trade price scaled by 100,000,000 (1e8); human price = value / 1e8.
  • timestamp — uint32. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns priceX8: uint64 — Observed trade price scaled by 100,000,000 (1e8); human price = value / 1e8.; timestamp: uint32 — Unix timestamp in seconds; zero-sentinel behavior is function-specific. Returns the last trade price scaled by 1e8 and its timestamp.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

lastTradeObservation()
  • Selector: 0xa4ab0548
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

makerFeePps()

view ABI callable public-read 0x3299a291

Returns the maker fee in basis points.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint256 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Returns the maker fee in basis points.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

makerFeePps()
  • Selector: 0x3299a291
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

makerLockedReserves(uint40)

view ABI callable public-read 0x101884ec

Returns a maker's active FIFO order reserves in this market.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.

Returns

  • baseReserved — uint256. Integer base-token/base-size units; human base quantity = value / market sizePrecision.
  • quoteReserved — uint256. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns baseReserved: uint256 — Integer base-token/base-size units; human base quantity = value / market sizePrecision.; quoteReserved: uint256 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns a maker's active FIFO order reserves in this market. Bids lock quote, asks lock base. Excludes passive liquidity and reserves in other orderbooks.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

makerLockedReserves(uint40)
  • Selector: 0x101884ec
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

marketState()

view ABI callable public-read 0x08fb1b77

Returns the Spot order book's current market state.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — enum IActiveOrderBook.MarketState. Numeric Solidity enum enum IActiveOrderBook.MarketState; member values are listed in types and constants.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: enum IActiveOrderBook.MarketState — Numeric Solidity enum enum IActiveOrderBook.MarketState; member values are listed in types and constants.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

marketState()
  • Selector: 0x08fb1b77
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

maxQuoteNotional()

view ABI callable public-read 0x6e2a0a92

Returns the maximum allowed quote notional.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint96 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

maxQuoteNotional()
  • Selector: 0x6e2a0a92
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

minQuoteNotional()

view ABI callable public-read 0x95f03b02

Returns the minimum allowed quote notional.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint96 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

minQuoteNotional()
  • Selector: 0x95f03b02
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

owner()

view ABI callable public-read 0x8da5cb5b

Returns the contract owner.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

owner()
  • Selector: 0x8da5cb5b
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

passiveSpreadTicks()

view ABI callable public-read 0x5d0aba6e

Returns the configured passive-liquidity spread in ticks.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. Count of discrete market ticks (unitless integer count).

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint32 — Count of discrete market ticks (unitless integer count).
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

passiveSpreadTicks()
  • Selector: 0x5d0aba6e
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

postFillHookGasLimit()

view ABI callable public-read 0x9a740097

Returns the gas limit forwarded to post-fill hooks.

Parameters and behavior

Inputs

  • None.

Returns

  • gasLimit — uint64. EVM gas units.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns gasLimit: uint64 — EVM gas units. Returns the gas limit forwarded to post-fill hooks.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

postFillHookGasLimit()
  • Selector: 0x9a740097
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

postFillHookMinQuoteNotional()

view ABI callable public-read 0x93a89931

Returns the minimum quote notional required for post-fill hook-generated orders.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint96. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint96 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns the minimum quote notional required for post-fill hook-generated orders.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

postFillHookMinQuoteNotional()
  • Selector: 0x93a89931
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

pricePrecision()

view ABI callable public-read 0xad5c6ec5

Returns the denominator used to scale integer prices.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. Price scaling denominator; human quote/base price = integer price / pricePrecision.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint32 — Price scaling denominator; human quote/base price = integer price / pricePrecision.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

pricePrecision()
  • Selector: 0xad5c6ec5
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

proxiableUUID()

view ABI callable implementation-read 0x52d1902d

Returns the ERC-1822 implementation-slot identifier.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bytes32. bytes32 opaque binary value.

Access and behavior

  • Who can call: Any caller on the implementation contract, not through the active proxy.
  • Requirements: UUPS notDelegated; intentionally reverts when delegatecalled through a proxy.
  • State effects: No state mutation. Returns the ERC-1967 implementation storage slot UUID. Returns the storage slot used by the implementation, as specified in ERC1822. Note: The notDelegated modifier prevents accidental upgrades to an implementation that is a proxy contract.
  • Units and rounding: Return/input units follow the ABI names, tuple definitions, constants, and NatSpec in this reference.
  • Event families: None; view/pure call.
  • Expected errors: Input/existence/configuration errors declared by the contract may still revert.

Exact call data

proxiableUUID()
  • Selector: 0x52d1902d
  • Mutability: view
  • Semantic rule: read.OrderBook.proxiableUUID
  • Call path: implementation-read

quoteToken()

view ABI callable public-read 0x217a4b70

Returns the market's quote-token address.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: address — EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

quoteToken()
  • Selector: 0x217a4b70
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

quoteTokenDecimals()

view ABI callable public-read 0x27624b07

Returns the quote token's configured decimals.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint8. Base-10 decimal exponent; token scale is 10 ** decimals.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint8 — Base-10 decimal exponent; token scale is 10 ** decimals.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

quoteTokenDecimals()
  • Selector: 0x27624b07
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

sizePrecision()

view ABI callable public-read 0x4200df4d

Returns the denominator used to scale integer base quantities.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint96. Base-size scaling denominator; human base quantity = integer base size or lots / sizePrecision.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint96 — Base-size scaling denominator; human base quantity = integer base size or lots / sizePrecision.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

sizePrecision()
  • Selector: 0x4200df4d
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotBalanceAccount()

view ABI callable public-read 0x11508161

Returns the configured Spot balance-account contract.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — contract ISpotBalanceAccount. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: contract ISpotBalanceAccount — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

spotBalanceAccount()
  • Selector: 0x11508161
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotBalanceAccountAddress()

view ABI callable public-read 0x23681a9a

Returns the configured Spot balance-account address.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

spotBalanceAccountAddress()
  • Selector: 0x23681a9a
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

takerFeePps()

view ABI callable public-read 0xeb7b683b

Returns the taker fee in basis points.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint256 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Returns the taker fee in basis points.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

takerFeePps()
  • Selector: 0xeb7b683b
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

tickSize()

view ABI callable public-read 0xf210d087

Returns the minimum valid price increment.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. Minimum price increment in integer price units; valid order prices are multiples of this value.

Access and behavior

  • Who can call: Any caller; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns _: uint32 — Minimum price increment in integer price units; valid order prices are multiples of this value.
  • Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
  • Event families: None; view/pure call.
  • Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.

Exact call data

tickSize()
  • Selector: 0xf210d087
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read