Contract fd4850c6042be7c905d3df7169b625fdfce2ae643d082a9716e4fab4c3b2c2cd

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CC3P5UNO6PBVAKKQ7A6SJZ6G566X3VF2XNH5BFI7A3VFUGIMNPOP2HDY
  • CCTL6C4PYDTXT6GL5YTE6CG4ZH2EXKJONUP4445SMTY5AYQPNQY666HZ

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