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>