Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/skecskes/ronin-ingestor
Ronin Transfer Events INGESTOR
https://github.com/skecskes/ronin-ingestor
Last synced: 3 days ago
JSON representation
Ronin Transfer Events INGESTOR
- Host: GitHub
- URL: https://github.com/skecskes/ronin-ingestor
- Owner: skecskes
- Created: 2023-03-09T01:02:49.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-10T19:34:06.000Z (2 months ago)
- Last Synced: 2024-09-10T22:25:27.151Z (2 months ago)
- Language: Rust
- Size: 1.02 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ronin Transfer Events INGESTOR
- I couldn't read `call_traces` from given ronin node, therefore we are limited to scratch just the surface of EVM data.
If we had `transaction_traces` endpoint working, we could not only see token from A to B and payment from B to A,
but we would be able to see even if it was from sale or staking, therefore much richer experience.
What EVM are you running? I have good experience with ERIGON
- http JSON RPC was provided. If we had websocket version (wss://...) we could create a stream and once ingestor
reaches last blocks, it will continue ingesting blocks indefinitely.
- the code is quite naive and needs a lot of optimisation, like I am storing transfers one by one, we could do that
in batch, etc..
- I wanted just to show how we can get the latest activity of user by just listening to events from chain.### Dependencies
- direnv (https://direnv.net/) - this will load `.envrc` file into terminal session so that next command like `docker`
will have our env variables ready to useLook into `.envrc` to see/change some basic configs
## Run locally:
direnv allow // to activate .envrc in terminal session
docker compose up // to start DB and ingestorAfter ingestor finishes ingesting the events from last 10000 blocks, it will die and only DB will stay running
this will make postgres available locally on port 5432, make sure that port is free beforehand. While DB is up and
running you can run python API to read data using new `GET /events/{ronin_address}` endppoint.![ingestor run logs and DB entries](ingestor.png)
## Migration
Migrations are automated and are run at ingestor start. Basically it checks if there is anything new to migrate or not.