Execute a tip and emit a TipExecuted event.
fn tip(
env: soroban_sdk::Env,
sender: soroban_sdk::Address,
recipient: soroban_sdk::Address,
amount: i128,
fee: i128,
) -> Result<(), ContractError>
Admin-only: upgrade the contract WASM code.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ContractError>
One-time initialisation. Must be called by the deployer before any tips.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
shx_contract: soroban_sdk::Address,
treasury: soroban_sdk::Address,
) -> Result<(), ContractError>
Read the contract version.
fn get_version(env: soroban_sdk::Env) -> u32
Read the current treasury address.
fn get_treasury(env: soroban_sdk::Env) -> Option
Admin-only: update the treasury address.
fn set_treasury(
env: soroban_sdk::Env,
new_treasury: soroban_sdk::Address,
) -> Result<(), ContractError>
Claim a withdrawal from the House Account into the user's wallet.
fn claim_withdrawal(
env: soroban_sdk::Env,
user: soroban_sdk::Address,
amount: i128,
nonce: u64,
expires_at: u64,
signature: soroban_sdk::BytesN<64>,
) -> Result<(), ContractError>
Set the raw Ed25519 public key of the bot (for withdrawal signatures).
fn set_admin_pubkey(
env: soroban_sdk::Env,
pubkey: soroban_sdk::BytesN<32>,
) -> Result<(), ContractError>