Contract 102ee6b25bbc022777950913f5ebe9bd3ca1468d653ded3513cb7cc3397f7c8e

← Back to Index 📥 Download WASM

Meta

cliver 27.1.0#8e402ea28202950b272fbabc34caad4d2f64fe87
rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.96.0

Interface

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

Claim amount for the leaf at index. Recipient signs and pays the fee.

Order (02 §3.6): config -> expired -> amount -> already-claimed -> proof -> auth -> set-claimed (BEFORE transfer) -> transfer + balance guard (rollback the bit on mismatch) -> event + TTL.

fn claim(
    env: soroban_sdk::Env,
    index: u32,
    claimant: soroban_sdk::Address,
    amount: i128,
    proof: soroban_sdk::Vec>,
) -> Result<(), soroban_sdk::Error>
fn token(env: soroban_sdk::Env) -> Result
fn config(env: soroban_sdk::Env) -> Result
fn progress(env: soroban_sdk::Env) -> Result
fn is_claimed(env: soroban_sdk::Env, index: u32) -> bool

Permissionless, paged TTL maintenance for dormant campaigns. The contract and instance storage share a TTL; claimed bitmap words are persistent and renewed in bounded windows. Returns the exclusive next word cursor; the sweep is complete when it reaches the word count derived from config().recipient_count.

fn keep_alive(
    env: soroban_sdk::Env,
    start_word: u32,
    limit: u32,
) -> Result
fn merkle_root(
    env: soroban_sdk::Env,
) -> Result, soroban_sdk::Error>

Atomic init at deploy. Validates total > 0, a nonzero root, and a not-already-past deadline (defense in depth — the factory checks these too). No BN254 canonical-field check: the root is a raw keccak256 digest, not a BN254 scalar.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token: soroban_sdk::Address,
    merkle_root: soroban_sdk::BytesN<32>,
    total: i128,
    recipient_count: u32,
    deadline: u64,
    locked: bool,
) -> Result<(), soroban_sdk::Error>

Bitmap status over start..(start+limit). The full requested window is returned (unwritten words read all-false); callers can use the config's recipient_count as the campaign boundary.

fn claimed_statuses(
    env: soroban_sdk::Env,
    start: u32,
    limit: u32,
) -> Result, soroban_sdk::Error>

Admin sweeps the remaining balance to to. Gated by the locked/deadline trust matrix (02 §3.7): locked && (deadline==0 || now<=deadline) => blocked.

fn withdraw_unclaimed(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶