RSS Amplifier

3loop blog · Sep 5, 2024

Introducing Decoder API: Open-Source REST API server to Decode EVM Transactions

0
Sign in to vote or save

Nastya · 3loop blog

The Decoder API is a simple, open-source REST API server designed to decode any EVM transaction into a human-readable format.

The service offers two main API endpoints:

  1. Decoding Endpoint - /decode/:chain/:hash

    This endpoint provides detailed information about a transaction, including:

    • Decoded transaction data

    • Event logs and transaction traces

    • Error messages, if any

    • Additional context such as token transfers and metadata for all addresses involved in the transaction

  2. Interpreting Endpoint - /interpret/:chain/:hash

    This endpoint translates the decoded transaction into a more accessible, human-readable format.

Here’s an example of a decoded and interpreted transaction from the Blur NFT marketplace:

Note: The live version of the Decoder API (available at decoder-api.3loop.io) currently supports Ethereum Mainnet transactions. It is available for demonstration purposes only and is not equipped to handle high traffic.

  • Open-source: The Decoder API is fully open-source, customizable, and does not rely on proprietary services for the decoding.

  • Minimal external dependencies: Only requires an RPC URL and an SQLite database for caching. If the database is empty, public contract data can be resolved using external APIs by providing them as strategies. See supported strategies in the Loop Decoder documentation.

  • Swagger Interface: Provides an OPEN API interface at /swagger for easy interaction with the service.

  • SQLite database with popular contracts: Includes metadata and ABIs for widely used contracts on Ethereum. Contact us on X for a database file.

  • OpenTelemetry: Built-in support for monitoring and observability.

  • Ready for deployment: Can be easily deployed to platforms like Fly.io.

  1. Clone the repository from GitHub: Decoder API Repository

  2. Set the required .env variables.

  3. Follow the instructions in the README to run the project.

  4. Deploy the API, for instance, using the fly deploy command on Fly.io.

We are constantly improving our libraries and open-source tools for decoding EVM transactions. If you have any feedback, please reach us out. Explore our GitHub repositories and if you found it useful, give us a star on GitHub and follow us on X for updates.

Read the original on 3loop.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.