github.com/Alien-Worlds/missions-api

An animated time-lapse of how Alien-Worlds/missions-api was built, commit by commit.

Open this visualization on its own page →

Contributors

6

Lines of Code

6,882

From

2021-04-29

To

2021-12-16

About Alien-Worlds/missions-api

Missions-api is a Go-based event listener service designed to monitor smart contracts deployed on Binance Smart Chain and persist contract events to a PostgreSQL database. The service continuously watches blockchain events and stores the event data for later retrieval and analysis.

The application is configured through a YAML file where users specify the database connection string, contract address to monitor, the starting block number, and the blockchain endpoint. It can work with both local blockchains like Ganache and the live Binance Smart Chain network. The service includes database migration scripts and runs as a command-line application with configurable API endpoints.

The project is intended for both development and production deployment scenarios. For development, it can be run directly from an IDE like GoLand with appropriate environment variables. For production deployment, it containerizes as a Docker image and runs via Docker Compose. The service requires Go 1.15 or higher, PostgreSQL 12.6, and Docker 20.10.6 with Compose 3.3 or later.

Share this video