SpotPeriphery functions¶
Unprivileged deposit and Spot quote facade. Direct deployment with immutable AccountCore pointer.
This page lists every ABI-exposed function: 11 total, comprising 2 user functions, 2 state-changing, and 9 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 11 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.
deposit(address,uint256)¶¶
Deposits native or ERC20 assets into msg.sender's account through AccountCore.
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 to its own AccountCore account through the facade.
- Requirements: Nonzero amount; native value exact or ERC-20 value zero with allowance to SpotPeriphery; downstream AccountCore protocol active and asset enabled.
- State effects: For ERC-20, pulls from caller and approves AccountCore; for native, forwards value; AccountCore then credits/possibly registers caller.
- Units and rounding: Raw atomic units of
token; exact transfer/credit. - Event families: Downstream optional
AccountRegistered, then AccountCoreSpotReserveUpdated, then AccountCoreDeposit; SpotPeriphery declares no deposit event. - Expected errors:
ZeroAmount,NativeAssetMismatch, token transfer/approval errors, plus downstreamProtocolPaused,SpotTokenNotEnabled, and deposit errors.
Exact call data
deposit(address,uint256)
- Selector:
0x47e7ef24 - Mutability:
payable - Semantic rule:
spot-periphery.deposit.deposit - Call path:
unprivileged-payer
depositForAccount(address,address,uint256)¶¶
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 through the facade.
- Requirements: Nonzero recipient and amount; native value exact or ERC-20 value zero with payer allowance; downstream AccountCore active and asset enabled.
- State effects: For ERC-20, pulls from caller and approves AccountCore; for native, forwards value; AccountCore credits/possibly registers
account. - Units and rounding: Raw atomic units of
token; exact transfer/credit. - Event families: Downstream optional
AccountRegistered, then AccountCoreSpotReserveUpdated, then AccountCoreDeposit; SpotPeriphery declares no deposit event. - Expected errors:
ZeroAddress,ZeroAmount,NativeAssetMismatch, token transfer/approval errors, plus downstreamProtocolPaused,SpotTokenNotEnabled, and deposit errors.
Exact call data
depositForAccount(address,address,uint256)
- Selector:
0xf89cc4dc - Mutability:
payable - Semantic rule:
spot-periphery.deposit.deposit-for-account - Call path:
unprivileged-payer
Read-only functions¶
These view and pure calls expose configuration or protocol state without mutating it.
accountCore()¶¶
Returns the configured AccountCore contract.
Parameters and behavior
Inputs
- None.
Returns
result0—contract IAccountCore. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
_:contract IAccountCore— EVM address; zero-address allowance/sentinel meaning is stated by the function semantics. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
accountCore()
- Selector:
0x15b5b207 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwap(address,bool,uint128,uint32)¶¶
Estimates an exact-input swap on one market with a builder fee applied to output.
Parameters and behavior
Inputs
market—address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.isBuy—bool. Boolean flag namedisBuy.amountIn—uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.builderFeePps—uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
Returns
result—struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
result:struct ISpotOrderBook.SwapResult— Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap on one market with a builder fee applied to output. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwap(address,bool,uint128,uint32)
- Selector:
0x944730fc - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwap(address,bool,uint128)¶¶
Estimates an exact-input swap on one market.
Parameters and behavior
Inputs
market—address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.isBuy—bool. Boolean flag namedisBuy.amountIn—uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
Returns
result—struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
result:struct ISpotOrderBook.SwapResult— Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap on one market. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwap(address,bool,uint128)
- Selector:
0x52f960d0 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwap(address,uint40,bool,uint128,uint32)¶¶
Estimates an exact-input swap using account-specific fees plus a builder fee on output.
Parameters and behavior
Inputs
market—address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.userId—uint40. AccountCore account ID (uint40in protocol state); zero denotes missing/unregistered unless explicitly allowed.isBuy—bool. Boolean flag namedisBuy.amountIn—uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.builderFeePps—uint32. Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
Returns
result—struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
result:struct ISpotOrderBook.SwapResult— Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap using account-specific fees plus a builder fee on output. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwap(address,uint40,bool,uint128,uint32)
- Selector:
0x0c4caa46 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwap(address,uint40,bool,uint128)¶¶
Estimates an exact-input swap on one market using a specific account id's fee policy.
Parameters and behavior
Inputs
market—address. EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.userId—uint40. AccountCore account ID (uint40in protocol state); zero denotes missing/unregistered unless explicitly allowed.isBuy—bool. Boolean flag namedisBuy.amountIn—uint128. Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
Returns
result—struct ISpotOrderBook.SwapResult. Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
result:struct ISpotOrderBook.SwapResult— Structured struct ISpotOrderBook.SwapResult; field-level units are defined in the type catalog and tuple metadata. Estimates an exact-input swap on one market using a specific account id's fee policy. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwap(address,uint40,bool,uint128)
- Selector:
0xaaa32553 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwaps(address[],bool[],uint128[],uint32[])¶¶
Estimates multiple exact-input swaps with per-quote builder fees applied to output.
Parameters and behavior
Inputs
markets—address[]. Array in ABI order; each element: EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.isBuy—bool[]. Array in ABI order; each element: Boolean flag namedisBuy.amountIn—uint128[]. Array in ABI order; each element: Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.builderFeePps—uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
Returns
results—struct ISpotOrderBook.SwapResult[]. Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
results:struct ISpotOrderBook.SwapResult[]— Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata. Estimates multiple exact-input swaps with per-quote builder fees applied to output. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwaps(address[],bool[],uint128[],uint32[])
- Selector:
0x41267dbc - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwaps(address[],bool[],uint128[])¶¶
Estimates multiple exact-input swaps through this single periphery call.
Parameters and behavior
Inputs
markets—address[]. Array in ABI order; each element: EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.isBuy—bool[]. Array in ABI order; each element: Boolean flag namedisBuy.amountIn—uint128[]. Array in ABI order; each element: Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
Returns
results—struct ISpotOrderBook.SwapResult[]. Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
results:struct ISpotOrderBook.SwapResult[]— Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata. Estimates multiple exact-input swaps through this single periphery call. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwaps(address[],bool[],uint128[])
- Selector:
0x9e16e8f6 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwaps(address[],uint40[],bool[],uint128[],uint32[])¶¶
Estimates multiple exact-input swaps using account-specific fees plus per-quote builder fees.
Parameters and behavior
Inputs
markets—address[]. Array in ABI order; each element: EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.userIds—uint40[]. Array in ABI order; each element: AccountCore account ID (uint40in protocol state); zero denotes missing/unregistered unless explicitly allowed.isBuy—bool[]. Array in ABI order; each element: Boolean flag namedisBuy.amountIn—uint128[]. Array in ABI order; each element: Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.builderFeePps—uint32[]. Array in ABI order; each element: Parts per 10,000,000 (PPS); 1 bp = 1,000 PPS and 1% = 100,000 PPS.
Returns
results—struct ISpotOrderBook.SwapResult[]. Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
results:struct ISpotOrderBook.SwapResult[]— Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata. Estimates multiple exact-input swaps using account-specific fees plus per-quote builder fees. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwaps(address[],uint40[],bool[],uint128[],uint32[])
- Selector:
0x6e2693a8 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read
estimateSwaps(address[],uint40[],bool[],uint128[])¶¶
Estimates multiple exact-input swaps using per-market account ids for fee policy.
Parameters and behavior
Inputs
markets—address[]. Array in ABI order; each element: EVM address; zero-address allowance/sentinel meaning is stated by the function semantics.userIds—uint40[]. Array in ABI order; each element: AccountCore account ID (uint40in protocol state); zero denotes missing/unregistered unless explicitly allowed.isBuy—bool[]. Array in ABI order; each element: Boolean flag namedisBuy.amountIn—uint128[]. Array in ABI order; each element: Raw atomic units of the applicable quote/token asset; human amount = value / that asset's decimal scale.
Returns
results—struct ISpotOrderBook.SwapResult[]. Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata.
Access and behavior
- Who can call: Any caller; no state mutation.
- Requirements: No caller authorization unless stated in NatSpec; input-dependent existence/configuration validation may revert.
- State effects: Returns
results:struct ISpotOrderBook.SwapResult[]— Array in ABI order; each element: Structured struct ISpotOrderBook.SwapResult[]; field-level units are defined in the type catalog and tuple metadata. Estimates multiple exact-input swaps using per-market account ids for fee policy. - Units and rounding: Return/input units follow ABI names, tuple definitions, constants, and NatSpec; no state-changing rounding occurs.
- Event families: None;
view/purecall. - Expected errors: Input, missing entity, invalid configuration, arithmetic, or delegated read errors declared in the error catalog.
Exact call data
estimateSwaps(address[],uint40[],bool[],uint128[])
- Selector:
0x94571d05 - Mutability:
view - Semantic rule:
read.public - Call path:
public-read