Current admin, or None if ownership was renounced.
fn get_admin(env: soroban_sdk::Env) -> Option
Read-only quote for one leg (no auth, no transfers). data is accepted
and ignored — see execute_leg.
fn quote_leg(
env: soroban_sdk::Env,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
amount_in: i128,
data: soroban_sdk::Bytes,
) -> i128
The Batching Router allowed to drive this adapter.
fn get_router(env: soroban_sdk::Env) -> soroban_sdk::Address
Re-point the adapter at a new Router. Admin-only; evented.
fn set_router(env: soroban_sdk::Env, router: soroban_sdk::Address)
Execute one swap leg through the wrapped Soroswap router. Router-only.
Precondition: the caller (Router) has already transferred amount_in of
token_in to this adapter. The resulting token_out is sent to
recipient. min_out is a per-leg floor (the Router passes 0 and
enforces the overall minimum itself). The Soroswap deadline is left open
(u64::MAX) because the Router already enforced the route deadline —
same convention as the PearFi adapter's cluster call. data is accepted
and ignored, whatever its content: Leg.data is an open extension
convention, and venues that need no hint must not reject payloads a
future catalog might attach.
fn execute_leg(
env: soroban_sdk::Env,
recipient: soroban_sdk::Address,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
amount_in: i128,
min_out: i128,
data: soroban_sdk::Bytes,
) -> i128
Accept a pending admin transfer (proposed admin's auth required).
fn accept_admin(env: soroban_sdk::Env)
Deploy-time setup (atomic with deployment). admin owns the adapter
(can re-point the venue and the router); router is the Soroswap router this adapter wraps; router is the
only caller allowed to drive this adapter's fund-moving entry points.
fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
soroswap_router: soroban_sdk::Address,
router: soroban_sdk::Address,
)
Begin a two-step admin transfer. live_until_ledger = 0 cancels.
fn propose_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
live_until_ledger: u32,
)
The Soroswap router this adapter wraps.
fn get_soroswap_router(env: soroban_sdk::Env) -> soroban_sdk::Address
Re-point the adapter at a new Soroswap router. Admin-only; evented.
fn set_soroswap_router(env: soroban_sdk::Env, soroswap_router: soroban_sdk::Address)