Contract bb8f831a785d871b98169a1727e8ee8a831a070959eccd2225d9fc27a223a62e

← Back to Index 📥 Download WASM

Meta

cliver 25.1.0#a048a57a75762458b487052e0021ea704a926bee
rssdkver 25.0.2#59a2e01a26f9330f8d516690911cb2ca87a6f1b3
rsver 1.89.0

Interface

Initialize the pool contract

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    seller: soroban_sdk::Address,
    fee_percent: u32,
    usdc_token: soroban_sdk::Address,
)

Set Blend pool addresses (admin only)

fn set_blend_pools(
    env: soroban_sdk::Env,
    blend_pool_usdc: soroban_sdk::Address,
    blend_pool_xlm: soroban_sdk::Address,
)

Deposit funds for an order (buyer calls directly)

fn deposit(
    env: soroban_sdk::Env,
    buyer: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    order_id: u64,
)

Withdraw collateral from Blend pool back to contract (admin only)

fn withdraw_from_blend(env: soroban_sdk::Env, amount_usdc: i128, amount_xlm: i128)

Settle deposits to seller

fn settle(env: soroban_sdk::Env) -> (i128, i128)

Get current pool status

fn get_status(env: soroban_sdk::Env) -> (i128, i128, bool)

Get yield information

fn get_yield_info(env: soroban_sdk::Env) -> (i128, i128)

Withdraw accumulated platform yield (admin only)

fn withdraw_yield(
    env: soroban_sdk::Env,
    recipient: soroban_sdk::Address,
) -> (i128, i128)

Update seller address (admin only)

fn set_seller(env: soroban_sdk::Env, new_seller: soroban_sdk::Address)

Update fee percentage (admin only)

fn set_fee_percent(env: soroban_sdk::Env, new_fee_percent: u32)

Update Blend USDC token address (admin only) This is the USDC variant that gets supplied to the Blend pool

fn set_blend_usdc_token(
    env: soroban_sdk::Env,
    new_blend_usdc_token: soroban_sdk::Address,
)

Claim BLND emissions from the Blend pool (admin only)

Calls the Blend pool's claim function to collect accrued BLND emissions for this contract's supply/collateral positions.

Arguments

  • reserve_token_ids - Vec of emission indices to claim (e.g., 6 = USDC supply emissions. Formula: reserve_index * 2 for supply)
fn claim_emissions(
    env: soroban_sdk::Env,
    reserve_token_ids: soroban_sdk::Vec,
) -> i128

Upgrade contract WASM (admin only)

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Imports

WebAssembly Text (WAT) ▶