Contract 72c7c2c8d832324060d14e02ec50a942a40e669a39429c351b04b8eab52a38b9

← Back to Index 📥 Download WASM

Meta

rssdkver 25.0.0#a3cefc1682d1d1ae2d894225c426af4cea7b752f
rsver 1.93.0

Instances

  • CCLDNXEV5DIRUZJUBOMH3P6W4JHCOXOWNQOKN2J3U5CIUNMKZBIWUMXM

Interface

Get contract statistics

fn get_stats(env: soroban_sdk::Env) -> (i128, i128)

Initialize the contract with admin and min profit

fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address, min_profit: i128)

Update minimum profit threshold (admin only)

fn set_min_profit(env: soroban_sdk::Env, caller: soroban_sdk::Address, new_min: i128)

Execute an atomic multi-hop swap

Arguments

  • caller - The account executing the swap (must approve token transfers)
  • legs - Vector of swap legs to execute
  • min_final_amount - Minimum final amount to receive (enforces profit)

Returns

SwapResult with execution details

Panics

  • If final amount < min_final_amount (no profit = revert)
  • If any leg fails to execute
fn execute_atomic_swap(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    legs: soroban_sdk::Vec,
    min_final_amount: i128,
) -> SwapResult

Imports

WebAssembly Text (WAT) ▶