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