Contract f4e3dba6d9a3603fc5488f0937d08ebc4e9f53934dc08336fa828e2f8954ca95

← Back to Index 📥 Download WASM

Meta

rssdkver 20.5.0#9e2c3022b4355b224a7a814e13ba51761eeb14bb
rsver 1.77.2

Instances

  • CA4WP2X2TRLAPIVYRSFBVD34UYE33AZB5MREW232Y35BFF6R63N5MUQM
  • CDKF7WYFNOBMXRHQXGK2AHF3ONLUNYUAY5TYJPDJ2BBYAJS3FO3LFFSP

Interface

Initialize the contract

Arguments

  • backstop - The backstop address
  • backstop_token - The backstop token address
  • pool_factory_address - The pool factory address

Panics

  • AlreadyInitializedError - If the contract has already been initialized
fn initialize(
    env: soroban_sdk::Env,
    backstop: soroban_sdk::Address,
    backstop_token: soroban_sdk::Address,
    pool_factory_address: soroban_sdk::Address,
)

Fetch data for a bootstrap

Arguments

  • id - The id of the bootstrap
fn get_bootstrap(env: soroban_sdk::Env, id: u32) -> Bootstrap

Fetch the next bootstrap's ID. The previous (and most recently created) bootsrap's ID will be this value decremented by 1.

fn get_next_id(env: soroban_sdk::Env) -> u32

Fetch a deposit for a user in a bootstrap

Arguments

  • id - The id of the bootstrap
  • user - The address of the user
fn get_deposit(
    env: soroban_sdk::Env,
    id: u32,
    user: soroban_sdk::Address,
) -> DepositData

Add a new bootstrap

Returns the ID of the bootstrap

Arguments

  • config - The configuration for the bootstrap
fn bootstrap(env: soroban_sdk::Env, config: BootstrapConfig) -> u32

Join a bootstrap by depositing a given amount of pair tokens

Returns the total amount of pair tokens deposited by from in this bootstrap

Arguments

  • from - The address of the user joining the bootstrap
  • id - The bootstrap id to join
  • amount - The amount of tokens to join with
fn join(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    id: u32,
    amount: i128,
) -> i128

Exits a bootstrap by withdrawing a given amount of pair tokens

Returns the remaining amount of pair tokens deposited by from in this bootstrap

Arguments

  • from - The address of the user joining the bootstrap
  • id - The bootstrap id to join
  • amount - The amount of tokens to join with
fn exit(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    id: u32,
    amount: i128,
) -> i128

Close the bootstrap by depositing bootstrapping tokens into the comet

Arguments

  • id - The id of the bootstrap
fn close(env: soroban_sdk::Env, id: u32) -> i128

Claim and deposit pool tokens into backstop

Returns the amount of backstop shares minted

Arguments

  • from - The address of the user claiming their bootstrap proceeds
  • id - The address of the bootstrap initiator
fn claim(env: soroban_sdk::Env, from: soroban_sdk::Address, id: u32) -> i128

Refund funds from a cancelled bootstrap

Returns the amount of funds returned

Arguments

  • from - The address of the user claiming their bootstrap proceeds
  • id - The address of the bootstrap initiator
fn refund(env: soroban_sdk::Env, from: soroban_sdk::Address, id: u32) -> i128

Imports

WebAssembly Text (WAT) ▶