Contract ad85a10fab4623940acfdefbf1c3008d9f4a9f1a7ab0b1075d9c90438f7735ad

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CC4MJ4ACXGVSHN3IXTVGPCYEZPTMTAUUE5S6KYUBFEOVID2T2OWKDG6I

Interface

Execute a swap through SushiSwap V3.

Expects amount_in of token_in pushed to this contract beforehand.

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 via the Sushi quoter/lens contract.

fn quote(
    env: soroban_sdk::Env,
    token_in: soroban_sdk::Address,
    token_out: soroban_sdk::Address,
    amount_in: i128,
) -> Result

Register the pool (fee tier + pool contract) for a pair, both directions. Admin only. Pool address is needed to pre-authorize the venue's nested fund pull wherever it lands (router or pool).

fn set_pair(
    env: soroban_sdk::Env,
    token_a: soroban_sdk::Address,
    token_b: soroban_sdk::Address,
    fee: u32,
    pool: soroban_sdk::Address,
) -> Result<(), SushiAdapterError>

Deploy-time constructor.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    sushi_router: soroban_sdk::Address,
    sushi_quoter: soroban_sdk::Address,
)

Update venue contract addresses. Admin only.

fn set_contracts(
    env: soroban_sdk::Env,
    sushi_router: soroban_sdk::Address,
    sushi_quoter: soroban_sdk::Address,
) -> Result<(), SushiAdapterError>

Imports

WebAssembly Text (WAT) ▶