-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Respect solc version when importing ABI JSON files inside Solidity code #4365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good @gnidan . We'll know if it breaks soon enough :)
This is a good idea! Can you make an issue so we don't lose it? |
Yep seems more is needed here. Oops! |
d52b374
to
bc4836f
Compare
bc4836f
to
1ae2a02
Compare
21f8ef6
to
dafb5f6
Compare
1ae2a02
to
f883dc6
Compare
dafb5f6
to
9258396
Compare
f883dc6
to
2822e3e
Compare
c9968ec
to
d57ab0c
Compare
2822e3e
to
161379a
Compare
d57ab0c
to
eb6f72f
Compare
161379a
to
e1b09bc
Compare
|
e1b09bc
to
34d41b9
Compare
OK, now this no longer needs to be merge-after-target, right? :) |
34d41b9
to
8588ebd
Compare
- Ensure we pass solc version info to abi-to-sol - Strip off `+commit.<hash>.<build>` suffix from argument
8588ebd
to
9e2ef8e
Compare
This approval was from a time when we thought this upgrade would be easy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, just two quick comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, seems good to me!
Thanks! Will merge when green. |
(Also reworded this to be an enhancement, rather than a dependency update, to be more explicit about the reasoning behind this upgrade.) |
This PR upgrades abi-to-sol to ^0.5.1, taking advantage of the new functionality in that package to generate version-specific Solidity output.
In order to accommodate this new functionality, we need to know what Solidity version to generate, and so this PR builds on the work of #4420 by hooking the compiler information into the
ABI
ResolverSource.Mostly straightforward, but I noticed one gotcha: when
resolver.resolve()
receives compiler info, it likely receives a version string containing the full commit and target info. This PR ensures theABI
ResolverSource strips that off because otherwise abi-to-sol throws an exception.