Get admin address.
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
Transfer all accumulated token balance to the Revenue Processor.
Callable by admin or authorized bot.
fn sweep(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
token: soroban_sdk::Address,
) -> i128
Get bot address.
fn get_bot(env: soroban_sdk::Env) -> Option
Set authorized bot (admin-only). Bot can call sweep only.
fn set_bot(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
bot: soroban_sdk::Address,
)
Update operating fee (admin-only). Capped by max_fee_bps.
fn set_fee(env: soroban_sdk::Env, admin: soroban_sdk::Address, new_fee_bps: u32)
Upgrade contract WASM (admin-only). Admin stored as standalone Address — immune to struct evolution.
fn upgrade(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
new_wasm_hash: soroban_sdk::BytesN<32>,
)
Get paused status.
fn is_paused(env: soroban_sdk::Env) -> bool
Transfer admin role (requires both old + new admin auth).
fn set_admin(
env: soroban_sdk::Env,
current_admin: soroban_sdk::Address,
new_admin: soroban_sdk::Address,
)
Extend instance TTL (callable by anyone — permissionless).
fn extend_ttl(env: soroban_sdk::Env)
Get current configuration.
fn get_config(env: soroban_sdk::Env) -> FeeCollectorConfig
Emergency pause (admin-only).
fn set_paused(env: soroban_sdk::Env, admin: soroban_sdk::Address, paused: bool)
Execute a swap through the Aquarius Router, skimming a fee from output.
Flow:
in_amount of token_in to this contractSingle TX, single signature — user signs for this contract.
token_out must be passed explicitly for auth pre-computation.
fn swap_chained(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
swaps_chain: soroban_sdk::Vec>,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
in_amount: u128,
out_min: u128,
) -> u128
Protocol 22+ constructor — flat args for Admin Bridge compatibility.
max_fee_bps: Immutable hard cap (recommended: 200 = 2%)fee_bps: Operating fee (recommended: 100 = 1%)fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
aquarius_router: soroban_sdk::Address,
revenue_processor: soroban_sdk::Address,
max_fee_bps: u32,
fee_bps: u32,
)