Contract 9102087ef2560d517f364113cedc5fd324a3369dfb6bc5828c2e4f6c5d002f77

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CBSGD23P6GB4BJBB3ZM5CPTN6EPV2FUWXKC72SMOITNWPCGLMLLSDLYT

Interface

Returns the admin address.

fn get_admin(env: soroban_sdk::Env) -> Option

Check if contract is currently paused

fn is_paused(env: soroban_sdk::Env) -> bool

Initialize the reputation contract with an admin.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
) -> Result<(), ReputationError>

File a dispute against a specific endorsement. The worker or admin can dispute a fraudulent endorsement.

fn file_dispute(
    env: soroban_sdk::Env,
    filed_by: soroban_sdk::Address,
    worker: soroban_sdk::Address,
    endorsement_index: u32,
    reason: soroban_sdk::String,
) -> Result<(), ReputationError>

Returns disputes for a worker.

fn get_disputes(
    env: soroban_sdk::Env,
    worker: soroban_sdk::Address,
) -> soroban_sdk::Vec

Returns the full reputation score for a worker.

fn get_reputation(
    env: soroban_sdk::Env,
    worker: soroban_sdk::Address,
) -> ReputationScore

Returns the trust tier (0-3) for a worker.

fn get_trust_tier(env: soroban_sdk::Env, worker: soroban_sdk::Address) -> u32

Emergency pause for the entire contract system in case of active attack.

fn pause_contract(env: soroban_sdk::Env) -> Result<(), ReputationError>

Admin-only: resolve a dispute by marking the endorsement as disputed. This removes the endorsement from the reputation calculation.

fn resolve_dispute(
    env: soroban_sdk::Env,
    worker: soroban_sdk::Address,
    dispute_index: u32,
    remove_endorsement: bool,
    resolution_note: soroban_sdk::String,
) -> Result<(), ReputationError>

Resume the contract after an emergency.

fn resume_contract(env: soroban_sdk::Env) -> Result<(), ReputationError>

Returns all endorsements for a worker.

fn get_endorsements(
    env: soroban_sdk::Env,
    worker: soroban_sdk::Address,
) -> soroban_sdk::Vec

Returns true if the worker has at least one endorsement.

fn has_endorsements(env: soroban_sdk::Env, worker: soroban_sdk::Address) -> bool

Extend TTL of a worker's endorsement data.

fn extend_worker_ttl(env: soroban_sdk::Env, worker: soroban_sdk::Address)

Submit an on-chain endorsement for a worker. Prevents self-endorsement and duplicate endorsements for the same job type.

fn submit_endorsement(
    env: soroban_sdk::Env,
    endorser: soroban_sdk::Address,
    worker: soroban_sdk::Address,
    rating: u32,
    job_type: soroban_sdk::String,
    feedback: soroban_sdk::String,
) -> Result<(), ReputationError>

Extend TTL of contract instance storage.

fn extend_instance_ttl(env: soroban_sdk::Env)

Returns trust tier name as a string.

fn get_trust_tier_name(
    env: soroban_sdk::Env,
    worker: soroban_sdk::Address,
) -> soroban_sdk::String

Returns the endorsement count for a worker.

fn get_endorsement_count(env: soroban_sdk::Env, worker: soroban_sdk::Address) -> u32

Returns the total endorsements across all workers.

fn get_total_endorsements(env: soroban_sdk::Env) -> u32

Returns the number of active (unresolved) disputes globally.

fn get_active_dispute_count(env: soroban_sdk::Env) -> u32

Imports

WebAssembly Text (WAT) ▶