Upgrade this contract to new wasm code. Admin-gated; emits the new hash. Provides a recovery path for bugs without a full redeploy + state migration.
fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Get the current admin address.
fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address
Rotate the admin key. Admin-gated; emits (old, new) for auditability.
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
Add an address to the whitelist
fn add_address(env: soroban_sdk::Env, address: soroban_sdk::Address)
Add multiple addresses to the whitelist at once
fn add_addresses(
env: soroban_sdk::Env,
addresses: soroban_sdk::Vec,
)
Get all whitelisted addresses
fn get_whitelist(env: soroban_sdk::Env) -> soroban_sdk::Vec
Constructor - Initialize the contract with an admin address
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Check if an address is whitelisted
fn is_whitelisted(env: soroban_sdk::Env, address: soroban_sdk::Address) -> bool
Remove an address from the whitelist
fn remove_address(env: soroban_sdk::Env, address: soroban_sdk::Address)
Remove multiple addresses from the whitelist at once
fn remove_addresses(
env: soroban_sdk::Env,
addresses: soroban_sdk::Vec,
)