Contract 6e1b332120d0bf4bef50b2614e8143b9515dcc7b950c4213783d813c50911966

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CCYFDTWAUROFCENYGJQFG6I46HHIGWJ7MGRA4ZDZMBFXARKEPP6HGR22

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) ▶