usecannon / cannon

Manage EVM protocol deployments. Inspired by Docker, Terraform, and npm.
https://usecannon.com
GNU General Public License v3.0
103 stars 20 forks source link

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

Closed FuzzB0t closed 1 month ago

FuzzB0t commented 1 month ago

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

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 1b4ff6c6d66399d469da7d5988d7edfc9cef3cb6

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

nx-cloud[bot] commented 1 month ago

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1b4ff6c6d66399d469da7d5988d7edfc9cef3cb6. 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 - [`lerna run build --ignore cannon-website --ignore @usecannon/indexer --ignore repo --ignore @usecannon/api`](https://cloud.nx.app/runs/5odOb8YU6s?utm_source=pull-request&utm_medium=comment)

Sent with 💌 from NxCloud.