Provides external indexers of token transfers and holdings for EVM blockchains in support of the ots2 namespace for Otterscan.
Note: This project is currently an early preview. It's experimental and unoptimized. Everything is likely to change.
Currently implemented:
ots2_getERC20Holdingsots2_getERC20TransferListots2_getERC20TransferCountots2_getERC721TransferListots2_getERC721TransferCount
- On Debian/Ubuntu systems, ensure the following packages are installed:
sudo apt install -y cmake build-essential pkg-config nlohmann-json3-dev libcurl4-openssl-dev libcpp-httplib-dev libcli11-dev libleveldb-dev
- Ensure you are running an execution node for your target EVM blockchain either on your local machine or on a local network.
- Syncing a remote node might take an extremely long time, and the initial sync uses lots of node resources.
- Any execution node which supports
eth_getLogsandeth_getBlockByNumberis compatible.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)
Run the indexer to sync with the execution node, saving the indexer database to ./eventsdb, and serve RPC requests (defaults to listening on http://localhost:17444):
./build/bin/indexer ./eventsdb --rpc-url http://localhost:8545
The indexer will finish the current sync batch and exit gracefully when interrupted.
Run clang-format -i src/* for code formatting.