-
Notifications
You must be signed in to change notification settings - Fork 91
platform: etherscan: add support for solc remaps, evm version #447
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
Conversation
This adds support for solc remaps found in the Etherscan JSON. Fixes: #415
e739787 to
4aa13a1
Compare
aa7af41 to
7da2761
Compare
|
This also seems to fix the case in #386. The case in #151 requires passing the EVM target, which this PR doesn't, but it could be added as a follow up. #150:
we could override any absolute paths and make them relative though, that would work in this case from what I can see.
|
f61ef40 to
fa4cd58
Compare
1aa03fc to
21b1f59
Compare
|
I added some more code to handle those two cases 👍 |
is_absolute() will return False on Windows if a Path does not contain a drive letter (e.g. if you are using a POSIX path string) solc on Windows does not seem to like case #5 though, so mark it as expected to fail.
21b1f59 to
fec9713
Compare
| if os.path.commonpath((allowed_path, os.path.abspath(dest_disk))) != allowed_path: | ||
| LOGGER.warning("Remapping %s=%s is potentially unsafe, skipping", origin, dest) | ||
| continue |
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.
Not blocking but we should extract this into utils so we can have a common API to validate absolute path resolution (ref 8a7c037)
This adds support for solc remaps and EVM version found in the Etherscan JSON.
Fixes #150, #151, #386, #415