Skip to content

johnsaviour56-ship-it/StarInvoice

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarInvoice

An invoice-based escrow protocol for freelancers, built on Stellar using Soroban smart contracts.

Overview

StarInvoice lets freelancers create on-chain invoices and receive payment through a trustless escrow flow. The client funds the invoice, the freelancer marks work as delivered, and funds are released upon approval — no intermediaries needed.

Status

This project is intentionally minimal. The create_invoice function is implemented. All other escrow functions are stubbed with TODO comments and open GitHub issues for contributors to pick up.

Contract Flow

create_invoice → fund_invoice → mark_delivered → approve_payment → release_payment

State Machine

stateDiagram-v2
    [*] --> Pending : create_invoice
    Pending --> Funded : fund_invoice
    Pending --> Cancelled : cancel_invoice
    Funded --> Delivered : mark_delivered
    Funded --> Cancelled : cancel_invoice
    Delivered --> Approved : approve_payment
    Delivered --> Disputed : dispute_invoice
    Disputed --> Approved : resolve_dispute
    Disputed --> Cancelled : resolve_dispute
    Approved --> Completed : release_payment
    Completed --> [*]
    Cancelled --> [*]
Loading

Note: Disputed and Cancelled states are planned — see issue #5.

Function Status
create_invoice ✅ Implemented
fund_invoice 🚧 TODO
mark_delivered 🚧 TODO
approve_payment 🚧 TODO
release_payment 🚧 TODO

Project Structure

contracts/
  invoice/
    src/
      lib.rs       # Contract entry point and function definitions
      storage.rs   # Invoice data structures and on-chain storage helpers
      events.rs    # Contract event emitters

Prerequisites

cargo install --locked soroban-cli

Build

cargo build --target wasm32-unknown-unknown --release

Test

cargo test

Contributing

See CONTRIBUTING.md for how to get involved.

License

MIT

About

Invoice-based escrow protocol enabling freelancers to create and settle invoices on Stellar using Soroban smart contracts.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Rust 100.0%