NEWTON
Asked
3 months ago
54
views
1
What are Event Indexers in Cairo lang? What is a StarkNet indexer? Can you explain more about how it work and is there any difference between StarkNet indexer and Solidity once?
Newton
asked
3 months ago
0
Accepted answer
If you come from Solidity, you’ll know that Solidity allows you to create indexed parameters in your contract events. The indexed parameters allow you to search for these events using the parameters as filters.
While StarkNet does not currently allow you to create indexed parameters by default in Cairo you can index your events using some available indexers such as Apibara and StarkNet Indexer.
StarkNet indexer is a service created to listen to blockchain events and decode and persist the emitted data, making it available for analysis with SQL, GraphQL, and HTTP queries.
They’ve also created a GraphQL console that enables developers to query blockchain data for events, transactions and their inputs, as well as to filter, aggregate, and sum up values easily.
Apibara is a framework and protocol that helps you build real-time, composable streams of Web3 and Web2 data. Apibara solves the challenge of streaming blockchain data: blocks are not immutable, and their data can be invalidated in response to a chain reorganization.
There’s an amazing template to help you get started indexing events here and a tutorial guide here.
Swagtimus.eth
answered
3 months ago
Cairo/Nile: Testing the proxy upgrade feature, but my tests fail with the error message TypeError: int() can't convert non-string with explicit base.
Why will I use events in Cairo language?
signing a message using account.signMessage(data) | starknet.js
What are a few of the best apps to test on starknet?
Cairo Passing Functions
Where can I learn more about starknet?
when to use tail call optimization in a cairo smartcontract