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

Verification of contract libraries #455

Open
jmank88 opened this issue Mar 18, 2020 · 0 comments
Open

Verification of contract libraries #455

jmank88 opened this issue Mar 18, 2020 · 0 comments

Comments

@jmank88
Copy link
Contributor

jmank88 commented Mar 18, 2020

If your contracts use libraries, you will notice that the bytecode contains substrings of the form __$53aea86b7d70b31448b230b20ae141a537$__. These are placeholders for the actual library addresses. The placeholder is a 34 character prefix of the hex encoding of the keccak256 hash of the fully qualified library name. The bytecode file will also contain lines of the form // -> at the end to help identify which libraries the placeholders represent.

From https://solidity.readthedocs.io/en/v0.5.8/using-the-compiler.html

When verifying a contract, explorer should notice placeholder strings for libraries and relax the match from exact to legal-address. We should extract those addresses to present and link in the UI as well.

An alternative approach would be to allow the user to provide the name/address association, and to just compile with that. This would be simpler to implement, but much less automatic.

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