Contract f6060459b9f9a2bf99ff17752674597262eef266a70b713a14e7de1d02d2fcd1

← Back to Index 📥 Download WASM

Meta

rssdkver 20.5.0#9e2c3022b4355b224a7a814e13ba51761eeb14bb
rsver 1.77.2

Instances

  • CAU4XS4HAJ5P6JRMQYKTUI36WOWB2H5EOSDBYCPZMTCO5XEFTGWQZLAE
  • CBJJOIRNZOFH5NGTU2SLFEAK4TB5P2KSOCOWTSWCTYNBSMMIBYFMFETV
  • CBOBO2GXRHGJNOOGYEOBEZDJQBOBSE6FKBPSEF52FTMEATKFNJBR2ATU
  • CC7KBDHAGNIHOGB3YXAMIAJS6DQPY2XKDXKQDJT5EDNRCKC3SMI3X7YZ
  • CCJGQ7FUZ7KTRRBMW3KJ2IUNKN2TTJ6HKEKUZVORQBALMJNTUT6XVYVH
  • CD7UCK6QPQVXGHI36HEVNAJXRO6GPFWSVBJDXK37ENL3DZ2NKEX5WM4S
  • CDJDJJYJU5DDX267RYB3RWYS6FFJXAXQABV2YNXJ3RGFEIR3X7B43UPQ

Interface

Initialize the contract

Arguments

  • owner - The owner of the contract
  • emitter - The address of the emitter contract
  • bootstrapper - The address of the backstop bootstrapper contract
  • unlock - The unlock time (in seconds since epoch)

Errors

  • AlreadyInitializedError - The contract has already been initialized
fn initialize(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    emitter: soroban_sdk::Address,
    bootstrapper: soroban_sdk::Address,
    unlock: u64,
)

Get owner

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

Get unlock time of the lockup

fn unlock(env: soroban_sdk::Env) -> u64

Get the emitter contract

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

Get the backstop contracts that have been recorded by the emitter

fn backstops(env: soroban_sdk::Env) -> soroban_sdk::Vec

Get the backstop token contracts that have been recorded by the emitter

fn backstop_tokens(env: soroban_sdk::Env) -> soroban_sdk::Vec

(Only Owner) Update the backstop contract and token from the emitter contract.

fn update_backstop(env: soroban_sdk::Env)

(Only Owner) Claim assets from the lockup

Arguments

  • assets - The Vec of addresses of the assets to claim

Errors

  • InvalidUnlockTime - The unlock time has not been reached
fn claim(env: soroban_sdk::Env, assets: soroban_sdk::Vec)

(Only Owner) Deposit "amount" backstop tokens from the lockup into the backstop for "pool_address"

Returns the number of backstop pool shares minted

Arguments

  • backstop - The address of the backstop contract
  • backstop_token - The address of the backstop token
  • pool_address - The address of the pool
  • amount - The amount of tokens to deposit
fn b_deposit(
    env: soroban_sdk::Env,
    backstop: soroban_sdk::Address,
    backstop_token: soroban_sdk::Address,
    pool_address: soroban_sdk::Address,
    amount: i128,
) -> i128

(Only Owner) Queue deposited pool shares from the lockup for withdraw from a backstop of a pool

Returns the created queue for withdrawal

Arguments

  • backstop - The address of the backstop contract
  • pool_address - The address of the pool
  • amount - The amount of shares to queue for withdraw
fn b_queue_withdrawal(
    env: soroban_sdk::Env,
    backstop: soroban_sdk::Address,
    pool_address: soroban_sdk::Address,
    amount: i128,
)

(Only Owner) Dequeue a currently queued pool share withdraw for the lockup from the backstop of a pool

Arguments

  • backstop - The address of the backstop contract
  • pool_address - The address of the pool
  • amount - The amount of shares to dequeue
fn b_dequeue_withdrawal(
    env: soroban_sdk::Env,
    backstop: soroban_sdk::Address,
    pool_address: soroban_sdk::Address,
    amount: i128,
)

(Only Owner) Withdraw shares from the lockup's withdraw queue for a backstop of a pool

Returns the amount of tokens returned

Arguments

  • backstop - The address of the backstop contract
  • pool_address - The address of the pool
  • amount - The amount of shares to withdraw
fn b_withdraw(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    pool_address: soroban_sdk::Address,
    amount: i128,
) -> i128

(Only Owner) Claim backstop deposit emissions from a list of pools for the lockup

Returns the amount of BLND emissions claimed

Arguments

  • backstop - The address of the backstop contract
  • pool_addresses - The Vec of addresses to claim backstop deposit emissions from

Errors

If an invalid pool address is included

fn b_claim(
    env: soroban_sdk::Env,
    backstop: soroban_sdk::Address,
    pool_addresses: soroban_sdk::Vec,
) -> i128

(Only Owner) Join a backstop token's liquidity pool. Requires that the backstop token implements the Comet interface.

Arguments

  • backstop_token - The address of the backstop token
  • pool_amount_out - The amount of pool shares to mint
  • max_amounts_in - The maximum amount of tokens to deposit
fn c_join_pool(
    env: soroban_sdk::Env,
    backstop_token: soroban_sdk::Address,
    pool_amount_out: i128,
    max_amounts_in: soroban_sdk::Vec,
)

(Only Owner) Exit a backstop token's liquidity pool. Requires that the backstop token implements the Comet interface.

Arguments

  • backstop_token - The address of the backstop token
  • burn_amount - The amount of pool shares to burn
  • min_amounts_out - The minimum amount of tokens to receive
fn c_exit_pool(
    env: soroban_sdk::Env,
    backstop_token: soroban_sdk::Address,
    burn_amount: i128,
    min_amounts_out: soroban_sdk::Vec,
)

(Only Owner) Creates a Backstop Bootstrapping with BLND

Arguments

  • bootstrap_token - The address of the bootstrap token
  • bootstrap_amount - The amount of tokens to bootstrap
  • pair_min - The minimum amount of pool shares to mint
  • duration - The duration of the bootstrapping period
  • pool_address - The address of the pool
fn bb_start_bootstrap(
    env: soroban_sdk::Env,
    bootstrap_token_index: u32,
    bootstrap_amount: i128,
    pair_min: i128,
    duration: u32,
    pool_address: soroban_sdk::Address,
)

(Only Owner) Claims the proceeds of a backstop bootstrapping

Arguments

  • bootstrap_id - The id of the bootstrapper
  • bootstrap_token_index - The index of the token being bootstrapped (must match with claimed bootstrap)
fn bb_claim_bootstrap(env: soroban_sdk::Env, bootstrap_id: u32)

(Only Owner) Refunds a cancelled backstop bootstrapping

Arguments

  • bootstrap_id - The id of the bootstrapper
fn bb_refund_bootstrap(env: soroban_sdk::Env, bootstrap_id: u32)

Imports

WebAssembly Text (WAT) ▶