Contract e9427b80d9ff5b1ade3c76098c044a447b57fa7a128fd4e05c8c42a6f615e713

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CAC5EDF76M5LY43BNHT47Y5NZRHO4ZRH7SRFPNHATGNKN2DI3SNK75PL
  • CBZ54RRGG4S5RZXW2BC26SIDFYVTB5XQDV3AYU42WQYBRNNUWZBACYTO

Interface

Emergency stop: block release_to_winner and post_task. Admin-only. Refunds remain available so posters can always exit. Intended for a suspected verdict-key compromise while the key is rotated.

fn pause(env: soroban_sdk::Env)

Refund the reward to the poster.

  • Open task: before deadline + settle_grace this is a poster-authorized cancel; after it, permissionless.
  • Active task (work submitted): locked until deadline + settle_grace so the platform can settle to a winner without being front-run; after the window it is permissionless.
fn refund(env: soroban_sdk::Env, task_id: u64) -> Result<(), soroban_sdk::Error>

Lift the emergency stop. Admin-only.

fn unpause(env: soroban_sdk::Env)

Mark a task Active (admin records the first agent submission).

fn activate(env: soroban_sdk::Env, task_id: u64) -> Result<(), soroban_sdk::Error>
fn get_task(env: soroban_sdk::Env, task_id: u64) -> Option

Lock a task's USDC reward in escrow. Pulls reward from the poster's account into the contract via the USDC SAC. Requires the poster's auth.

fn post_task(
    env: soroban_sdk::Env,
    poster: soroban_sdk::Address,
    task_id: u64,
    reward: i128,
    deadline: u64,
) -> Result<(), soroban_sdk::Error>
fn get_config(env: soroban_sdk::Env) -> Config

One-time constructor: wires the USDC SAC, the verdict-authority public key, the pass threshold, and the post-deadline settlement grace window.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    usdc_sac: soroban_sdk::Address,
    verdict_pubkey: soroban_sdk::BytesN<32>,
    pass_threshold: u32,
    settle_grace: u64,
)

Flag a completed task as disputed (state stub; full Agent Court resolution is a later deliverable). Admin-authorized.

fn flag_disputed(env: soroban_sdk::Env, task_id: u64) -> Result<(), soroban_sdk::Error>

Release the reward to the winning agent on a verified judge verdict. Anyone may submit the transaction, but only a signature from the verdict authority over the canonical (task_id, winner, score, nonce) message — with score >= pass_threshold — moves the funds.

fn release_to_winner(
    env: soroban_sdk::Env,
    task_id: u64,
    winner: soroban_sdk::Address,
    score: u32,
    nonce: u64,
    signature: soroban_sdk::BytesN<64>,
) -> Result<(), soroban_sdk::Error>

Rotate the verdict-authority public key (e.g. after a key compromise) without redeploying. Admin-only. Existing signatures over the old key stop verifying immediately.

fn set_verdict_pubkey(env: soroban_sdk::Env, new_pubkey: soroban_sdk::BytesN<32>)

Imports

WebAssembly Text (WAT) ▶