Contract 4e0e4932dd24fcf434236d09434c18a8f8eb8496c6f70397d823452814d3fc9f

← Back to Index 📥 Download WASM

Meta

rssdkver 26.0.1#f52b6aad85f18c5e312ff3f60e57cb613274e6bb
rsver 1.91.0

Instances

  • CDGNPRYTFDXJLWZE4YDKZXW4IEN2RLPSE4N7VM5HJ7NLPL2QC45GIXI5

Interface

fn claim(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    market_id: u64,
) -> Result<(), MarketError>
fn get_bet(
    env: soroban_sdk::Env,
    market_id: u64,
    user: soroban_sdk::Address,
) -> Result

Replace this contract's WASM bytecode in place. Admin only. Storage is preserved — only the executable changes.

fn upgrade(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), MarketError>
fn place_bet(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    market_id: u64,
    is_yes: bool,
    amount: i128,
) -> Result<(), MarketError>

Read the current Config (for verification/admin tooling).

fn get_config(env: soroban_sdk::Env) -> Config
fn get_market(env: soroban_sdk::Env, market_id: u64) -> Result
fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token_contract: soroban_sdk::Address,
    referral_contract: soroban_sdk::Address,
    leaderboard_contract: soroban_sdk::Address,
    xlm_sac: soroban_sdk::Address,
) -> Result<(), MarketError>

Update the packed Config (token / referral / leaderboard / xlm_sac). Admin only. Used to correct an address set at initialize time.

fn set_config(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token_contract: soroban_sdk::Address,
    referral_contract: soroban_sdk::Address,
    leaderboard_contract: soroban_sdk::Address,
    xlm_sac: soroban_sdk::Address,
) -> Result<(), MarketError>
fn is_resolver(env: soroban_sdk::Env, resolver: soroban_sdk::Address) -> bool
fn add_resolver(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    resolver: soroban_sdk::Address,
) -> Result<(), MarketError>
fn cancel_market(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    market_id: u64,
) -> Result<(), MarketError>
fn cancel_refund(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    market_id: u64,
) -> Result
fn create_market(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    question: soroban_sdk::String,
    image_url: soroban_sdk::String,
    category: Category,
    duration_secs: u64,
) -> Result
fn get_bet_gross(
    env: soroban_sdk::Env,
    market_id: u64,
    user: soroban_sdk::Address,
) -> i128
fn withdraw_fees(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
) -> Result
fn resolve_market(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    market_id: u64,
    outcome: bool,
) -> Result<(), MarketError>
fn remove_resolver(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    resolver: soroban_sdk::Address,
) -> Result<(), MarketError>
fn get_market_count(env: soroban_sdk::Env) -> u64
fn add_fee_recipient(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
) -> Result<(), MarketError>
fn get_market_bettors(
    env: soroban_sdk::Env,
    market_id: u64,
) -> Result, MarketError>
fn get_user_bet_count(
    env: soroban_sdk::Env,
    market_id: u64,
    user: soroban_sdk::Address,
) -> u32
fn get_accumulated_fees(env: soroban_sdk::Env) -> i128
fn remove_fee_recipient(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
) -> Result<(), MarketError>

Imports

WebAssembly Text (WAT) ▶