Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing to the DB via API functions #1388

Open
jagnani73 opened this issue Jan 3, 2025 · 3 comments
Open

Writing to the DB via API functions #1388

jagnani73 opened this issue Jan 3, 2025 · 3 comments

Comments

@jagnani73
Copy link
Contributor

jagnani73 commented Jan 3, 2025

Problem / use case

The documentation specifies that the API functions can't write to the DB. Why is that, and is there a workaround?
I really need to be able to write to the table via an API function

Proposed solution

No response

@kyscott18
Copy link
Collaborator

Hi, the reason for that is that the database in ponder is not stateful in the sense that it is completely derived from on-chain state (necessary for reorg handling). Every time a new deployment happens it starts from scratch. So, the only place where the database can be written to is an event handler.

Keep your eye out for 0.9, we are planning on providing an example that shows how to achieve a similar result.

@jagnani73
Copy link
Contributor Author

jagnani73 commented Jan 3, 2025

That makes sense
Any timeline for the 0.9?

@kyscott18
Copy link
Collaborator

No timeline, high priority

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants