Contract fc66ec6a0bb21cc29134e0d8d13a9459357e068128a2f41777b24da4cb8f2105

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.0

Instances

  • CD6QMW55IT43L3UXWB2M7BXXENJLUUR4DJL5OULFQQHD75SRGYUPGPX2

Interface

Fill a signed swap intent. User auth via composable auth on token transfer. intent_hash is SHA-256 of canonical intent JSON (off-chain).

fn fill(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    solver: soroban_sdk::Address,
    intent_hash: soroban_sdk::BytesN<32>,
    nonce: soroban_sdk::BytesN<32>,
    amount_in: i128,
    min_amount_out: i128,
    deadline_ledger: u32,
) -> i128

Configure reactor with default token pair (admin only).

fn init(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token_in: soroban_sdk::Address,
    token_out: soroban_sdk::Address,
)
fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Check whether a nonce has been consumed for a user.

fn is_nonce_used(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    nonce: soroban_sdk::BytesN<32>,
) -> bool
fn get_emergency_token(env: soroban_sdk::Env) -> soroban_sdk::Address
fn is_emergency_redeemed(env: soroban_sdk::Env) -> bool

Redeem the full 50 XLM emergency reserve. Callable only by the configured beneficiary.

fn redeem_emergency_reserve(
    env: soroban_sdk::Env,
    beneficiary: soroban_sdk::Address,
) -> i128
fn get_emergency_beneficiary(env: soroban_sdk::Env) -> soroban_sdk::Address

Configure a one-time 50 XLM emergency reserve redeemable only by beneficiary. Fund the contract with at least 50 XLM (SAC) before redemption.

fn configure_emergency_reserve(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    beneficiary: soroban_sdk::Address,
    token: soroban_sdk::Address,
)
fn get_emergency_reserve_amount(env: soroban_sdk::Env) -> i128

Imports

WebAssembly Text (WAT) ▶