Contract 2b1b00bf60620c54ff0b068a883471a1fb5b1e8be5527c0bd7f68885683b0fc9

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 26.1.1#8ac18efb681a1c0b4b85a38c5a380300344e3f39
rsver 1.95.0

Instances

  • CD5G6SFEJZOIADCGKFNZ3HPX3RCHHUVBQLJG3XRMGE3ENNTGWKEDSYJE

Interface

fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Claim one payout line. The holder authorizes the call (their signed inner transaction may be fee-bumped by the platform — the signature stays theirs). Panics if the line was already paid, the proof does not match, or the cycle expired. Returns the amount paid.

fn claim(
    env: soroban_sdk::Env,
    cycle_id: u32,
    holder: soroban_sdk::Address,
    amount: i128,
    proof: soroban_sdk::Vec>,
) -> i128
fn cycle(env: soroban_sdk::Env, cycle_id: u32) -> Cycle

Admin: recover whatever a cycle never paid out, once it has expired. Closes the cycle for good. Returns the swept amount.

fn sweep(env: soroban_sdk::Env, cycle_id: u32, to: soroban_sdk::Address) -> i128
fn is_paid(env: soroban_sdk::Env, cycle_id: u32, holder: soroban_sdk::Address) -> bool
fn pay_sac(env: soroban_sdk::Env) -> soroban_sdk::Address

USDC still unpaid in a cycle (0 once swept).

fn unclaimed(env: soroban_sdk::Env, cycle_id: u32) -> i128

Anyone: re-extend a cycle's storage TTL. Purely maintenance — a cycle with a long claim window must not be archived before it expires.

fn bump_cycle(env: soroban_sdk::Env, cycle_id: u32)

Number of cycles ever created (ids are 0..cycle_count).

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

Admin: open a distribution cycle. Pulls total USDC from the admin into this contract and publishes the payout list's Merkle root. Returns the cycle id.

fn create_cycle(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    total: i128,
    snapshot_ledger: u32,
    root: soroban_sdk::BytesN<32>,
    expires_at: u64,
) -> u32

Runs once at deploy. pay_sac is the USDC Stellar Asset Contract.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    pay_sac: soroban_sdk::Address,
)

Admin: push a batch of payout lines. Lines already paid are skipped, so overlapping batches are harmless; an invalid proof aborts the whole batch — a bad line in an operator batch is a bug, not a holder mistake. Returns the amount actually paid by this batch.

Deliberately usable after expires_at (until the sweep): expiry closes self-service claims, not the operator settling a laggard.

fn distribute_for(
    env: soroban_sdk::Env,
    cycle_id: u32,
    entries: soroban_sdk::Vec,
) -> i128

Imports

WebAssembly Text (WAT) ▶