One-time setup. Records the admin and the pool's SAC token, then unpauses.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
token: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
Deposit amount of the pool token into the contract's custody.
Auth: requires the funder's signature; the same authorization covers the
inner SAC transfer(funder -> contract). Anyone may top up the pool.
fn fund(
env: soroban_sdk::Env,
funder: soroban_sdk::Address,
amount: i128,
) -> Result
Release a grant from the pool to recipient and write a permanent
on-chain receipt under grant_ref.
Auth: the contract admin only. A grant can be disbursed exactly once.
fn disburse(
env: soroban_sdk::Env,
grant_ref: soroban_sdk::BytesN<32>,
admin: soroban_sdk::Address,
recipient: soroban_sdk::Address,
amount: i128,
) -> Result
fn get_disbursement(
env: soroban_sdk::Env,
grant_ref: soroban_sdk::BytesN<32>,
) -> Result
fn is_disbursed(env: soroban_sdk::Env, grant_ref: soroban_sdk::BytesN<32>) -> bool
fn pool_balance(env: soroban_sdk::Env) -> i128
fn total_disbursed(env: soroban_sdk::Env) -> i128
fn total_disbursements(env: soroban_sdk::Env) -> u64
fn is_paused(env: soroban_sdk::Env) -> bool
fn get_admin(env: soroban_sdk::Env) -> Result
fn get_token(env: soroban_sdk::Env) -> Result
fn pause(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>
fn unpause(env: soroban_sdk::Env) -> Result<(), soroban_sdk::Error>
fn set_admin(
env: soroban_sdk::Env,
new_admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
Replace the contract's own code (admin-gated). Lets Tulong ship fixes without migrating receipt state — important for a mainnet (L6) deploy.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>