Skip to content

AccountCore functions

← Browse all contracts

Shared account, custody, Spot settlement, and Perp gateway. ERC-1967/UUPS proxy; implementation disables direct initialization.

This page lists every ABI-exposed function: 147 total, comprising 24 user functions, 75 state-changing, and 72 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 147 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.

addPerpEngine(address)

state-changing ABI callable perp-router 0x28aaaf0f

Registers one verified PerpEngine for a quote asset.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Configured PerpRouter only.
  • Requirements: Unique nonzero Engine and quote asset; Engine must point back to AccountCore, use the enabled quote token's scale, and not already be verified.
  • State effects: Registers one verified PerpEngine for a quote asset.
  • Units and rounding: Quote scale is 10 ** tokenDecimals; quote balances use raw token units.
  • Event families: PerpEngineAdded.
  • Expected errors: OnlyPerpRouter, ZeroAddress, MarketAlreadyExists, InvalidMarketConfig, AssetNotEnabled.

Exact call data

addPerpEngine(address)
  • Selector: 0x28aaaf0f
  • Mutability: nonpayable
  • Semantic rule: account.perp-engine-add
  • Call path: perp-router

addPerpIsolatedMargin(uint40,uint32,uint256)

state-changing user function ABI callable account-internal-transfer 0xbba0481f

Moves free AccountCore balance into the account's isolated bucket for a market.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; enabled nonzero Perp market; registered account; nonzero amount; free quote balance sufficient.
  • State effects: Debits AccountCore free quote balance and credits the market's isolated-margin namespace.
  • Units and rounding: amount is raw quote-token units; exact transfer.
  • Event families: Engine PerpMarginTransferred(...,marketId,amount,true) and PerpMarginUpdated, then AccountCore SpotReserveUpdated.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, MarketNotFound, InvalidMarketConfig, ZeroAmount, InsufficientBalance, Engine and reentrancy errors.

Exact call data

addPerpIsolatedMargin(uint40,uint32,uint256)
  • Selector: 0xbba0481f
  • Mutability: nonpayable
  • Semantic rule: account.perp-margin.add-perp-isolated-margin
  • Call path: account-internal-transfer

applySpotReserveDelta(uint40,uint96,uint96,uint96,uint96)

state-changing ABI callable verified-spot-book 0x80b8845e

Applies batched bid/ask reserve and release deltas for orderbook updates.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • reserveBid — uint96. Raw atomic quote-token units reserved/released for bid orders.
  • reserveAsk — uint96. Raw atomic base-token units reserved/released for ask orders.
  • releaseBid — uint96. Raw atomic quote-token units reserved/released for bid orders.
  • releaseAsk — uint96. Raw atomic base-token units reserved/released for ask orders.

Returns

  • No return value.

Access and behavior

  • Who can call: Any currently verified Spot order book.
  • Requirements: Known account; any reserve increase requires unpaused protocol and sufficient free balance; each release must be covered by that token's reserve. All-zero deltas are a no-op.
  • State effects: Applies bid quote-token and ask base-token reserve/release deltas atomically.
  • Units and rounding: Bid fields are raw quote-token units; ask fields are raw base-token units; arithmetic is exact.
  • Event families: SpotReserveUpdated once for each token side with a nonzero reserve or release delta.
  • Expected errors: OnlyVerifiedSpotOrderBook, ProtocolPaused, AccountNotFound, InsufficientBalance, arithmetic overflow.

Exact call data

applySpotReserveDelta(uint40,uint96,uint96,uint96,uint96)
  • Selector: 0x80b8845e
  • Mutability: nonpayable
  • Semantic rule: account.spot-reserve.apply-spot-reserve-delta
  • Call path: verified-spot-book

approveBuilder(address,uint32,uint64)

state-changing user function ABI callable root-user 0xfa599b24

Allows a builder to charge fees for orders submitted on msg.sender's root account.

Parameters and behavior

Inputs

  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • maxFeePps — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • expiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Returns

  • No return value.

Access and behavior

  • Who can call: The root account itself (msg.sender).
  • Requirements: Builder nonzero, maxFeePps <= MAX_FEE_PPS; caller is registered if needed and must be a root rather than subaccount.
  • State effects: Creates or replaces one active root-scoped builder approval with its cap and expiry.
  • Units and rounding: Fee cap is PPS; expiry is Unix seconds with zero behavior enforced when the approval is later used.
  • Event families: Possible AccountRegistered, then BuilderApprovalUpdated(...,true).
  • Expected errors: InvalidBuilder, BuilderFeeTooHigh, InvalidSubaccount, and account-ID bounds errors.

Exact call data

approveBuilder(address,uint32,uint64)
  • Selector: 0xfa599b24
  • Mutability: nonpayable
  • Semantic rule: account.builder-approval.approve-builder
  • Call path: root-user

authorizeAccountSigner(address,address,uint32,uint64)

state-changing user function ABI callable account-admin 0x2607750a

Grants signer permissions on an account.

Parameters and behavior

Inputs

  • account — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • signer — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • permissions — uint32. uint32 AccountCore permission bitmask; bit definitions are in types and constants.
  • expiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_ADMIN; an unregistered account can self-register only when msg.sender == account.
  • Requirements: Protocol active; nonzero account/signer; target signer cannot be the account owner. Permissions and expiry are accepted as supplied.
  • State effects: Creates or replaces signer authorization and increments accountSignerAuthorizationNonces[account].
  • Units and rounding: Permissions are a uint32 bitmask; expiry is Unix seconds; nonce increments by one.
  • Event families: Possible AccountRegistered, then AccountSignerAuthorized.
  • Expected errors: ProtocolPaused, ZeroAddress, AccountNotFound, Unauthorized, CannotAuthorizeOwner, and account-ID bounds errors.

Exact call data

authorizeAccountSigner(address,address,uint32,uint64)
  • Selector: 0x2607750a
  • Mutability: nonpayable
  • Semantic rule: account.signer.authorize-account-signer
  • Call path: account-admin

cancelOwnershipHandover()

payable ABI callable ownership-candidate 0x54d1f13d

Sets the caller's handover-request expiry to zero, including when no request existed.

Parameters and behavior

Inputs

  • None.

Returns

  • No return value.

Access and behavior

  • Who can call: Any requester, for its own pending request.
  • Requirements: No current-owner requirement and no request-existence requirement.
  • State effects: Sets the caller's handover-request expiry to zero, including when no request existed.
  • Units and rounding: No protocol arithmetic.
  • Event families: OwnershipHandoverCanceled.
  • Expected errors: No contract-defined revert path.

Exact call data

cancelOwnershipHandover()
  • Selector: 0x54d1f13d
  • Mutability: payable
  • Semantic rule: ownership.handover-cancel
  • Call path: ownership-candidate

claimBuilderFees(address)

state-changing user function ABI callable builder 0x4460854e

Claims msg.sender's accrued builder fees for one asset.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: The builder claiming its own accrued balance.
  • Requirements: Protocol active, nonzero accrued amount, reentrancy guard.
  • State effects: Zeroes the claimable balance before transferring the asset to the builder.
  • Units and rounding: Raw token units; exact transfer.
  • Event families: BuilderFeesClaimed.
  • Expected errors: ProtocolPaused, NoBuilderFees, and token transfer errors.

Exact call data

claimBuilderFees(address)
  • Selector: 0x4460854e
  • Mutability: nonpayable
  • Semantic rule: account.builder-claim
  • Call path: builder

clearBuilderReferralByRootId(uint40)

state-changing ABI callable governance/ops 0xfc420785

Clears a root referral by id through governance/ops.

Parameters and behavior

Inputs

  • rootAccountId — 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: Governance or ops role.
  • Requirements: The supplied ID must resolve to an existing root account; no protocol-active check.
  • State effects: Administratively clears the root's Spot builder-referral record.
  • Units and rounding: Root account ID is exact uint40; inactive event values are zeroed.
  • Event families: BuilderReferralUpdated(rootId,address(0),0,0,0,false).
  • Expected errors: Unauthorized, InvalidAuthority, AccountNotFound, InvalidSubaccount.

Exact call data

clearBuilderReferralByRootId(uint40)
  • Selector: 0xfc420785
  • Mutability: nonpayable
  • Semantic rule: account.referral-clear.clear-builder-referral-by-root-id
  • Call path: governance/ops

clearPerpBuilderReferralByRootId(uint40)

state-changing ABI callable governance/ops 0xd36cc41d

Clears a root perp referral by id through governance/ops.

Parameters and behavior

Inputs

  • rootAccountId — 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: Governance or ops role.
  • Requirements: The supplied ID must resolve to an existing root account; no protocol-active check.
  • State effects: Administratively clears the root's Perp builder-referral record.
  • Units and rounding: Root account ID is exact uint40; inactive event values are zeroed.
  • Event families: PerpBuilderReferralUpdated(rootId,address(0),0,0,0,false).
  • Expected errors: Unauthorized, InvalidAuthority, AccountNotFound, InvalidSubaccount.

Exact call data

clearPerpBuilderReferralByRootId(uint40)
  • Selector: 0xd36cc41d
  • Mutability: nonpayable
  • Semantic rule: account.referral-clear.clear-perp-builder-referral-by-root-id
  • Call path: governance/ops

clearPerpCrossLiquidation(uint40,address)

state-changing ABI callable permissionless 0xdbf8114f

Permissionlessly clears a recovered cross liquidation lock.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • quoteAsset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Returns

  • No return value.

Access and behavior

  • Who can call: Any caller; AccountCore only routes to the quote Engine.
  • Requirements: Quote Engine must exist; cross namespace must be locked and current maintenance health nonnegative. The clear path does not independently require fresh/oracle-sane prices.
  • State effects: Clears the cross liquidation lock without changing positions or margin.
  • Units and rounding: Health is raw quote units; address selects the quote Engine.
  • Event families: PerpLiquidationCleared(accountId,0,CROSS).
  • Expected errors: MarketNotFound, LiquidationNotActive, LiquidationNotAllowed, Engine caller/configuration, numeric, and reentrancy errors.

Exact call data

clearPerpCrossLiquidation(uint40,address)
  • Selector: 0xdbf8114f
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-clear.clear-perp-cross-liquidation
  • Call path: permissionless

clearPerpIsolatedLiquidation(uint40,uint32)

state-changing ABI callable permissionless 0xd8af2061

Permissionlessly clears a recovered isolated liquidation lock.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Any caller; AccountCore only routes to the market Engine.
  • Requirements: Market route must exist; isolated position must be locked and current maintenance health nonnegative. The clear path does not independently require fresh/oracle-sane prices.
  • State effects: Clears that isolated position's liquidation flag without changing position or margin.
  • Units and rounding: Market ID is exact; health is raw quote units.
  • Event families: PerpIsolatedPositionUpdated with the liquidation flag cleared, then PerpLiquidationCleared(accountId,marketId,ISOLATED).
  • Expected errors: MarketNotFound, mode/position errors, LiquidationNotActive, LiquidationNotAllowed, Engine caller/configuration, numeric, and reentrancy errors.

Exact call data

clearPerpIsolatedLiquidation(uint40,uint32)
  • Selector: 0xd8af2061
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-clear.clear-perp-isolated-liquidation
  • Call path: permissionless

completeOwnershipHandover(address)

payable ABI callable owner 0xf04e283e

Transfers ownership to the requesting address and consumes the request.

Parameters and behavior

Inputs

  • pendingOwner — 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: The nominated pending owner must have an unexpired request.
  • State effects: Transfers ownership to the requesting address and consumes the request.
  • Units and rounding: Request validity is timestamp-based.
  • Event families: OwnershipTransferred only; clearing the request emits no OwnershipHandoverCanceled.
  • Expected errors: Unauthorized, NoHandoverRequest.

Exact call data

completeOwnershipHandover(address)
  • Selector: 0xf04e283e
  • Mutability: payable
  • Semantic rule: ownership.handover-complete
  • Call path: owner

configureSpotToken(address,bool)

state-changing ABI callable governance 0x9a0f2959

Configures a token for spot deposits, withdrawals, markets, and settlement.

Parameters and behavior

Inputs

  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • enabled — bool. Boolean flag named enabled.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Disabling is forbidden while the token has a registered Perp Engine. Enabling reads decimals (native MON is fixed at 18), enforces the maximum, and requires unchanged decimals for a previously seen token.
  • State effects: Writes the token's Spot enabled flag and decimals; first enable appends it once to supportedSpotTokens. Disabling blocks new deposits/Spot-market registration and prevents a new Perp Engine association, but does not revoke existing withdrawals, reserve/release, or settlement paths. Disabling an unseen token records no list entry.
  • Units and rounding: Decimals are a base-10 exponent; enabled is boolean; no token balance changes.
  • Event families: Exactly one SpotTokenConfigured with token, stored decimals, and enabled state.
  • Expected errors: Unauthorized, InvalidAuthority, MarketStateError, InvalidMarketConfig, and token metadata call/decode errors mapped to InvalidMarketConfig.

Exact call data

configureSpotToken(address,bool)
  • Selector: 0x9a0f2959
  • Mutability: nonpayable
  • Semantic rule: account.market-config.configure-spot-token
  • Call path: governance

createSubaccount(address,uint256,bytes)

state-changing user function ABI callable user 0x26b0c523

Creates a subaccount using an EIP-712 signature from subaccount.

Parameters and behavior

Inputs

  • subaccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • deadline — uint256. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • signature — bytes. Raw ECDSA/ERC-1271 signature bytes; encoding depends on signer type.

Returns

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

Access and behavior

  • Who can call: Root account submits a deadline-bound authorization signed by the prospective subaccount.
  • Requirements: Protocol active, valid unexpired EIP-712 signature, unused address, root/subaccount sequence bounds; reentrancy guard.
  • State effects: Registers the signer address as the next subaccount under the caller's root.
  • Units and rounding: Account IDs are uint40; subaccount sequence is uint16; deadline is Unix seconds.
  • Event families: AccountRegistered followed by SubaccountCreated.
  • Expected errors: ProtocolPaused, InvalidSignature, InvalidExpireTime, AccountAlreadyRegistered, InvalidSubaccount, registry bounds errors.

Exact call data

createSubaccount(address,uint256,bytes)
  • Selector: 0x26b0c523
  • Mutability: nonpayable
  • Semantic rule: account.subaccount
  • Call path: user

deposit(address,uint256)

payable user function ABI callable user 0x47e7ef24

Deposits native or ERC20 assets into msg.sender's account.

Parameters and behavior

Inputs

  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Any payer deposits only to its own AccountCore address.
  • Requirements: Protocol active, nonzero amount, asset Spot-enabled; native msg.value == amount, ERC-20 msg.value == 0 with allowance and balance.
  • State effects: Transfers custody from msg.sender, registers it as a root account if needed, and credits its free balance.
  • Units and rounding: Raw atomic units of token; native MON uses 18 decimals; exact credit with no protocol rounding.
  • Event families: AccountRegistered only on first registration, then authoritative SpotReserveUpdated, then Deposit(accountId,token,amount).
  • Expected errors: ProtocolPaused, ZeroAmount, SpotTokenNotEnabled, NativeAssetMismatch, and native/ERC-20 transfer errors.

Exact call data

deposit(address,uint256)
  • Selector: 0x47e7ef24
  • Mutability: payable
  • Semantic rule: account.deposit.deposit
  • Call path: user

depositForAccount(address,address,uint256)

payable user function ABI callable integrator/payer 0xf89cc4dc

Deposits native or ERC20 assets paid by msg.sender into an account.

Parameters and behavior

Inputs

  • account — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Any payer may credit the explicit nonzero recipient account.
  • Requirements: Protocol active, nonzero recipient and amount, asset Spot-enabled; native value exact or ERC-20 allowance/balance from msg.sender.
  • State effects: Transfers custody from msg.sender, registers account as a root account if needed, and credits that recipient's free balance.
  • Units and rounding: Raw atomic units of token; native MON uses 18 decimals; exact credit with no protocol rounding.
  • Event families: AccountRegistered only when the recipient is new, then authoritative SpotReserveUpdated, then Deposit(accountId,token,amount); Deposit does not include the payer or recipient address.
  • Expected errors: ProtocolPaused, ZeroAddress, ZeroAmount, SpotTokenNotEnabled, NativeAssetMismatch, and native/ERC-20 transfer errors.

Exact call data

depositForAccount(address,address,uint256)
  • Selector: 0xf89cc4dc
  • Mutability: payable
  • Semantic rule: account.deposit.deposit-for-account
  • Call path: integrator/payer

depositToPerpCrossMargin(uint40,address,uint256)

state-changing user function ABI callable account-internal-transfer 0x8baccabc

Moves free AccountCore balance into the account's cross-margin bucket.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • quoteAsset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; registered account; nonzero amount; quoteAsset must map to a verified Engine; free quote balance sufficient.
  • State effects: Debits AccountCore free quote balance and credits that Engine's cross-margin namespace (marketId = 0).
  • Units and rounding: amount is raw quote-token units; exact transfer with no decimal conversion.
  • Event families: Engine PerpMarginTransferred(...,0,amount,true) and PerpMarginUpdated, then AccountCore SpotReserveUpdated.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, ZeroAmount, MarketNotFound, InsufficientBalance, Engine caller/configuration, and reentrancy errors.

Exact call data

depositToPerpCrossMargin(uint40,address,uint256)
  • Selector: 0x8baccabc
  • Mutability: nonpayable
  • Semantic rule: account.perp-margin.deposit-to-perp-cross-margin
  • Call path: account-internal-transfer

enrollBuilderReferralBySig(address,address,uint32,uint32,uint64,bytes32,uint256,bytes)

state-changing user function ABI callable permissionless-signed-enrollment 0x55e65375

Consumes the builder's Spot referral nonce and stores the root-scoped Spot referral; registers the root address if needed.

Parameters and behavior

Inputs

  • rootAccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • referralExpiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • nonce — bytes32. Opaque 32-byte nonce/anti-replay identifier.
  • deadline — uint256. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • signature — bytes. Raw ECDSA/ERC-1271 signature bytes; encoding depends on signer type.

Returns

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

Access and behavior

  • Who can call: Any submitter carrying the builder's valid Spot referral authorization.
  • Requirements: Nonzero root/builder; deadline and referral expiry not elapsed; unused Spot referral nonce; valid builder signature and root account. Fees must exactly match an active builder tier. Tier expiry 0 permits any unexpired referral expiry; a finite tier requires nonzero referralExpiry <= tierExpiry. If the prior referral is still live, both new fees must be no greater, its expiry must cover the old one (old 0 requires new 0; old finite permits new 0 or new >= old), and at least one fee must strictly decrease or a finite old expiry must be strictly extended/made perpetual. The improvement test is skipped when no prior live referral exists; all time-bound comparisons are inclusive at equality.
  • State effects: Consumes the builder's Spot referral nonce and stores the root-scoped Spot referral; registers the root address if needed.
  • Units and rounding: Fees are PPS; referral expiry and deadline are Unix seconds; nonce is opaque bytes32.
  • Event families: Possible AccountRegistered, then BuilderReferralUpdated(...,true).
  • Expected errors: ZeroAddress, InvalidSignature, InvalidExpireTime, MarketFeeError, BuilderReferralNotFound, BuilderReferralTierMismatch, InvalidSubaccount, BuilderReferralNotImproved, and account-ID bounds errors.

Exact call data

enrollBuilderReferralBySig(address,address,uint32,uint32,uint64,bytes32,uint256,bytes)
  • Selector: 0x55e65375
  • Mutability: nonpayable
  • Semantic rule: account.referral-enroll.enroll-builder-referral-by-sig
  • Call path: permissionless-signed-enrollment

enrollPerpBuilderReferralBySig(address,address,uint32,uint32,uint64,bytes32,uint256,bytes)

state-changing user function ABI callable permissionless-signed-enrollment 0xd1756920

Consumes the builder's Perp referral nonce and stores the root-scoped Perp referral; registers the root address if needed.

Parameters and behavior

Inputs

  • rootAccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • referralExpiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • nonce — bytes32. Opaque 32-byte nonce/anti-replay identifier.
  • deadline — uint256. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • signature — bytes. Raw ECDSA/ERC-1271 signature bytes; encoding depends on signer type.

Returns

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

Access and behavior

  • Who can call: Any submitter carrying the builder's valid Perp referral authorization.
  • Requirements: Nonzero root/builder; deadline and referral expiry not elapsed; unused Perp referral nonce; valid builder signature and root account. Fees must exactly match an active builder tier. Tier expiry 0 permits any unexpired referral expiry; a finite tier requires nonzero referralExpiry <= tierExpiry. If the prior referral is still live, both new fees must be no greater, its expiry must cover the old one (old 0 requires new 0; old finite permits new 0 or new >= old), and at least one fee must strictly decrease or a finite old expiry must be strictly extended/made perpetual. The improvement test is skipped when no prior live referral exists; all time-bound comparisons are inclusive at equality.
  • State effects: Consumes the builder's Perp referral nonce and stores the root-scoped Perp referral; registers the root address if needed.
  • Units and rounding: Fees are PPS; referral expiry and deadline are Unix seconds; nonce is opaque bytes32.
  • Event families: Possible AccountRegistered, then PerpBuilderReferralUpdated(...,true).
  • Expected errors: ZeroAddress, InvalidSignature, InvalidExpireTime, MarketFeeError, BuilderReferralNotFound, BuilderReferralTierMismatch, InvalidSubaccount, BuilderReferralNotImproved, and account-ID bounds errors.

Exact call data

enrollPerpBuilderReferralBySig(address,address,uint32,uint32,uint64,bytes32,uint256,bytes)
  • Selector: 0xd1756920
  • Mutability: nonpayable
  • Semantic rule: account.referral-enroll.enroll-perp-builder-referral-by-sig
  • Call path: permissionless-signed-enrollment

ensureUserRegistered(address)

state-changing ABI callable verified-spot-book 0x9c9222ae

Registers a root account if needed and returns its account id.

Parameters and behavior

Inputs

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

Returns

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

Access and behavior

  • Who can call: Any currently verified Spot order book.
  • Requirements: Caller verification; user must be nonzero for new registration.
  • State effects: Returns an existing account ID or creates a root account owned by the supplied address.
  • Units and rounding: Account IDs are uint40; zero is the missing sentinel.
  • Event families: AccountRegistered only when newly created.
  • Expected errors: OnlyVerifiedSpotOrderBook, ZeroAddress, duplicate/registry bounds errors.

Exact call data

ensureUserRegistered(address)
  • Selector: 0x9c9222ae
  • Mutability: nonpayable
  • Semantic rule: account.ensure-registration
  • Call path: verified-spot-book

executePerpOrderAction(uint32,(uint40,uint8,address,uint32,bool,uint256),(bool,bool,bool,uint96,uint96)[],(uint40,bool,bool,bool,uint96,uint96,uint32,uint96,uint96,uint96,bool)[])

state-changing ABI callable verified-perp-book 0x76c568f8

Applies policy and custody effects for one verified Engine-ready orderbook action.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • context — struct IPerpBalanceAccount.PerpActionContext. Structured struct IPerpBalanceAccount.PerpActionContext; field-level units are defined in the type catalog and tuple metadata.
  • orderChanges — struct IPerpEngine.PerpOrderExposureDelta[]. Array in ABI order; each element: Structured struct IPerpEngine.PerpOrderExposureDelta[]; field-level units are defined in the type catalog and tuple metadata.
  • makerFills — struct IPerpEngine.PerpMakerFill[]. Array in ABI order; each element: Structured struct IPerpEngine.PerpMakerFill[]; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: The Perp order book currently routed for marketId.
  • Requirements: Risk-increasing changes/fills require unpaused enabled market; cancel/release-only actions remain available; fee/builder policy and Engine health/open-interest/reduce-only checks apply.
  • State effects: Applies order exposure, maker/taker fills, position/funding/margin changes, maker-fee reserve changes, and protocol/builder fee accrual.
  • Units and rounding: Base and quote lots use market precisions; fees use parts-per-10,000,000 and round up when debited.
  • Event families: Engine emits the state-touched position/mode/margin/reserve/exposure and maker-then-taker PerpFillSettled families; AccountCore then emits conditional PerpFeeCharged, PerpProtocolFeesAccrued, collector SpotReserveUpdated, and BuilderFeeAccrued; after this call returns the outer book emits TradesPacked then BookUpdatesPacked.
  • Expected errors: Verified caller, pause/market state, account/mode/liquidation, price/funding, reduce-only/open-interest/health, balance/reserve, builder/fee, and overflow errors.

Exact call data

executePerpOrderAction(uint32,(uint40,uint8,address,uint32,bool,uint256),(bool,bool,bool,uint96,uint96)[],(uint40,bool,bool,bool,uint96,uint96,uint32,uint96,uint96,uint96,bool)[])
  • Selector: 0x76c568f8
  • Mutability: nonpayable
  • Semantic rule: account.perp-order-action
  • Call path: verified-perp-book

initialize(address,address)

state-changing ABI callable proxy-initialization 0x485cc955

Initializes ownership and the protocol fee collector for a proxy deployment.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Any caller only while the proxy is uninitialized; deployers must supply this calldata atomically with proxy creation.
  • Requirements: Owner and fee collector both nonzero; Solady initializer guard; implementation constructor disables direct initialization.
  • State effects: Initializes proxy ownership, stores the Spot fee collector, and registers that collector as an AccountCore root account.
  • Units and rounding: Addresses/account ID only; no balance credit.
  • Event families: OwnershipTransferred, AccountRegistered for the fee collector, then Initialized.
  • Expected errors: AlreadyInitialized, ZeroAddress, account registration/ID bounds errors.

Exact call data

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

liquidatePerpCrossPosition(uint40,uint32,uint96,uint32)

state-changing ABI callable liquidation-keeper 0xb1e93abf

Partially reduces a locked cross position through the normal FIFO book.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • maxBaseLots — uint96. Integer base-size lots; human base quantity = value / market sizePrecision.
  • limitPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.

Returns

  • No return value.

Access and behavior

  • Who can call: Allowlisted Perp liquidation keeper.
  • Requirements: Existing account; cross namespace locked; target market has a cross position; positive lot cap and valid tick-aligned limit; book not hard-paused with opposite liquidity; fresh sane prices; resulting cross maintenance health strictly improves unless recovered.
  • State effects: Runs a reduce-only IOC against normal FIFO makers, settles maker and cross-target fills, charges liquidation taker/protocol fees, and clears the cross lock when maintenance health becomes nonnegative.
  • Units and rounding: Lot cap is base lots; limit is market price units; quote fills and fees are raw quote-token units with fee debit rounded up.
  • Event families: TradesPacked, BookUpdatesPacked, Engine position/margin/exposure/fill events and conditional PerpLiquidationCleared(accountId,0,CROSS); AccountCore PerpProtocolFeesAccrued/SpotReserveUpdated and PerpFeeCharged when fee nonzero, then PerpPositionLiquidated.
  • Expected errors: Unauthorized, AccountNotFound, liquidation/mode/position, hard-pause, price/tick/liquidity, health-improvement, balance/open-interest/numeric, route, and reentrancy errors.

Exact call data

liquidatePerpCrossPosition(uint40,uint32,uint96,uint32)
  • Selector: 0xb1e93abf
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-execute.liquidate-perp-cross-position
  • Call path: liquidation-keeper

liquidatePerpIsolatedPosition(uint40,uint32,uint96,uint32)

state-changing ABI callable liquidation-keeper 0x5627efad

Partially reduces a locked isolated position through the normal FIFO book.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • maxBaseLots — uint96. Integer base-size lots; human base quantity = value / market sizePrecision.
  • limitPrice — uint32. Integer market price units; human quote/base price = value / market pricePrecision; order prices must be tick aligned where required.

Returns

  • No return value.

Access and behavior

  • Who can call: Allowlisted Perp liquidation keeper.
  • Requirements: Existing account; target isolated position locked; positive lot cap and valid tick-aligned limit; book not hard-paused with opposite liquidity; fresh sane price; resulting isolated maintenance health strictly improves unless recovered.
  • State effects: Runs a reduce-only IOC against normal FIFO makers, settles maker and isolated-target fills, charges liquidation taker/protocol fees, and clears the isolated lock when maintenance health becomes nonnegative.
  • Units and rounding: Lot cap is base lots; limit is market price units; quote fills and fees are raw quote-token units with fee debit rounded up.
  • Event families: TradesPacked, BookUpdatesPacked, Engine isolated-position/margin/exposure/fill events and conditional PerpLiquidationCleared(accountId,marketId,ISOLATED); AccountCore PerpProtocolFeesAccrued/SpotReserveUpdated and PerpFeeCharged when fee nonzero, then PerpPositionLiquidated.
  • Expected errors: Unauthorized, AccountNotFound, liquidation/mode/position, hard-pause, price/tick/liquidity, health-improvement, balance/open-interest/numeric, route, and reentrancy errors.

Exact call data

liquidatePerpIsolatedPosition(uint40,uint32,uint96,uint32)
  • Selector: 0x5627efad
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-execute.liquidate-perp-isolated-position
  • Call path: liquidation-keeper

lockSpotPassiveLiquidity(uint40,uint128,uint128)

state-changing ABI callable verified-spot-book 0xb906e3a5

Locks free base and quote balances into passive liquidity custody.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • 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

  • No return value.

Access and behavior

  • Who can call: Any currently verified Spot order book.
  • Requirements: Protocol active; known account; free base and quote balances must cover each nonzero amount.
  • State effects: Debits free base and quote balances into OrderBook-managed passive inventory accounting.
  • Units and rounding: baseAmount and quoteAmount are raw atomic token units; exact debits.
  • Event families: SpotReserveUpdated for each nonzero token amount.
  • Expected errors: OnlyVerifiedSpotOrderBook, ProtocolPaused, AccountNotFound, InsufficientBalance.

Exact call data

lockSpotPassiveLiquidity(uint40,uint128,uint128)
  • Selector: 0xb906e3a5
  • Mutability: nonpayable
  • Semantic rule: account.spot-settlement.lock-spot-passive-liquidity
  • Call path: verified-spot-book

movePerpCrossPositionToIsolated(uint40,uint32,uint256)

state-changing user function ABI callable account-internal-transfer 0x762c9cbc

Moves an order-free cross perp position into isolated mode with the requested isolated margin.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • isolatedMarginAmount — uint256. 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: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; enabled market; cross mode with an existing non-liquidating position; zero resting exposure and maker-fee reserve; no isolated record; positive supplied isolated margin; cross balance and both resulting health checks pass.
  • State effects: Moves the entire cross position into isolated storage, frees its cross slot, and transfers the supplied raw quote margin from cross to isolated.
  • Units and rounding: Position fields are base lots/raw quote entry and funding scale; isolated margin is raw quote units.
  • Event families: PerpIsolatedPositionUpdated, PerpPositionModeUpdated(CROSS,ISOLATED), PerpCrossPositionSlotUpdated(...,false), cross and isolated PerpMarginUpdated, then PerpPositionMigrated.
  • Expected errors: ProtocolPaused, Unauthorized, ZeroAmount, market/mode/position/liquidation, active-order or maker-reserve, balance, price/health, numeric, and reentrancy errors.

Exact call data

movePerpCrossPositionToIsolated(uint40,uint32,uint256)
  • Selector: 0x762c9cbc
  • Mutability: nonpayable
  • Semantic rule: account.perp-mode-migration.move-perp-cross-position-to-isolated
  • Call path: account-internal-transfer

movePerpIsolatedPositionToCross(uint40,uint32)

state-changing user function ABI callable account-internal-transfer 0xc1ef15cd

Moves an order-free isolated perp position and all market margin into cross margin.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; enabled market; isolated mode with an existing non-liquidating position; zero resting exposure and maker-fee reserve; cross slot capacity; resulting cross health valid.
  • State effects: Moves the entire position and all isolated margin to cross, clears isolated storage, and allocates a cross-position slot.
  • Units and rounding: Position fields are base lots/raw quote entry and funding scale; margin is raw quote units; no fractional migration.
  • Event families: PerpPositionModeUpdated(ISOLATED,CROSS), PerpCrossPositionSlotUpdated(...,true), PerpIsolatedPositionCleared, isolated and cross PerpMarginUpdated, then PerpPositionMigrated.
  • Expected errors: ProtocolPaused, Unauthorized, market/mode/position/liquidation, active-order or maker-reserve, cross-capacity, price/health, numeric, and reentrancy errors.

Exact call data

movePerpIsolatedPositionToCross(uint40,uint32)
  • Selector: 0xc1ef15cd
  • Mutability: nonpayable
  • Semantic rule: account.perp-mode-migration.move-perp-isolated-position-to-cross
  • Call path: account-internal-transfer

movePerpMargin(uint40,uint32,uint32,uint256)

state-changing user function ABI callable account-internal-transfer 0x57969867

Moves margin between cross/isolated namespaces inside PerpEngine.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • fromMarketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • toMarketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; distinct namespaces with exactly one side equal to cross namespace 0; both nonzero market IDs must route to the same Engine; nonzero amount; source balance and post-debit health sufficient.
  • State effects: Moves quote margin inside one Engine between cross and one isolated namespace; AccountCore free balance is unchanged.
  • Units and rounding: amount is raw quote-token units; transfer is exact after conservative source-health validation.
  • Event families: Source PerpMarginTransferred(...,false) and PerpMarginUpdated, then destination PerpMarginTransferred(...,true) and PerpMarginUpdated.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, InvalidMarketConfig, MarketNotFound, ZeroAmount, InsufficientBalance, mode/liquidation, price/health, numeric, and reentrancy errors.

Exact call data

movePerpMargin(uint40,uint32,uint32,uint256)
  • Selector: 0x57969867
  • Mutability: nonpayable
  • Semantic rule: account.perp-margin.move-perp-margin
  • Call path: account-internal-transfer

registerPerpMarket(uint32,address,address)

state-changing ABI callable perp-router 0xcca2fdf6

Registers a router-deployed perp orderbook and enables its market in one step.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • orderBook — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • engineAddress — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Returns

  • No return value.

Access and behavior

  • Who can call: Configured PerpRouter only.
  • Requirements: Protocol active; nonzero market ID and book; Perp fees configured; Engine verified and market registered; quote asset Spot-enabled; route unused.
  • State effects: Stores the book and Engine route and atomically enables the new Perp market.
  • Units and rounding: Market ID is exact uint32 and cannot be zero; addresses have no numeric conversion.
  • Event families: PerpMarketEnabled(marketId,true) then PerpOrderBookUpdated(marketId,address(0),orderBook).
  • Expected errors: OnlyPerpRouter, ProtocolPaused, InvalidMarketConfig, ZeroAddress, MarketFeeError, MarketNotFound, AssetNotEnabled, MarketAlreadyExists.

Exact call data

registerPerpMarket(uint32,address,address)
  • Selector: 0xcca2fdf6
  • Mutability: nonpayable
  • Semantic rule: account.perp-market-registry.register-perp-market
  • Call path: perp-router

registerSpotMarket(address,address,address)

state-changing ABI callable spot-router 0xa36f2cf9

Registers an orderbook as the settlement authority for a base/quote pair.

Parameters and behavior

Inputs

  • orderBook — 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.

Returns

  • No return value.

Access and behavior

  • Who can call: Configured SpotRouter only.
  • Requirements: Protocol active; nonzero book; distinct base and quote; both assets enabled for Spot.
  • State effects: Permanently verifies the book and records its base-token and quote-token mappings.
  • Units and rounding: Addresses only; no token amount or rounding.
  • Event families: SpotMarketRegistered with book, base token, and quote token.
  • Expected errors: OnlySpotRouter, ProtocolPaused, ZeroAddress, InvalidCollateral, SpotTokenNotEnabled.

Exact call data

registerSpotMarket(address,address,address)
  • Selector: 0xa36f2cf9
  • Mutability: nonpayable
  • Semantic rule: account.market-config.register-spot-market
  • Call path: spot-router

releaseSpotOrderReserve(uint40,uint96,bool)

state-changing ABI callable verified-spot-book 0x9435bbbc

Releases reserved spot balance back to free balance when an order is cancelled or reduced.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • releasedAmount — uint96. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.
  • isBid — bool. Boolean flag named isBid.

Returns

  • No return value.

Access and behavior

  • Who can call: Any currently verified Spot order book.
  • Requirements: Known account; zero release is a no-op; otherwise the caller-selected bid quote reserve or ask base reserve must cover the amount. Release is available while paused.
  • State effects: Moves one raw token amount from Spot-reserved balance back to free balance.
  • Units and rounding: releasedAmount is raw quote units for bids and raw base units for asks; exact debit/credit.
  • Event families: One SpotReserveUpdated when releasedAmount != 0; none for the zero no-op.
  • Expected errors: OnlyVerifiedSpotOrderBook, AccountNotFound, InsufficientBalance.

Exact call data

releaseSpotOrderReserve(uint40,uint96,bool)
  • Selector: 0x9435bbbc
  • Mutability: nonpayable
  • Semantic rule: account.spot-reserve.release-spot-order-reserve
  • Call path: verified-spot-book

releaseSpotPassiveLiquidity(uint40,uint128,uint128)

state-changing ABI callable verified-spot-book 0xc20e101f

Releases passive-liquidity principal or fees back to free balances.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • 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

  • No return value.

Access and behavior

  • Who can call: Any currently verified Spot order book.
  • Requirements: Known account; no protocol-active check, so exits remain available while paused.
  • State effects: Credits returned passive base and quote inventory to free balances.
  • Units and rounding: baseAmount and quoteAmount are raw atomic token units; exact credits.
  • Event families: SpotReserveUpdated for each nonzero token amount.
  • Expected errors: OnlyVerifiedSpotOrderBook, AccountNotFound, arithmetic overflow.

Exact call data

releaseSpotPassiveLiquidity(uint40,uint128,uint128)
  • Selector: 0xc20e101f
  • Mutability: nonpayable
  • Semantic rule: account.spot-settlement.release-spot-passive-liquidity
  • Call path: verified-spot-book

removePerpIsolatedMargin(uint40,uint32,uint256)

state-changing user function ABI callable account-internal-transfer 0x950ee247

Moves isolated margin for a market back to free AccountCore balance.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; enabled market; registered account; nonzero amount; isolated margin sufficient and post-withdrawal transfer health passes with fresh sane price.
  • State effects: Debits isolated margin for marketId and credits AccountCore free quote balance.
  • Units and rounding: amount is raw quote-token units; Engine requirement math rounds conservatively before allowing the exact transfer.
  • Event families: Engine PerpMarginTransferred(...,marketId,amount,false) and PerpMarginUpdated, then AccountCore SpotReserveUpdated.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, MarketNotFound, ZeroAmount, InsufficientBalance, mode/liquidation, stale/divergent price, margin-health, numeric, and reentrancy errors.

Exact call data

removePerpIsolatedMargin(uint40,uint32,uint256)
  • Selector: 0x950ee247
  • Mutability: nonpayable
  • Semantic rule: account.perp-margin.remove-perp-isolated-margin
  • Call path: account-internal-transfer

renounceOwnership()

payable ABI callable owner 0x715018a6

Sets the owner to the zero address; owner-gated paths then become unreachable.

Parameters and behavior

Inputs

  • None.

Returns

  • No return value.

Access and behavior

  • Who can call: Current owner.
  • Requirements: Owner authorization.
  • State effects: Sets the owner to the zero address; owner-gated paths then become unreachable.
  • Units and rounding: No numeric units.
  • Event families: OwnershipTransferred.
  • Expected errors: Unauthorized.

Exact call data

renounceOwnership()
  • Selector: 0x715018a6
  • Mutability: payable
  • Semantic rule: ownership.renounce
  • Call path: owner

requestOwnershipHandover()

payable ABI callable ownership-candidate 0x25692962

Creates or refreshes the caller's ownership handover request to expire at block.timestamp + 172800.

Parameters and behavior

Inputs

  • None.

Returns

  • No return value.

Access and behavior

  • Who can call: Any prospective owner, for its own address.
  • Requirements: No current-owner requirement; always succeeds absent an EVM-level failure.
  • State effects: Creates or refreshes the caller's ownership handover request to expire at block.timestamp + 172800.
  • Units and rounding: Expiry is a Unix timestamp in seconds; validity is exactly 48 hours (172,800 seconds).
  • Event families: OwnershipHandoverRequested.
  • Expected errors: No contract-defined revert path.

Exact call data

requestOwnershipHandover()
  • Selector: 0x25692962
  • Mutability: payable
  • Semantic rule: ownership.handover-request
  • Call path: ownership-candidate

revokeAccountSigner(address,address)

state-changing user function ABI callable account-admin 0xae3aacb6

Revokes a delegated signer from an account.

Parameters and behavior

Inputs

  • account — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • signer — 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 live signer with ACCOUNT_PERMISSION_ADMIN.
  • Requirements: Nonzero registered account and signer; no protocol-active check and no requirement that a signer record currently exists.
  • State effects: Deletes the signer record and increments accountSignerAuthorizationNonces[account].
  • Units and rounding: Addresses plus an unsigned nonce increment; no fee or token arithmetic.
  • Event families: AccountSignerRevoked.
  • Expected errors: ZeroAddress, AccountNotFound, Unauthorized.

Exact call data

revokeAccountSigner(address,address)
  • Selector: 0xae3aacb6
  • Mutability: nonpayable
  • Semantic rule: account.signer.revoke-account-signer
  • Call path: account-admin

revokeBuilder(address)

state-changing user function ABI callable root-user 0xb1d20c74

Revokes a previously approved builder for msg.sender's root account.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: The already registered root account itself (msg.sender).
  • Requirements: Builder nonzero; caller must be a root and the stored approval must currently be active.
  • State effects: Deletes one root-scoped builder approval.
  • Units and rounding: Addresses only; emitted cap and expiry are reset to zero.
  • Event families: BuilderApprovalUpdated(rootId,builder,0,0,false).
  • Expected errors: InvalidBuilder, AccountNotFound, InvalidSubaccount, BuilderApprovalNotFound.

Exact call data

revokeBuilder(address)
  • Selector: 0xb1d20c74
  • Mutability: nonpayable
  • Semantic rule: account.builder-approval.revoke-builder
  • Call path: root-user

revokeBuilderReferral(address)

state-changing user function ABI callable account-admin 0x1b698eef

Revokes a root account's builder referral discount.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Root account owner or live signer with ACCOUNT_PERMISSION_ADMIN.
  • Requirements: Nonzero registered root-account address; caller authorized for that root. No governance role or protocol-active check.
  • State effects: Clears the root's Spot builder-referral record.
  • Units and rounding: Addresses/account ID only; inactive event values are zeroed.
  • Event families: BuilderReferralUpdated(rootId,address(0),0,0,0,false).
  • Expected errors: ZeroAddress, AccountNotFound, InvalidSubaccount, Unauthorized.

Exact call data

revokeBuilderReferral(address)
  • Selector: 0x1b698eef
  • Mutability: nonpayable
  • Semantic rule: account.referral-clear.revoke-builder-referral
  • Call path: account-admin

revokePerpBuilderReferral(address)

state-changing user function ABI callable account-admin 0xad397b79

Revokes a root account's perp builder referral discount.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Root account owner or live signer with ACCOUNT_PERMISSION_ADMIN.
  • Requirements: Nonzero registered root-account address; caller authorized for that root. No governance role or protocol-active check.
  • State effects: Clears the root's Perp builder-referral record.
  • Units and rounding: Addresses/account ID only; inactive event values are zeroed.
  • Event families: PerpBuilderReferralUpdated(rootId,address(0),0,0,0,false).
  • Expected errors: ZeroAddress, AccountNotFound, InvalidSubaccount, Unauthorized.

Exact call data

revokePerpBuilderReferral(address)
  • Selector: 0xad397b79
  • Mutability: nonpayable
  • Semantic rule: account.referral-clear.revoke-perp-builder-referral
  • Call path: account-admin

setAccountFeeTierById(uint40,uint32,uint32,bool)

state-changing ABI callable governance/ops 0xe39e4227

Writes one root-scoped Spot account fee tier and active flag.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: Account must resolve to a root; maker/taker fee pair must be valid.
  • State effects: Writes one root-scoped Spot account fee tier and active flag.
  • Units and rounding: Account ID is uint40; fees are PPS; active is boolean.
  • Event families: One AccountFeeTierUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, AccountNotFound, InvalidSubaccount, MarketFeeError.

Exact call data

setAccountFeeTierById(uint40,uint32,uint32,bool)
  • Selector: 0xe39e4227
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-account-fee-tier-by-id
  • Call path: governance/ops

setAccountFeeTiersById(uint40[],uint32[],uint32[],bool[])

state-changing ABI callable governance/ops 0xbb002b2a

Writes one root-scoped Spot account fee tier per array element; any failure reverts the full batch.

Parameters and behavior

Inputs

  • accountIds — uint40[]. Array in ABI order; each element: AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • makerFeePps_ — uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • active — bool[]. Array in ABI order; each element: Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: All four arrays must have identical length; every account must resolve to a root and every fee pair must be valid.
  • State effects: Writes one root-scoped Spot account fee tier per array element; any failure reverts the full batch.
  • Units and rounding: Account IDs are uint40; fee arrays are PPS; active array is boolean.
  • Event families: One AccountFeeTierUpdated per successfully processed element, in input order.
  • Expected errors: Unauthorized, InvalidAuthority, InvalidMarketConfig for length mismatch, AccountNotFound, InvalidSubaccount, MarketFeeError.

Exact call data

setAccountFeeTiersById(uint40[],uint32[],uint32[],bool[])
  • Selector: 0xbb002b2a
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-account-fee-tiers-by-id
  • Call path: governance/ops

setAuthority(address)

state-changing ABI callable owner 0x7a9e5e4b

Sets the shared authority contract used for governance, ops, and emergency roles.

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

setBasePerpFees(uint32,uint32)

state-changing ABI callable governance/ops 0x8717928b

Replaces global base Perp fees and permanently marks perpFeesConfigured = true.

Parameters and behavior

Inputs

  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. 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: Governance or ops role.
  • Requirements: Maker and taker fees must each be within MAX_FEE_PPS and satisfy the protocol fee-pair relation.
  • State effects: Replaces global base Perp fees and permanently marks perpFeesConfigured = true.
  • Units and rounding: Both fees are PPS.
  • Event families: BasePerpFeesUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, MarketFeeError.

Exact call data

setBasePerpFees(uint32,uint32)
  • Selector: 0x8717928b
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-base-perp-fees
  • Call path: governance/ops

setBuilderReferralTier(address,uint32,uint32,uint64,bool)

state-changing ABI callable governance/ops 0x1ec167ac

Creates, replaces, deactivates, or time-bounds the builder's Spot referral tier.

Parameters and behavior

Inputs

  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • expiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: Builder nonzero; valid Spot fee pair; an active finite expiry must be in the future.
  • State effects: Creates, replaces, deactivates, or time-bounds the builder's Spot referral tier.
  • Units and rounding: Fees are PPS; expiry is Unix seconds; zero expiry means no finite tier expiry.
  • Event families: BuilderReferralTierUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, InvalidBuilder, MarketFeeError, InvalidExpireTime.

Exact call data

setBuilderReferralTier(address,uint32,uint32,uint64,bool)
  • Selector: 0x1ec167ac
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-builder-referral-tier
  • Call path: governance/ops

setDefaultSpotFees(uint32,uint32,bool)

state-changing ABI callable governance/ops 0x8d3d0b46

Replaces the global default Spot maker/taker fee pair and its active flag.

Parameters and behavior

Inputs

  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: Maker and taker fees must each be within MAX_FEE_PPS and satisfy the protocol fee-pair relation.
  • State effects: Replaces the global default Spot maker/taker fee pair and its active flag.
  • Units and rounding: Both fees are PPS; active is boolean.
  • Event families: DefaultSpotFeesUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, MarketFeeError.

Exact call data

setDefaultSpotFees(uint32,uint32,bool)
  • Selector: 0x8d3d0b46
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-default-spot-fees
  • Call path: governance/ops

setFeeCollector(address)

state-changing ABI callable governance 0xa42dce80

Updates the protocol fee collector that receives spot trading fees.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Nonzero collector; auto-registers the address if necessary.
  • State effects: Changes the shared protocol-fe collector account used for both Spot and Perp maker/taker protocol fees.
  • Units and rounding: Address/account ID only.
  • Event families: May emit AccountRegistered; no dedicated fee-collector update event.
  • Expected errors: Unauthorized, InvalidAuthority, ZeroAddress, account registration errors.

Exact call data

setFeeCollector(address)
  • Selector: 0xa42dce80
  • Mutability: nonpayable
  • Semantic rule: account.fee-collector
  • Call path: governance

setPerpAccountFeeTierById(uint40,uint32,uint32,bool)

state-changing ABI callable governance/ops 0xfa01ff06

Writes one root-scoped Perp account fee tier and active flag.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: Account must resolve to a root; maker/taker fee pair must be valid.
  • State effects: Writes one root-scoped Perp account fee tier and active flag.
  • Units and rounding: Account ID is uint40; fees are PPS; active is boolean.
  • Event families: One PerpAccountFeeTierUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, AccountNotFound, InvalidSubaccount, MarketFeeError.

Exact call data

setPerpAccountFeeTierById(uint40,uint32,uint32,bool)
  • Selector: 0xfa01ff06
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-perp-account-fee-tier-by-id
  • Call path: governance/ops

setPerpAccountFeeTiersById(uint40[],uint32[],uint32[],bool[])

state-changing ABI callable governance/ops 0x9b1d2c66

Writes one root-scoped Perp account fee tier per array element; any failure reverts the full batch.

Parameters and behavior

Inputs

  • accountIds — uint40[]. Array in ABI order; each element: AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • makerFeePps_ — uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • active — bool[]. Array in ABI order; each element: Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: All four arrays must have identical length; every account must resolve to a root and every fee pair must be valid.
  • State effects: Writes one root-scoped Perp account fee tier per array element; any failure reverts the full batch.
  • Units and rounding: Account IDs are uint40; fee arrays are PPS; active array is boolean.
  • Event families: One PerpAccountFeeTierUpdated per successfully processed element, in input order.
  • Expected errors: Unauthorized, InvalidAuthority, InvalidMarketConfig for length mismatch, AccountNotFound, InvalidSubaccount, MarketFeeError.

Exact call data

setPerpAccountFeeTiersById(uint40[],uint32[],uint32[],bool[])
  • Selector: 0x9b1d2c66
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-perp-account-fee-tiers-by-id
  • Call path: governance/ops

setPerpBuilderReferralTier(address,uint32,uint32,uint64,bool)

state-changing ABI callable governance/ops 0x29b40c0a

Creates, replaces, deactivates, or time-bounds the builder's Perp referral tier.

Parameters and behavior

Inputs

  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • makerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • takerFeePps_ — uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • expiry — uint64. Unix timestamp in seconds; zero-sentinel behavior is function-specific.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or ops role.
  • Requirements: Builder nonzero; valid Perp fee pair; an active finite expiry must be in the future.
  • State effects: Creates, replaces, deactivates, or time-bounds the builder's Perp referral tier.
  • Units and rounding: Fees are PPS; expiry is Unix seconds; zero expiry means no finite tier expiry.
  • Event families: PerpBuilderReferralTierUpdated.
  • Expected errors: Unauthorized, InvalidAuthority, InvalidBuilder, MarketFeeError, InvalidExpireTime.

Exact call data

setPerpBuilderReferralTier(address,uint32,uint32,uint64,bool)
  • Selector: 0x29b40c0a
  • Mutability: nonpayable
  • Semantic rule: account.fee-policy.set-perp-builder-referral-tier
  • Call path: governance/ops

setPerpFundingUpdater(address)

state-changing ABI callable governance 0x06be4e6a

Sets the account allowed to push normal perp funding updates.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: No nonzero check: the zero address deliberately disables the dedicated updater; ops remains authorized by the update gateway.
  • State effects: Replaces perpFundingUpdater, which AccountCore authenticates before forwarding funding batches.
  • Units and rounding: EVM address; no arithmetic or rounding.
  • Event families: PerpFundingUpdaterUpdated with old and new updater addresses.
  • Expected errors: Unauthorized, InvalidAuthority.

Exact call data

setPerpFundingUpdater(address)
  • Selector: 0x06be4e6a
  • Mutability: nonpayable
  • Semantic rule: account.perp-special-roles.set-perp-funding-updater
  • Call path: governance

setPerpLiquidationKeeper(address,bool)

state-changing ABI callable governance 0xf788de37

Enables or disables a trusted liquidation keeper.

Parameters and behavior

Inputs

  • keeper — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • active — bool. Boolean flag named active.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Keeper must be nonzero; active is stored exactly.
  • State effects: Adds or removes one address in the Perp liquidation-keeper allowlist.
  • Units and rounding: EVM address plus boolean; no arithmetic or rounding.
  • Event families: PerpLiquidationKeeperUpdated with keeper and active state.
  • Expected errors: Unauthorized, InvalidAuthority, ZeroAddress.

Exact call data

setPerpLiquidationKeeper(address,bool)
  • Selector: 0xf788de37
  • Mutability: nonpayable
  • Semantic rule: account.perp-special-roles.set-perp-liquidation-keeper
  • Call path: governance

setPerpMarketEnabled(uint32,bool)

state-changing ABI callable governance 0x18f26fd1

Enables or disables a registered PerpEngine market for AccountCore perp flows.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • enabled — bool. Boolean flag named enabled.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Nonzero registered market; enabling additionally requires configured Perp fees, a nonzero routed book, and an enabled quote asset.
  • State effects: Writes only the AccountCore enabled flag for one existing Perp route.
  • Units and rounding: Market ID is exact uint32; enabled is boolean.
  • Event families: PerpMarketEnabled with the resulting boolean.
  • Expected errors: Unauthorized, InvalidAuthority, InvalidMarketConfig, MarketNotFound, MarketFeeError, OnlyVerifiedPerpOrderBook, AssetNotEnabled.

Exact call data

setPerpMarketEnabled(uint32,bool)
  • Selector: 0x18f26fd1
  • Mutability: nonpayable
  • Semantic rule: account.market-config.set-perp-market-enabled
  • Call path: governance

setPerpPriceUpdater(address)

state-changing ABI callable governance 0x6ebeecc1

Sets the account allowed to push normal perp price updates.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: No nonzero check: the zero address deliberately disables the dedicated updater; ops remains authorized by the update gateway.
  • State effects: Replaces perpPriceUpdater, which AccountCore authenticates before forwarding Perp price batches.
  • Units and rounding: EVM address; no arithmetic or rounding.
  • Event families: PerpPriceUpdaterUpdated with old and new updater addresses.
  • Expected errors: Unauthorized, InvalidAuthority.

Exact call data

setPerpPriceUpdater(address)
  • Selector: 0x6ebeecc1
  • Mutability: nonpayable
  • Semantic rule: account.perp-special-roles.set-perp-price-updater
  • Call path: governance

setPerpRouter(address)

state-changing ABI callable governance 0xe130a52a

Sets the perp router allowed to register verified perp orderbooks.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: The replacement PerpRouter address must be nonzero.
  • State effects: Replaces the sole PerpRouter authorized to add Engines and register or reroute Perp books.
  • Units and rounding: EVM address; no arithmetic or rounding.
  • Event families: PerpRouterUpdated with the old and new router.
  • Expected errors: Unauthorized, InvalidAuthority, ZeroAddress.

Exact call data

setPerpRouter(address)
  • Selector: 0xe130a52a
  • Mutability: nonpayable
  • Semantic rule: account.router-config.set-perp-router
  • Call path: governance

setSpotRouter(address)

state-changing ABI callable governance 0xd82645be

Sets the spot router allowed to register verified orderbooks.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: The replacement SpotRouter address must be nonzero.
  • State effects: Replaces the sole SpotRouter authorized to register future Spot books; existing verified books remain verified.
  • Units and rounding: EVM address; no arithmetic or rounding.
  • Event families: SpotRouterUpdated with the old and new router.
  • Expected errors: Unauthorized, InvalidAuthority, ZeroAddress.

Exact call data

setSpotRouter(address)
  • Selector: 0xd82645be
  • Mutability: nonpayable
  • Semantic rule: account.router-config.set-spot-router
  • Call path: governance

settlePerpFunding(uint40,uint32)

state-changing user function ABI callable account-trader 0x315ada60

Settles one account's accrued funding for one market.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_TRADE.
  • Requirements: Registered account and enabled market; position mode/record must exist and unsigned margin must cover any funding debit; reentrancy guard.
  • State effects: Settles one market's cumulative funding into margin and advances its funding checkpoint; explicitly requests a zero-value settlement event.
  • Units and rounding: Funding debit rounds up and credit rounds down into raw quote-token units.
  • Event families: In order: PerpMarginUpdated only for nonzero funding; PerpIsolatedPositionUpdated when mode is ISOLATED; then PerpFundingSettled even when funding is zero.
  • Expected errors: Unauthorized, AccountNotFound, MarketNotFound, mode/position, InsufficientBalance, conversion/overflow, and reentrancy errors.

Exact call data

settlePerpFunding(uint40,uint32)
  • Selector: 0x315ada60
  • Mutability: nonpayable
  • Semantic rule: account.perp-funding-settle.settle-perp-funding
  • Call path: account-trader

settlePerpFundingBatch(uint40,uint32[])

state-changing user function ABI callable account-trader 0x41df092c

Settles one account's accrued funding across several markets.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketIds — uint32[]. Array in ABI order; each element: Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_TRADE.
  • Requirements: Registered account; every listed market must be enabled and have a compatible position; any failed element reverts the full batch; reentrancy guard.
  • State effects: Settles cumulative funding and advances the checkpoint once per input market, in order, requesting zero-value settlement events.
  • Units and rounding: Each funding debit rounds up and credit rounds down into that Engine's raw quote-token units.
  • Event families: Per market in input order: conditional PerpMarginUpdated; PerpIsolatedPositionUpdated when mode is ISOLATED; then PerpFundingSettled including zero settlements.
  • Expected errors: Unauthorized, AccountNotFound, MarketNotFound, mode/position, InsufficientBalance, conversion/overflow, and reentrancy errors from any element.

Exact call data

settlePerpFundingBatch(uint40,uint32[])
  • Selector: 0x41df092c
  • Mutability: nonpayable
  • Semantic rule: account.perp-funding-settle.settle-perp-funding-batch
  • Call path: account-trader

settleSpotPassiveTrade(uint40,bool,uint96,uint128,uint256,address,uint32)

state-changing ABI callable verified-spot-book 0x9de5074e

Settles a taker fill against passive liquidity inventory, applying taker and builder fees.

Parameters and behavior

Inputs

  • takerId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • takerIsBuy — bool. Boolean flag named takerIsBuy.
  • baseAmount — uint96. 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.
  • takerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • builderFeePps — uint32. 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 currently verified Spot order book.
  • Requirements: Protocol active; zero base or quote makes the call a no-op; otherwise known taker, sufficient free balance, valid protocol fee, and optional live builder approval/cap.
  • State effects: Settles one taker against passive inventory, updates both taker token balances, credits quote protocol fees, and optionally accrues a builder fee.
  • Units and rounding: Base and quote are raw token units; fees are PPS and use integer division in the settlement helpers.
  • Event families: SpotReserveUpdated for both taker sides and, when protocol fee is nonzero, the fee collector; conditional BuilderFeeAccrued.
  • Expected errors: OnlyVerifiedSpotOrderBook, ProtocolPaused, AccountNotFound, InsufficientBalance, InvalidBuilder, BuilderApprovalNotFound, BuilderFeeTooHigh, MarketFeeError, and arithmetic bounds errors.

Exact call data

settleSpotPassiveTrade(uint40,bool,uint96,uint128,uint256,address,uint32)
  • Selector: 0x9de5074e
  • Mutability: nonpayable
  • Semantic rule: account.spot-settlement.settle-spot-passive-trade
  • Call path: verified-spot-book

settleSpotTradesWithBuilder((uint40,uint96,uint128,bool,uint96,uint32)[],uint40,bool,uint256,address,uint32)

state-changing ABI callable verified-spot-book 0x1df27954

Settles FIFO orderbook fills and accrues an approved builder fee.

Parameters and behavior

Inputs

  • makerFills — struct ISpotBalanceAccount.SpotFill[]. Array in ABI order; each element: Structured struct ISpotBalanceAccount.SpotFill[]; field-level units are defined in the type catalog and tuple metadata.
  • takerId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • takerIsBuy — bool. Boolean flag named takerIsBuy.
  • takerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • builderFeePps — uint32. 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 currently verified Spot order book.
  • Requirements: Protocol active; known maker/taker accounts; maker reserves and taker free balance sufficient; fee pair and optional builder approval valid; fill arithmetic representable.
  • State effects: Settles every active-book maker fill and aggregate taker leg, releases consumed maker reserves, credits counterpart assets, accrues protocol quote fees, and optionally accrues the approved builder fee.
  • Units and rounding: Base/quote amounts are raw token units; protocol and builder fees are PPS with the implementation's integer division; reserve debits are exact.
  • Event families: SpotReserveUpdated for affected maker, taker, and fee-collector balances; conditional BuilderFeeAccrued. The caller's outer action later emits its own TradesPacked and BookUpdatesPacked.
  • Expected errors: OnlyVerifiedSpotOrderBook, ProtocolPaused, AccountNotFound, InsufficientBalance, InvalidBuilder, BuilderApprovalNotFound, BuilderFeeTooHigh, MarketFeeError, and arithmetic bounds errors.

Exact call data

settleSpotTradesWithBuilder((uint40,uint96,uint128,bool,uint96,uint32)[],uint40,bool,uint256,address,uint32)
  • Selector: 0x1df27954
  • Mutability: nonpayable
  • Semantic rule: account.spot-settlement.settle-spot-trades-with-builder
  • Call path: verified-spot-book

startPerpCrossLiquidation(uint40,address,uint32[])

state-changing ABI callable liquidation-keeper 0xc67b8a3e

Starts cross liquidation and atomically cancels orders from the supplied markets.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • quoteAsset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • marketIds — uint32[]. Array in ABI order; each element: Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Allowlisted Perp liquidation keeper.
  • Requirements: Existing account and quote Engine; cross namespace not already liquidating; strictly increasing complete list of all active cross markets on that Engine; fresh sane prices; cancel-margin health below zero; routed order cancellations succeed.
  • State effects: Locks cross liquidation, cancels every listed market's resting orders, applies exposure/reserve releases, and clears the lock immediately if cancellation restores maintenance health.
  • Units and rounding: Account/market IDs are exact; health and margin are raw quote units; risk factors are PPS.
  • Event families: For each market in the validated ascending list: book BookUpdatesPacked, then per cancellation conditional Engine PerpMarginUpdated, PerpMakerFeeReserveUpdated, and PerpOrderExposureUpdated in that order; final PerpLiquidationStarted(accountId,0,CROSS,recovered).
  • Expected errors: Unauthorized, AccountNotFound, Engine/market-list/mode/liquidation, stale/divergent price, health, route/cancellation, numeric, and reentrancy errors.

Exact call data

startPerpCrossLiquidation(uint40,address,uint32[])
  • Selector: 0xc67b8a3e
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-start.start-perp-cross-liquidation
  • Call path: liquidation-keeper

startPerpIsolatedLiquidation(uint40,uint32)

state-changing ABI callable liquidation-keeper 0x5aac53c7

Starts isolated liquidation and atomically cancels that market's orders.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • No return value.

Access and behavior

  • Who can call: Allowlisted Perp liquidation keeper.
  • Requirements: Existing account and market in isolated mode; not already liquidating; fresh sane market price; cancel-margin health below zero; routed order cancellation succeeds.
  • State effects: Locks that isolated position, cancels its resting orders, applies exposure/reserve releases, and clears the lock immediately if cancellation restores maintenance health.
  • Units and rounding: Account/market IDs are exact; health and margin are raw quote units; risk factors are PPS.
  • Event families: In order: initial PerpIsolatedPositionUpdated sets the liquidation flag; book BookUpdatesPacked; per cancellation conditional PerpMarginUpdated, PerpMakerFeeReserveUpdated, then PerpOrderExposureUpdated; a resulting isolated-position snapshot; if recovered, another PerpIsolatedPositionUpdated clears the flag; final PerpLiquidationStarted(accountId,marketId,ISOLATED,recovered).
  • Expected errors: Unauthorized, AccountNotFound, market/mode/position/liquidation, stale/divergent price, health, route/cancellation, numeric, and reentrancy errors.

Exact call data

startPerpIsolatedLiquidation(uint40,uint32)
  • Selector: 0x5aac53c7
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-start.start-perp-isolated-liquidation
  • Call path: liquidation-keeper

takeoverPerpCrossNamespace(uint40,address,uint40)

state-changing ABI callable liquidation-keeper/destination-trader 0xd37c7491

Transfers a terminally insolvent cross namespace to a keeper-controlled account.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • quoteAsset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • destinationId — 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: Allowlisted keeper that is also owner or live trade-authorized signer for destinationId.
  • Requirements: Distinct existing source/destination; source cross namespace locked and below takeover threshold with fresh sane prices; destination cross namespace empty/not liquidating, quote-compatible, and sufficiently prefunded; source list/state internally consistent.
  • State effects: Moves every cross position and its funding checkpoint to destination cross slots, transfers the cross margin balance, clears the source lock/bitmap, and preserves aggregate open interest.
  • Units and rounding: Positions are base lots and raw quote entry; margin/health are raw quote units; takeover threshold factors are PPS.
  • Event families: Per position PerpPositionModeUpdated for source and destination plus paired PerpCrossPositionSlotUpdated; source/destination PerpMarginUpdated; final PerpNamespaceTakenOver(...,0,CROSS). No PerpLiquidationCleared.
  • Expected errors: Unauthorized, AccountNotFound, same/destination account, mode/liquidation, nonempty destination, price/threshold/health, slot capacity, balance/numeric, and reentrancy errors.

Exact call data

takeoverPerpCrossNamespace(uint40,address,uint40)
  • Selector: 0xd37c7491
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-takeover.takeover-perp-cross-namespace
  • Call path: liquidation-keeper/destination-trader

takeoverPerpIsolatedPosition(uint40,uint32,uint40)

state-changing ABI callable liquidation-keeper/destination-trader 0xeb310b84

Transfers a terminally insolvent isolated namespace to a keeper-controlled account.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • destinationId — 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: Allowlisted keeper that is also owner or live trade-authorized signer for destinationId.
  • Requirements: Distinct existing source/destination; source isolated position locked and below takeover threshold with fresh sane price; destination has no position/mode and is sufficiently prefunded for the transfer.
  • State effects: Moves the isolated position, funding checkpoint, and isolated margin to destination, clears the source record/lock, and preserves aggregate open interest.
  • Units and rounding: Position is base lots/raw quote entry; margin/health are raw quote units; takeover threshold factors are PPS.
  • Event families: Source/destination PerpPositionModeUpdated, source PerpIsolatedPositionCleared, destination PerpIsolatedPositionUpdated, both PerpMarginUpdated, then PerpNamespaceTakenOver(...,marketId,ISOLATED). No PerpLiquidationCleared.
  • Expected errors: Unauthorized, AccountNotFound, same/destination account, mode/liquidation, nonempty destination, price/threshold/health, balance/numeric, and reentrancy errors.

Exact call data

takeoverPerpIsolatedPosition(uint40,uint32,uint40)
  • Selector: 0xeb310b84
  • Mutability: nonpayable
  • Semantic rule: account.perp-liquidation-takeover.takeover-perp-isolated-position
  • Call path: liquidation-keeper/destination-trader

toggleProtocolState(bool)

state-changing ABI callable emergency/governance 0xe004f924

Pauses or unpauses account operations.

Parameters and behavior

Inputs

  • state — bool. Boolean flag named state.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance or emergency may pause; governance or ops may unpause.
  • Requirements: Valid authority pointer and role; the requested bool is written directly.
  • State effects: Sets the global AccountCore pause used by deposits, withdrawals, risk-increasing trading, and other protocolActive paths.
  • Units and rounding: Boolean state; no rounding.
  • Event families: No dedicated semantic event in the reviewed implementation.
  • Expected errors: Unauthorized, InvalidAuthority.

Exact call data

toggleProtocolState(bool)
  • Selector: 0xe004f924
  • Mutability: nonpayable
  • Semantic rule: account.pause
  • Call path: emergency/governance

transferBetweenAccounts(address,address,address,uint256)

state-changing user function ABI callable user/signer 0x3c341293

Moves free balance between two accounts under the same root account.

Parameters and behavior

Inputs

  • fromAccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • toAccount — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Root owner, source account, or signer authorized for internal transfer under the same root.
  • Requirements: Protocol active; both accounts registered under one root; enabled token, nonzero amount, and sufficient free source balance.
  • State effects: Moves free balance between two AccountCore subaccounts without moving external custody.
  • Units and rounding: Raw token units; exact debit/credit.
  • Event families: InternalAccountTransfer.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, SameRootRequired, AssetNotEnabled, ZeroAmount, InsufficientBalance.

Exact call data

transferBetweenAccounts(address,address,address,uint256)
  • Selector: 0x3c341293
  • Mutability: nonpayable
  • Semantic rule: account.internal-transfer
  • Call path: user/signer

transferOwnership(address)

payable 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: payable
  • Semantic rule: ownership.transfer
  • Call path: owner

updatePerpFunding((uint32,uint96,bool)[])

state-changing ABI callable funding-updater 0xa03b0b75

Updates funding rates and cumulative funding through the AccountCore auth boundary.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Configured Perp funding updater (or the governing authorization path implemented by AccountCore).
  • Requirements: Every market must be registered and operational; Engine enforces funding interval and cumulative-value bounds.
  • State effects: Applies signed cumulative funding deltas with the current block timestamp.
  • Units and rounding: Absolute funding delta is quote-per-base-lot scale defined by the Engine; sign is the separate boolean; timestamp is seconds.
  • Event families: Per element in input order: Engine PerpFundingUpdated, then AccountCore PerpFundingUpdateRequested.
  • Expected errors: Unauthorized, market state/registration, funding interval/timestamp, and numeric overflow error families.

Exact call data

updatePerpFunding((uint32,uint96,bool)[])
  • Selector: 0xa03b0b75
  • Mutability: nonpayable
  • Semantic rule: account.perp-funding-update
  • Call path: funding-updater

updatePerpFundingInterval(uint32,uint32)

state-changing ABI callable governance 0x90b2f135

Updates a perp market's minimum funding interval through the AccountCore auth boundary.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • fundingIntervalSeconds — uint32. Duration in seconds.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Market route must exist; the Engine requires a registered market and validates the supplied interval.
  • State effects: Writes only the market funding cadence through its Engine.
  • Units and rounding: fundingIntervalSeconds is a duration in seconds.
  • Event families: Engine PerpFundingIntervalUpdated, followed by AccountCore PerpFundingIntervalUpdateRequested.
  • Expected errors: Unauthorized, InvalidAuthority, route MarketNotFound, plus Engine OnlyAccountCore, market, and invalid-interval/configuration errors.

Exact call data

updatePerpFundingInterval(uint32,uint32)
  • Selector: 0x90b2f135
  • Mutability: nonpayable
  • Semantic rule: account.market-config.update-perp-funding-interval
  • Call path: governance

updatePerpMarketRiskParams(uint32,(uint32,uint32,uint32,uint32,uint32,uint32,uint96,uint32,uint32,uint96,uint96))

state-changing ABI callable governance 0xc8d866e4

Updates mutable perp risk parameters through the AccountCore auth boundary.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • params — struct IPerpEngine.PerpMarketRiskParams. Structured struct IPerpEngine.PerpMarketRiskParams; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return value.

Access and behavior

  • Who can call: Governance role.
  • Requirements: Market route must exist; the Engine validates every factor, leverage, staleness, order cap, and liquidation parameter.
  • State effects: Forwards the complete risk-parameter struct to the market's Engine; AccountCore stores no duplicate risk values.
  • Units and rounding: Risk factors are PPS, leverage is E6, staleness is seconds, and position/order caps are base lots as defined field-by-field in the tuple catalog.
  • Event families: Engine PerpMarketRiskParamsUpdated, followed by AccountCore PerpMarketRiskParamsUpdateRequested.
  • Expected errors: Unauthorized, InvalidAuthority, route MarketNotFound, plus Engine market/configuration/size/factor errors.

Exact call data

updatePerpMarketRiskParams(uint32,(uint32,uint32,uint32,uint32,uint32,uint32,uint96,uint32,uint32,uint96,uint96))
  • Selector: 0xc8d866e4
  • Mutability: nonpayable
  • Semantic rule: account.market-config.update-perp-market-risk-params
  • Call path: governance

updatePerpOrderBookRoute(uint32,address)

state-changing ABI callable perp-router 0xd8e0f1a9

Persists a PerpRouter-authorized orderbook route change for a disabled market.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.
  • orderBook — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.

Returns

  • No return value.

Access and behavior

  • Who can call: Configured PerpRouter only.
  • Requirements: Market route must already have an Engine and must be disabled; AccountCore does not independently reject a zero replacement here.
  • State effects: Replaces only the stored Perp order-book address; Engine and enabled state are unchanged.
  • Units and rounding: Market ID is exact uint32; address has no numeric conversion.
  • Event families: PerpOrderBookUpdated with market ID, old book, and replacement book.
  • Expected errors: OnlyPerpRouter, MarketNotFound, MarketStateError.

Exact call data

updatePerpOrderBookRoute(uint32,address)
  • Selector: 0xd8e0f1a9
  • Mutability: nonpayable
  • Semantic rule: account.perp-market-registry.update-perp-order-book-route
  • Call path: perp-router

updatePerpPrices((uint32,uint32,uint32,uint32)[])

state-changing ABI callable price-updater 0xf3d9819c

Updates oracle, index, and mark prices through the AccountCore auth boundary.

Parameters and behavior

Inputs

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

Returns

  • No return value.

Access and behavior

  • Who can call: Configured Perp price updater (or the governing authorization path implemented by AccountCore).
  • Requirements: Every market must be registered and operational; Engine validates nonzero prices, freshness timestamp, and index/oracle divergence.
  • State effects: Writes mark, index, oracle, and current block timestamp into each market through its Engine.
  • Units and rounding: Prices are uint32 market price units; timestamp is seconds; no conversion is performed by AccountCore.
  • Event families: Per element in input order: Engine PerpPricesUpdated, then AccountCore PerpPricesUpdateRequested.
  • Expected errors: Unauthorized, market state/registration errors, PriceError, StalePrice, and divergence/configuration errors.

Exact call data

updatePerpPrices((uint32,uint32,uint32,uint32)[])
  • Selector: 0xf3d9819c
  • Mutability: nonpayable
  • Semantic rule: account.perp-price-update
  • Call path: price-updater

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

withdraw(address,uint256)

state-changing user function ABI callable user 0xf3fef3a3

Withdraws free, unreserved assets from msg.sender's account.

Parameters and behavior

Inputs

  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: msg.sender withdraws from its own registered AccountCore balance.
  • Requirements: Protocol active, registered caller, nonzero amount, sufficient free balance; reentrancy guard. Withdrawals do not require the token to remain Spot-enabled.
  • State effects: Debits the caller's free balance and transfers the asset to the caller.
  • Units and rounding: Raw atomic units of token; exact debit and transfer with no protocol rounding.
  • Event families: After the asset transfer: authoritative SpotReserveUpdated, then Withdrawal(accountId,token,amount); Withdrawal does not include the recipient address.
  • Expected errors: ProtocolPaused, AccountNotFound, ZeroAmount, InsufficientBalance, and native/ERC-20 transfer errors.

Exact call data

withdraw(address,uint256)
  • Selector: 0xf3fef3a3
  • Mutability: nonpayable
  • Semantic rule: account.withdraw.withdraw
  • Call path: user

withdrawFromAccount(address,address,uint256)

state-changing user function ABI callable account-withdraw 0x6c370b11

Withdraws free, unreserved assets from an account if msg.sender has withdraw permission.

Parameters and behavior

Inputs

  • account — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: The account owner or a live signer with ACCOUNT_PERMISSION_WITHDRAW for account.
  • Requirements: Protocol active; registered account, nonzero amount, sufficient free balance; reentrancy guard. Withdrawals do not require the token to remain Spot-enabled.
  • State effects: Debits account and transfers the asset to msg.sender; an authorized delegated withdraw signer is therefore the recipient.
  • Units and rounding: Raw atomic units of token; exact debit and transfer with no protocol rounding.
  • Event families: After the asset transfer: authoritative SpotReserveUpdated, then Withdrawal(accountId,token,amount); Withdrawal does not include msg.sender.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, ZeroAmount, InsufficientBalance, and transfer errors.

Exact call data

withdrawFromAccount(address,address,uint256)
  • Selector: 0x6c370b11
  • Mutability: nonpayable
  • Semantic rule: account.withdraw.withdraw-from-account
  • Call path: account-withdraw

withdrawFromPerpCrossMargin(uint40,address,uint256)

state-changing user function ABI callable account-internal-transfer 0x06665cd6

Moves Engine quote from cross margin back to free AccountCore balance.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • quoteAsset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.
  • amount — uint256. Raw atomic units of the token/asset identified by the same call or enclosing struct; no decimal conversion is performed by ABI encoding.

Returns

  • No return value.

Access and behavior

  • Who can call: Account owner or live signer with ACCOUNT_PERMISSION_INTERNAL_TRANSFER.
  • Requirements: Protocol active; registered account; nonzero amount; quote Engine exists; cross margin sufficient and post-withdrawal transfer health passes with fresh sane prices.
  • State effects: Debits the Engine's cross-margin namespace and credits AccountCore free quote balance.
  • Units and rounding: amount is raw quote-token units; Engine requirement math rounds conservatively before allowing the exact transfer.
  • Event families: Engine PerpMarginTransferred(...,0,amount,false) and PerpMarginUpdated, then AccountCore SpotReserveUpdated.
  • Expected errors: ProtocolPaused, Unauthorized, AccountNotFound, ZeroAmount, MarketNotFound, InsufficientBalance, StalePrice/PriceError, margin-health, numeric, and reentrancy errors.

Exact call data

withdrawFromPerpCrossMargin(uint40,address,uint256)
  • Selector: 0x06665cd6
  • Mutability: nonpayable
  • Semantic rule: account.perp-margin.withdraw-from-perp-cross-margin
  • Call path: account-internal-transfer

Read-only functions

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

ACCOUNT_PERMISSION_ADMIN()

view ABI callable public-read 0x67411328

Returns the account permission administrator constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. uint32 AccountCore permission bitmask; bit definitions are 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 _: uint32 — uint32 AccountCore permission bitmask; bit definitions are 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

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

ACCOUNT_PERMISSION_INTERNAL_TRANSFER()

view ABI callable public-read 0xe4de1931

Returns the account permission internal transfer constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. uint32 AccountCore permission bitmask; bit definitions are 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 _: uint32 — uint32 AccountCore permission bitmask; bit definitions are 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

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

ACCOUNT_PERMISSION_TRADE()

view ABI callable public-read 0x27931b1b

Returns the account permission trade constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. uint32 AccountCore permission bitmask; bit definitions are 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 _: uint32 — uint32 AccountCore permission bitmask; bit definitions are 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

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

ACCOUNT_PERMISSION_WITHDRAW()

view ABI callable public-read 0xff419fc1

Returns the account permission withdraw constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. uint32 AccountCore permission bitmask; bit definitions are 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 _: uint32 — uint32 AccountCore permission bitmask; bit definitions are 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

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

accountSignerAuthorizationNonces(address)

view ABI callable public-read 0x84249ce7

Returns the next account-scoped EIP-712 signer-authorization nonce.

Parameters and behavior

Inputs

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

Returns

  • result0 — uint256. Unsigned anti-replay sequence/nonce; increment and zero semantics are contract-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 _: uint256 — Unsigned anti-replay sequence/nonce; increment and zero semantics are contract-specific. Returns the next EIP-712 account-scoped authorization nonce.
  • 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

accountSignerAuthorizationNonces(address)
  • Selector: 0x84249ce7
  • 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

basePerpMakerFeePps()

view ABI callable public-read 0x55375427

Returns the base Perp maker fee in PPS.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • 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

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

basePerpTakerFeePps()

view ABI callable public-read 0x1952df1e

Returns the base Perp taker fee in PPS.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • 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

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

BUILDER_REFERRAL_AUTHORIZATION_TYPEHASH()

view ABI callable public-read 0xc0e8803f

Returns the EIP-712 type hash for builder referral authorization.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bytes32. Keccak-256 hash of the canonical EIP-712 struct type string.

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 _: bytes32 — Keccak-256 hash of the canonical EIP-712 struct type string.
  • 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

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

builderReferralAuthorizationUsed(address,bytes32)

view ABI callable public-read 0xc739bb01

Returns whether a builder referral authorization nonce has been consumed.

Parameters and behavior

Inputs

  • arg0 — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • arg1 — bytes32. bytes32 opaque binary value.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether a builder referral authorization nonce has been consumed.
  • 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

builderReferralAuthorizationUsed(address,bytes32)
  • Selector: 0xc739bb01
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

CREATE_SUBACCOUNT_TYPEHASH()

view ABI callable public-read 0xc28c6bb7

Returns the EIP-712 type hash for create subaccount.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bytes32. Keccak-256 hash of the canonical EIP-712 struct type string.

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 _: bytes32 — Keccak-256 hash of the canonical EIP-712 struct type string.
  • 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

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

defaultSpotFeesActive()

view ABI callable public-read 0x1bb1f7ce

Returns whether the default Spot fee schedule is active.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named 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

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

defaultSpotMakerFeePps()

view ABI callable public-read 0x55550373

Returns the default Spot maker fee in PPS.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • 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

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

defaultSpotTakerFeePps()

view ABI callable public-read 0x32f16b04

Returns the default Spot taker fee in PPS.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • 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

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

effectivePerpMakerFeePps(uint40)

view ABI callable public-read 0xac453d5e

Resolves the global perp maker fee after account and referral discounts.

Parameters and behavior

Inputs

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

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Resolves the global perp maker fee after account and referral discounts.
  • 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

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

effectivePerpTakerFeePps(uint40)

view ABI callable public-read 0x425949c0

Resolves the global perp taker fee after account and referral discounts.

Parameters and behavior

Inputs

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

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Resolves the global perp taker fee after account and referral discounts.
  • 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

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

effectiveSpotMakerFeePps(uint40,uint256)

view ABI callable public-read 0x0ad77aeb

Resolves maker fee from account/default policy and the market fee cap.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketMakerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Resolves maker fee from account/default policy and the market fee cap.
  • 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

effectiveSpotMakerFeePps(uint40,uint256)
  • Selector: 0x0ad77aeb
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

effectiveSpotTakerFeePps(uint40,uint256)

view ABI callable public-read 0xce3be2dc

Resolves taker fee from account/default policy and the market fee cap.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • marketTakerFeePps — uint256. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS. Resolves taker fee from account/default policy and the market fee cap.
  • 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

effectiveSpotTakerFeePps(uint40,uint256)
  • Selector: 0xce3be2dc
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

eip712Domain()

view ABI callable public-read 0x84b0196e

Returns AccountCore's EIP-712 signing domain.

Parameters and behavior

Inputs

  • None.

Returns

  • fields — bytes1. bytes1 opaque binary value.
  • name — string. UTF-8 string encoded by the Solidity ABI.
  • version — string. UTF-8 string encoded by the Solidity ABI.
  • chainId — uint256. EVM chain ID (unitless integer).
  • verifyingContract — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • salt — bytes32. 32-byte CREATE2 or hashing salt.
  • extensions — uint256[]. Array in ABI order; each element: Unitless ERC-5267 EIP-712 extension identifier.

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 fields: bytes1 — bytes1 opaque binary value.; name: string — UTF-8 string encoded by the Solidity ABI.; version: string — UTF-8 string encoded by the Solidity ABI.; chainId: uint256 — EVM chain ID (unitless integer).; verifyingContract: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.; salt: bytes32 — 32-byte CREATE2 or hashing salt.; extensions: uint256[] — Array in ABI order; each element: Unitless ERC-5267 EIP-712 extension identifier. See: https://eips.ethereum.org/EIPS/eip-5267
  • 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

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

feeCollector()

view ABI callable public-read 0xc415b95c

Returns the account that receives protocol fees.

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

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

getAccountFeeTierById(uint40)

view ABI callable public-read 0x8ea754ee

Returns the root-level spot fee tier for an account id.

Parameters and behavior

Inputs

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

Returns

  • tier — struct IAccountCore.AccountFeeTier. Structured struct IAccountCore.AccountFeeTier; 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 tier: struct IAccountCore.AccountFeeTier — Structured struct IAccountCore.AccountFeeTier; field-level units are defined in the type catalog and tuple metadata. Returns the root-level spot fee tier for an account id.
  • 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

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

getAccountOwner(address)

view ABI callable public-read 0x442b172c

Returns the owner of a root or subaccount, or address(0) if unknown.

Parameters and behavior

Inputs

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

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. Returns the owner of a root or subaccount, or address(0) if unknown.
  • 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

getAccountOwner(address)
  • Selector: 0x442b172c
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getAccountRootId(address)

view ABI callable public-read 0x5b83ed4e

Returns the root account id for a root or subaccount.

Parameters and behavior

Inputs

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

Returns

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

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 _: uint40 — AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed. Returns the root account id for a root or subaccount.
  • 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

getAccountRootId(address)
  • Selector: 0x5b83ed4e
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getAccountSubaccountSeq(address)

view ABI callable public-read 0xc3a46a56

Returns zero for root accounts and a nonzero sequence for subaccounts.

Parameters and behavior

Inputs

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

Returns

  • result0 — uint16. Unitless integer count or zero-based index, as named.

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 _: uint16 — Unitless integer count or zero-based index, as named. Returns zero for root accounts and a nonzero sequence for subaccounts.
  • 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

getAccountSubaccountSeq(address)
  • Selector: 0xc3a46a56
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getBalance(address,address)

view ABI callable public-read 0xd4fac45d

Returns an account's free balance for an asset.

Parameters and behavior

Inputs

  • user — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Returns

  • result0 — 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 _: uint256 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns an account's free balance for an asset.
  • 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

getBalance(address,address)
  • Selector: 0xd4fac45d
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getBalanceById(uint40,address)

view ABI callable public-read 0xe1d64f3e

Returns an account's free balance for an asset by account id.

Parameters and behavior

Inputs

  • userId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Returns

  • result0 — 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 _: uint256 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns an account's free balance for an asset by account id.
  • 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

getBalanceById(uint40,address)
  • Selector: 0xe1d64f3e
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getBuilderApproval(address,address)

view ABI callable public-read 0xc2531e86

Returns the builder approval configured by a root account.

Parameters and behavior

Inputs

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

Returns

  • result0 — struct IAccountCore.BuilderApproval. Structured struct IAccountCore.BuilderApproval; 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 _: struct IAccountCore.BuilderApproval — Structured struct IAccountCore.BuilderApproval; field-level units are defined in the type catalog and tuple metadata. Returns the builder approval configured by a root account.
  • 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

getBuilderApproval(address,address)
  • Selector: 0xc2531e86
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getBuilderReferral(address)

view ABI callable public-read 0xdeff77dd

Returns the referral configured for an account's root and whether it is currently live.

Parameters and behavior

Inputs

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

Returns

  • referral — struct IAccountCore.BuilderReferral. Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.
  • active — bool. Boolean flag named active.

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 referral: struct IAccountCore.BuilderReferral — Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.; active: bool — Boolean flag named active. Returns the referral configured for an account's root and whether it is currently live.
  • 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

getBuilderReferral(address)
  • Selector: 0xdeff77dd
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getBuilderReferralById(uint40)

view ABI callable public-read 0x8cde1a9e

Returns the referral configured for an account id's root and whether it is currently live.

Parameters and behavior

Inputs

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

Returns

  • referral — struct IAccountCore.BuilderReferral. Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.
  • active — bool. Boolean flag named active.

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 referral: struct IAccountCore.BuilderReferral — Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.; active: bool — Boolean flag named active. Returns the referral configured for an account id's root and whether it is currently live.
  • 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

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

getBuilderReferralTier(address)

view ABI callable public-read 0xc320f074

Returns the referral discount tier configured for a builder.

Parameters and behavior

Inputs

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

Returns

  • result0 — struct IAccountCore.BuilderReferralTier. Structured struct IAccountCore.BuilderReferralTier; 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 _: struct IAccountCore.BuilderReferralTier — Structured struct IAccountCore.BuilderReferralTier; field-level units are defined in the type catalog and tuple metadata. Returns the referral discount tier configured for a builder.
  • 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

getBuilderReferralTier(address)
  • Selector: 0xc320f074
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getClaimableBuilderFees(address,address)

view ABI callable public-read 0x5d98cf47

Returns accrued, unclaimed builder fees for one asset.

Parameters and behavior

Inputs

  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • asset — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Returns

  • result0 — 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 _: uint256 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns accrued, unclaimed builder fees for one asset.
  • 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

getClaimableBuilderFees(address,address)
  • Selector: 0x5d98cf47
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPerpAccountFeeTierById(uint40)

view ABI callable public-read 0xfd9400fa

Returns the root-level perp fee tier for an account id.

Parameters and behavior

Inputs

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

Returns

  • tier — struct IAccountCore.AccountFeeTier. Structured struct IAccountCore.AccountFeeTier; 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 tier: struct IAccountCore.AccountFeeTier — Structured struct IAccountCore.AccountFeeTier; field-level units are defined in the type catalog and tuple metadata. Returns the root-level perp fee tier for an account id.
  • 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

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

getPerpBuilderReferral(address)

view ABI callable public-read 0x3afd6f97

Returns the perp referral configured for an account's root and whether it is currently live.

Parameters and behavior

Inputs

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

Returns

  • referral — struct IAccountCore.BuilderReferral. Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.
  • active — bool. Boolean flag named active.

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 referral: struct IAccountCore.BuilderReferral — Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.; active: bool — Boolean flag named active. Returns the perp referral configured for an account's root and whether it is currently live.
  • 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

getPerpBuilderReferral(address)
  • Selector: 0x3afd6f97
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPerpBuilderReferralById(uint40)

view ABI callable public-read 0x5a485d6b

Returns the perp referral configured for an account id's root and whether it is currently live.

Parameters and behavior

Inputs

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

Returns

  • referral — struct IAccountCore.BuilderReferral. Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.
  • active — bool. Boolean flag named active.

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 referral: struct IAccountCore.BuilderReferral — Structured struct IAccountCore.BuilderReferral; field-level units are defined in the type catalog and tuple metadata.; active: bool — Boolean flag named active. Returns the perp referral configured for an account id's root and whether it is currently live.
  • 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

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

getPerpBuilderReferralTier(address)

view ABI callable public-read 0x396b10a3

Returns the perp referral discount tier configured for a builder.

Parameters and behavior

Inputs

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

Returns

  • result0 — struct IAccountCore.BuilderReferralTier. Structured struct IAccountCore.BuilderReferralTier; 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 _: struct IAccountCore.BuilderReferralTier — Structured struct IAccountCore.BuilderReferralTier; field-level units are defined in the type catalog and tuple metadata. Returns the perp referral discount tier configured for a builder.
  • 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

getPerpBuilderReferralTier(address)
  • Selector: 0x396b10a3
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getPerpMarketConfig(uint32)

view ABI callable public-read 0xd316d88d

Returns the configured orderbook and operational status for a perp market.

Parameters and behavior

Inputs

  • marketId — uint32. Global Perp market ID (uint32); market ID 0 is reserved as the cross-margin namespace within an Engine.

Returns

  • orderBook — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • engine — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • enabled — bool. Boolean flag named enabled.

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 orderBook: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.; engine: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.; enabled: bool — Boolean flag named enabled. Returns the configured orderbook and operational status for a perp market.
  • 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

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

getPerpOrderAdmissionResult((uint40,uint32,bool,bool,uint96,uint8,uint8))

view ABI callable public-read 0xf149f880

Returns a non-reverting admission result for off-chain routing and frontend previews.

Parameters and behavior

Inputs

  • admission — struct IPerpEngine.PerpOrderAdmission. Structured struct IPerpEngine.PerpOrderAdmission; field-level units are defined in the type catalog and tuple metadata.

Returns

  • allowed — bool. Boolean flag named allowed.
  • errorSelector — bytes4. Four-byte EVM selector or ERC-165 interface identifier.

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 allowed: bool — Boolean flag named allowed.; errorSelector: bytes4 — Four-byte EVM selector or ERC-165 interface identifier. Returns a non-reverting admission result for off-chain routing and frontend previews.
  • 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

getPerpOrderAdmissionResult((uint40,uint32,bool,bool,uint96,uint8,uint8))
  • Selector: 0xf149f880
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getSpotReservedBalance(address,address)

view ABI callable public-read 0xda19598d

Returns the user's reserved balance for a spot asset.

Parameters and behavior

Inputs

  • user — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • token — address. EVM asset address; address(0) denotes native MON only on explicitly native-aware AccountCore/periphery paths.

Returns

  • result0 — 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 _: uint256 — Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale. Returns the user's reserved balance for a spot asset.
  • 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

getSpotReservedBalance(address,address)
  • Selector: 0xda19598d
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getSpotTokenDecimals(address)

view ABI callable public-read 0xa9f9e592

Returns configured decimals for a spot token.

Parameters and behavior

Inputs

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

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. Returns configured decimals for a spot token.
  • 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

getSpotTokenDecimals(address)
  • Selector: 0xa9f9e592
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

getSubaccounts(address)

view ABI callable public-read 0x4644fcf4

Returns all subaccount addresses created under a root account.

Parameters and behavior

Inputs

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

Returns

  • result0 — address[]. Array in ABI order; each element: 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[] — Array in ABI order; each element: EVM address; zero-address allowance/sentinel meaning is stated by the function semantics. Returns all subaccount addresses created under a root account.
  • 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

getSubaccounts(address)
  • Selector: 0x4644fcf4
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

isAssetEnabledForSpot(address)

view ABI callable public-read 0xb0269711

Returns whether a token may be used for spot balances and markets.

Parameters and behavior

Inputs

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

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether a token may be used for spot balances and markets.
  • 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

isAssetEnabledForSpot(address)
  • Selector: 0xb0269711
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

isAuthorizedAccountSigner(address,address,uint32)

view ABI callable public-read 0x9421f0dc

Returns whether signer has a live permission on an account.

Parameters and behavior

Inputs

  • account — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • signer — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • permission — uint32. uint32 AccountCore permission bitmask; bit definitions are in types and constants.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether signer has a live permission on an account.
  • 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

isAuthorizedAccountSigner(address,address,uint32)
  • Selector: 0x9421f0dc
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

isAuthorizedAccountSignerById(uint40,address,uint32)

view ABI callable public-read 0xd7155f19

Returns whether signer has a live permission on an account id.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • signer — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • permission — uint32. uint32 AccountCore permission bitmask; bit definitions are in types and constants.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether signer has a live permission on an account id.
  • 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

isAuthorizedAccountSignerById(uint40,address,uint32)
  • Selector: 0xd7155f19
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

MAX_FEE_PPS()

view ABI callable public-read 0x9ab1f4eb

Returns the max fee PPS constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint32. 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 _: uint32 — Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
  • 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

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

MAX_SPOT_TOKEN_DECIMALS()

view ABI callable public-read 0x030959c1

Returns the max Spot token decimals constant.

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

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

NATIVE_TOKEN_DECIMALS()

view ABI callable public-read 0x2e4f1aca

Returns the native token decimals constant.

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

NATIVE_TOKEN_DECIMALS()
  • Selector: 0x2e4f1aca
  • 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

  • result — 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 result: address — EVM address; zero-address allowance/sentinel meaning is stated by the function semantics. Returns the owner of the contract.
  • 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

ownershipHandoverExpiresAt(address)

view ABI callable public-read 0xfee81cf4

Returns when a pending ownership handover expires.

Parameters and behavior

Inputs

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

Returns

  • result — uint256. 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 result: uint256 — Unix timestamp in seconds; zero-sentinel behavior is function-specific. Returns the expiry timestamp for the two-step ownership handover to pendingOwner.
  • 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

ownershipHandoverExpiresAt(address)
  • Selector: 0xfee81cf4
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

PERP_BUILDER_REFERRAL_AUTHORIZATION_TYPEHASH()

view ABI callable public-read 0x21d1d156

Returns the EIP-712 type hash for Perp builder referral authorization.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bytes32. Keccak-256 hash of the canonical EIP-712 struct type string.

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 _: bytes32 — Keccak-256 hash of the canonical EIP-712 struct type string.
  • 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

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

perpBuilderReferralAuthorizationUsed(address,bytes32)

view ABI callable public-read 0xd3b63f81

Returns whether a perp builder referral authorization nonce has been consumed.

Parameters and behavior

Inputs

  • arg0 — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • arg1 — bytes32. bytes32 opaque binary value.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether a perp builder referral authorization nonce has been consumed.
  • 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

perpBuilderReferralAuthorizationUsed(address,bytes32)
  • Selector: 0xd3b63f81
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

perpEngineByQuoteAsset(address)

view ABI callable public-read 0xdd8ebf11

Returns the configured perp engine for a quote asset.

Parameters and behavior

Inputs

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

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. Returns the configured perp engine for a quote asset.
  • 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

perpEngineByQuoteAsset(address)
  • Selector: 0xdd8ebf11
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

perpFeesConfigured()

view ABI callable public-read 0x951c9170

Returns whether base Perp fees have been configured.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named 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

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

perpFundingUpdater()

view ABI callable public-read 0x65aec849

Returns the account allowed to push normal perp funding updates.

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. Returns the account allowed to push normal perp funding updates.
  • 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

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

perpLiquidationKeeper(address)

view ABI callable public-read 0x78357d0a

Returns whether an address is authorized as a Perp liquidation keeper.

Parameters and behavior

Inputs

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

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named 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

perpLiquidationKeeper(address)
  • Selector: 0x78357d0a
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

perpPriceUpdater()

view ABI callable public-read 0x9cc192dc

Returns the account allowed to push normal perp price updates.

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. Returns the account allowed to push normal perp price updates.
  • 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

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

perpRouterAddress()

view ABI callable public-read 0xbeaef649

Returns the router allowed to register verified perp orderbooks.

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. Returns the router allowed to register verified perp 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

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

PPS_MULTIPLIER()

view ABI callable public-read 0xaa8eb96c

Returns the PPS multiplier constant.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — uint256. PPS denominator constant 10,000,000; divide a PPS value by this scale to obtain a fraction.

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 — PPS denominator constant 10,000,000; divide a PPS value by this scale to obtain a fraction.
  • 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

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

protocolPaused()

view ABI callable public-read 0x425fad58

Returns whether protocol actions are paused in AccountCore.

Parameters and behavior

Inputs

  • None.

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named 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

protocolPaused()
  • Selector: 0x425fad58
  • 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.AccountCore.proxiableUUID
  • Call path: implementation-read

spotOrderBookToBaseToken(address)

view ABI callable public-read 0xd7df6e65

Returns the base token for a verified spot orderbook.

Parameters and behavior

Inputs

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

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. Returns the base token for a verified spot orderbook.
  • 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

spotOrderBookToBaseToken(address)
  • Selector: 0xd7df6e65
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotOrderBookToQuoteToken(address)

view ABI callable public-read 0x9efe3886

Returns the quote token for a verified spot orderbook.

Parameters and behavior

Inputs

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

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. Returns the quote token for a verified spot orderbook.
  • 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

spotOrderBookToQuoteToken(address)
  • Selector: 0x9efe3886
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotReservedBalance(address,address)

view ABI callable public-read 0xde746f31

Returns the account's Spot-reserved balance for an asset.

Parameters and behavior

Inputs

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

Returns

  • result0 — 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 _: uint256 — 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

spotReservedBalance(address,address)
  • Selector: 0xde746f31
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotRouterAddress()

view ABI callable public-read 0xf1b37e8e

Returns the configured SpotRouter 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

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

spotTokenConfigs(address)

view ABI callable public-read 0x978f7053

Returns whether a Spot token is enabled and the decimals recorded for it.

Parameters and behavior

Inputs

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

Returns

  • decimals — uint8. Base-10 decimal exponent; token scale is 10 ** decimals.
  • enabled — bool. Boolean flag named enabled.

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 decimals: uint8 — Base-10 decimal exponent; token scale is 10 ** decimals.; enabled: bool — Boolean flag named enabled.
  • 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

spotTokenConfigs(address)
  • Selector: 0x978f7053
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

spotTokenEnabled(address)

view ABI callable public-read 0x7c1d9d7c

Returns whether a configured spot token is currently enabled.

Parameters and behavior

Inputs

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

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether a configured spot token is currently enabled.
  • 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

spotTokenEnabled(address)
  • Selector: 0x7c1d9d7c
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

supportedSpotTokens(uint256)

view ABI callable public-read 0xb58418fa

Returns the supported Spot token stored at an index.

Parameters and behavior

Inputs

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

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

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

userAddressById(uint40)

view ABI callable public-read 0x686067c5

Returns the account address for an id, or address(0) if unknown.

Parameters and behavior

Inputs

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

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. Returns the account address for an id, or address(0) if unknown.
  • 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

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

userRegistry(address)

view ABI callable public-read 0x7fe0dd32

Returns the account id for an address, or zero if unregistered.

Parameters and behavior

Inputs

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

Returns

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

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 _: uint40 — AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed. Returns the account id for an address, or zero if unregistered.
  • 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

userRegistry(address)
  • Selector: 0x7fe0dd32
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

validateBuilderConfigById(uint40,address,uint32)

view ABI callable public-read 0x8e236449

Reverts unless builder can charge feePps for the account id.

Parameters and behavior

Inputs

  • accountId — uint40. AccountCore account ID (uint40 in protocol state); zero denotes missing/unregistered unless explicitly allowed.
  • builder — address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
  • feePps — uint32. 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; no state mutation.
  • Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
  • State effects: Returns success/revert validation only. Reverts unless builder can charge feePps for the account id.
  • 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

validateBuilderConfigById(uint40,address,uint32)
  • Selector: 0x8e236449
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

validatePerpOrderAdmission((uint40,uint32,bool,bool,uint96,uint8,uint8))

view ABI callable public-read 0x7c55a344

Validates whether a perp order action would be admissible through the AccountCore risk boundary.

Parameters and behavior

Inputs

  • admission — struct IPerpEngine.PerpOrderAdmission. Structured struct IPerpEngine.PerpOrderAdmission; field-level units are defined in the type catalog and tuple metadata.

Returns

  • No return 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 success/revert validation only. Validates whether a perp order action would be admissible through the AccountCore risk boundary.
  • 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

validatePerpOrderAdmission((uint40,uint32,bool,bool,uint96,uint8,uint8))
  • Selector: 0x7c55a344
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

verifiedPerpEngine(address)

view ABI callable public-read 0x5f840e08

Returns whether an engine is registered with AccountCore.

Parameters and behavior

Inputs

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

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether an engine is registered with AccountCore.
  • 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

verifiedPerpEngine(address)
  • Selector: 0x5f840e08
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read

verifiedSpotOrderBook(address)

view ABI callable public-read 0x6b7b5374

Returns whether an orderbook is authorized to reserve and settle spot balances.

Parameters and behavior

Inputs

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

Returns

  • result0 — bool. Boolean flag named 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 _: bool — Boolean flag named value. Returns whether an orderbook is authorized to reserve and settle spot balances.
  • 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

verifiedSpotOrderBook(address)
  • Selector: 0x6b7b5374
  • Mutability: view
  • Semantic rule: read.public
  • Call path: public-read