Contract aba81900bc82d24a6f5b66a6fee775bc51543f91dc89e824bd96ffcf3879dba1

← Back to Index 📥 Download WASM

Meta

rssdkver 23.5.3#d3e1ab2424388b10893b796b0c8e405c5edd03d2
rsver 1.93.0

Instances

  • CCPLJV7AKKFIE4LXFVUWZXDI2HNLEC7U3CQHAMVDLYHQFGMGVTCR4D5W
  • CDCGJQS74ZKTL6TSP6JCXLEKOFO7RSA76QQCJD7PIIRZ2RLKPRZRHLRP

Interface

fn pause(env: soroban_sdk::Env)
fn paused(env: soroban_sdk::Env) -> bool
fn unpause(env: soroban_sdk::Env)
fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
    operator: soroban_sdk::Address,
)
fn blocklist(env: soroban_sdk::Env, address: soroban_sdk::Address)
fn get_admin(env: soroban_sdk::Env) -> Option
fn get_owner(env: soroban_sdk::Env) -> Option

Swaps the minter's registered allow asset 1:1 for mint_asset by burning amount from minter and minting amount to to.

Arguments

  • e - Access to the Soroban environment.
  • to - The recipient.
  • amount - The amount to mint (must be greater than zero).
  • minter - The minter address (must be registered via configure_minter).

Errors

  • [FiatTokenAdminError::InvalidAmount] – If amount is less than or equal to zero.
  • [MinterAssetControllableError::MinterNotFound] – If the minter is not registered.
  • HostError: Error(Contract, #1000) – Contract is paused (EnforcedPaused from stellar_contract_utils::pausable, OZ fork).
  • HostError: Error(Auth, InvalidAction)minter authorization fails.

Events

Emitted by the allow asset SAC:

  • topics - ["burn", from: Address, asset: Symbol]
  • data - amount: i128

Emitted by the mint asset SAC:

  • topics - ["mint", to: Address, asset: Symbol]
  • data - amount: i128
fn swap_mint(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    amount: i128,
    minter: soroban_sdk::Address,
)
fn get_pauser(env: soroban_sdk::Env) -> Option
fn unblocklist(env: soroban_sdk::Env, address: soroban_sdk::Address)
fn accept_admin(env: soroban_sdk::Env)
fn __constructor(env: soroban_sdk::Env, params: FiatTokenAdminContractInitParams)
fn remove_minter(env: soroban_sdk::Env, minter: soroban_sdk::Address)
fn update_pauser(env: soroban_sdk::Env, new_pauser: soroban_sdk::Address)

Returns the mint asset address.

Arguments

  • e - Access to the Soroban environment.

Returns

The mint asset address.

fn get_mint_asset(env: soroban_sdk::Env) -> soroban_sdk::Address
fn is_blocklisted(env: soroban_sdk::Env, address: soroban_sdk::Address) -> bool
fn transfer_admin(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
    expires_in_ledgers: u32,
)

Returns the current blocklister address if set.

Arguments

  • e - Access to the Soroban environment.

Returns

  • Some(Address) – The blocklister address if set.
  • None – If the blocklister has not been set.
fn get_blocklister(env: soroban_sdk::Env) -> Option
fn accept_ownership(env: soroban_sdk::Env)
fn configure_minter(
    env: soroban_sdk::Env,
    minter: soroban_sdk::Address,
    allow_asset: soroban_sdk::Address,
)
fn get_pending_admin(env: soroban_sdk::Env) -> Option
fn get_pending_owner(env: soroban_sdk::Env) -> Option
fn transfer_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
    expires_in_ledgers: u32,
)

Updates the blocklister address.

Arguments

  • e - Access to the Soroban environment.
  • blocklister - The address that will be authorized to blocklist/unblocklist addresses.

Errors

  • HostError: Error(Auth, InvalidAction) – Authorization from the contract owner fails.

Events

  • topics - ["blocklister_changed"]
  • data - [new_blocklister: Address]
fn update_blocklister(env: soroban_sdk::Env, blocklister: soroban_sdk::Address)
fn get_minter_allow_asset(
    env: soroban_sdk::Env,
    minter: soroban_sdk::Address,
) -> Option
fn get_minter_asset_controller(env: soroban_sdk::Env) -> Option
fn update_minter_asset_controller(
    env: soroban_sdk::Env,
    new_controller: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶