Skip to content

Verification of contract libraries #455

@jmank88

Description

@jmank88

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions