fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
expiration_ledger: u32,
) -> Result<(), TokenError>
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn balance_of(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn balance_of_with_index(
env: soroban_sdk::Env,
id: soroban_sdk::Address,
liquidity_index: u128,
) -> i128
fn balance_of_with_liquidity_index(
env: soroban_sdk::Env,
id: soroban_sdk::Address,
liquidity_index: u128,
) -> i128
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
WP-L8: Disabled — uses stale stored index. Router uses burn_scaled exclusively.
fn burn(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
WP-M4: Disabled — burn_from bypasses HF checks. Router uses burn_scaled exclusively.
fn burn_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
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 total_supply(env: soroban_sdk::Env) -> i128
WP-L8: Disabled — uses stale stored index. Router uses mint_scaled exclusively.
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
underlying_asset: soroban_sdk::Address,
pool: soroban_sdk::Address,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
decimals: u32,
) -> Result<(), TokenError>
fn set_incentives_contract(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
incentives: soroban_sdk::Address,
) -> Result<(), TokenError>
fn get_incentives_contract(env: soroban_sdk::Env) -> Option
Mint scaled aTokens for a user. Returns (is_first_supply, user_new_scaled_balance, total_supply_scaled). The user_new_scaled_balance enables callers to compute the user's underlying balance via ray_mul(user_new_scaled_balance, index), avoiding an extra balance_of_with_index cross-contract call.
fn mint_scaled(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
on_behalf_of: soroban_sdk::Address,
amount: u128,
index: u128,
) -> Result<(bool, i128, i128), TokenError>
fn burn_scaled(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
on_behalf_of: soroban_sdk::Address,
amount: u128,
index: u128,
) -> Result<(bool, i128), TokenError>
fn transfer_underlying_to(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
target: soroban_sdk::Address,
amount: u128,
) -> Result
Burns scaled aTokens and transfers underlying to target in a single call.
Returns (new_user_scaled_balance, new_total_supply_scaled, actual_amount_transferred).
The actual_amount is capped at amount to prevent rounding overshoot (WP-C1).
fn burn_scaled_and_transfer_to(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
on_behalf_of: soroban_sdk::Address,
amount: u128,
index: u128,
transfer_target: soroban_sdk::Address,
) -> Result<(i128, i128, u128), TokenError>
WP-M3: Transfer aTokens from borrower to liquidator without moving underlying. Used when _receive_a_token=true. Returns true if this is the liquidator's first balance. Uses single ray_div for both debit and credit to prevent total_supply_scaled drift.
fn transfer_on_liquidation(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: u128,
index: u128,
) -> Result
fn scaled_balance_of(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn scaled_total_supply(env: soroban_sdk::Env) -> i128
fn get_liquidity_index(env: soroban_sdk::Env) -> u128
fn get_underlying_asset(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_pool_address(env: soroban_sdk::Env) -> soroban_sdk::Address
Upgrade contract WASM (admin only)
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), TokenError>
fn version(env: soroban_sdk::Env) -> u32
fn get_admin(env: soroban_sdk::Env) -> Result