Skip to content

3loop/transaction-frame

Repository files navigation

Transaction View Frame

This project provides a Farcaster frame for displaying EVM transactions. It is built on top of the Loop Decoder - an open source library for transforming EVM transactions into a human readable format.

Example frame link:

Screenshot 2024-09-23 at 17 35 40

Endpoints

  • Frame Endpoint /frame/:chain/:hash - This endpoint provides a Farcaster frame metadata with a transaction image from the transaction hash.

  • Interpreting Endpoint /interpret/:chain/:hash - This endpoint provides a human-readable transaction image from the transaction hash.

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 Farcaster or 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