fn root(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>
Get the admin authorized to upgrade this contract.
fn admin(env: soroban_sdk::Env) -> Result
Upgrade the contract's WASM code in place (admin-gated). Keeps the blocklist and sparse-tree root intact.
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
Add a leaf to the blocklist (admin-gated). In a full implementation, this would update a sparse Merkle tree. For the buildathon, we track blocked leaves in storage and update the root by hashing the new leaf into the existing root (simplified but functional).
fn block_leaf(
env: soroban_sdk::Env,
leaf: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn blocked_count(env: soroban_sdk::Env) -> u32
Check that a leaf is NOT blocklisted. Returns true if the leaf is NOT in the blocklist (i.e., the address is clean). In the full system, the ZK circuit verifies a sparse Merkle non-membership proof, and this on-chain check is a secondary validation.
fn is_not_blocked(env: soroban_sdk::Env, leaf: soroban_sdk::BytesN<32>) -> bool
Assert non-membership. Returns Ok(true) if leaf is not blocked.
fn assert_non_member(
env: soroban_sdk::Env,
leaf: soroban_sdk::BytesN<32>,
) -> Result