Skip to content
 
 

Repository files navigation

COMEBACKHERE Contracts

WASM Build Check Test Lint Format Pre-commit Coverage Contract Size ABI Snapshot Drift Check Deny Init Contracts Smoke Test Changelog Release Check

Rust & Soroban smart contracts powering the COMEBACKHERE Protocol.

This repository contains the core on-chain components that power the COMEBACKHERE Protocol on the Stellar network. It manages invoice escrow, payment verification, treasury settlement, and compliance controls while providing a secure and auditable foundation for protocol operations.


Overview

The smart contracts in this repository are responsible for:

  • Managing invoice escrow and lifecycle
  • Validating and recording payments
  • Executing multi-signature treasury settlements
  • Enforcing compliance through allowlists and blocklists

Built with Rust and Soroban, these contracts prioritize security, performance, and maintainability.


Repository Structure

contracts/
├── invoice/       # Invoice escrow state machine and payment lifecycle
├── treasury/      # 2-of-3 multisignature treasury settlement workflow
└── compliance/    # Admin-managed allowlist and blocklist controls
Contract Purpose
invoice Manages invoice creation, escrow state, and payment confirmation
treasury Handles secure multi-signature settlement approvals (2-of-3)
compliance Maintains protocol allowlists and blocklists for compliance enforcement

Contributing via open issues

This repository maintains two cohesive rounds of issues — an initial foundational set and a follow-up round building on those foundations. Many issues are independent; some explicitly depend on others landing first.

New contributor orientation:

  1. Check the Issues tab and filter by labels (e.g., Stellar Wave, easy, hard) to find work that fits your scope.
  2. You must request assignment before starting. Comment on the issue asking for assignment; an issue must be assigned to you before you begin work.
  3. Some issues in the current wave depend on others in the same wave. Read the full issue description to check for dependency notes.
  4. If you discover an issue is already resolved by a recent change, or is a duplicate of another unnoticed issue, comment to flag it for triage rather than opening conflicting work.

For detailed branch naming, commit message, and pull request conventions, see CONTRIBUTING.md.


Development

Format the Code

Using Just:

just fmt

Or directly with Cargo:

cargo fmt --all

Run the Linter

Using Just:

just lint

Or with Cargo:

cargo clippy -- -D warnings

Run Tests

Using Just:

just test

Or with Cargo:

cargo test

Run All Checks

Execute formatting, linting, and tests in a single command:

just check

Mirror the Pre-commit CI Job Locally

Run the exact same command sequence, in the same order, as the Pre-commit CI job (cargo fmt --all -- --check, cargo clippy -- -D warnings, scripts/check-enum-ordering.sh):

Using Just:

just precommit

Or with Make:

make precommit

Run a Local Stellar Network

Start a local Stellar quickstart network matching the exact image, environment variables, and port used by the Init Contracts Smoke Test CI workflow, so scripts/init-contracts.sh behaves the same locally as it does in CI:

docker compose up

This starts stellar/quickstart:latest on localhost:8000 with Soroban RPC enabled. Once healthy, run scripts/init-contracts.sh against it as usual.


ABI Snapshots

Whenever contract interfaces change, regenerate the ABI metadata from the sibling COMEBACKHERE repository.

cd ../COMEBACKHERE
make update-abi-snapshots

This keeps the backend and other protocol components synchronized with the latest contract interfaces.


Toolchain

The project is built using the following toolchain:

Tool Version
Rust 1.95.0
Compilation Target wasm32-unknown-unknown
Stellar CLI 22.8.2

The Rust version is pinned in rust-toolchain.toml to ensure consistent builds across development environments.


Verify Your Environment

Run the following script to confirm that all required tools are installed and correctly configured:

./scripts/check-tools.sh

Contributing

Before submitting a pull request, make sure to:

  • Format the code.
  • Run the linter.
  • Execute the full test suite.
  • Regenerate ABI snapshots if contract interfaces changed.
  • Ensure all checks pass successfully.

License

This project is licensed under the MIT License.

About

COMEBACKHERE Protocol - Rust/Soroban smart contracts

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages