Contract 11b4bacca38f670e792b7a1bbd6c6888f9e572c06e1def9cc5adf9294403bbb2

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdk_spec_shaking 2
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.96.0

Instances

  • CBRT4E5AH23GMRQI7H6HQW54HMDMK4C23OO2CEN5OHWEOSRYBQZCMYBC
  • CCECATRPUHLMFTIUQDQQPOU5GLXQGJYGBJHKSFMWJYOFEIFNN3MOQWU3

Interface

fn mint(
    env: soroban_sdk::Env,
    shares: i128,
    receiver: soroban_sdk::Address,
    from: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> i128

Returns the name for this token.

Arguments

  • e - Access to Soroban environment.
fn name(env: soroban_sdk::Env) -> soroban_sdk::String

The Blend pool this wrapper supplies into.

fn pool(env: soroban_sdk::Env) -> soroban_sdk::Address
fn wrap(
    env: soroban_sdk::Env,
    vault_shares: i128,
    receiver: soroban_sdk::Address,
    caller: soroban_sdk::Address,
) -> i128

The current admin (role administrator). None if uninitialized.

fn admin(env: soroban_sdk::Env) -> Option

Pause. Requires PAUSER.

fn pause(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Whether paused.

fn paused(env: soroban_sdk::Env) -> bool

Burn shares, withdraw their floor underlying value from the pool straight to receiver. The pool burns at most shares bTokens.

fn redeem(
    env: soroban_sdk::Env,
    shares: i128,
    receiver: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> i128

Returns the symbol for this token.

Arguments

  • e - Access to Soroban environment.
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn unwrap(
    env: soroban_sdk::Env,
    shares: i128,
    receiver: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> i128

Sets the amount of tokens a spender is allowed to spend on behalf of an owner. Overrides any existing allowance set between spender and owner.

Arguments

  • e - Access to Soroban environment.
  • owner - The address holding the tokens.
  • spender - The address authorized to spend the tokens.
  • amount - The amount of tokens made available to spender.
  • live_until_ledger - The ledger number at which the allowance expires.

Errors

  • [FungibleTokenError::InvalidLiveUntilLedger] - Occurs when attempting to set live_until_ledger that is less than the current ledger number and greater than 0.
  • [FungibleTokenError::LessThanZero] - Occurs when amount < 0.

Events

  • topics - ["approve", from: Address, spender: Address]
  • data - [amount: i128, live_until_ledger: u32]
fn approve(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    live_until_ledger: u32,
)

Returns the amount of tokens held by account.

Arguments

  • e - Access to the Soroban environment.
  • account - The address for which the balance is being queried.
fn balance(env: soroban_sdk::Env, account: soroban_sdk::Address) -> i128

Pull underlying from from, supply it to the pool, mint the bToken position delta as shares to receiver.

fn deposit(
    env: soroban_sdk::Env,
    assets: i128,
    receiver: soroban_sdk::Address,
    from: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> i128

Unpause. Requires PAUSER.

fn unpause(env: soroban_sdk::Env, caller: soroban_sdk::Address)

Upgrade the contract Wasm. Requires UPGRADE.

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

Returns the number of decimals used to represent amounts of this token.

Arguments

  • e - Access to Soroban environment.
fn decimals(env: soroban_sdk::Env) -> u32

Whether account holds role.

fn has_role(
    env: soroban_sdk::Env,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
) -> bool
fn max_mint(env: soroban_sdk::Env, receiver: soroban_sdk::Address) -> i128
fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::MuxedAddress,
    amount: i128,
)

Burn ceil shares to pay exactly assets to receiver — Blend's Withdraw request is natively asset-denominated.

fn withdraw(
    env: soroban_sdk::Env,
    assets: i128,
    receiver: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> i128

Returns the amount of tokens a spender is allowed to spend on behalf of an owner.

Arguments

  • e - Access to Soroban environment.
  • owner - The address holding the tokens.
  • spender - The address authorized to spend the tokens.
fn allowance(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128

Grant role to account.

fn grant_role(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
)

Owner's shares clamped to serviceable liquidity.

fn max_redeem(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> i128

Supply-cap headroom in underlying, or 0 when paused/disabled.

fn max_deposit(env: soroban_sdk::Env, receiver: soroban_sdk::Address) -> i128

The underlying asset. Defaults to the wrapped token (vault_share).

fn query_asset(env: soroban_sdk::Env) -> soroban_sdk::Address

Revoke role from account.

fn revoke_role(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    account: soroban_sdk::Address,
    role: soroban_sdk::Symbol,
)

Blend has no bToken contract; the pool address is exposed via pool().

fn vault_share(env: soroban_sdk::Env) -> soroban_sdk::Address

Owner's position clamped to serviceable underlying liquidity.

fn max_withdraw(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> i128
fn preview_mint(env: soroban_sdk::Env, shares: i128) -> i128
fn preview_wrap(env: soroban_sdk::Env, vault_shares: i128) -> i128
fn total_assets(env: soroban_sdk::Env) -> i128

Returns the total amount of tokens in circulation.

Arguments

  • e - Access to the Soroban environment.
fn total_supply(env: soroban_sdk::Env) -> i128

Wrap a Blend position in pool on the reserve asset. Metadata is derived from the underlying asset; admin receives every role.

fn __constructor(
    env: soroban_sdk::Env,
    pool: soroban_sdk::Address,
    asset: soroban_sdk::Address,
    admin: soroban_sdk::Address,
)
fn claim_rewards(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    function: soroban_sdk::Symbol,
    args: soroban_sdk::Vec,
) -> soroban_sdk::Val

The rewards proxy, or None when unset. See {ISpectra4626Wrapper-rewardsProxy}.

fn rewards_proxy(env: soroban_sdk::Env) -> Option
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn preview_redeem(env: soroban_sdk::Env, shares: i128) -> i128
fn preview_unwrap(env: soroban_sdk::Env, shares: i128) -> i128
fn preview_deposit(env: soroban_sdk::Env, assets: i128) -> i128
fn preview_withdraw(env: soroban_sdk::Env, assets: i128) -> i128
fn convert_to_assets(env: soroban_sdk::Env, shares: i128) -> i128
fn convert_to_shares(env: soroban_sdk::Env, assets: i128) -> i128
fn set_rewards_proxy(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    new_rewards_proxy: Option,
)

The wrapper's bToken position in the pool.

fn total_vault_shares(env: soroban_sdk::Env) -> i128

Propose new_admin as the next admin. Two-step: the proposed admin must then call accept_admin_transfer before live_until_ledger. Requires the current admin's auth (enforced inside stellar-access).

fn transfer_admin_role(
    env: soroban_sdk::Env,
    new_admin: soroban_sdk::Address,
    live_until_ledger: u32,
)

wrap with ERC-5143 slippage protection: reverts when the minted wrapper shares are below min_shares.

fn wrap_with_min_shares(
    env: soroban_sdk::Env,
    vault_shares: i128,
    receiver: soroban_sdk::Address,
    caller: soroban_sdk::Address,
    min_shares: i128,
) -> i128

Accept a pending admin role. Requires the proposed admin's auth (enforced inside stellar-access).

fn accept_admin_transfer(env: soroban_sdk::Env)

unwrap with ERC-5143 slippage protection: reverts when the returned vault shares are below min_vault_shares.

fn unwrap_with_min_vault_shares(
    env: soroban_sdk::Env,
    shares: i128,
    receiver: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
    min_vault_shares: i128,
) -> i128

The pool's to_asset_from_b_token (and its ceil counterpart).

fn convert_to_assets_with_rounding(
    env: soroban_sdk::Env,
    shares: i128,
    rounding: Rounding,
) -> i128

1 share = 1 bToken: the pool's to_b_token_down/to_b_token_up.

fn convert_to_shares_with_rounding(
    env: soroban_sdk::Env,
    assets: i128,
    rounding: Rounding,
) -> i128

Imports

WebAssembly Text (WAT) ▶