Contract 8f2090ebb822e22ea389231770c51e7c85dac16c0f63d9620b7f8f48484bb0b6

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#
rssdkver 22.0.10#9a1b75b509a5053b676b09fdbd224fe8c5f2fcd5
rsver 1.90.0

Instances

  • CDCAZUHZ646FRANKC7MG5TGVVHBDYY3MV4WV7PDUJSHQRGKFVMXM3LRE

Interface

初始化合约,设置 owner

fn initialize(env: soroban_sdk::Env, owner: soroban_sdk::Address)

充值: owner 向合约转入 token

fn deposit(env: soroban_sdk::Env, token: soroban_sdk::Address, amount: i128)

提现: owner 从合约取出 token

fn withdraw(env: soroban_sdk::Env, token: soroban_sdk::Address, amount: i128)

提现全部余额

fn withdraw_all(env: soroban_sdk::Env, token: soroban_sdk::Address)

升级合约 WASM (仅 owner)

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

添加授权 caller (可以调用 execute_arb/execute_amm_leg)

fn add_caller(env: soroban_sdk::Env, caller: soroban_sdk::Address)

移除授权 caller

fn remove_caller(env: soroban_sdk::Env, caller: soroban_sdk::Address)

查询合约余额

fn balance(env: soroban_sdk::Env, token: soroban_sdk::Address) -> i128

查询 owner

fn owner(env: soroban_sdk::Env) -> soroban_sdk::Address

查询是否是授权 caller

fn is_authorized(env: soroban_sdk::Env, caller: soroban_sdk::Address) -> bool
fn execute_arb(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token_in: soroban_sdk::Address,
    amount_in: i128,
    steps: soroban_sdk::Vec,
    min_profit: i128,
)
fn execute_amm_leg(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token_in: soroban_sdk::Address,
    amount_in: i128,
    steps: soroban_sdk::Vec,
    token_out_final: soroban_sdk::Address,
    min_amount_out: i128,
    pull_from_caller: bool,
    push_to_caller: bool,
)

Imports

WebAssembly Text (WAT) ▶