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

[GraphQL] Rework Event type #19654

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

Conversation

stefan-mysten
Copy link
Contributor

@stefan-mysten stefan-mysten commented Oct 2, 2024

Description

Accessing the bcs field of an Event is rather confusing, as it is not the whole event BCS encoded, but just the contents of it, more specifically, the BCS bytes of a MoveValue.

This PR removes the #flatten in Event, adds a contents field to the type, and adds the bcs field to the Event type which encodes the whole Event.

Test plan

Existing tests


Release notes

Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.

For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC:
  • GraphQL: The Event type has a new field called contents, which is the event's content value as a MoveValue. This replaces the previous scheme that flattened the MoveValue type in the Event type. It also added a bcs field which represents the Base64 encoded BCS serialized event.
  • CLI:
  • Rust SDK:
  • REST API:

Copy link

vercel bot commented Oct 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sui-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 3, 2024 11:19pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
multisig-toolkit ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2024 11:19pm
sui-kiosk ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2024 11:19pm
sui-typescript-docs ⬜️ Ignored (Inspect) Visit Preview Oct 3, 2024 11:19pm

@stefan-mysten stefan-mysten changed the title [GraphQL] Remove the flatten of the MoveValue in Event and rename the field to … [GraphQL] Rework Event type Oct 2, 2024
Copy link
Contributor

@amnn amnn left a comment

Choose a reason for hiding this comment

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

Nice, thank you @stefan-mysten ! Could you also give a heads up to the SDK working group about this change and when it's expected to be released?

@stefan-mysten
Copy link
Contributor Author

stefan-mysten commented Oct 4, 2024

Nice, thank you @stefan-mysten ! Could you also give a heads up to the SDK working group about this change and when it's expected to be released?

Definitely, thanks for the reminder!

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.

3 participants