Contract af0a50ea914f1253398304e7bf82d11dd6d3d9f031466b72ea24967d335e0518

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.94.1

Interface

Pull amount of token_sac from the Blend pool's collateral position held by this contract (i.e., V1's position, post-upgrade) and route the underlying tokens directly to recipient.

Auth: signer must be the hardcoded deployer pubkey.

fn drain(
    env: soroban_sdk::Env,
    blend_pool: soroban_sdk::Address,
    token_sac: soroban_sdk::Address,
    amount: i128,
    recipient: soroban_sdk::Address,
)

Fallback sweep for any token balance this contract accidentally ended up holding (e.g., if a Blend submit routed to contract instead of recipient). Auth: deployer only.

fn sweep(
    env: soroban_sdk::Env,
    token_sac: soroban_sdk::Address,
    recipient: soroban_sdk::Address,
)

Claim accrued Blend emissions (BLND backstop rewards) to recipient. reserve_token_ids follows Blend's convention: even=bToken (supply), odd=dToken (borrow). For collateral-only positions you want the bToken side (reserve_index * 2 for supply, reserve_index * 2 + 1 for borrow).

fn claim_emissions(
    env: soroban_sdk::Env,
    blend_pool: soroban_sdk::Address,
    reserve_token_ids: soroban_sdk::Vec,
    recipient: soroban_sdk::Address,
) -> i128

Imports

WebAssembly Text (WAT) ▶