Contract 9c28ac89c1d486863e83081d25339ad57d02e299eed6147ac0e0718bfe9a91f4

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.84.1

Instances

  • CACZEAS44NKI6OAPSLGGTZXW3YEHUPRW6DDA4JM3QNGNVFJX3KMFBWVG

Interface

Initialize the backstop manager

Arguments

  • owner - The address of the owner of the funds
  • manager - The address of the manager of the funds
  • emitter - The address of the emitter contract
  • backstop_token - The address of the backstop token the manager can interact with. This is fixed as the backstop manager only supports the BLND-USDC LP token as the backstop token.
  • backstop - The addresses of the backstops the manager can interact with initially
  • pool - The addresses of the pools the manager can interact with initially

Errors

  • AlreadyInitializedError - The contract has already been initialized
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    manager: soroban_sdk::Address,
    emitter: soroban_sdk::Address,
    backstop_token: soroban_sdk::Address,
    backstop: soroban_sdk::Address,
    pool: soroban_sdk::Address,
)

(Only Owner) Transfer tokens from the manager contract to another address

Arguments

  • token - The address of the token to transfer
  • to - The address to transfer the tokens to
  • amount - The amount of tokens to transfer
fn transfer_token(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

(Only Owner) Set the manager for the contract

Arguments

  • manager - The address of the manager
fn set_manager(env: soroban_sdk::Env, manager: soroban_sdk::Address)
  • (Manager) Deposit and invoke emitter swap in one go *
    • Arguments

      • amount - The amount of tokens to deposit
      • max_amounts_in - The maximum amounts of tokens to swap in
fn deposit_swap(
    env: soroban_sdk::Env,
    amount: i128,
    max_amounts_in: soroban_sdk::Vec,
)

(Manager) Claim backstop deposit emissions from a list of pools for the contract

Returns the amount of BLND emissions claimed

Arguments

  • min_lp_tokens_out - The minimum amount of backstop tokens to mint with emissions

Errors

If an invalid pool address is included

fn claim(env: soroban_sdk::Env, min_lp_tokens_out: i128) -> i128

(Manager) Queue deposited pool shares from the contract for withdraw from a backstop of a pool

Returns the created queue for withdrawal

Arguments

  • amount - The amount of shares to queue for withdraw
fn queue_withdrawal(env: soroban_sdk::Env, amount: i128)

(Manager) Dequeue a currently queued pool share withdraw for the contract from the backstop of a pool

Arguments

  • amount - The amount of shares to dequeue
fn dequeue_withdrawal(env: soroban_sdk::Env, amount: i128)

(Manager) Withdraw shares from the contract's withdraw queue for a backstop of a pool

Returns the amount of tokens returned

Arguments

  • amount - The amount of shares to withdraw
fn withdraw(env: soroban_sdk::Env, amount: i128) -> i128

Imports

WebAssembly Text (WAT) ▶