Contract 6c47b86b587e898b527c93c75bfb13956a3a791b321ec98de6a781951fc175b3

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.94.1

Instances

  • CAWAYAYBUJUTTBTNLFOZ5S7AF3COO526WAZXJ6EHR45NJ6ZQ546K4B6O

Interface

Get pool stats: (total_deposits, total_settled, pending_owners_count).

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

Deposit payment for a service. The amount goes to the pool, credited to the service owner's pending balance.

fn deposit(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    service_owner: soroban_sdk::Address,
    amount: i128,
) -> Result<(), PoolError>

Withdraw pending balance for a specific owner. Owner must authorize.

fn withdraw(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
) -> Result

Initialize the pool with an admin and payment token address.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    token: soroban_sdk::Address,
) -> Result<(), PoolError>

Get pending balance for a service owner.

fn pending_for(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> i128

Batch settle all pending balances. Permissionless — anyone can call this. This is the privacy mechanism: multiple deposits settle in one transaction.

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

Imports

WebAssembly Text (WAT) ▶