Submit a milestone (freelancer completed the work). Requires freelancer authentication.
fn submit(env: soroban_sdk::Env, id: u32)
Deposit funds into a milestone. Requires client authentication.
fn deposit(env: soroban_sdk::Env, id: u32, amount: i128)
Dispute a milestone. Requires either client or freelancer authentication.
fn dispute(env: soroban_sdk::Env, caller: soroban_sdk::Address, id: u32)
Release milestone funds to the freelancer. Requires client authentication.
fn release(env: soroban_sdk::Env, id: u32)
Resolve a dispute. Requires arbitrator authentication.
fn resolve(env: soroban_sdk::Env, id: u32, freelancer_share: i128, client_share: i128)
fn get_token(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_client(env: soroban_sdk::Env) -> soroban_sdk::Address
Initialize the escrow contract with roles and the target payment token.
fn initialize(
env: soroban_sdk::Env,
client: soroban_sdk::Address,
freelancer: soroban_sdk::Address,
arbitrator: soroban_sdk::Address,
token: soroban_sdk::Address,
)
fn get_milestone(env: soroban_sdk::Env, id: u32) -> Option
fn get_arbitrator(env: soroban_sdk::Env) -> soroban_sdk::Address
fn get_freelancer(env: soroban_sdk::Env) -> soroban_sdk::Address
Cancel a milestone and refund to client. Initiated voluntarily by the freelancer.
fn refund_by_freelancer(env: soroban_sdk::Env, id: u32)