Contract e1ab0f393c5cb60526ca640b0d7afb8da594ea998a5630d0c494d78047799ba7

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CCVQTCXFCNETGA2QDSBMLRHMCGBWOOHMH3HGRT5QHNDYL7K2VUROFURA

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