Contract b6ef5d773b2debd556d9aea2478a1627a81106a25b89dfe996f6c7eadd6529de

← Back to Index 📥 Download WASM

Meta

rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.91.1

Instances

  • CDRONMSFK2FYPGU3BNFLNDEHKMZJJS6RQ4RWCN4OV4KRPCYU6IKBUPDB

Interface

Initialize factory with config

fn init(
    env: soroban_sdk::Env,
    adm: soroban_sdk::Address,
    wasm: soroban_sdk::BytesN<32>,
    xlm: soroban_sdk::Address,
    fee: i128,
) -> Result<(), Err>

Get pool by address

fn pool(env: soroban_sdk::Env, adr: soroban_sdk::Address) -> Result

Sync TVL/staker count from pool (called by staking contracts) Pool calls sync(self) and factory fetches stats from the pool

fn sync(env: soroban_sdk::Env, pool: soroban_sdk::Address) -> Result<(), Err>

List pools with pagination

fn pools(env: soroban_sdk::Env, from: u32, lim: u32) -> soroban_sdk::Vec

Get platform stats: (pool_count, total_stakers, total_tvl)

fn stats(env: soroban_sdk::Env) -> (u32, u32, i128)

Get config

fn config(env: soroban_sdk::Env) -> Result

Deploy new staking pool

fn deploy(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    token: soroban_sdk::Address,
    min: i128,
    max: i128,
) -> Result

Update deploy fee

fn set_fee(env: soroban_sdk::Env, fee: i128) -> Result<(), Err>

Get pools by owner

fn by_owner(env: soroban_sdk::Env, own: soroban_sdk::Address) -> soroban_sdk::Vec

Update WASM hash for new pool deployments

fn set_wasm(env: soroban_sdk::Env, wasm: soroban_sdk::BytesN<32>) -> Result<(), Err>

Update admin address

fn set_admin(env: soroban_sdk::Env, new: soroban_sdk::Address) -> Result<(), Err>

Withdraw collected fees to admin

fn withdraw_fees(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), Err>

Imports

WebAssembly Text (WAT) ▶