Contract d7049478085a960fab7b0b9525755b810a02c3846fb8a87d3cb9ddd17aed3ecb

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.8#f46e9e0610213bbb72285566f9dd960ff96d03d8
rsver 1.88.0

Instances

  • CC6U5XPOVLDYZYDDPVR6QAQB73IRDJVENOLWDT52EY42ZBVJHPS7GQDO
  • CDBO2XF6X6EJPI25DYZRDY3TEE2O4WTVZQN5YK5BVGU2I66X3LWEQQJL

Interface

Initialize the factory with the admin and HTLC WASM hash

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    htlc_wasm_hash: soroban_sdk::BytesN<32>,
)

Update the HTLC WASM hash (admin only)

fn update_htlc_hash(env: soroban_sdk::Env, new_hash: soroban_sdk::BytesN<32>)

Deploy an escrow contract with deterministic address

fn deploy_escrow(
    env: soroban_sdk::Env,
    order_hash: soroban_sdk::BytesN<32>,
    hashlock: soroban_sdk::BytesN<32>,
    maker: soroban_sdk::Address,
    taker: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    safety_deposit: i128,
    timelocks: u64,
) -> soroban_sdk::Address

Calculate the address that would be generated for given immutables

fn calculate_escrow_address(
    env: soroban_sdk::Env,
    order_hash: soroban_sdk::BytesN<32>,
    hashlock: soroban_sdk::BytesN<32>,
    maker: soroban_sdk::Address,
    taker: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    safety_deposit: i128,
    timelocks: u64,
) -> soroban_sdk::Address

Get the current HTLC WASM hash

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

Get the admin address

fn get_admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Imports

WebAssembly Text (WAT) ▶