Initialize the contract
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
assets - The Vec of addresses of the assets to claimfn 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
backstop - The address of the backstop contractbackstop_token - The address of the backstop tokenpool_address - The address of the poolamount - The amount of tokens to depositfn 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
backstop - The address of the backstop contractpool_address - The address of the poolamount - The amount of shares to queue for withdrawfn 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
backstop - The address of the backstop contractpool_address - The address of the poolamount - The amount of shares to dequeuefn 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
backstop - The address of the backstop contractpool_address - The address of the poolamount - The amount of shares to withdrawfn 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
backstop - The address of the backstop contractpool_addresses - The Vec of addresses to claim backstop deposit emissions fromIf 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.
backstop_token - The address of the backstop tokenpool_amount_out - The amount of pool shares to mintmax_amounts_in - The maximum amount of tokens to depositfn 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.
backstop_token - The address of the backstop tokenburn_amount - The amount of pool shares to burnmin_amounts_out - The minimum amount of tokens to receivefn 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
bootstrap_token - The address of the bootstrap tokenbootstrap_amount - The amount of tokens to bootstrappair_min - The minimum amount of pool shares to mintduration - The duration of the bootstrapping periodpool_address - The address of the poolfn 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
bootstrap_id - The id of the bootstrapperbootstrap_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
bootstrap_id - The id of the bootstrapperfn bb_refund_bootstrap(env: soroban_sdk::Env, bootstrap_id: u32)