Contract 0f770d0d25e6f61477d6eabc86dedab6a898f39aa706bfc83fb3556a84608c81

← Back to Index 📥 Download WASM

Meta

Description Phoenix Protocol LP Share token staking
cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 22.0.7#211569aa49c8d896877dfca1f2eb4fe9071121c8
rsver 1.81.0

Instances

  • CBUS3GWDBJYOLYC7PA3JCFQPPHXCX7U3TBHQSVCSTSNG6GH6WU4L74UE

Interface

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    lp_token: soroban_sdk::Address,
    min_bond: i128,
    min_reward: i128,
    manager: soroban_sdk::Address,
    owner: soroban_sdk::Address,
    max_complexity: u32,
)

Admin-only. Materialize pre-existing stake positions on behalf of users (used for pool-migration / recovery deploys). Callable multiple times to fit into per-tx compute/write budgets.

For every call, the caller (admin) must hold LP tokens equal to the batch sum; the batch total is transferred from admin to this contract as part of the same tx. Each entry MUST reference a user with no prior stake position; attempting to seed the same user twice panics.

fn seed_stakes(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    entries: soroban_sdk::Vec<(soroban_sdk::Address, i128)>,
)
fn bond(env: soroban_sdk::Env, sender: soroban_sdk::Address, tokens: i128)
fn unbond(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    stake_amount: i128,
    stake_timestamp: u64,
)
fn create_distribution_flow(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    asset: soroban_sdk::Address,
)
fn distribute_rewards(
    env: soroban_sdk::Env,
    sender: soroban_sdk::Address,
    amount: i128,
    reward_token: soroban_sdk::Address,
)
fn withdraw_rewards(env: soroban_sdk::Env, sender: soroban_sdk::Address)
fn query_config(env: soroban_sdk::Env) -> ConfigResponse
fn query_admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn query_staked(env: soroban_sdk::Env, address: soroban_sdk::Address) -> StakedResponse
fn query_total_staked(env: soroban_sdk::Env) -> i128
fn query_withdrawable_rewards(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
) -> WithdrawableRewardsResponse
fn migrate_admin_key(env: soroban_sdk::Env) -> Result<(), ContractError>
fn update(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Imports

WebAssembly Text (WAT) ▶