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