Contract 45d648b56e3a36b2777ee1b87c66b1316fc0881035737022f45f3fc19d9e64f5

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CDK4YWZSUEPCNDBA3VUVKXFLEKD2HWJ7JFXV5MEBGXWO6HNUO3YJ5D3R

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