A comprehensive Rust CLI and Soroban smart contract backend for launching tokens on Stellar with built-in vesting schedules, airdrop distribution, and contributor allocation tools.
- Complete Token Launch Platform: End-to-end solution for token launches on Stellar
- SAC-Compatible Tokens: Stellar Asset Contract compatible fungible tokens
- Flexible Vesting: Linear, cliff, and hybrid vesting strategies
- Efficient Airdrops: Equal, weighted, and claimable distribution mechanisms
- Central Registry: Track all launches with comprehensive metadata
- CLI Interface: Full command-line tool for all operations
- Comprehensive Testing: 45+ tests covering all functionality
- Production Ready: Security-focused with proper authorization controls
This repository contains 4 Soroban smart contracts and a comprehensive CLI tool:
- SAC-compatible fungible token implementation
- Configurable minting, burning, and pausing capabilities
- Admin controls with proper authorization
- Tests: 10 comprehensive test cases
- Linear Vesting: Gradual token release over time
- Cliff Vesting: All tokens released after cliff period
- Hybrid Vesting: Combination of cliff amount + linear remainder
- Revocable and non-revocable schedules
- Tests: 12 comprehensive test cases
- Equal Distribution: Same amount to all recipients
- Weighted Distribution: Different amounts per recipient
- Claimable Campaigns: Recipients claim individually
- Batch operations and time-bound campaigns
- Tests: 11 comprehensive test cases
- Central registry for all token launches
- Creator-based launch tracking
- Integration with vesting and airdrop contracts
- Admin oversight and launch management
- Tests: 10 comprehensive test cases
The stellar-launchpad CLI provides comprehensive commands for:
# Launch Management
stellar-launchpad launch --name "MyToken" --symbol "MTK" --supply 1000000
stellar-launchpad status --launch-id 1 --network testnet
stellar-launchpad list --creator GXXXXX --active-only
# Vesting Operations
stellar-launchpad vesting create --token CXXXXX --beneficiary GXXXXX --amount 100000
stellar-launchpad vesting release --schedule-id 1
stellar-launchpad vesting check --schedule-id 1
# Airdrop Management
stellar-launchpad airdrop create --token CXXXXX --recipients recipients.csv
stellar-launchpad airdrop distribute --campaign-id 1
stellar-launchpad airdrop claim --campaign-id 1
# Contract Deployment
stellar-launchpad deploy --contract token --network testnet-
Rust (latest stable version):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh rustup target add wasm32-unknown-unknown
-
Stellar CLI:
curl -sL https://stellar.github.io/stellar-cli/install.sh | bash
# Clone the repository
git clone https://github.com/<your-org>/stellar-launchpad-core.git
cd stellar-launchpad-core
# Build all contracts and CLI
cargo build
# Run comprehensive test suite
cargo test
# Build CLI for release
cd crates/cli
cargo build --release# Set up your Stellar account (testnet)
stellar keys generate my-account
stellar keys fund my-account --network testnet
# Deploy all contracts to testnet
export SOURCE_ACCOUNT=$(stellar keys address my-account)
./scripts/deploy.sh
# Check deployment status
cat DEPLOYMENTS.md# 1. Launch a new token
stellar-launchpad launch \
--name "MyAwesomeToken" \
--symbol "MAT" \
--supply 1000000000 \
--decimals 7 \
--description "Revolutionary DeFi token" \
--website "https://mytoken.com" \
--mintable \
--network testnet
# 2. Create vesting schedules for team members
stellar-launchpad vesting create \
--token $TOKEN_CONTRACT \
--beneficiary $TEAM_MEMBER_ADDRESS \
--amount 50000000 \
--cliff-days 365 \
--vest-days 1460 \
--vesting-type hybrid \
--cliff-amount 12500000 \
--revocable \
--network testnet
# 3. Set up community airdrop
stellar-launchpad airdrop create \
--token $TOKEN_CONTRACT \
--recipients community_members.csv \
--airdrop-type claimable \
--amount 100000000 \
--duration-days 90 \
--network testnet
# 4. Monitor launch status
stellar-launchpad status --launch-id 1 --network testnetstellar-launchpad-core/
βββ crates/ # Rust workspace members
β βββ cli/ # CLI binary: stellar-launchpad
β β βββ src/main.rs # CLI implementation with clap
β β βββ Cargo.toml # CLI dependencies
β βββ client/ # Contract client helpers
βββ contracts/ # Soroban smart contracts
β βββ token/ # SAC-compatible token contract
β β βββ src/lib.rs # Token implementation
β β βββ test_snapshots/ # Test result snapshots
β βββ vesting/ # Token vesting contract
β β βββ src/lib.rs # Vesting strategies implementation
β β βββ test_snapshots/
β βββ airdrop/ # Airdrop distribution contract
β β βββ src/lib.rs # Airdrop mechanisms implementation
β β βββ test_snapshots/
β βββ launchpad/ # Launchpad registry contract
β βββ src/lib.rs # Registry implementation
β βββ test_snapshots/
βββ docs/ # Comprehensive documentation
β βββ token.md # Token contract documentation
β βββ vesting.md # Vesting contract documentation
β βββ airdrop.md # Airdrop contract documentation
β βββ launchpad.md # Launchpad contract documentation
βββ scripts/
β βββ deploy.sh # Automated deployment script
βββ DEPLOYMENTS.md # Contract addresses and deployment info
βββ CONTRIBUTING.md # Development guide
βββ Cargo.toml # Workspace configuration
The project includes comprehensive test coverage:
# Run all tests (45+ test cases)
cargo test
# Run tests for specific contracts
cargo test -p stellar-launchpad-token # 10 tests
cargo test -p stellar-launchpad-vesting # 12 tests
cargo test -p stellar-launchpad-airdrop # 11 tests
cargo test -p stellar-launchpad-registry # 10 tests
cargo test -p stellar-launchpad # 2 CLI tests
# Test individual contracts
cd contracts/token && cargo test
cd contracts/vesting && cargo test
cd contracts/airdrop && cargo test
cd contracts/launchpad && cargo test- Happy Path Tests: All core functionality working correctly
- Authorization Tests: Proper access control enforcement
- Edge Case Tests: Boundary conditions and error scenarios
- Integration Tests: Cross-contract interactions
- CLI Tests: Command-line interface functionality
- Authentication Required: All admin functions protected by signature verification
- Input Validation: Comprehensive validation of all parameters
- Access Controls: Proper authorization checks throughout
- Error Handling: Robust error handling with clear messages
- No todo!() Macros: All functionality fully implemented
- Comprehensive Testing: Extensive test coverage including security scenarios
This project integrates deeply with the Stellar network and its ecosystem:
- Soroban Smart Contracts: All contracts are written for Stellar's Soroban VM and compiled to WASM
- Stellar Asset Contract (SAC): Tokens are SAC-compatible, enabling native interoperability with the Stellar DEX, Horizon, and wallets
- Stellar SDK: Uses
soroban-sdkfor contract development andstellar-sdkin the CLI for transaction building and submission - Stellar CLI: Contract deployment and invocation via the official
stellarCLI tool - Horizon API: Launch status and account queries are routed through the Horizon REST API
- Friendbot / Testnet: Funded test accounts via Stellar's Friendbot for fast local development
- Testnet: Fully deployed and tested
- Mainnet: Ready for production deployment
βββββββββββββββββββββββββββββββββββββββββββββββ
β stellar-launchpad CLI β
β (Transaction builder & signer) β
ββββββββββββ¬βββββββββββββββββββββββ¬βββββββββββββ
β β
ββββββββΌβββββββ ββββββββΌβββββββ
β Horizon API β β Soroban RPC β
β (queries) β β (invokes) β
ββββββββ¬βββββββ ββββββββ¬βββββββ
β β
ββββββββββββ¬ββββββββββββ
β
ββββββββββββΌββββββββββββ
β Stellar Network β
β ββββββββββββββββββ β
β β Token Contract β β
β β Vesting β β
β β Airdrop β β
β β Launchpad Reg. β β
β ββββββββββββββββββ β
ββββββββββββββββββββββββ
Detailed documentation for each contract:
- Token Contract: SAC-compatible token implementation
- Vesting Contract: Flexible vesting strategies
- Airdrop Contract: Efficient distribution mechanisms
- Launchpad Contract: Central launch registry
- Contributing Guide: Development setup and guidelines
Please read CONTRIBUTING.md for details on:
- Development environment setup
- Building and testing procedures
- Code style guidelines
- Pull request process
- Adding new features
This project is part of a larger ecosystem:
- Web Dashboard: React-based user interface
- Documentation Site: Comprehensive user guides
This project is licensed under the MIT License - see the LICENSE file for details.
- Core smart contracts implementation
- Comprehensive CLI tool
- Automated deployment scripts
- Extensive test coverage
- Documentation and guides
- Web dashboard integration
- Mainnet deployment
- Advanced analytics and reporting
- Multi-token launch batching
- Enhanced governance features
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Discord: Join the Stellar developer community
Built with β€οΈ for the Stellar ecosystem