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

Automatically set correct compiler version when instantiating Slither #2595

Closed
Yustynn opened this issue Oct 24, 2024 · 3 comments
Closed

Automatically set correct compiler version when instantiating Slither #2595

Yustynn opened this issue Oct 24, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Yustynn
Copy link

Yustynn commented Oct 24, 2024

Describe the desired feature

I'd like the version to be auto-detected (e.g. from the solidity pragma) and set. Maybe I'm doing it wrong, but currently I had to write non-slither code to do this for me.

Use case: I'm doing analysis on many contracts of different compiler versions.

Is this feature desirable? Idm making a PR if yes, would appreciate any guidance on implementation if you have preferences

@Yustynn Yustynn added the enhancement New feature or request label Oct 24, 2024
@elopez
Copy link
Member

elopez commented Oct 24, 2024

Hi! crytic-compile already offers this functionality of "guessing" the solc version. You need to list the allowed and installed versions in the solc_solcs_select option / --solc-solcs-select flag when running Slither or crytic-compile.

https://github.com/crytic/crytic-compile/blob/20df04f37af723eaa7fa56dc2c80169776f3bc4d/crytic_compile/platform/solc.py#L713-L733

Additionally, if you're pulling code from Etherscan, we'll fetch the version number that was used for verification there so there's no need to be guessing.

@Yustynn
Copy link
Author

Yustynn commented Oct 24, 2024

Ah that's great, thanks :)

@webgit63
Copy link

Hi
I am really lost in all this.
I been trying for a year to find
out if any of this is real.
I keep getting transactions sent
From Ethplorer ….
Anyone here that can help,
I would truly appreciate it

Wayne Brown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants