Smart contracts powering the ThinkMesh protocol — on-chain reputation, rewards, and governance.
🌊 Drips Wave 1 is LIVE — Support mesh-contract and earn your place on the leaderboard! Fund this project on Drips →
Mesh Contract is the smart contract layer of the ThinkMesh ecosystem. It provides:
- 🏆 On-chain reputation — Immutable proof of contribution quality
- 💰 THINK token — ERC-20 reward token for problem solvers
- 🎖️ Impact NFTs — Soulbound badges proving real-world impact
- 🏛️ DAO governance — Community control over platform decisions
- 💸 Solution bounties — Smart contract escrow for funded challenges
- 📊 Drips integration — Streaming rewards to contributors
Think: "The on-chain trust layer for real-world problem solving"
Wave 1 is open. Your support makes collaborative problem solving unstoppable.
ThinkMesh is building the infrastructure to reward people who solve real-world problems — from local infrastructure to global challenges. The smart contract layer is the backbone of that vision.
Your contribution via Drips streams directly to the developers building:
| What You Fund | Impact |
|---|---|
| 🪙 THINK token contracts | Enables micro-rewards to global contributors |
| 🎖️ Impact NFT system | Gives solvers verifiable, portable credentials |
| 🏛️ DAO governance | Puts platform decisions in the community's hands |
| 💸 Bounty escrow | Funds real implementations of winning solutions |
| 🔐 Security audits | Protects user funds and on-chain reputation |
- Visit drips.network
- Connect your wallet
- Set a streaming amount (as low as $1/month)
- Start streaming — funds flow continuously to contributors
Drips lets you support open-source sustainably. No one-time donations — just continuous, fair compensation for ongoing work.
contracts/
├── registry/
│ └── src/lib.rs # Wave Program registration contract
├── escrow/
│ └── src/lib.rs # Wave funding escrow contract
├── settlement/
│ └── src/lib.rs # Wave completion settlement contract
scripts/
├── deploy.sh # Stellar testnet deployment script
└── seed_testnet.sh # Testnet seeding script
│ └── src/lib.rs # Wave Program registration contract
├── escrow/
│ └── src/lib.rs # Wave escrow for fund management
├── settlement/
│ └── src/lib.rs # Wave settlement and distribution
scripts/
├── deploy.sh # Automated testnet deployment
└── seed_testnet.sh # Testnet data seeding
- Rust >= 1.70.0
- Stellar CLI (soroban-cli)
- Stellar SDK
- A wallet with Stellar testnet XLM (funded via Friendbot)
- Soroban CLI (install via
cargo install soroban-cli) - Stellar testnet account (get funded via Friendbot)
# Clone the repo
git clone https://github.com/frankosakwe/mesh-contract.git
cd mesh-contract
# Install Rust toolchain for Soroban
rustup target add wasm32-unknown-unknown
# Install Stellar CLI
cargo install soroban-cli
# Build contracts
cargo build --target wasm32-unknown-unknown --release
# Deploy to Stellar testnet (Linux/Mac/WSL)
chmod +x scripts/deploy.sh
./scripts/deploy.sh
# Seed testnet with sample data (Linux/Mac/WSL)
chmod +x scripts/seed_testnet.sh
./scripts/seed_testnet.shFor Windows users, PowerShell scripts are also provided:
# Deploy to Stellar testnet (PowerShell)
.\scripts\deploy.ps1
# Seed testnet with sample data (PowerShell)
.\scripts\seed_testnet.ps1Note: Windows users experiencing build issues should use WSL (Windows Subsystem for Linux) or see BUILD_ISSUES.md for workarounds. cargo install soroban-cli
cp .env.testnet.example .env.testnet
cargo build
cargo build --release --target wasm32-unknown-unknown
cargo test
./scripts/deploy.sh
./scripts/seed_testnet.sh
### Current Status
- ✅ Contracts compile successfully with `cargo build`
- ✅ Soroban SDK 20.5.0 compatibility issues resolved
- ⚠️ WASM compilation requires soroban-cli installation
- ⚠️ Unit tests have dependency issues with soroban-sdk test features
- 📝 Deployment scripts ready for use after soroban-cli installation
### Environment Variables
After deployment, contract IDs are automatically saved to `.env.testnet`:
```bash
# .env.testnet (auto-generated)
NETWORK=testnet
RPC_URL=https://soroban-testnet.stellar.org:443
DEPLOYER_ADDRESS=your_deployer_address
REGISTRY_CONTRACT_ID=deployed_registry_contract_id
ESCROW_CONTRACT_ID=deployed_escrow_contract_id
SETTLEMENT_CONTRACT_ID=deployed_settlement_contract_id
# .env.testnet
DEPLOYER_SECRET_KEY=your_stellar_secret_key
STELLAR_NETWORK=testnet
STELLAR_RPC_URL=https://soroban-testnet.stellar.org:443
| Contract | Network | Address |
|---|---|---|
| Registry | Stellar Testnet | Deployed via scripts/deploy.sh |
| Escrow | Stellar Testnet | Deployed via scripts/deploy.sh |
| Settlement | Stellar Testnet | Deployed via scripts/deploy.sh |
Contract IDs are saved to
.env.testnetafter deployment. | Registry | Stellar Testnet | Run./scripts/deploy.shto deploy | | Escrow | Stellar Testnet | Run./scripts/deploy.shto deploy | | Settlement | Stellar Testnet | Run./scripts/deploy.shto deploy |
Testnet deployments are automated via deployment scripts.
| Layer | Technology |
|---|---|
| Smart contracts | Rust + Soroban SDK |
| Framework | Soroban CLI |
| Network | Stellar Testnet |
| Contract types | Registry, Escrow, Settlement |
| Deployment | Stellar CLI (soroban contract deploy) |
| Funding | Stellar Friendbot |
| Feature | Stellar Soroban | Ethereum L1 |
|---|---|---|
| Gas fee | ~$0.0001 | ~$2–50 |
| Speed | ~5 seconds | ~12 seconds |
| Security | ✅ Stellar SCP | ✅ Native |
| Developer UX | ✅ Rust-based | ✅ EVM |
| Accessibility | ✅ Low cost for all | ❌ Expensive for small users |
| Framework | Soroban 20.0.0 | |
| Testing | Soroban SDK testutils | |
| Network | Stellar (Soroban) | |
| Contract types | Registry, Escrow, Settlement |
| Feature | Stellar | Ethereum L1 |
|---|---|---|
| Gas fee | ~$0.0001 | ~$2–50 |
| Speed | ~5 seconds | ~12 seconds |
| Security | ✅ SCP consensus | ✅ PoW/PoS |
| Developer UX | ✅ Rust-based | ✅ EVM |
| Accessibility | ✅ Very low cost | ❌ Expensive for small users |
- Repository setup & architecture design
- Registry contract (Wave Program registration)
- Escrow contract (Wave funding escrow)
- Settlement contract (Wave completion settlement)
- Testnet deployment scripts
- Testnet seeding scripts
- Comprehensive contract tests
- Integration tests
- Soroban contract development
- Testnet deployment scripts
- Comprehensive test coverage
- Mainnet deployment
- ImpactNFT soulbound badges
- MeshDAO voting contracts
- Timelock controller
- Security audit
- Mainnet deployment
- Token integration
- Advanced governance features
- Frontend integration with thinkmesh-api
- Drips streaming integration
- Cross-chain bridges
- Partner integrations
- Grant program smart contracts
# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific contract tests
cargo test -p registry
cargo test -p escrow
cargo test -p settlement
# Run tests with output
cargo test -- --nocapture
# Run specific contract tests
cargo test -p registry
cargo test -p escrow
cargo test -p settlement-
Install Rust and Soroban CLI
rustup target add wasm32-unknown-unknown cargo install soroban-cli
-
Generate a Stellar Key Pair
soroban keys generate --network testnet
This will generate a public key and secret key. Save the secret key securely.
-
Fund Your Testnet Account Visit Stellar Friendbot and enter your public key to get testnet XLM.
-
Configure Environment
cp .env.testnet.example .env.testnet # Edit .env.testnet and set DEPLOYER_SECRET_KEY -
Build Contracts
cargo build --release --target wasm32-unknown-unknown
-
Deploy to Testnet
./scripts/deploy.sh
This script will:
- Deploy Registry contract
- Deploy Escrow contract
- Deploy Settlement contract
- Initialize all contracts with proper wiring
- Save contract IDs to
.env.testnet
-
Seed Test Data
./scripts/seed_testnet.sh
This script will:
- Register a sample Wave Program
- Open a Wave escrow
- Fund the escrow
- Create and approve a settlement proposal
After deployment, you can verify the contracts are deployed correctly by checking the contract IDs in .env.testnet.
You can manually invoke contracts using the Soroban CLI:
# Read program details
soroban contract read \
--id $REGISTRY_CONTRACT_ID \
--fn get_program \
--program_id your_program_id \
--rpc-url https://soroban-testnet.stellar.org:443
# Read wave details
soroban contract read \
--id $ESCROW_CONTRACT_ID \
--fn get_wave \
--wave_id your_wave_id \
--rpc-url https://soroban-testnet.stellar.org:443We welcome contributions! See CONTRIBUTING.md for:
- Development environment setup
- Coding standards (NatSpec documentation required)
- Pull request process
- Security disclosure policy
We maintain a list of open, well-scoped issues that contributors can pick up and implement:
| Label | Description |
|---|---|
good first issue |
Beginner-friendly tasks (Easy–Medium, 5–8 hrs) |
smart-contract |
All Solidity contract work |
advanced |
Complex tasks for experienced contributors |
To claim an issue:
- Comment
/applyon the issue you want to work on - A maintainer will assign it to you
- Fork, implement, and open a PR referencing the issue
Quick ways to contribute:
- 🐛 Report bugs
- 💡 Suggest features
- 🔧 Propose a contract
- 🔐 Responsible security disclosure: security@thinkmesh.io
Smart contracts handle real funds. We take security seriously:
- All contracts use OpenZeppelin audited libraries
- NatSpec documentation required for all functions
- Comprehensive test coverage required (>95%)
- Bug bounty program: security@thinkmesh.io
- Responsible disclosure: SECURITY.md
⚠️ Do not use unaudited contracts in production. Mainnet deployment follows a full security audit.
- ThinkMesh API: thinkmesh-api
- Mesh API: mesh-up_api
- Discord: https://discord.gg/thinkmesh
- Twitter: https://twitter.com/thinkmesh
- Drips: Fund us on Drips
MIT License — see LICENSE for details.
Open source, forever.
💧 Fund this project on Drips — Wave 1 is LIVE
🔗 Smart contracts • 🏆 On-chain reputation • 💸 Streaming rewards • 🌍 Real-world impact
Made with ❤️ by the ThinkMesh community
⭐ Star this repo if you believe in rewarding real-world problem solvers!