Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Apibara Example Chapter #340

Merged
merged 2 commits into from
Mar 5, 2024

Conversation

machuwey
Copy link
Contributor

@machuwey machuwey commented Mar 5, 2024

Example chaper using Apibara DNA to stream Starknet data into a MongoDB database.

Server-Side Code:

The server-side example utilizes Apibara's TypeScript SDK to:

  1. Initiate a real-time data stream from StarkNet using Apibara's SDK capabilities.
  2. Identify and listen for swap events specifically emitted by the AVNU contract.
  3. Process and prepare the raw data for proper storage in a MongoDB database.
  4. Persistently store the swap event data into MongoDB.

Frontend Visualization:

To complement the data streaming backend, the frontend code example demonstrates how to:

Connect to the MongoDB database and subscribe to new data entries.
Display the AVNU swap events in real-time, enabling users to track StarkNet swaps as they happen.

Closes #331

@gianalarcon
Copy link
Contributor

Great job! Awesome contribution. @machuwey Let me know if you still plan to add something to your PR. It looks good

@machuwey
Copy link
Contributor Author

machuwey commented Mar 5, 2024

I think we can merge it for now. I still have some improvements would like to make, but think it pretty much gets the job done.

@machuwey machuwey marked this pull request as ready for review March 5, 2024 19:51
@gianalarcon gianalarcon merged commit c03cb0f into starknet-edu:main Mar 5, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request for Contribution: Add Apibara indexers tutorial
2 participants