Contract 91d5ab7e075d533a9404373453a548bc21c3d2893d78f9782785985f396b4454

← Back to Index 📥 Download WASM

Meta

cliver 28.1.0#c0f4d0da891bbf214c08b8c5035ae6db80e9a3bd
rssdkver 26.1.1#8ac18efb681a1c0b4b85a38c5a380300344e3f39
rsver 1.97.1

Instances

  • CAE54B6CIQ3XB3VT7T4ZQ4FN6BNQZ3FZX3EPIKXVXAZZTZP63F5U4HKN

Interface

Spend xlm_in stroops (fee included) on token's curve. The last buy of a curve is capped at what completes it and only that is taken. Returns the tokens bought.

fn buy(
    env: soroban_sdk::Env,
    buyer: soroban_sdk::Address,
    token: soroban_sdk::Address,
    xlm_in: i128,
    min_out: i128,
) -> i128

Sell amount tokens back to the curve for XLM (fee taken). Returns the XLM paid out.

fn sell(
    env: soroban_sdk::Env,
    seller: soroban_sdk::Address,
    token: soroban_sdk::Address,
    amount: i128,
    min_out: i128,
) -> i128

Launch a token on pad: deploys the token (whole supply to the hub), takes the launch fee and runs the creator's first_buy (XLM stroops, fee included; 0 for none). params_hash is params_hash(pad) as the launcher saw it (None skips the check). Returns the token address.

fn launch(
    env: soroban_sdk::Env,
    creator: soroban_sdk::Address,
    pad: u64,
    name: soroban_sdk::String,
    symbol: soroban_sdk::String,
    image_uri: soroban_sdk::String,
    params_hash: Option>,
    first_buy: i128,
    first_buy_min_out: i128,
) -> soroban_sdk::Address
fn get_pad(env: soroban_sdk::Env, pad: u64) -> Option

Extend the TTL of a pad, its slug and the hub (anyone may call; trades extend on their own).

fn bump_pad(env: soroban_sdk::Env, pad: u64)

Move a complete curve into its Aquarius pool (permissionless; caller is paid the bounty). A pool that has to be created (the Aquarius AQUA fee bought with XLM from the raise) takes a call of its own, paid half the bounty; the next call deposits the liquidity and is paid the rest (one transaction would sit near the network's memory limit). With the pool already there, one call does both. Returns the curve status: 2 = pool created, call again; 3 = graduated.

fn graduate(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token: soroban_sdk::Address,
) -> u32
fn get_curve(env: soroban_sdk::Env, token: soroban_sdk::Address) -> Option

(tokens out, XLM used fee included, fee); zeros unless live

fn quote_buy(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    xlm_in: i128,
) -> (i128, i128, i128)
fn bump_curve(env: soroban_sdk::Env, token: soroban_sdk::Address)

Create a launchpad; owner pays the creation fee to the treasury.

fn create_pad(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    slug: soroban_sdk::String,
    metadata_uri: soroban_sdk::String,
    params: CurveParams,
) -> u64
fn get_config(env: soroban_sdk::Env) -> Config
fn get_counts(env: soroban_sdk::Env) -> (u64, u64)

the token address the next launch will get

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

(XLM out after the fee, fee); zeros unless live

fn quote_sell(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    amount: i128,
) -> (i128, i128)
fn set_params(env: soroban_sdk::Env, pad: u64, params: CurveParams)
fn params_hash(env: soroban_sdk::Env, pad: u64) -> soroban_sdk::BytesN<32>
fn set_creator(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    new_creator: soroban_sdk::Address,
)
fn set_treasury(env: soroban_sdk::Env, treasury: soroban_sdk::Address)
fn __constructor(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    creation_fee: i128,
    platform_bps: u32,
    graduation_bounty: i128,
    token_wasm: soroban_sdk::BytesN<32>,
    router: soroban_sdk::Address,
    xlm: soroban_sdk::Address,
    pool_fee: u32,
    aqua_pool: soroban_sdk::BytesN<32>,
    pool_cost_max: i128,
)
fn slug_available(env: soroban_sdk::Env, slug: soroban_sdk::String) -> bool
fn get_pad_by_slug(env: soroban_sdk::Env, slug: soroban_sdk::String) -> Option

the graduation pool tier, the AQUA source pool and the XLM cap for a new pool's AQUA fee

fn set_pool_config(
    env: soroban_sdk::Env,
    pool_fee: u32,
    aqua_pool: soroban_sdk::BytesN<32>,
    pool_cost_max: i128,
)
fn accept_ownership(env: soroban_sdk::Env)

Pay the pad owner's fees (anyone may call).

fn claim_owner_fees(env: soroban_sdk::Env, pad: u64) -> i128
fn set_creation_fee(env: soroban_sdk::Env, creation_fee: i128)
fn set_metadata_uri(env: soroban_sdk::Env, pad: u64, metadata_uri: soroban_sdk::String)

new pads only: existing pads keep their snapshot

fn set_platform_bps(env: soroban_sdk::Env, platform_bps: u32)

Pay the creator's accrued fees (anyone may call).

fn claim_creator_fees(env: soroban_sdk::Env, token: soroban_sdk::Address) -> i128

Claim the AQUA rewards of a graduated curve's LP shares to the treasury (anyone may call).

fn claim_pool_rewards(env: soroban_sdk::Env, token: soroban_sdk::Address) -> i128
fn transfer_ownership(env: soroban_sdk::Env, new_owner: soroban_sdk::Address)

Pay ANYCHAIN's share of a pad's fees to the treasury (anyone may call).

fn claim_platform_fees(env: soroban_sdk::Env, pad: u64) -> i128
fn accept_pad_ownership(env: soroban_sdk::Env, pad: u64)

new pads only: existing pads keep their snapshot

fn set_graduation_bounty(env: soroban_sdk::Env, graduation_bounty: i128)
fn transfer_pad_ownership(
    env: soroban_sdk::Env,
    pad: u64,
    new_owner: soroban_sdk::Address,
)

Imports

WebAssembly Text (WAT) ▶