Contract 5b90ff32336f9c7d0b32f8e2a09b134b541712b8edd980ef88190edc4754d59e

← Back to Index 📥 Download WASM

Meta

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

Instances

  • CDKRCTCUHNJJIZW5I4VFI6SG57DMIHHFXIGPW5KDKIJEUMSSAMMLC7RJ

Interface

Replace this contract's code. The factory only deploys and indexes circles — it never custodies member funds — so upgrading it cannot touch money already committed to a circle.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn get_admin(env: soroban_sdk::Env) -> Result

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>

Configure the factory with the shared reputation contract, the contribution token, and the Circle wasm hash to deploy.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    reputation: soroban_sdk::Address,
    token: soroban_sdk::Address,
    circle_wasm: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn list_circles(env: soroban_sdk::Env) -> soroban_sdk::Vec

Deploy a new circle, initialize it, and authorize it in reputation.

fn create_circle(
    env: soroban_sdk::Env,
    creator: soroban_sdk::Address,
    contribution_amount: i128,
    collateral_amount: i128,
    max_members: u32,
    round_timeout_ledgers: u32,
) -> Result
fn get_circle_wasm(
    env: soroban_sdk::Env,
) -> Result, soroban_sdk::Error>

Point the factory at a new Circle wasm. Circles already deployed keep running the code their members agreed to — this only affects circles created from here on.

fn set_circle_wasm(
    env: soroban_sdk::Env,
    wasm: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn get_circle_count(env: soroban_sdk::Env) -> u32

Imports

WebAssembly Text (WAT) ▶