Trait soroban_sdk::token::StellarAssetAdminInterface
source · pub trait StellarAssetAdminInterface {
// Required methods
fn set_admin(env: Env, new_admin: Address);
fn set_authorized(env: Env, id: Address, authorize: bool);
fn mint(env: Env, to: Address, amount: i128);
fn clawback(env: Env, from: Address, amount: i128);
}
Expand description
Interface for admin capabilities for Token contracts, such as the Stellar Asset Contract.
Required Methods§
Sets whether the account is authorized to use its balance. If
authorized
is true, id
should be able to use its balance.
Arguments
id
- The address being (de-)authorized.authorize
- Whether or notid
can use its balance.
Events
Emits an event with topics ["set_authorized", id: Address], data = [authorize: bool]
sourcefn clawback(env: Env, from: Address, amount: i128)
fn clawback(env: Env, from: Address, amount: i128)
Clawback amount
from from
account. amount
is burned in the
clawback process.
Arguments
from
- The address holding the balance from which the clawback will take tokens.amount
- The amount of tokens to be clawed back.
Events
Emits an event with topics ["clawback", admin: Address, to: Address], data = [amount: i128]