Lóthrandir is a Transaction Engine powered by lite-rpc and yellowstone-grpc, is a service designed to handle and process transactions at high throughput. It interacts with various APIs and databases to fetch token prices, calculate transaction details, and store transaction information.
- Node.js (version 20 or later)
- pnpm (version 7 or later)
- Docker (optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/Bulk-trade/transaction-engine cd transaction-engine
-
Install dependencies:
pnpm install
-
Set up environment variables:
- Create a
.env
file in the root directory and add the necessary environment variables. Refer to.env.example
for the required variables.
- Create a
-
Build the TypeScript code:
pnpm run build
-
Start the application:
pnpm start
-
Build the Docker image:
docker build -t transaction-engine .
-
Run the Docker container:
docker run -d -p 4000:4000 --env-file .env transaction-engine
-
Start the services:
docker-compose up --build -d
-
See realtime logs:
docker-compose logs -f
-
Properly close the services:
docker-compose down
- Start the application in development mode:
pnpm run dev
Logs are stored in the logs
directory. You can view the logs by opening the logs/bulk.log
file.
This project is licensed under the ISC License.