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>
Update the factory address. Admin only.
fn set_factory(
env: soroban_sdk::Env,
sushi_factory: soroban_sdk::Address,
) -> Result<(), SushiAdapterError>
Complete an admin rotation — callable only by the proposed admin, proving the new key is live before it holds power.
fn accept_admin(env: soroban_sdk::Env) -> 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,
sushi_factory: 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>
Propose a new admin (two-step rotation). Admin only. The proposed
address must call accept_admin to take over, so a mistyped
transfer is recoverable until accepted.
fn transfer_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), SushiAdapterError>