Block explorer for the Selendra Network featuring a SurrealDB backend, archive services, and REST API endpoints.
- Rust (latest stable)
- Docker and Docker Compose
- Git
# Clone and setup
git clone https://github.com/selendra/explorer.git
cd explorer
cp .env.example .env
# Initialize and start services
./scripts/init.sh # Setup database
cargo run -p archive-service -- evm --block # Start archive service
cargo run -p explorer-api # Start API server
Indexes blockchain data into SurrealDB.
# Development
cargo run -p archive-service -- <command>
# EVM Services
cargo run -p archive-service -- evm --account # Archive EVM accounts
cargo run -p archive-service -- evm --block # Archive EVM blocks
# Substrate Services
cargo run -p archive-service -- substrate --account # Archive Substrate accounts
cargo run -p archive-service -- substrate --block # Archive Substrate blocks
# Production
cargo build --release
./target/release/archive-service <command>
REST API built with Actix-web.
# Development
cargo run -p explorer-api
# Production
cargo build --release
./target/release/explorer-api
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- OpenAPI Spec: http://localhost:8080/api-docs/openapi.json
selendra-explorer/
├── archive-service/ # Indexing service
├── api/ # REST API
├── scripts/ # Utilities
├── docker/ # Docker configs
├── db/ # Database
├── rust-client/ # Blockchain clients
├── config/ # Configuration
└── data/ # Storage
# Build
cargo build # Debug
cargo build --release # Production
# Test
cargo test # All tests
cargo test -p api # Package specific
See Contributing Guide for guidelines and best practices.