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
Simple Summary
Add support for the
EXTCODEHASHopcode, which was added in Constantinople via EIP-1052 which allows a user to obtain thekeccak256hash 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.codehashwhich 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)toaddress.codehash