This project provides a REST API to decode EVM transactions. It is built on top of the Loop Decoder library.
The service has two main API endpoints:
-
Decoding Endpoint
/decode/:chain/:hash
- This endpoint returns detailed information about a transaction, including:- Decoded transaction data
- Events and traces
- Errors, if any
- Additional context, such as transfers and metadata for all addresses involved in the transaction
-
Interpreting Endpoint
/interpret/:chain/:hash
- This endpoint provides a human-readable version of the decoded transaction data, making it easier to understand.
For a more detailed API overview, please refer to the openapi through the /swagger
endpoint.
This project uses SQLite as its database. At a minimum, you need to provide the WETH contract metadata. Other public contracts can be resolved using third-party strategies.
If you need a database snapshot for Ethereum Mainnet that includes common contracts metadata and contracts ABIs, please contact us on X.
To use this project you need to have Bun installed on your machine.
For development, we will use pnpm as our package manager, because Drizzle Kit does not yet support bun sqlite.
Run the migration to create the database:
$ pnpm migrate
Start the development server:
$ pnpm dev
Optionally, start docker-compose to run local telemetry server:
$ cd ./local && docker-compose up
Create a volume for sqlite
$ fly volumes create litefs --size 1
Create a new app:
$ fly launch
Configure the consul:
$ fly consul attach