Fund an order (transfer tokens to escrow)
fn fund(
env: soroban_sdk::Env,
payer: soroban_sdk::Address,
order_id: u128,
) -> (u128, OrderStatus)
fn pause(env: soroban_sdk::Env, paused: bool)
Release a funded order: validates policy, settles funds to payee with fee split
fn release(env: soroban_sdk::Env, actor: soroban_sdk::Address, order_id: u128)
fn upgrade(
env: soroban_sdk::Env,
new_wasm_hash: soroban_sdk::BytesN<32>,
version: Option,
)
Get order by ID
fn get_order(env: soroban_sdk::Env, order_id: u128) -> Order
fn get_owner(env: soroban_sdk::Env) -> soroban_sdk::Address
fn is_paused(env: soroban_sdk::Env) -> bool
fn get_version(env: soroban_sdk::Env) -> u32
Cancel an unfunded (Created) order. Can be called by the payer or the platform owner (platform_admin). Note: cancel does not require the contract to be unpaused — users should always be able to cancel pending orders.
fn cancel_order(env: soroban_sdk::Env, actor: soroban_sdk::Address, order_id: u128)
Create a new escrow order Returns the order ID
fn create_order(env: soroban_sdk::Env, params: CreateOrderParams) -> u128
fn __constructor(
env: soroban_sdk::Env,
id: u128,
platform_owner: soroban_sdk::Address,
platform_config: PlatformConfig,
ebioro_config: EbioroConfig,
)
Partial refund a funded order back to the refund address, bypassing release conditions.
fn partial_refund(
env: soroban_sdk::Env,
actor: soroban_sdk::Address,
order_id: u128,
amount: u128,
)
Refund an expired funded order back to the refund address. Can be called by the payer or the platform owner (platform_admin).
fn refund_expired(env: soroban_sdk::Env, actor: soroban_sdk::Address, order_id: u128)
Create a new escrow order and fund it atomically in a single transaction. Equivalent to calling create_order followed by fund, but requires only one signature. Returns the order ID.
fn create_and_fund(env: soroban_sdk::Env, params: CreateOrderParams) -> u128
Emergency rescue: owner-only last resort for funds stuck in a funded order that has been expired for at least 90 days.
fn emergency_rescue(
env: soroban_sdk::Env,
order_id: u128,
recipient: soroban_sdk::Address,
)
fn get_ebioro_config(env: soroban_sdk::Env) -> EbioroConfig
fn get_platform_config(env: soroban_sdk::Env) -> PlatformConfig
Updates Ebioro configuration directly. Called by the registry when Ebioro pushes a new config to all platform escrows.
fn update_ebioro_config(env: soroban_sdk::Env, new_config: UpdateEbioroConfig)
fn update_platform_config(
env: soroban_sdk::Env,
release_policy: Option,
platform_fee_recipient: Option,
)