Contract d66ba572eeee7e21a639fceafac727f362785fd79efc4a9cb4f8a08698e97bb8

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CB2LDQ2AEVI5WHQOCD5N6T3R7GAA7ALC5DGO4ZSE43NLG4Y42ZQSXJPP

Interface

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>

Deploy-time constructor.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    aqua_router: soroban_sdk::Address,
)

Update the Aqua router address. Admin only.

fn set_aqua_router(
    env: soroban_sdk::Env,
    new_router: soroban_sdk::Address,
) -> Result<(), AquaAdapterError>

Imports

WebAssembly Text (WAT) ▶