Contract b5742667059cc60e6a2355ec18d260bcba797ef0b998adf55882b6cbdac2bdbb

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.0#e5cb4b52c3da8e56fc48adfd7b85d85976c1a059
rsver 1.91.0

Instances

  • CA7GUCUQSWKAPGYELJRKJKCLZMNHMJDVBA3D3NMJCK2QB3IJAZOTC6E2
  • CDINUC5TOIXOPYDW5WWJ74MCNXRZEDNFGAELCFQWHF4KYZ6JSBWRFOJB
  • CDITGYXEQQB3I7PJRHHLQLDQ7TGE4GYXLJCUQZJTVUWNMBKPDRXVNXD5

Interface

Quote a multi-hop swap without executing (view).

fn quote_path(
    env: soroban_sdk::Env,
    pools: soroban_sdk::Vec,
    tokens: soroban_sdk::Vec,
    amount_in: i128,
) -> Result

Convenience pass-through: deposit into a single pool.

fn add_liquidity(
    env: soroban_sdk::Env,
    pool: soroban_sdk::Address,
    from: soroban_sdk::Address,
    amounts: soroban_sdk::Vec,
    min_shares: i128,
    deadline: u64,
) -> i128

Swap amount_in along tokens through pools, returning the final output. user authorizes; each hop delivers to user. Final output must be ≥ min_out.

fn swap_exact_in(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    pools: soroban_sdk::Vec,
    tokens: soroban_sdk::Vec,
    amount_in: i128,
    min_out: i128,
    deadline: u64,
) -> Result

Swap for an exact final amount_out of token_out through pools, paying at most max_in. Sizes each hop by quoting backward, then executes forward. Returns the total input charged.

fn swap_exact_out(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    pools: soroban_sdk::Vec,
    tokens: soroban_sdk::Vec,
    amount_out: i128,
    max_in: i128,
    deadline: u64,
) -> Result

Convenience pass-through: withdraw from a single pool.

fn remove_liquidity(
    env: soroban_sdk::Env,
    pool: soroban_sdk::Address,
    from: soroban_sdk::Address,
    shares: i128,
    min_amounts: soroban_sdk::Vec,
    deadline: u64,
) -> soroban_sdk::Vec

Imports

WebAssembly Text (WAT) ▶