Initialize contract with admin and fee token
fn init(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
fee_token: soroban_sdk::Address,
)
Perform token swaps following router instructions Returns: [amount_sold, amount_bought, fee_collected]
fn swap(
env: soroban_sdk::Env,
selling: soroban_sdk::Address,
routes: soroban_sdk::Vec,
trader: soroban_sdk::Address,
vfee: u32,
ffee: u32,
fpath: soroban_sdk::Vec,
) -> soroban_sdk::Vec
Withdraw accumulated fees from contract balance
fn withdraw(
env: soroban_sdk::Env,
dest: soroban_sdk::Address,
token: soroban_sdk::Address,
amount: i128,
)
Enable/disable specific LP protocol
fn enable_protocol(env: soroban_sdk::Env, protocol: Protocol, enabled: bool)
Update the contract's WASM hash
fn update_contract(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)