Contract 58f7fa8ec9a5c6c27284cf36481388aad0c2ed2f592715ad58c39766dcf7a0ff

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 23.4.0#673d6c4f2368d282d25da29bda55c21b8be69ca6
rsver 1.95.0

Instances

  • CAJJCRW4UC35HW5LIGDWNYSUWMAI2W5YB6FHDNRXPS3JOOJCWMPAHOPS
  • CDRGXDVGBUX6ZKQETKFGGZPAJCCQGRNOUQR2GYEYZEORVEQBXIKRPU6F

Interface

fn cancel(env: soroban_sdk::Env, request_id: u64)
fn upgrade(env: soroban_sdk::Env, wasm_hash: soroban_sdk::BytesN<32>)

Withdraws tokens, respecting the locked liquidity needed for pending claims

Panics

If the fund does not have enough free liquidity for available for withdraw

fn withdraw(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)
fn get_status(env: soroban_sdk::Env, request_id: u64) -> Option

Marks existing request as ready and locks the liquidity

Panics

If the fund does not have enough free liquidity to cover this request

fn mark_ready(env: soroban_sdk::Env, request_id: u64, covered_amount: i128)

Sets an insured market contract address in the storage

fn set_market(
    env: soroban_sdk::Env,
    market: soroban_sdk::Address,
) -> Result<(), ContractError>

Returns

Request with given request_id if exists

fn get_request(env: soroban_sdk::Env, request_id: u64) -> Option
fn add_reserves(env: soroban_sdk::Env, token: soroban_sdk::Address, amount: i128)

Constructs an account-controlled insurance fund contract

fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn claim_coverage(env: soroban_sdk::Env, request_id: u64) -> i128
fn request_coverage(
    env: soroban_sdk::Env,
    token: soroban_sdk::Address,
    amount: i128,
) -> IssueRequestResult

Proposes a new fund's admin

fn propose_new_admin(
    env: soroban_sdk::Env,
    proposed_admin: soroban_sdk::Address,
) -> Result<(), ContractError>

Updates market status (Descriptive/Helper). Funds can decide that a market is not insured enough to proceed safely and update its status accordingly. Owned market admins can always overwrite this behavior

fn update_market_status(env: soroban_sdk::Env, new_status: u32)
fn accept_proposed_admin(env: soroban_sdk::Env) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶