-
Notifications
You must be signed in to change notification settings - Fork 110
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 getActions
to LocalBlockchain
#327
Conversation
should stay part of reducer, that gives us much better typing than we have with events. I think we should change events as well at some point |
…encingEvents"" This reverts commit 23fc757.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Description
This is a follow up PR to #323 that introduces
getActions
(fetchSequenceEvents
) to theLocalBlockchain
and the reducer on smart contracts.In order to get it working #324 is required, since it adds the needed
sequenceState
field to zkapp accounts. (DONE)Under the hood
Similar to
fetchEvents
, emitted actions are now stored in a variable calledactions
and theLocalBlockchain
exposes a closure 'getActions` that returns all emitted actions.zkApp instances can now fetch sequence events (actions) as follows:
Question:
getActions
currently is a part of thereducer
. Should it stay there or become its own method on theSmartContract
class, similar tofetchEvents
?The example
src/examples/state_update_rollup.ts
has been extended to support multiple action rollupscloses #284