fn cancel(env: soroban_sdk::Env, agreement_id: u64) -> Result<(), soroban_sdk::Error>
fn complete(env: soroban_sdk::Env, agreement_id: u64) -> Result<(), soroban_sdk::Error>
fn get_count(env: soroban_sdk::Env) -> u64
fn post_bond(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result<(), soroban_sdk::Error>
Lets the recipient (the trader field) exit a Pending agreement and
recover their bond if the sender never funds it. There is no deadline in
Pending, so without this the bond could be stranded by an absent sender.
Returns the bond to the recipient and any already-deposited capital to the
sender, then cancels.
fn reclaim_bond(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result<(), soroban_sdk::Error>
Runs once at deploy. admin is reserved for future dispute resolution.
fn __constructor(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn get_agreement(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result
fn get_reputation(env: soroban_sdk::Env, trader: soroban_sdk::Address) -> Reputation
fn deposit_capital(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result<(), soroban_sdk::Error>
fn create_agreement(
env: soroban_sdk::Env,
investor: soroban_sdk::Address,
trader: soroban_sdk::Address,
token: soroban_sdk::Address,
capital: i128,
bond: i128,
milestones: u32,
profit_share_bps: u32,
duration: u64,
) -> Result
fn emergency_refund(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result<(), soroban_sdk::Error>
fn release_milestone(
env: soroban_sdk::Env,
agreement_id: u64,
) -> Result