Contract 0f447bbd16eaa3bd2e0ea96a81db392740ef151246b95d33c43063d09b62432f

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 23.4.0#673d6c4f2368d282d25da29bda55c21b8be69ca6
rsver 1.95.0

Instances

  • CCOA3SWSRHPLIXKIQXCGP3KBG7VLAA3THE3FZQF6Y3UYGEE7LGNDT2JU

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) ▶