Contract 4a77259bbe07ebf9e018cd5a38820b3b4258a145aae858adac96fa876a7c4b04

← Back to Index 📥 Download WASM

Meta

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

Instances

  • CDACN7M44Z2NU4T7CLW5VBJHCQNDMVSJPZNAHGVJ3BUPOVIB4PSOOUE2

Interface

Record a reputation change for member. Callable only by an authorized circle; reporter is the calling circle (verified via auth).

fn record(
    env: soroban_sdk::Env,
    reporter: soroban_sdk::Address,
    member: soroban_sdk::Address,
    delta: i64,
) -> Result

Replace this contract's code. Reputation holds scores rather than funds, so an upgrade can fix bugs without putting anyone's money at risk.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn get_score(env: soroban_sdk::Env, member: soroban_sdk::Address) -> i64

Hand the admin role to another account — the route to a multisig or a timelock once the protocol is live.

fn set_admin(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Set the admin account that may configure the Factory.

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

Point reputation at the Factory contract that will authorize circles.

fn set_factory(
    env: soroban_sdk::Env,
    factory: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn is_authorized(env: soroban_sdk::Env, circle: soroban_sdk::Address) -> bool

Authorize a circle to write reputation. Callable only by the Factory.

fn authorize_circle(
    env: soroban_sdk::Env,
    circle: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶