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

Externally-fetched interfaces from Etherscan may not match internal solc version #21

Closed
gnidan opened this issue Aug 6, 2022 · 1 comment

Comments

@gnidan
Copy link
Contributor

gnidan commented Aug 6, 2022

I noticed that this project is invoking abi-to-sol by asking for Solidity v0.8.9, which differs from this project's solc dependency version of ^0.8.15. This probably isn't a big deal, but in the future it might make sense to align this generateSolidity({ solidityVersion }) field more formally with the version of solc that's running in this shell.

Note that this field accepts a semver range, and abi-to-sol seeks to output Solidity that is valid across all versions in that range... so you can probably start by doing a require("../../package.json").dependencies["solc"] or such and just use that instead of hardcoding some kind of version or version range literal.

@gnidan
Copy link
Contributor Author

gnidan commented Aug 6, 2022

Oh, but you allow users to specify a pragma solidity statement to select a different solc version...

In that case, you probably want to capture that user-specified range and pass that to abi-to-sol. This should work fine (except for weird situations where users want >0.4.0 <0.9.0 or some range that's overly broad and contains unreconcilable syntax forms)

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

No branches or pull requests

1 participant