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 support for querying and parsing built-in events #60

Open
9 tasks
psiemens opened this issue Jun 18, 2020 · 2 comments
Open
9 tasks

Add support for querying and parsing built-in events #60

psiemens opened this issue Jun 18, 2020 · 2 comments

Comments

@psiemens
Copy link
Contributor

psiemens commented Jun 18, 2020

Flow defines the following built-in system events which are emitted when creating and updating accounts:

"flow.AccountCreated"
"flow.AccountKeyAdded"
"flow.AccountKeyRemoved"
"flow.AccountCodeUpdated"

The SDK should provide support for querying and parsing these events. Currently the SDK supports flow.AccountCreated and the (now deprecated) flow.AccountUpdated event, but it should should all four events above.

For reference, these events are defined in Cadence here: https://github.com/onflow/cadence/blob/30a200f9c324a208336e233b8b3293370a68a3ed/runtime/stdlib/flow_builtin.go#L219-L246

Definition of Done

  • A user can query events of type flow.AccountCreated
  • A user can query events of type flow.AccountKeyAdded
  • A user can query events of type flow.AccountKeyRemoved
  • A user can query events of type flow.AccountCodeUpdated
  • A user can read all fields on event of type flow.AccountCreated as native Go values
  • A user can read all fields on event of type flow.AccountKeyAdded as native Go values
  • A user can read all fields on event of type flow.AccountKeyRemoved as native Go values
  • A user can read all fields on event of type flow.AccountCodeUpdated as native Go values
  • A user can read documentation for the following built-in events:
    • flow.AccountCreated
    • flow.AccountKeyAdded
    • flow.AccountKeyRemoved
    • flow.AccountCodeUpdated
@beaugunderson
Copy link
Contributor

Is the basic work here to add the Event structs to event.go and add the struct methods for accessing the native Go values?

@psiemens
Copy link
Contributor Author

psiemens commented Mar 9, 2021

@beaugunderson Yep, pretty much!

TBH I'm not in love with the existing approach, so definitely open to alternatives. Regardless, it probably makes sense to eventually have a codegen solution that generates these structs from the Cadence source.

@devbugging devbugging added the L2 label Feb 23, 2022
@devbugging devbugging added the L1 label Jun 27, 2022
@devbugging devbugging moved this to 🔖 Ready for Pickup in 🌊 Flow 4D Mar 30, 2023
@devbugging devbugging added the Good First Issue Good for newcomers label Aug 4, 2023
@gregsantos gregsantos moved this from 🔖 Ready for Pickup to 🧊Ice Box in 🌊 Flow 4D Jan 16, 2024
@gregsantos gregsantos moved this to 🧊 Backlog in 🌊 Flow 4D Feb 26, 2024
@chasefleming chasefleming removed their assignment May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🧊 Backlog
Development

No branches or pull requests

4 participants