Contract ccf4aab9fa5e0e67bc59ba0a1c2eb92ad73bb10d273335707e47207183fb6768

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.93.0

Instances

  • CCGFHMW3NZD5Z7ATHYHZSEG6ABCJADUHP5HIAWFPR37CP4VGNEDQO7FJ

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) ▶