project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Athena

Backfills starknet events , transaction ,blocks and a tool to decode starknet transactions to get execution trace & also decodes events and ABI

Athena

Created At

ETHOnline 2024

Winner of

trophy

Build Starknet.anything

Project Description

This tool does the following

  1. Outputs the Contract Implementation History for a Contract Address
  2. Gets Starknet ABI JSON & Parses into event signatures
  3. Decodes the full transaction data and events for a given transaction hash
  4. Backfilling events with filters
  5. ABI decoding
  6. Backfilling full blocks, transactions and events.

Event decoder :- To decode an event , user provides the contract hash and the name of the event and block range , firstly the abi is fetched and parsed and the data for the particular event and block range is fetched The data fetched contains the keys and data required to decode the event , the decoder then initiates a new decoder class for that particular event and the event’s data is decoded with the provided inputs of hash,block range and event name

Function decoder:- Similar as above but instead of keys and data pairs we give call data as input that we will fetch in the provided blockrange

You can do all that using cli This tool is inspired from nethermind/entro but our tool is written in golang and uses goroutines to produce results faster.

How it's Made

Firstly we worked on the abi parser , to parse each event and function ie to get its name and parameters and their datatype to help us in decoding Further for event decoder the keys and data values are converted into bytes and are decoded according to the arguments and datatype that we obtained by parsing the abi

For function decoder we take the call data as input and it is also decoded acc to arguments and datatypes obtained by parsing the abi.

Backfilling uses goroutines to fetch block & transaction data using rpc http calls so that it is faster , we are using nethermind/starknet.go to fetch events , class hash & apply filter to events. For block data and transaction receipt we use direct http calls to rpc and goroutines to make it fast. We used cobra to interact with cli & morph to create a database to store ABIs and backfilled data. The databse is used to save the abi which can be used to decode transaction database is created using mySQL

background image mobile

Join the mailing list

Get the latest news and updates