How trustless-work/trustless-work-smart-escrow works
Project type and purpose
• This is a Rust-based smart-contract project targeting Stellar’s Soroban environment.
• It provides a “trustless escrow” system: clients deposit stablecoins (e.g., USDC) into an escrow contract; funds are released to freelancers upon milestone approval or returned/refunded in case of disputes.
• A second “test-token” contract exists purely for development/demo, modeling standard token behavior.
File structure
Top-level files:
• Cargo.toml/lock – Rust project manifests.
• README, guidelines, GitHub templates.
contracts/escrow:
• src/lib.rs, contract.rs – entry point defining contract interface.
• core/ – business logic modules: escrow.rs, milestone.rs, dispute.rs.
• core/validators – input/state validation.
• events/handler.rs – emitting on-chain events.
• modules/fee, math, token – submodules for fee calculation, safe arithmetic, token transfer.
• storage/types.rs – data schema for on-chain storage.
• tests/ – unit tests.
contracts/test-token:
• Standard token modules (balance, allowance, metadata, admin, etc.).
README for additional insights
• No frontend in this repo—interaction is via Stellar CLI or external API layer (docs at docs.trustlesswork.com).
• Deployment steps: build → install → deploy to Testnet, using wasm32 target.
• External dependencies: stellar-cli, Soroban testnet RPC.
Elements
• Another for off-chain tools/actors (CLI, API, users)
– Annotations for technologies (e.g., Rust, wasm, Soroban CLI, Stellar Testnet RPC URL).