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

fix(cli): Fix parse error on undefined values in tuples #1285

Merged
merged 8 commits into from
Aug 20, 2024
Merged

Conversation

FuzzB0t
Copy link
Contributor

@FuzzB0t FuzzB0t commented Aug 16, 2024

When decoding tuples, the whole struct being decoded is passed as an object inside of an array containing the values of the struct, the decode function attempts to parse this as an array when it should be parsing tuple values as objects this was causing an error when trying to parse these values and they were returning undefined.

Also added names to the values inside of a tuple to make it more clear

Before:
image

After:

Note: For the feed id below, the bytes32 value does not get parsed correctly and returns garbled output
image

fixes https://linear.app/usecannon/issue/CAN-437/decode-command-does-not-work-with-tuples

Copy link

changeset-bot bot commented Aug 16, 2024

⚠️ No Changeset found

Latest commit: 1b4ff6c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

nx-cloud bot commented Aug 16, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1b4ff6c. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@FuzzB0t FuzzB0t marked this pull request as draft August 16, 2024 19:03
@FuzzB0t FuzzB0t self-assigned this Aug 16, 2024
@FuzzB0t FuzzB0t requested a review from a team August 16, 2024 19:35
@FuzzB0t FuzzB0t marked this pull request as ready for review August 16, 2024 20:31
@FuzzB0t FuzzB0t merged commit 3c056d0 into main Aug 20, 2024
7 of 9 checks passed
@FuzzB0t FuzzB0t deleted the decode-tuple branch August 20, 2024 15:12
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