Execute a single-path multi-hop swap atomically.
Use this when the optimal route is a single path (no splitting needed).
Flow:
amount_in of token_in from usermin_amount_outfn swap(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
token_in: soroban_sdk::Address,
amount_in: i128,
steps: soroban_sdk::Vec,
min_amount_out: i128,
) -> i128
Get the admin address.
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
Upgrade the contract WASM code. Only admin can call.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Initialize the contract with an admin address. Must be called once after deployment.
fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Execute a split-order swap atomically.
Splits the input across multiple paths for better execution: e.g., 30% via Soroswap (A→B), 70% via Aquarius (A→C→B)
Flow:
amount_in of token_in from usertoken_out)min_amount_outAll sub-routes MUST produce the same output token.
fn split_swap(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
sub_routes: soroban_sdk::Vec,
min_amount_out: i128,
) -> i128