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