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

add documentation for app defined events #57

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ecioppettini
Copy link
Contributor

Document the user facing changes in PaimaStudios/paima-engine#409

@ecioppettini ecioppettini self-assigned this Aug 22, 2024
@@ -37,7 +37,7 @@ export default async function (
blockHeader: BlockHeader,
randomnessGenerator: Prando,
dbConn: Pool
): Promise<SQLUpdate[]> {
): Promise<{ stateTransitions: SQLUpdate[], events: [] }> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While writing this I started to wonder if it would be worth to have it accept either {stateTransitions: SQLUpdate[], events: ...} or just SQLUpdate[] to keep the existing code working. We can dynamically check if the returned object is an object with the stateTransitions key, so we could branch on that on the engine's side. It depends on how much do we care about the breaking change and how common is the no-events case I guess.

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

Successfully merging this pull request may close these issues.

1 participant