Contract b7a7ebb74f03a879aa2c43ef9ec3e7e720bae1601bf9868f44e5bd55e1a912f8

← Back to Index 📥 Download WASM

Meta

rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.93.0

Instances

  • CCYP45NQNJF5Z6XZX5S3L7TT6334MLMWFFWSZMXHLGO6OH6JLSY2VG2D
  • CDLSO3PZYXKBLXOXABZ4OLCTOG67XKQDBAGO6CJKMSS4QATY3I5ZBKUY
  • CDYMMCMH7ZMBRFQSSIL3A6RGZZQ4YWYYDLBUYHQUQRMTRBPEVMA5LUJ3

Interface

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,
)

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,
)

Read the contract version.

fn get_version(env: soroban_sdk::Env) -> u32

Read the current treasury address.

fn get_treasury(env: soroban_sdk::Env) -> soroban_sdk::Address

Admin-only: update the treasury address.

fn set_treasury(env: soroban_sdk::Env, new_treasury: soroban_sdk::Address)

Claim a withdrawal from the House Account into the user's wallet. This requires a valid Ed25519 signature from the bot (admin_pubkey).

fn claim_withdrawal(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    amount: i128,
    nonce: u64,
    signature: soroban_sdk::BytesN<64>,
)

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>)

Imports

WebAssembly Text (WAT) ▶