Contract fc5ecbaf838665560cb4461818fc1adfe0a118aec9ce987c11604fe2f60f45d4

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.10#9a1b75b509a5053b676b09fdbd224fe8c5f2fcd5
rsver 1.94.0

Interface

fn fund(env: soroban_sdk::Env, user: soroban_sdk::Address, amount: i128)
fn claim(env: soroban_sdk::Env, user: soroban_sdk::Address)
fn refund(env: soroban_sdk::Env, user: soroban_sdk::Address)
fn mint_lp(env: soroban_sdk::Env)

Finalize the raise after deadline. If min_threshold met: take platform fee, send 20% to AMM, keep 80% in escrow as treasury. If not met: set to Refunding.

fn finalize(env: soroban_sdk::Env)
fn get_status(env: soroban_sdk::Env) -> u32
fn initialize(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    project_treasury: soroban_sdk::Address,
    amm_pool: soroban_sdk::Address,
    min_threshold: i128,
    max_goal: i128,
    deadline: u64,
    token_contract: soroban_sdk::Address,
    token_price: i128,
    admin: soroban_sdk::Address,
    platform_config: PlatformConfig,
)
fn get_proposal(env: soroban_sdk::Env, proposal_id: u32) -> SpendingProposal

Approve a spending proposal. Only signers can approve.

fn approve_spend(env: soroban_sdk::Env, signer: soroban_sdk::Address, proposal_id: u32)

Execute a spending proposal after enough approvals. Anyone can call this — it just checks that the threshold is met.

fn execute_spend(env: soroban_sdk::Env, proposal_id: u32)

Propose a treasury withdrawal. Only signers or admin can propose. Returns the proposal ID.

fn propose_spend(
    env: soroban_sdk::Env,
    proposer: soroban_sdk::Address,
    amount: i128,
    recipient: soroban_sdk::Address,
) -> u32
fn get_total_score(env: soroban_sdk::Env) -> i128
fn get_contribution(
    env: soroban_sdk::Env,
    user: soroban_sdk::Address,
) -> Option
fn get_raise_params(env: soroban_sdk::Env) -> RaiseParams
fn get_total_raised(env: soroban_sdk::Env) -> i128

Configure spending controls. Can only be called by admin, and only once. Sets the monthly spend limit, required approvals (M), and signer addresses.

fn configure_spending(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    monthly_limit: i128,
    required_approvals: u32,
    signers: soroban_sdk::Vec,
)
fn get_spending_config(env: soroban_sdk::Env) -> SpendingConfig
fn get_treasury_balance(env: soroban_sdk::Env) -> i128

Imports

WebAssembly Text (WAT) ▶