Contract 44b84e003733373cd0c4f271c9fba7e8e5909a1b1b9076288a8a3cdf0ec6ee96

← Back to Index 📥 Download WASM

Meta

rssdkver 27.0.5#ea54f95d3f2f49e0487b29fd1a9f469638f09aba
rsver 1.96.0

Instances

  • CBJB2GMQP6DFAMRWDBTMEKXK6RKALVN7WQJWKQ6AAD4V6OGGLXSBXOSL

Interface

fn caps(env: soroban_sdk::Env) -> AdapterCaps

The address that administers this adapter's allowlist.

A view, added in Phase 11 alongside caller() and for the same reason (ADR-037): scripts/verify_deployment.sh has to read the owner off the chain rather than trust the deploy script's variable. The value was always stored — initialize takes it — but nothing exposed it, so the one check that would catch an adapter initialized by the wrong key was the one check that could not be made.

fn owner(env: soroban_sdk::Env) -> Result
fn pools(env: soroban_sdk::Env) -> soroban_sdk::Vec>

The one contract permitted to invoke this adapter.

A view, added in Phase 11 for scripts/verify_deployment.sh. The binding is the single most error-prone fact in a deployment — a venue reachable from three contracts needs three adapter instances, and one bound to the wrong caller passes every other check and fails on the first user call. A deployment invariant that cannot be read cannot be verified.

fn caller(env: soroban_sdk::Env) -> Result
fn router(env: soroban_sdk::Env) -> Result

Verification

Measured by this adapter's own balance delta across the router call, then swept. Measuring on the adapter rather than on the beneficiary is deliberate and matches soroswap-adapter: the beneficiary may already hold the token, and a delta on their balance would count what they came in with. The router's return values are ignored (ADR-007).

fn execute(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    action: Action,
    token_in: soroban_sdk::Address,
    amount: i128,
    beneficiary: soroban_sdk::Address,
    min_out: i128,
    params: AdapterParams,
) -> Result

Storage-layout version.

fn version(env: soroban_sdk::Env) -> u32

Owner-gated. Permits one pool, identified by both its token vector and its configuration hash.

Rejects an unsorted vector here as well as at call time, so a key that could never match a legal call cannot be stored in the first place.

fn allow_pool(
    env: soroban_sdk::Env,
    tokens: soroban_sdk::Vec,
    pool_index: soroban_sdk::BytesN<32>,
) -> Result<(), AdapterError>

caller is the vault or executor this adapter serves; router is the Aquarius router, fixed at initialisation because there is exactly one.

fn initialize(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    caller: soroban_sdk::Address,
    router: soroban_sdk::Address,
) -> Result<(), AdapterError>

Owner-gated.

fn revoke_pool(
    env: soroban_sdk::Env,
    tokens: soroban_sdk::Vec,
    pool_index: soroban_sdk::BytesN<32>,
) -> Result<(), AdapterError>

Whether this exact (tokens, pool_index) pair is permitted.

fn pool_allowed(
    env: soroban_sdk::Env,
    tokens: soroban_sdk::Vec,
    pool_index: soroban_sdk::BytesN<32>,
) -> bool
fn authorized_caller(
    env: soroban_sdk::Env,
) -> Result

Imports

WebAssembly Text (WAT) ▶