Contract d09320ad147011192b30212090918a2292443bd0dc96bd625727f5e47e5f2600

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.95.0

Instances

  • CBFNGCV7IIZC2E2LUQFLBJU2E4UKG4AINSDWWOU5S64OFKHXTOB74DNB

Interface

fn get_fee(env: soroban_sdk::Env) -> (i128, i128)
fn is_used(env: soroban_sdk::Env, maker: soroban_sdk::Address, nonce: u64) -> bool

Set the fee rate (per 100k). Hard-capped at the deployed 0.5 bps.

fn set_fee(env: soroban_sdk::Env, fee_per_100k: i128) -> Result<(), RfqError>

Oracle fair value of amount_in of token_in, in token_out base units, per the SwapBook's feeds for the pair.

fn fair_value(
    env: soroban_sdk::Env,
    token_in: soroban_sdk::Address,
    token_out: soroban_sdk::Address,
    amount_in: i128,
) -> Result

(admin, fee_vault, swap_book)

fn get_config(
    env: soroban_sdk::Env,
) -> Result<
    (soroban_sdk::Address, soroban_sdk::Address, soroban_sdk::Address),
    RfqError,
>

Everything settle_quote would compute, without auth or transfers. Fails with the same error settlement would.

fn check_quote(env: soroban_sdk::Env, q: Quote) -> Result
fn accept_admin(env: soroban_sdk::Env) -> Result<(), RfqError>

Settle a firm quote. Requires auth from BOTH parties: the taker (normally the transaction source) and the maker (normally a pre-signed authorization entry carried in the transaction). Returns the protocol fee charged.

fn settle_quote(env: soroban_sdk::Env, q: Quote) -> Result

Deploy-time constructor — atomic with deployment.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    fee_vault: soroban_sdk::Address,
    swap_book: soroban_sdk::Address,
)

Repoint the NAV source (a SwapBook with get_oracle_price).

fn set_swap_book(
    env: soroban_sdk::Env,
    swap_book: soroban_sdk::Address,
) -> Result<(), RfqError>
fn transfer_admin(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
) -> Result<(), RfqError>

Imports

WebAssembly Text (WAT) ▶