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): settings lost their memoized values #1367

Merged
merged 5 commits into from
Sep 12, 2024
Merged

Conversation

saeta-eth
Copy link
Contributor

@saeta-eth saeta-eth commented Sep 10, 2024

We need to memoize/cache the settings once they're used. In many parts of the code, we call resolveCliSettings without arguments, expecting it to return the memoized value. However, this isn't happening, and as a result, we're using incorrect settings. I've detected this issue in the decode command, but I'm fairly certain it's occurring throughout the project.

For instance, cannon decode synthetix-omnibus:3.3.4@main 0x243fc3d98160ae6ec9f764dd688cbc4c99d29f30d5e28ebefdc4968a45371ce3 --rpc-url https://mainnet.gateway.tenderly.co is not using the RPC url and instead its using the default Viem values.

Closes https://linear.app/usecannon/issue/CAN-515/settings-lost-their-memoized-values

@saeta-eth saeta-eth added the bug Something isn't working label Sep 10, 2024
@saeta-eth saeta-eth self-assigned this Sep 10, 2024
Copy link

changeset-bot bot commented Sep 10, 2024

⚠️ No Changeset found

Latest commit: 69123a5

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

@saeta-eth saeta-eth changed the title fix(cli): memoized settings fix(cli): Settings lost their memoized values Sep 10, 2024
@saeta-eth saeta-eth requested a review from a team September 10, 2024 21:17
@saeta-eth saeta-eth marked this pull request as ready for review September 10, 2024 21:20
@saeta-eth saeta-eth changed the title fix(cli): Settings lost their memoized values fix(cli): settings lost their memoized values Sep 10, 2024
@mjlescano mjlescano merged commit 76f2445 into main Sep 12, 2024
6 of 8 checks passed
@mjlescano mjlescano deleted the fix/settings-cache branch September 12, 2024 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants