Contract dc88e79071959a9c1c2afb93456878209301f27ca520329356e492153a4a241e

← Back to Index 📥 Download WASM

Meta

rssdkver 23.5.3#d3e1ab2424388b10893b796b0c8e405c5edd03d2
rsver 1.94.0

Instances

  • CCXR453OZN5SVVP6AHAHGXRNPTAZ72R5I5CAV4VKLGOVO24ZFXPUPRYZ

Interface

Initialize the adapter with admin only. Can only be called once. No pool is registered at initialization — use register_pool to add pools.

fn initialize(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Get all position values for an account across all registered Blend pools.

Called by PositionRegistry as: adapter.get_all_pos(account, oracle_registry, accounting_token, enabled_position_ids)

enabled_position_ids — the set of position IDs that are enabled in the registry for this account/protocol. Each pool at index i has position_id Symbol INDEX_STRS[i].

Per-pool error isolation: if any pool call fails, that pool is skipped (try_invoke).

fn get_all_pos(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    oracle_registry: soroban_sdk::Address,
    accounting_token: soroban_sdk::Address,
    enabled_position_ids: soroban_sdk::Vec,
) -> soroban_sdk::Vec

Remove a pool by index using swap-with-last removal. Admin only.

fn remove_pool(env: soroban_sdk::Env, index: u32)

Accept a pending admin proposal (step 2 of two-step transfer).

Must be called by the pending_admin address. Overwrites the current admin with pending_admin and clears the pending slot.

fn accept_admin(env: soroban_sdk::Env)

Propose a new admin (step 1 of two-step transfer). Admin only.

Writes the pending_admin storage key but does NOT overwrite the current admin. The new admin must call accept_admin() to complete the transfer. This prevents permanent lock-out from a typo or misrouted address.

fn propose_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Register a single Blend pool address. Admin only. Panics if pool is already registered or pool limit is reached.

fn register_pool(env: soroban_sdk::Env, pool: soroban_sdk::Address)

Return the number of registered pools.

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

Return adapter info: (protocol_id, name, version).

fn get_adapter_info(
    env: soroban_sdk::Env,
) -> (soroban_sdk::Symbol, soroban_sdk::Symbol, u32)

Enable or disable a specific pool (circuit-breaker). Admin only.

fn set_pool_enabled(env: soroban_sdk::Env, index: u32, enabled: bool)

Register multiple Blend pools at once. Skips duplicates silently. Admin only.

fn register_pools_batch(
    env: soroban_sdk::Env,
    pools: soroban_sdk::Vec,
)

Imports

WebAssembly Text (WAT) ▶