Execute a single-hop swap through Aquarius.
Expects amount_in of token_in to have been pushed to this contract
by the caller beforehand. Sends the output to recipient and returns
the actual amount out.
fn swap(
env: soroban_sdk::Env,
recipient: soroban_sdk::Address,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
amount_in: i128,
min_amount_out: i128,
) -> Result
Quote a swap via the registered pool's estimate_swap.
fn quote(
env: soroban_sdk::Env,
token_in: soroban_sdk::Address,
token_out: soroban_sdk::Address,
amount_in: i128,
) -> Result
Register the pool to use for a pair (both directions). Admin only.
fn set_pool(
env: soroban_sdk::Env,
token_a: soroban_sdk::Address,
token_b: soroban_sdk::Address,
tokens: soroban_sdk::Vec,
pool_hash: soroban_sdk::BytesN<32>,
pool_address: soroban_sdk::Address,
) -> Result<(), AquaAdapterError>
Complete an admin rotation — callable only by the proposed admin, proving the new key is live before it holds power.
fn accept_admin(env: soroban_sdk::Env) -> Result<(), AquaAdapterError>
Deploy-time constructor.
fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
aqua_router: soroban_sdk::Address,
)
Propose a new admin (two-step rotation). Admin only. The proposed
address must call accept_admin to take over, so a mistyped
transfer is recoverable until accepted.
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), AquaAdapterError>
Update the Aqua router address. Admin only.
fn set_aqua_router(
env: soroban_sdk::Env,
new_router: soroban_sdk::Address,
) -> Result<(), AquaAdapterError>