A comprehensive platform for discovering, publishing, and verifying Soroban smart contracts on the Stellar network.
Soroban Registry is the trusted package manager and contract registry for the Stellar ecosystem, similar to npm for JavaScript or crates.io for Rust. It provides developers with a centralized platform to share, discover, and verify smart contracts.
- Contract Discovery - Search and browse verified Soroban contracts
- Source Verification - Verify contract source code matches on-chain bytecode
- Package Management - Publish and manage contract versions
- Multi-Network Support - Mainnet, Testnet, and Futurenet
- Publisher Profiles - Track contract publishers and their deployments
- Analytics - Contract usage statistics and metrics
- Web Interface - Responsive web application for contract management
- Command Line Interface - Developer-friendly CLI tool
soroban-registry/
├── backend/ # Rust backend services
│ ├── api/ # REST API server (Axum)
│ ├── indexer/ # Blockchain indexer
│ ├── verifier/ # Contract verification engine
│ └── shared/ # Shared types and utilities
├── frontend/ # Next.js web application
├── cli/ # Rust CLI tool
├── database/ # PostgreSQL migrations
└── examples/ # Example contracts
- Rust 1.75+ (Installation Guide)
- Node.js 20+ (Installation Guide)
- PostgreSQL 16+ (Installation Guide)
- Docker (optional, for containerized deployment)
Populate your development database with test data:
# Seed with 50 contracts (default)
cargo run --bin seeder -- --count=50
# Seed with 100 contracts
cargo run --bin seeder -- --count=100
# Use a specific seed for reproducible data
cargo run --bin seeder -- --count=50 --seed=12345
# Use custom data file
cargo run --bin seeder -- --count=50 --data-file=./custom-data.json
# Specify database URL
cargo run --bin seeder -- --count=50 --database-url=postgresql://user:pass@localhost/dbnameFeatures:
- Creates realistic contracts with names, descriptions, tags, and categories
- Generates publishers with Stellar addresses
- Creates contract versions and verification records
- Distributes contracts across all networks (mainnet, testnet, futurenet)
- Safe to run multiple times
- Performance: creates 100 contracts in less than 5 seconds
- Reproducible results with
--seedflag
Custom Data Format:
{
"contract_names": ["CustomContract1", "CustomContract2"],
"publisher_names": ["CustomPublisher1", "CustomPublisher2"]
}# Clone the repository
git clone https://github.com/yourusername/soroban-registry.git
cd soroban-registry
# Copy environment file
cp .env.example .env
# Start all services
docker-compose up -d
# API endpoint: http://localhost:3001
# Frontend: http://localhost:3000# Create database
createdb soroban_registry
# Set database URL
export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/soroban_registry"cd backend
# Install dependencies and build
cargo build --release
# Run migrations
sqlx migrate run --source ../database/migrations
# Start API server
cargo run --bin apicd frontend
# Install dependencies
pnpm install
# Start development server
pnpm devAccess the web application at http://localhost:3000 to:
- Browse and search contracts
- View contract details and source code
- Publish new contracts
- Verify contract deployments
# Install CLI
cargo install --path cli
# Search for contracts
soroban-registry search "token"
# Get contract details
soroban-registry info <contract-id>
# Publish a contract
soroban-registry publish --contract-path ./my-contract
# Verify a contract
soroban-registry verify <contract-id> --source ./src
# Preview a state migration (dry-run)
soroban-registry migrate preview <old-id> <new-id>
# Analyze schema differences
soroban-registry migrate analyze <old-id> <new-id>
# Generate migration template (Rust or JS)
soroban-registry migrate generate <old-id> <new-id> --language rust
soroban-registry migrate generate <old-id> <new-id> --language js
# Validate, apply, rollback, and audit history
soroban-registry migrate validate <old-id> <new-id>
soroban-registry migrate apply <old-id> <new-id>
soroban-registry migrate rollback <migration-id>
soroban-registry migrate history --limit 20CLI configuration is stored at ~/.soroban-registry/config.toml. If a legacy ~/.soroban-registry.toml file exists, it will be migrated automatically.
GET /api/contracts- List and search contractsGET /api/contracts/:id- Get contract detailsPOST /api/contracts- Publish a new contractGET /api/contracts/:id/versions- Get contract versionsGET /api/contracts/:id/changelog- Get contract release history with breaking-change markersGET /contracts/:id/changelog- Compatibility alias for the changelog endpointPOST /api/contracts/verify- Verify contract source
GET /api/publishers/:id- Get publisher detailsGET /api/publishers/:id/contracts- Get publisher's contractsPOST /api/publishers- Create publisher profile
GET /api/stats- Registry statisticsGET /health- Health check
Soroban Registry automatically tracks release history for each contract and enforces semantic versioning rules when new versions are created.
-
Version creation enforcement
- When
POST /api/contracts/:id/versionsis called, the registry:- Loads the latest ABI for the previous version.
- Computes an ABI diff using the same engine behind
GET /api/contracts/breaking-changes. - Rejects the request with
422 BreakingChangeWithoutMajorBumpif any breaking changes are detected and the new version does not bump the major semver component.
- When
-
Changelog API
GET /api/contracts/:id/changelog(and aliasGET /contracts/:id/changelog) returns a structured changelog:
{ "contract_id": "1e8c0c4c-3c5e-4b0a-a1c2-9f2f5f3d7b10", "entries": [ { "version": "2.0.0", "created_at": "2026-02-24T12:34:56Z", "commit_hash": "abc1234", "source_url": "https://github.com/org/repo/commit/abc1234", "release_notes": "Major rewrite of the settlement engine.", "breaking": true, "breaking_changes": [ "Function 'settle' parameter 'amount' type changed from 'u64' to 'i128'", "Enum 'SettlementState' variant 'Pending' was removed" ] } ] }- Entries are ordered newest-first.
breakingistrueif any ABI-breaking changes were detected compared to the previous version.breaking_changescontains human-readable descriptions derived from the ABI diff engine.
This changelog API is designed to back both UI release history views and automation/CI checks that need to understand when a release contains breaking changes.
The registry uses PostgreSQL with the following primary tables:
contracts- Contract metadata and deployment informationcontract_versions- Version history and changelogverifications- Source code verification recordspublishers- Publisher account informationcontract_interactions- Usage statistics and analytics
See database/migrations/001_initial.sql for the complete schema.
# Backend tests
cd backend
cargo test --all
# Frontend tests
cd frontend
pnpm test# Format Rust code
cargo fmt --all
# Lint TypeScript
pnpm lint// examples/hello-world/src/lib.rs
#![no_std]
use soroban_sdk::{contract, contractimpl, symbol_short, Env, Symbol};
#[contract]
pub struct HelloContract;
#[contractimpl]
impl HelloContract {
pub fn hello(env: Env, to: Symbol) -> Symbol {
symbol_short!("Hello")
}
}# Build the contract
cd examples/hello-world
soroban contract build
# Publish to registry
soroban-registry publish \
--name "Hello World" \
--description "A simple greeting contract" \
--category "examples" \
--network testnetContributions are welcome. To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/description) - Commit your changes (
git commit -m 'Add feature description') - Push to the branch (
git push origin feature/description) - Open a Pull Request
Please ensure all tests pass and code follows the project's style guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.