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

Update SDK encoding/decoding for Cadence 1.0 #1863

Merged
merged 17 commits into from May 9, 2024
Merged

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Apr 30, 2024

closes #1861

Copy link

changeset-bot bot commented Apr 30, 2024

🦋 Changeset detected

Latest commit: 5ed4763

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@onflow/sdk Minor
@onflow/types Minor
@onflow/fcl-core Patch
@onflow/fcl-react-native Patch
@onflow/fcl Patch
@onflow/fcl-wc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -638,6 +641,9 @@ export const Optional = <
v => v
)

/**
* @deprecated Reference values cannot be imported into the Cadence interpreter, will be removed in future versions
*/
export const Reference = typedef(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Don't know what the deal is with this... if it's a relic of the past or just a mistake altogether, because Reference values cannot be imported into the Cadence interpreter, so this will never work.

@jribbink jribbink marked this pull request as ready for review May 1, 2024 16:02
@jribbink jribbink requested a review from a team as a code owner May 1, 2024 16:02
@jribbink jribbink marked this pull request as draft May 1, 2024 16:14
Comment on lines 900 to 904
(v: {
start: TypeDescriptorInput<T>
end: TypeDescriptorInput<T>
step?: TypeDescriptorInput<T>
}) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have prefered to use a tuple here for brevity, but it feels more explicit to use an object for the decoding, and I think there's value in encoding/decoding formats being in sync

@jribbink jribbink marked this pull request as ready for review May 1, 2024 18:36
@jribbink jribbink merged commit 7ef7edf into master May 9, 2024
1 check passed
@jribbink jribbink deleted the jribbink/c1-json-cdc branch May 9, 2024 19:22
@github-actions github-actions bot mentioned this pull request May 9, 2024
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.

[FEATURE] Update JSON-CDC encoding for Cadence 1.0
2 participants