Contract 94617af01ba3b9b7dfd6940d720b104a6523dab345b1fad15eef054ce252c469

← Back to Index 📥 Download WASM

Meta

cliver 28.0.0#300aaf69ab100536678bdb641428b06f06b318ea
rssdk_spec_shaking 2
rssdkver 28.0.0#48d506712f964094d14176e2f0b02afcd1054567
rsver 1.96.0

Instances

  • CCIJYT5LJBNO5WHW5OJILTLQXSPC5CZWGCNT5B2MSXD2FDV6VIU7UMPT

Interface

Open a one-input/one-output escrow order using the actual post-fee/source-swap amount.

amount is positive source-token base units, argument index 2 excluding Env; router registration uses amount_arg_index = 2, amount_field = None. terms supplies the signed destination floor and fixed-point quote multiplier.

Authorization and effects

The user authorizes these full arguments plus escrow's order-ID commitment and exact transfer subcalls. Never transfers funds or authorizes on the user's behalf. Calls escrow open, emits IntentOpened, and returns the canonical order ID. Any error rolls back the whole transaction, including router fees/source swaps.

Errors

Quote/conversion errors from build_order, configuration errors, or escrow/token/auth failures. Changed realized amounts require new authorization. The router ignores the return; recover the full order from escrow's Opened event.

fn open(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    terms: IntentTerms,
) -> Result, AdapterError>

Return immutable escrow and chain configuration without user authorization.

Maintains instance/code TTL. Returns NotConfigured when configuration is missing. The adapter stores no per-order data.

fn get_config(env: soroban_sdk::Env) -> Result

Bind the immutable native escrow, OIF origin chain_id, and Stellar network_id.

No admin or later configuration path exists. AddressType rejects a non-contract escrow; WrongNetwork rejects a mismatching ledger network. The constructor does not query escrow's chain configuration: choose matching values or escrow will reject orders. Stores instance configuration and maintains instance/code TTL.

fn __constructor(
    env: soroban_sdk::Env,
    escrow: soroban_sdk::Address,
    chain_id: soroban_sdk::U256,
    network_id: soroban_sdk::BytesN<32>,
) -> Result<(), AdapterError>

Imports

WebAssembly Text (WAT) ▶