fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
operator: soroban_sdk::Address,
)
fn __constructor(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
decimals: u32,
)
Set the permission manager (central role management authority).
permission_manager - The address of the permission manager.fn set_permission_manager(
env: soroban_sdk::Env,
permission_manager: soroban_sdk::Address,
)
Set the redemption (redemption contract).
redemption - The address of the redemption contract.fn set_redemption(env: soroban_sdk::Env, redemption: soroban_sdk::Address)
Mint tokens to an account.
account - The address of the account to mint tokens to.amount - The amount of tokens to mint.caller - The address of the caller.The caller must have the MINTER_ROLE. The account must have the WHITELISTED_ROLE. The amount must be greater than zero.
fn mint(
env: soroban_sdk::Env,
account: soroban_sdk::Address,
amount: i128,
caller: soroban_sdk::Address,
)
Mint tokens to a batch of accounts.
operations - The operations to mint tokens to.caller - The address of the caller.idempotency_key - The idempotency key. It is used to prevent duplicate calls to the same function. It is locked for 7 days.The caller must have the MINTER_ROLE. The idempotency key must not be used. The batch must not be empty. All accounts must have the WHITELISTED_ROLE. All amounts must be greater than zero.
fn mint_batch(
env: soroban_sdk::Env,
operations: soroban_sdk::Vec,
caller: soroban_sdk::Address,
idempotency_key: soroban_sdk::String,
)
Burn tokens from an account.
account - The address of the account to burn tokens from.amount - The amount of tokens to burn.caller - The address of the caller.The caller must have the BURNER_ROLE. The amount must be greater than zero.
fn burn(
env: soroban_sdk::Env,
account: soroban_sdk::Address,
amount: i128,
caller: soroban_sdk::Address,
)
Burn tokens from a batch of accounts.
operations - The operations to burn tokens from.caller - The address of the caller.idempotency_key - The idempotency key. It is used to prevent duplicate calls to the same function. It is locked for 7 days.The caller must have the BURNER_ROLE. The idempotency key must not be used. The batch must not be empty. All amounts must be greater than zero.
fn burn_batch(
env: soroban_sdk::Env,
operations: soroban_sdk::Vec,
caller: soroban_sdk::Address,
idempotency_key: soroban_sdk::String,
)
Redeem tokens from an account. The tokens are transferred to the redemption contract. The redemption contract will then burn the tokens.
amount - The amount of tokens to redeem.caller - The address of the caller.idempotency_key - The idempotency key. It is used to prevent duplicate calls to the same function. It is locked for 7 days.The caller must have the WHITELISTED_ROLE. The idempotency key must not be used. The amount must be greater than zero. The redemption contract must be set. The redemption contract must have the WHITELISTED_ROLE.
fn redeem(
env: soroban_sdk::Env,
amount: i128,
caller: soroban_sdk::Address,
idempotency_key: soroban_sdk::String,
)
Transfer tokens from one account to another.
from - The address of the account to transfer tokens from.to - The address of the account to transfer tokens to.amount - The amount of tokens to transfer.The from account must have the WHITELISTED_ROLE. The to account must have the WHITELISTED_ROLE. The amount must be greater than zero.
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
Transfer tokens from one account to another. The transfer is idempotent.
from - The address of the account to transfer tokens from.to - The address of the account to transfer tokens to.amount - The amount of tokens to transfer.idempotency_key - The idempotency key. It is used to prevent duplicate calls to the same function. It is locked for 7 days.The from account must have the WHITELISTED_ROLE. The to account must have the WHITELISTED_ROLE. The idempotency key must not be used. The amount must be greater than zero.
fn safe_transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
idempotency_key: soroban_sdk::String,
)
Get the total supply of tokens.
fn total_supply(env: soroban_sdk::Env) -> i128
Get the balance of an account.
account - The address of the account to get the balance of.fn balance(env: soroban_sdk::Env, account: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn paused(env: soroban_sdk::Env) -> bool
fn pause(env: soroban_sdk::Env, caller: soroban_sdk::Address)
fn unpause(env: soroban_sdk::Env, caller: soroban_sdk::Address)
fn get_owner(env: soroban_sdk::Env) -> Option
fn transfer_ownership(
env: soroban_sdk::Env,
new_owner: soroban_sdk::Address,
live_until_ledger: u32,
)
fn accept_ownership(env: soroban_sdk::Env)
fn renounce_ownership(env: soroban_sdk::Env)