Contract ecebeb2091a0a0d91564788cf27f7d333f7807500e1f49438b2a7a9b23176fb2

← Back to Index 📥 Download WASM

Meta

rssdkver 23.0.3#6aa930b08eabfd578b7824a0d5de473cbd958282
rsver 1.90.0

Instances

  • CAUVOH2ZWZKN4NM3FHR7XSTNPL6VPQ2KT57SSM4LUIZKR4J23LUEZI7A

Interface

Initialize: admin, fee bps, pricing (base/slope in stroops per token), and fungible token contract id.

fn init(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    fee_bps: u32,
    base: i128,
    slope: i128,
    token_id: soroban_sdk::BytesN<32>,
)

Buy tokens for XLM (stroops). Returns tokens_out (integer units). NOTE: This minimal version matches the worker ABI; on-chain XLM and token transfers are TODO.

fn buy(env: soroban_sdk::Env, buyer: soroban_sdk::Address, xlm_stroops: i128) -> i128

Sell tokens for XLM; returns XLM stroops paid out (placeholder).

fn sell(
    env: soroban_sdk::Env,
    seller: soroban_sdk::Address,
    token_amount: i128,
) -> i128

Imports

WebAssembly Text (WAT) ▶