Go package for interacting with starknet. It is a tool which can be used in cli for the following tasks
This is inspired from nethermind/entro but implemented in GoLang and is therefore much faster than Entro. Unlike entro which is limited to being a cli tool , We have implemented frontend as well for Athena(Currently limited to backfilling ) We plan to make the frontend fully functional soon.
The below graph compares the backfilling time taken by Athena and Entro .
- Backfill full blocks including events , tx & receipts
- Get implementation history
- ABI Decoding
- Decoding of functions & events from a transaction
from :- block number
to :- block number
jsonRpcUrl - https://rpc.nethermind.io/mainnet-juno?x-apikey=YOUR_API_KEY
output :- your_file_name.csv
abi parser , to parse each event and function ie to get its name and parameters and their datatype to help us in decoding
go run cli/get/starknet.go --classHash 0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003 --jsonRpcUrl "https://rpc.nethermind.io/mainnet-juno?x-apikey=MIkLH4AOTdTH9uqu8PqvSHUBNnAnMU1fXdROa3qc1DsSVxvOcGRrwr6kSj1zsNjT" --decode
Result - list of functions and events decoded in that ABI to your console.
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
go run cli/get/dispatcher.go -event TransactionExecuted -contract 0x005a708f9c84bc709e967086572c6655e2b85eaf5a2ef752d92e24e64c5e392c_1 -from 691000 -to 692000
Result -
Similar as above but instead of keys and data pairs we give call data as input that we will fetch in the provided blockrange
From - Block Number
To - Block Number
go run cli/backfill/starknet_events.go --from 67800 --to 67801 --rpc-url https://starknet-mainnet.public.blastapi.io/rpc/v0_7 --output events.csv --chunk-size 100
go run cli/backfill/starknet_filters.go -rpc-url "https://rpc.nethermind.io/mainnet-juno?x-apikey=MIkLH4AOTdTH9uqu8PqvSHUBNnAnMU1fXdROa3qc1DsSVxvOcGRrwr6kSj1zsNjT" -contract-address "0x01a736d6ed154502257f02b1ccdf4d9d1089f80811cd6acad48e6b6a9d1f2003" -from 100000 -to 200000 -output "filtered_events.csv"
Result - all events decoded in your excel file
go run starknet.go --from 110 --to 130 --rpc-url https://rpc.nethermind.io/mainnet-juno?x-apikey=MIkLH4AOTdTH9uqu8PqvSHUBNnAnMU1fXdROa3qc1DsSVxvOcGRrwr6kSj1zsNjT --output blocks_details.csv --transactionhash (for block data)
Result - all blocks , transaction hashes , receipts & events of that txns data in your csv files.