Contract e12c4a0220b9cfb9d5bab10d5bf0cc23d727666103de3d13d3152bd76be14a72

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.89.0

Instances

  • CBSA2NVG7LYW3KPL2PU7EUTFWX2DYAXK67JVPHWONQXPZF4BFEYT4YTZ

Interface

One-time setup. Records the admin and unpauses the contract.

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

Lock amount of token for an invoice into the contract's custody.

Auth: requires the client's signature; the same authorization covers the inner SAC transfer(client -> contract).

fn deposit(
    env: soroban_sdk::Env,
    invoice_ref: soroban_sdk::BytesN<32>,
    client: soroban_sdk::Address,
    freelancer: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
) -> Result<(), soroban_sdk::Error>

Release a funded escrow to the freelancer (the instant payout).

Auth: the contract admin or the escrow's own client may trigger it. Either way, the only possible destination is the freelancer recorded at deposit time.

fn release(
    env: soroban_sdk::Env,
    invoice_ref: soroban_sdk::BytesN<32>,
    caller: soroban_sdk::Address,
) -> Result

Refund a funded escrow back to the client (cancel before release).

Auth: the contract admin or the escrow's own client.

fn refund(
    env: soroban_sdk::Env,
    invoice_ref: soroban_sdk::BytesN<32>,
    caller: soroban_sdk::Address,
) -> Result
fn get_escrow(
    env: soroban_sdk::Env,
    invoice_ref: soroban_sdk::BytesN<32>,
) -> Result
fn has_escrow(env: soroban_sdk::Env, invoice_ref: soroban_sdk::BytesN<32>) -> bool
fn total_escrows(env: soroban_sdk::Env) -> u64
fn is_paused(env: soroban_sdk::Env) -> bool
fn get_admin(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 PayRosa ship fixes without migrating escrow state — important for a mainnet (L6) deploy.

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

Imports

WebAssembly Text (WAT) ▶