Executes calls in order and returns each call's raw return value, in
call order.
Any failing call traps the whole invocation, so either every call lands or none does.
e - Access to the Soroban environment.calls - The Call sequence, executed front to back.fn multicall(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
) -> soroban_sdk::Vec
Executes calls in order, isolates each call's failure, and returns
one raw outcome per call, in call order. An outcome is the call's raw
return value when it lands, or the failure as a host Error value
when it does not.
A call that fails with a recoverable error rolls back its own effects, and the batch continues with the next call. A budget or storage-footprint limit aborts the whole transaction. The two outcome kinds cannot collide, because the host turns an error-tagged return into a failure.
e - Access to the Soroban environment.calls - The Call sequence, executed front to back.fn multicall_try(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
) -> soroban_sdk::Vec
Runs a create-and-fill batch strictly, fills calls[0], and returns
the N batch results with the fill payout appended (length N + 1).
The payout is an i128 (token-dec).
By convention, calls[0] is the order to fill, and it targets the
market contract (calls[0].contract). Its u32 return value is the
order id handed to the fill. A failing fill unwinds the whole batch,
so nothing rests.
e - Access to the Soroban environment.calls - The batch, executed like multicall. The router does not
check the shape of calls[0], and later calls are never filled.user - The trader who owns the order, passed to execute_order.
It is an explicit argument, not decoded from calls[0].keeper - The fill-reward recipient. With keeper = user the fill
reward returns to the trader.price - The serialized price update for the fill.calls: there is no first call to fill.calls[0] returns anything but a u32 order id.fn create_and_fill(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
user: soroban_sdk::Address,
keeper: soroban_sdk::Address,
price: soroban_sdk::Bytes,
) -> soroban_sdk::Vec
Collects a relayer fee from user, then acts as multicall, returning
its results. A failing call also reverts the fee. With empty calls,
the fee is still collected.
e - Access to the Soroban environment.calls - The batch.user - The fee payer.fee_token - The fee token.max_fee_amount - The fee cap (token-dec).fee_expiration - The allowance's live-until ledger, at or after
execution.fee_amount - The fee (token-dec). 0 skips it.fee_recipient - The fee payee.FeeAbstractionError::InvalidFeeBounds - If fee_amount is negative
or above max_fee_amount.FeeAbstractionError::InvalidUser - If user is the router.["fee_collected", user: Address, recipient: Address][token: Address, amount: i128]user is required over (calls, fee_token, max_fee_amount, fee_expiration). Inner call auths nest under it. The
submitter sets fee_amount and fee_recipient.fn multicall_with_fee(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
user: soroban_sdk::Address,
fee_token: soroban_sdk::Address,
max_fee_amount: i128,
fee_expiration: u32,
fee_amount: i128,
fee_recipient: soroban_sdk::Address,
) -> soroban_sdk::Vec
Runs a create-and-fill batch strictly, then attempts an immediate
fill, and returns the N batch results with the isolated fill outcome
appended (length N + 1). The outcome is encoded like
multicall_try: the payout (i128, token-dec) on a landed fill, or
the failure as a host Error value when it rests.
The batch follows the first-call convention of create_and_fill. A
fill that fails with a recoverable error leaves the orders still
standing after the batch available for a later keeper fill. A budget
or storage-footprint limit in the fill aborts the whole transaction.
e - Access to the Soroban environment.calls - The create-and-fill batch. calls[0] is the order to
fill.user - The trader who owns the order, passed to the fill.keeper - The fill-reward recipient.price - The serialized price update for the fill.calls: there is no first call to fill.calls[0] returns anything but a u32 order id.fn create_and_try_fill(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
user: soroban_sdk::Address,
keeper: soroban_sdk::Address,
price: soroban_sdk::Bytes,
) -> soroban_sdk::Vec
Collects a relayer fee from user, then acts as create_and_fill,
returning its results. A failing fill also unwinds the fee.
e - Access to the Soroban environment.calls - The batch.user - The trader and fee payer.fee_token - The fee token.max_fee_amount - The fee cap (token-dec).fee_expiration - The allowance's live-until ledger.fee_amount - The fee (token-dec). 0 skips it.fee_recipient - The fee payee.keeper - The fill-reward recipient.price - The price update.FeeAbstractionError::InvalidFeeBounds - If fee_amount is negative
or above max_fee_amount.FeeAbstractionError::InvalidUser - If user is the router.["fee_collected", user: Address, recipient: Address][token: Address, amount: i128]user is required over (calls, fee_token, max_fee_amount, fee_expiration). Inner call auths nest under it.calls or a non-u32 first result.fn create_and_fill_with_fee(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
user: soroban_sdk::Address,
fee_token: soroban_sdk::Address,
max_fee_amount: i128,
fee_expiration: u32,
fee_amount: i128,
fee_recipient: soroban_sdk::Address,
keeper: soroban_sdk::Address,
price: soroban_sdk::Bytes,
) -> soroban_sdk::Vec
Collects a relayer fee from user, then acts as create_and_try_fill,
returning its results. A resting fill keeps the fee.
e - Access to the Soroban environment.calls - The batch.user - The trader and fee payer.fee_token - The fee token.max_fee_amount - The fee cap (token-dec).fee_expiration - The allowance's live-until ledger.fee_amount - The fee (token-dec). 0 skips it.fee_recipient - The fee payee.keeper - The fill-reward recipient.price - The price update.FeeAbstractionError::InvalidFeeBounds - If fee_amount is negative
or above max_fee_amount.FeeAbstractionError::InvalidUser - If user is the router.["fee_collected", user: Address, recipient: Address][token: Address, amount: i128]user is required over (calls, fee_token, max_fee_amount, fee_expiration). Inner call auths nest under it.calls or a non-u32 first result.fn create_and_try_fill_with_fee(
env: soroban_sdk::Env,
calls: soroban_sdk::Vec,
user: soroban_sdk::Address,
fee_token: soroban_sdk::Address,
max_fee_amount: i128,
fee_expiration: u32,
fee_amount: i128,
fee_recipient: soroban_sdk::Address,
keeper: soroban_sdk::Address,
price: soroban_sdk::Bytes,
) -> soroban_sdk::Vec