Skip to content

An API that decodes and provides insights into any specific EVM transaction.

Notifications You must be signed in to change notification settings

3loop/decoder-api

Repository files navigation

Decoder REST API

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:

  1. 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
  2. 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.

Database

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.

Requirements

To use this project you need to have Bun installed on your machine.

Development

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

Deploy with fly.io

Create a volume for sqlite

$ fly volumes create litefs --size 1

Create a new app:

$ fly launch

Configure the consul:

$ fly consul attach

About

An API that decodes and provides insights into any specific EVM transaction.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published