Contract 2ce18af8f3ef2ae35953b86db8972c6abfa86d9f7ed2b057ef4d52fab957af34

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 27.0.0#e5cb4b52c3da8e56fc48adfd7b85d85976c1a059
rsver 1.97.0

Instances

  • CBTALUV2T6FRODHLQIT5MRD6SVXOQ5NTURYY5EFS5NWTCZ6ZLKJCJGXW

Interface

Upgrade the contract to a new WASM version. Only admin can call this. The contract keeps the same address and all data.

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Returns the current contract version.

fn version(env: soroban_sdk::Env) -> u32
fn get_bounty(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
) -> Result

Winner pulls their committed award.

fn claim_reward(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
    winner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    native_token: soroban_sdk::Address,
)

Creator cancels the bounty, reclaiming any unassigned escrow.

fn cancel_bounty(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    bounty_id: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>

Creator deposits amount of token into escrow. The bounty_id is the DB-generated UUID passed from off-chain. Only the creator needs to authorize this call.

fn create_bounty(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
    creator: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    max_winners: u32,
) -> Result<(), soroban_sdk::Error>

Creator commits amount of the remaining escrow to winner.

fn select_winner(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    bounty_id: soroban_sdk::String,
    winner: soroban_sdk::Address,
    amount: i128,
) -> Result<(), soroban_sdk::Error>
fn get_winner_award(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
    winner: soroban_sdk::Address,
) -> Option
fn admin_extend_bounty_ttl(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
) -> Result<(), soroban_sdk::Error>
fn admin_extend_instance_ttl(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>
fn admin_extend_winner_award_ttl(
    env: soroban_sdk::Env,
    bounty_id: soroban_sdk::String,
    winner: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶