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

Selecting the main contract when fetching from Etherscan #215

Closed
ggrieco-tob opened this issue Oct 27, 2021 · 0 comments
Closed

Selecting the main contract when fetching from Etherscan #215

ggrieco-tob opened this issue Oct 27, 2021 · 0 comments

Comments

@ggrieco-tob
Copy link
Member

crytic-compile can query etherscan for getting source code of verified contracts, however, it cannot provide the information of which contract corresponds to an address. For instance, for the DAI contract, the source code contains two contracts. The information that the DAI contract is the one needed is available in the etherscan respose:

"ContractName":"Dai"

However, the resulting file from crytic-compile does not include it and there is no way to pass it to other tools like Echidna. How we can easily instrument this?

montyly added a commit that referenced this issue Dec 8, 2021
- Use the standard json to improve the support of multi files in etherscan
- Use the contract name as the compilation unit unique ID (fix #215)
- Create standalone functions for the solc standard json
- Create a CompileVersion object instead of a namedtuple
- Add optimize runs in the compiler version - for now this is only
supported for etherscan
- For etherscan, detect if solc-select is installed and warns the user
if the lib is not installed. Otherwise install the solc version if its missing (fix #157)
@montyly montyly closed this as completed in 8eec142 Dec 9, 2021
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