A Photon supply tracker
A custom indexer for atomone built with eclesia-indexer-core.
- ✅ Block indexing
- ✅ Transaction processing
- ✅ Module-based architecture
- ✅ PostgreSQL storage
- ✅ Real-time synchronization
- ✅ Docker support
- Node.js 18+
- PostgreSQL 12+
- Access to atomone RPC endpoint
-
Install dependencies
npm install
-
Set up environment
cp .env.example .env # Edit .env with your configuration -
Start PostgreSQL (if using Docker)
docker-compose up postgres -d
-
Run the indexer
npm run build npm start
Configure your indexer through environment variables or directly in src/index.ts:
RPC_ENDPOINT: atomone RPC endpoint (default: https://atomone-rpc-history.infra.allinbits.vip)PG_CONNECTION_STRING: PostgreSQL connection stringLOG_LEVEL: Logging level (info, debug, warn, error)QUEUE_SIZE: Batch size for processing blocksPROCESS_GENESIS: Whether to process the genesis block
docker-compose up -dThis will start both PostgreSQL and the indexer in containers.
npm run dev # Start in development mode with hot reload
npm run lint # Run ESLint
npm run build # Build for productionThe indexer automatically creates the necessary database tables on startup. You can find migration files in the src/migrations/ directory (if applicable).
To add custom indexing logic:
- Create a new module in
src/modules/ - Implement the required interfaces from eclesia-indexer-core
- Register your module in
src/index.ts
Connection refused to database
- Ensure PostgreSQL is running
- Check your connection string
- Verify network connectivity
RPC endpoint errors
- Verify the RPC endpoint is accessible
- Check for rate limiting
- Ensure the endpoint supports the required methods
High memory usage
- Reduce
QUEUE_SIZEif processing large blocks - Monitor PostgreSQL memory usage
- Consider using connection pooling
ISC
For issues with eclesia-indexer-core, please refer to the main repository documentation.