Contract 1aeca2da79c633f8cd9c329fa7cca8e25d81e3ddf49eb97c2c50c23ab391d395

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.98.0

Instances

  • CDM46YOGN2DVMPGTZVVJSIQIP66SY4EZFBET6UCR54RN2NPN45TBHEFA

Interface

Retrieve drop details by ID

fn get_drop(env: soroban_sdk::Env, drop_id: u64) -> Option

Claims an active drop if provided with the correct preimage secret before expiry.

fn claim_drop(
    env: soroban_sdk::Env,
    drop_id: u64,
    secret: soroban_sdk::Bytes,
    recipient: soroban_sdk::Address,
) -> bool

Creates a new time-locked and hash-locked escrow Drop. Senders deposit tokens into the contract.

fn create_drop(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    hash_lock: soroban_sdk::BytesN<32>,
    duration_seconds: u64,
) -> u64

Senders can refund their deposit after the expiration timestamp has passed.

fn refund_drop(env: soroban_sdk::Env, drop_id: u64) -> bool

Total drops created

fn get_drop_count(env: soroban_sdk::Env) -> u64

Imports

WebAssembly Text (WAT) ▶