Contract 311bbbeae3b7b24e40ac442ae670256a78a9c9ee399114a2918f8618bd74dfc6

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 26.0.1#f52b6aad85f18c5e312ff3f60e57cb613274e6bb
rsver 1.94.0

Instances

  • CBJWADSNYX52I6GEASN5P7MS6NWQ4O5WWQJOPTNSKCRHYTK2BYET6YB3

Interface

fn root(env: soroban_sdk::Env) -> soroban_sdk::BytesN<32>

Upgrade the contract's WASM code in place (admin-gated). Keeps the full ASP Merkle tree (frontier, root, leaves) intact.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>

Verify membership: check that the leaf exists in storage. The ZK circuit handles the actual Merkle proof verification off-chain, and the on-chain contract verifies the Groth16 proof that includes the ASP root. This on-chain check is a secondary validation.

fn is_member(env: soroban_sdk::Env, leaf: soroban_sdk::BytesN<32>) -> bool
fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn leaf_count(env: soroban_sdk::Env) -> u32

Insert an approved leaf into the ASP Merkle tree (admin-gated). Uses frontier-based insertion identical to VayylPool's Merkle tree.

fn insert_leaf(
    env: soroban_sdk::Env,
    leaf: soroban_sdk::BytesN<32>,
) -> Result<(), soroban_sdk::Error>

True if root is the current ASP root or any root still inside the historical-roots window. The pool calls this to bind a deposit's caller- supplied asp_root to a trusted root, accepting recent roots so in-flight deposits survive concurrent ASP-set updates.

fn is_known_root(env: soroban_sdk::Env, root: soroban_sdk::BytesN<32>) -> bool

Get the leaf index for a given leaf

fn get_leaf_index(
    env: soroban_sdk::Env,
    leaf: soroban_sdk::BytesN<32>,
) -> Result

Imports

WebAssembly Text (WAT) ▶