Contract 268f3e4e5114454cd4938921b97b26c478337c7858c0b566f3031cebfbe9d075

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.94.1

Instances

  • CDWCHBTYGG4BBHZ6XTON4B7PKZG3LPFRJBF7DER2HJ4IQQZQOF675NY2

Interface

Burn sXLM tokens — only callable by the minter (staking contract).

fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)

Mint sXLM tokens — only callable by the minter (staking contract).

fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn minter(env: soroban_sdk::Env) -> soroban_sdk::Address
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    _expiration_ledger: u32,
)
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128

Upgrade the contract WASM. Only callable by admin.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
fn decimals(env: soroban_sdk::Env) -> u32
fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128

Transfer admin role.

fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Initialize the sXLM token contract. admin - protocol admin address minter - the staking contract address (only address allowed to mint/burn)

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    minter: soroban_sdk::Address,
    decimals: u32,
    name: soroban_sdk::String,
    symbol: soroban_sdk::String,
)

Update the minter address (e.g., if staking contract is redeployed).

fn set_minter(env: soroban_sdk::Env, new_minter: soroban_sdk::Address)

Bump a user's balance TTL — can be called by anyone.

fn bump_balance(env: soroban_sdk::Env, user: soroban_sdk::Address)
fn total_supply(env: soroban_sdk::Env) -> i128

Bump instance TTL — can be called by anyone to keep contract alive.

fn bump_instance(env: soroban_sdk::Env)
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

Imports

WebAssembly Text (WAT) ▶