Contract 41d3d305b62ee18223676ab36baaac9a28965bf143e738808bf7372a45370fd0

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdkver 27.0.0#e5cb4b52c3da8e56fc48adfd7b85d85976c1a059
rsver 1.97.1

Instances

  • CC2NCXWMJTVYYICPIZK422RGNDZSSA4YENZCTGNAZQBWMSGQK7SWAFKZ

Interface

Approve a proposed outcome. Only callable by registered committee members. Reaching a threshold of 3-of-5 approvals triggers immediate finalization and market resolution.

fn approve(
    env: soroban_sdk::Env,
    market_id: u64,
    committee_member: soroban_sdk::Address,
)

Finalize resolution for a market. Can be called by anyone if:

  1. 3-of-5 committee members have approved, OR
  2. The challenge window has elapsed with no disputes.
fn finalize(env: soroban_sdk::Env, market_id: u64)

Initialize the oracle contract with the market contract, committee members, and challenge window duration

fn initialize(
    env: soroban_sdk::Env,
    market_contract: soroban_sdk::Address,
    committee: soroban_sdk::Vec,
    challenge_window: u64,
)

Dispute a proposed outcome. Anyone can call this before the challenge window elapses. Disputed proposals require committee consensus (3-of-5 approvals) to finalize.

fn dispute_outcome(
    env: soroban_sdk::Env,
    market_id: u64,
    disputer: soroban_sdk::Address,
)

Propose the outcome of a prediction market. Anyone can call this. Initiates a challenge window during which disputes can be filed.

fn propose_outcome(
    env: soroban_sdk::Env,
    market_id: u64,
    outcome: Outcome,
    proposer: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶