Initializes the Debt token contract.
Panics if the specified decimal value exceeds the maximum value of u8. Panics if the contract has already been initialized. Panics if name or symbol is empty
fn initialize(
env: soroban_sdk::Env,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
pool: soroban_sdk::Address,
underlying_asset: soroban_sdk::Address,
)
Upgrades the deployed contract wasm preserving the contract id.
Panics if the caller is not the pool associated with this token.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Returns the current version of the contract.
fn version(env: soroban_sdk::Env) -> u32
Returns the balance of tokens for a specified id.
The balance of tokens for the specified id.
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
The spendable balance of tokens for the specified id.
Currently the same as balance(id)
fn spendable_balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
Checks whether a specified id is authorized.
Returns true if the id is authorized, otherwise returns false
fn authorized(env: soroban_sdk::Env, id: soroban_sdk::Address) -> bool
Burns a specified amount of tokens from the from account.
Panics if the amount is negative. Panics if the caller is not the pool associated with this token. Panics if overflow happens
fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)
fn burn_from(
env: soroban_sdk::Env,
_spender: soroban_sdk::Address,
_from: soroban_sdk::Address,
_amount: i128,
)
Sets the authorization status for a specified id.
Panics if the caller is not the pool associated with this token.
fn set_authorized(env: soroban_sdk::Env, id: soroban_sdk::Address, authorize: bool)
Mints a specified amount of tokens for a given id.
Panics if the amount is negative. Panics if the caller is not the pool associated with this token.
fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
Clawbacks a specified amount of tokens from the from account.
Panics if the amount is negative. Panics if the caller is not the pool associated with this token. Panics if overflow happens
fn clawback(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)
Returns the number of decimal places used by the token.
The number o
fn decimals(env: soroban_sdk::Env) -> u32
Returns the name of the token.
The name of the token as a soroban_sdk::Bytes value.
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
Returns the symbol of the token.
The symbol of the token as a soroban_sdk::Bytes value.
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
Returns the total supply of tokens.
The total supply of tokens.
fn total_supply(env: soroban_sdk::Env) -> i128