Contract 91acbf2ee24b5ac4d51c7f470e9c0560799003f55699c464e2a7d364c4d4bef3

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.4#1d4afb3b981a4f4b2bbc19f0ce38af85c4ab316a
rsver 1.86.0

Instances

  • CB2DHZMQHQE3TGUMD6BRM7UCJZNIPKDRVEQOWBIRRS3G2FZOGDTRKSB3

Interface

Get current admin

fn admin_get(env: soroban_sdk::Env) -> Option

Transfer to new admin Should be called in the same transaction as deploying the contract to ensure that a different account try to become admin

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

Admin can upgrade the contract with given hash.

fn upgrade(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)

Constructor to set the admin

fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)

The source account should should be the issuer of the asset which is intially the admin of this contract. This contract is set as the admin of the SAC and the operator is set to this contract. Lastly the contract is unpaused.

fn init(
    env: soroban_sdk::Env,
    sac: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Add to the contract’s set of banned accounts. Max 50 accounts per call.

fn add_banned_accounts(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Remove from the contract’s set of banned accounts. Max 50 accounts per call.

fn remove_banned_accounts(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Since AUTH_REQUIRED is set, accounts must call this method to request authorizing their trustline. The method will check if the account is banned, if not will call the SAC's set_authorized method and add the account to the contract’s set of authorized accounts.

fn authorize_trustline(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

The issuer can remove an account’s authorization via the SAC's set_authorized method.

fn deauthorize_trustline(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Start the pausing process

fn pause(env: soroban_sdk::Env)

End the pausing process

fn unpause(env: soroban_sdk::Env)

An iterator method which removes a batch from the set of authorized accounts, revoking authorization from each with a call to the SAC's set_authorized method and transfers the batch to the set of paused accounts.

fn batch_pause(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Batches of accounts are removed from the set of paused accounts, authorized, and returned to the set of authorized accounts.

fn batch_unpause(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

burn funds from an account.

fn clawback(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    amount: i128,
) -> Result<(), soroban_sdk::Error>

Mint to a normal authoirzed account

fn mint_to_account(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    amount: i128,
) -> Result<(), soroban_sdk::Error>

Ban account and remove authorization

fn freeze_accounts(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Unban account and authorize

fn unfreeze_accounts(
    env: soroban_sdk::Env,
    accounts: soroban_sdk::Vec,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶