Contract f48f10d9c7d35fc7783b5e27578bf0e764e3a30ff26a3bd7d8e57758c17a9ea8

← Back to Index 📥 Download WASM

Meta

binver 0.0.1
rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.89.0

Instances

  • CARUUX2FZNPH6DGJOEUFSIUQWYHNL5AVDV7PMVSHWL7OBYIBFC76F4TO
  • CBGV2QFQBBGEQRUKUMCPO3SZOHDDYO6SCP5CH6TW7EALKVHCXTMWDDOF
  • CCFIYXF32QI45KXO43J7XY3DMH6W6DKT7XFDEHA65UG4ONNPWBWR4YMA
  • CCPLGWIIZX6GUIV6JUWJBCGW3PB24ZTHKOVGQQNTTAZIJRRLFJ4PIUMZ
  • CDS2GCAQTNQINSCJUJIVBJXILKBWP5PU7LOBGHMP3X47QCQBFKPMTCNT
  • CDT3KU6TQZNOHKNOHNAFFDQZDURVC3MSTL4ML7TUTZGNOPBZCLABP4FR
  • CDWOB6T7SVSMMQN5V3P2OPTBAXOP7DAZHGVW3PYTZIKHVFKN6TBSXR6A

Interface

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

Arguments

  • 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).

Arguments

  • redemption - The address of the redemption contract.
fn set_redemption(env: soroban_sdk::Env, redemption: soroban_sdk::Address)

Mint tokens to an account.

Arguments

  • account - The address of the account to mint tokens to.
  • amount - The amount of tokens to mint.
  • caller - The address of the caller.

Errors

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.

Arguments

  • 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.

Errors

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.

Arguments

  • account - The address of the account to burn tokens from.
  • amount - The amount of tokens to burn.
  • caller - The address of the caller.

Errors

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.

Arguments

  • 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.

Errors

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.

Arguments

  • 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.

Errors

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.

Arguments

  • 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.

Errors

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.

Arguments

  • 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.

Errors

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.

Arguments

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

Imports

WebAssembly Text (WAT) ▶