Contract b3d4b57646a03b32f08056781c73bc5b886e4fdf244cea039e9e13b26636fde3

← Back to Index 📥 Download WASM

Meta

cliver 23.2.1#e7dd9394b99a6064c489be50434a66d2349d9d35
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.91.1

Instances

  • CANGH2RQUGHWPR3GJXGC7WXONSVG4YMECGGZ72KJT22KHSEGLL6DFREC

Interface

One-time initialisation. Panics if already initialised.

fn init(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    usdc_contract: soroban_sdk::Address,
    xlm_contract: soroban_sdk::Address,
)

Transfer amount XLM (in stroops, 7 d.p.) from from to treasury. Emits: topics=[Symbol("pay_xlm"), order_id, from], value=amount

fn pay_xlm(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    amount: i128,
    order_id: soroban_sdk::Bytes,
)

Transfer amount USDC (in micro-USDC, 7 d.p.) from from to treasury. Emits: topics=[Symbol("pay_usdc"), order_id, from], value=amount

fn pay_usdc(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    amount: i128,
    order_id: soroban_sdk::Bytes,
)

Return the treasury address.

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

Return the native XLM SAC contract address.

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

Return the USDC SAC contract address.

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

Imports

WebAssembly Text (WAT) ▶