A lightweight Node.js/Express service for indexing and exposing LiFi’s FeesCollected events via a REST API.
- Node.js (v18+ recommended)
- npm
- Docker
npm install && npm run build && npm run testCopy .env.sample and .env.docker.sample to .env and .env.docker, and optionally set the variables in the file.
cp .env.sample .env && cp .env.docker.sample .env.dockerdocker compose up -d mongo && npm install && npm run build && npm run devdocker compose up --buildGET /api/:chainId/fees-collected/:integrator
{
"count": 22,
"data": [
{
"token": "0x123...",
"integrator": "0x123...",
"integratorFee": "123",
"lifiFee": "456",
}
...
]
}src/
domain/ # Core entities and interfaces
application/ # Service layer and application logic
infrastructure/ # External providers, HTTP, persistence implementation
http-server.ts # Express app setup
server.ts # Entry point
container.ts # DI instances bootstrap
MIT