Skip to content

Conversation

zugdev
Copy link

@zugdev zugdev commented Aug 17, 2025

Motivation

#9939 is a feature request for --solc-version as a CLI argument for cast storage. This is my first PR, please be as strict as possible so I can learn.

Solution

User can override the detected version by passing cast storage --solc-version <version>, I've added a conditional in case the argument is passed.

I have a few observations:

  1. It's not clear by spec, whether it should be a global cast argument
  2. Should I forbid the user from passing a version older than MIN_SOLC or an invalid compiler version for that artifact? The warning and error message are already displayed in each case.
  3. Should I add a test set?

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zugdev
Copy link
Author

zugdev commented Aug 28, 2025

bumping for feedback!

@grandizzy
Copy link
Collaborator

grandizzy commented Aug 28, 2025

thank you!

It's not clear by spec, whether it should be a global cast argument

IMO storage related should be fine, we can extend if needed on other commands

Should I forbid the user from passing a version older than MIN_SOLC or an invalid compiler version for that artifact?

The warning and error message are already displayed in each case.
Nope, don't think we should

@zerosnacks wdyt on points above?

Should I add a test set?

Yes, please add a test for this, there are samples in cast.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants