Constructs an account-controlled insurance fund contract
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
Sets an insured market contract address in the storage
fn set_market(
env: soroban_sdk::Env,
market: soroban_sdk::Address,
) -> Result<(), ContractError>
Request with given request_id if exists
fn get_request(env: soroban_sdk::Env, request_id: u64) -> Option
Withdraws tokens, respecting the locked liquidity needed for pending claims
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,
)
Marks existing request as ready and locks the liquidity
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)
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)
Proposes a new fund's admin
fn propose_new_admin(
env: soroban_sdk::Env,
proposed_admin: soroban_sdk::Address,
) -> Result<(), ContractError>
fn accept_proposed_admin(env: soroban_sdk::Env) -> Result<(), ContractError>
fn add_reserves(env: soroban_sdk::Env, token: soroban_sdk::Address, amount: i128)
fn request_coverage(
env: soroban_sdk::Env,
token: soroban_sdk::Address,
amount: i128,
) -> IssueRequestResult
fn get_status(env: soroban_sdk::Env, request_id: u64) -> Option
fn claim_coverage(env: soroban_sdk::Env, request_id: u64) -> i128
fn cancel(env: soroban_sdk::Env, request_id: u64)