Thank you for investing your time in contributing to SoroScan!
SoroScan is an open-source indexing layer designed to make Soroban smart contract data accessible and queryable. Whether you're fixing a bug, improving documentation, or building a new feature, we welcome your involvement.
The following is a set of guidelines for contributing to SoroScan and its packages.
- Navigate to the Issues tab.
- Filter by
good-first-issueif you are new to the project. - Claim it: Please comment "I'd like to work on this!" on the issue thread to avoid duplicate work. Wait for a maintainer to assign it to you.
- Clone & Navigate after forking the repo.
git clone https://github.com/<your-username>/soroscan.git
cd soroscan
This project requires Rust, Python 3.11+, PostgreSQL, and Redis.
The backend handles data ingestion, the API, and webhook dispatching.
# 1. Navigate to backend directory
cd django-backend
# 2. Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Configure Environment
cp .env.example .env
# Edit .env with your local PostgreSQL credentials
# 5. Run Migrations & Start Server
python manage.py migrate
python manage.py runserver🦀 Smart Contract (Rust) Setup If you are modifying the core indexing logic or event emission standards.
# 1. Navigate to contracts directory
cd soroban-contracts/soroscan_core
# 2. Run tests to ensure environment is correct
cargo test
# 3. Build optimized WASM
cargo build --target wasm32-unknown-unknown --releaseBranching: Create a new branch for your work.
git checkout -b feat/your-feature-nameCode Style:
-
Python: We adhere to PEP 8. Please run black . before committing.
-
Rust: Please run cargo fmt before committing.
Database migrations are critical for maintaining schema consistency across environments.
Run this command whenever you modify any Django model in models.py:
python manage.py makemigrationsThis generates a new migration file in migrations/ that describes the schema changes.
Important: Always commit the generated migration file with your PR!
Run this command in these situations:
-
After pulling changes from
mainthat include new migrations:git pull origin main python manage.py migrate
-
After checking out a PR branch to test it locally:
gh pr checkout 123 # or git checkout feature-branch python manage.py migrate -
After generating new migrations yourself:
python manage.py makemigrations python manage.py migrate
To see which migrations are applied or pending:
python manage.py showmigrationsMigrations with [X] are applied, [ ] are pending.
If your PR modifies models:
- ✅ Include the generated migration file(s)
- ✅ Ensure
python manage.py migrateruns without errors - ✅ Run tests after migrating to verify compatibility
We prioritize stability. Please run the test suite before submitting your PR.
Django Tests:
python manage.py testContract Tests:
cargo testLinting:
ruff check .
black --check .
# Rust
cargo clippy -- -D warnings
cargo fmt --check
Push your branch to your fork.
git push origin feat/your-feature-name
Open a Pull Request against the main branch.
Title: Please use Conventional Commits format:
feat: add websocket support
fix: resolve overflow in indexer
docs: update installation guide
Description: Reference the issue you are solving (e.g., Closes #12).
Validation: Ensure all CI checks pass.
📜 Code of Conduct By participating in this project, you agree to maintain a respectful and inclusive environment for everyone.