Contract 22e25896129abdba5d9d08d305788b0be910cd6f0b94f0843e82f75967e6329c

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.95.0

Instances

  • CAB3T7OEQH2VBKZKY45S4Z45JOZKGCPT7F2QKZRZF4VHZKJZQ7E6AUJC
  • CACMPR7ZCQ3J5SWHRNHGRV2C3FG67DCD3UFPJTZT5EME37GVRVRTOK6T
  • CAHN2EA7MEE2TA3VQLDFXAPARBV7CFCWEEIAUIGJA6EK6HXCO4APG6WQ
  • CAK4YXE6TP5VA5DS5YKJPJLCFSPO6ICANPBXCWK2WMIS5OWHO5PMX6IY
  • CAL3PYURGXNGI2HPALR4YVC3533JZXIFNBJQATTK4VE66SHC6SII5J4V
  • CBGU4N7JBPMKOLYJIKWAE2IEDWD3V52YEVHGLQ23ZYUEYOMTIPPEIADY
  • CBY6CYLGOZ3KBYI6ICKIMHNYUFEPGKQBBJ6NP5KB7AKTFFZ3ZDHVZIMI
  • CCDVQRNYGCFO6II62WJCHZG2L65HIDMPWBU3ZXNBWJBS6B2GGOPMNUZR
  • CCE7TPDTAZOFGU6ZCKDEBKBWWXKO27D4I5AHKYRXC2FUNATCPRFY72CI
  • CCWWSGJVUA7TBWGG47K4GGDB6AB5TRLC73OVIPEHWAPFEBTJIHGYYTFD
  • CDN5BGX6XGVC5WBZGX2425NN22DPWK76PFARSK32PRXCCYKTKDTAVVHQ

Interface

Member join

fn join(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
    deposit_amount: i128,
) -> Result<(), soroban_sdk::Error>

Vote on a proposal

fn vote(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
    proposal_id: u64,
    choice: VoteChoice,
) -> Result<(), soroban_sdk::Error>

Create a new proposal

fn propose(
    env: soroban_sdk::Env,
    proposer: soroban_sdk::Address,
    proposal_type: ProposalType,
) -> Result

Sponsor a candidate for joining (sponsor must be an Active member)

fn sponsor(
    env: soroban_sdk::Env,
    sponsor: soroban_sdk::Address,
    candidate: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Upgrade contract WASM code (admin only) Contract address and all storage data are preserved.

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

Get vote record (C2: from persistent storage)

fn get_vote(
    env: soroban_sdk::Env,
    proposal_id: u64,
    voter: soroban_sdk::Address,
) -> Result

Get round information (C2: from persistent storage)

fn get_round(env: soroban_sdk::Env, round_id: u64) -> Result

Contribution

fn contribute(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Get configuration

fn get_config(env: soroban_sdk::Env) -> Result

Get member information

fn get_member(
    env: soroban_sdk::Env,
    address: soroban_sdk::Address,
) -> Result

Initialize the contract

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

Get list of all member addresses

fn get_members(
    env: soroban_sdk::Env,
) -> Result, soroban_sdk::Error>

Step 2: Accept admin transfer (pending admin only)

fn accept_admin(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>

Get proposal information (C2: from persistent storage)

fn get_proposal(
    env: soroban_sdk::Env,
    proposal_id: u64,
) -> Result

Check if a proposal has been cancelled (public query)

fn is_cancelled(env: soroban_sdk::Env, proposal_id: u64) -> bool

Request exit (two-step: sets ExitPending, actual exit happens at settle_round)

fn request_exit(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Settle round (including recipient selection and payout) C3: Permissionless — anyone can call after round ends + grace period

fn settle_round(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>

Get statistics

fn get_statistics(env: soroban_sdk::Env) -> Result

Top up deposit (replenish after violation deductions) NOTE: Intentionally allows top-up during Paused status. This is by design — members should be able to replenish their deposit (e.g. after violation deductions) even while the ROSCA is paused, so they are ready when it resumes. Only Dissolved is blocked.

fn top_up_deposit(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
    amount: i128,
) -> Result<(), soroban_sdk::Error>

Step 1: Propose admin transfer (current admin only)

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

Cancel a proposal (only the proposer can cancel, before voting period ends)

fn cancel_proposal(
    env: soroban_sdk::Env,
    proposer: soroban_sdk::Address,
    proposal_id: u64,
) -> Result<(), soroban_sdk::Error>

Late contribution (with late fee)

fn contribute_late(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Execute a proposal after voting ends

fn execute_proposal(
    env: soroban_sdk::Env,
    executor: soroban_sdk::Address,
    proposal_id: u64,
) -> Result<(), soroban_sdk::Error>

Get current round number

fn get_current_round(env: soroban_sdk::Env) -> Result

Get insurance pool balance

fn get_insurance_pool(env: soroban_sdk::Env) -> Result

Calculate recipient for current round (priority-based, deterministic query) This function is for querying who has highest priority, non-consuming, for reference only

fn calculate_recipient(
    env: soroban_sdk::Env,
) -> Result, soroban_sdk::Error>

Process exit refund while ROSCA is Paused. During Pause, settle_round cannot run, so ExitPending members would be stuck. This function allows any ExitPending member to claim their refund directly.

fn process_paused_exit(
    env: soroban_sdk::Env,
    member: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶