Contract 1dc5b1a938dfa7531aae9b62c418e828ebf5dd0523ece552ea7d17e0dffbc2fc

← Back to Index 📥 Download WASM

Meta

rssdkver 23.4.1#e671b396f8bacf1370925f722df158b31c0baae5
rsver 1.91.0-nightly

Instances

  • CD7LQRKH37UNMA6UFFWEIKBC6NLEM5FXL2PPNH2UXGIIIEY4UHQXSBJF

Interface

Returns the allowance for spender to transfer from from.

fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128

Set the allowance by amount for spender to transfer/burn from from.

fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    expiration_ledger: u32,
)

Returns the balance of id.

fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128

Transfer amount from from to to.

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

Transfer amount from from to to, consuming the allowance that spender has on from's balance.

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

Burn amount from from.

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

Burn amount from from, consuming the allowance of spender.

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

Returns the number of decimals used to represent amounts of this token.

fn decimals(env: soroban_sdk::Env) -> u32

Returns the name for this token.

fn name(env: soroban_sdk::Env) -> soroban_sdk::String

Returns the symbol for this token.

fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String

Initialize the token contract

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

Mint tokens (admin only)

fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)

Get admin address

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

Set admin address (admin only)

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

Imports

WebAssembly Text (WAT) ▶