Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/3loop/decoder-api
An API that decodes and provides insights into any specific EVM transaction.
https://github.com/3loop/decoder-api
decode ethereum evm human-readable
Last synced: 1 day ago
JSON representation
An API that decodes and provides insights into any specific EVM transaction.
- Host: GitHub
- URL: https://github.com/3loop/decoder-api
- Owner: 3loop
- Created: 2024-06-22T20:06:34.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-09-05T17:36:41.000Z (5 months ago)
- Last Synced: 2024-11-25T14:18:24.828Z (2 months ago)
- Topics: decode, ethereum, evm, human-readable
- Language: TypeScript
- Homepage: https://decoder-api.3loop.io/swagger
- Size: 376 KB
- Stars: 5
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Decoder REST API
This project provides a REST API to decode EVM transactions. It is built on top of the [Loop Decoder](https://github.com/3loop/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 transaction2. **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](https://x.com/3loop_io).
## Requirements
To use this project you need to have [Bun](https://bun.sh/) installed on your machine.
## Development
For development, we will use [pnpm](https://pnpm.io/) as our package manager, because Drizzle Kit does not yet support bun sqlite.
Run the migration to create the database:
```bash
$ pnpm migrate
```Start the development server:
```bash
$ pnpm dev
```Optionally, start docker-compose to run local telemetry server:
```bash
$ cd ./local && docker-compose up
```## Deploy with fly.io
Create a volume for sqlite
```bash
$ fly volumes create litefs --size 1
```Create a new app:
```bash
$ fly launch
```Configure the consul:
```bash
$ fly consul attach
```