Skip to content

VIP: Add support for EXTCODEHASH #1765

@fubuloubu

Description

@fubuloubu

Simple Summary

Add support for the EXTCODEHASH opcode, which was added in Constantinople via EIP-1052 which allows a user to obtain the keccak256 hash of a contract's deployed bytecode.

Motivation

This feature is helpful for users who want to check that a particular configuration of a contract's bytecode is a given value, such as the use of proxy/registry contracts, and other uses.

Specification

Add the attribute address.codehash which returns the hash of the given account's address per EIP-1052 by calling that opcode. Note the updated gas costs in #1653.

Backwards Compatibility

No backwards incompatibilities.

Dependencies

No dependencies

Copyright

Copyright and related rights waived via CC0


Edits:

#1818 - Modified syntax from get_extcodehash(address) to address.codehash

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions