mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #12606 from ethereum/chriseth-patch-1
[docs] Correct type of address.code
This commit is contained in:
commit
e87d959f48
@ -331,7 +331,9 @@ on ``call``.
|
||||
|
||||
* ``code`` and ``codehash``
|
||||
|
||||
You can query the deployed code for any smart contract. Use ``code`` to get the EVM bytecode as a string, which might be empty. Use ``codehash`` get the Keccak-256 hash of that code.
|
||||
You can query the deployed code for any smart contract. Use ``.code`` to get the EVM bytecode as a
|
||||
``bytes memory``, which might be empty. Use ``.codehash`` get the Keccak-256 hash of that code
|
||||
(as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
|
||||
|
||||
.. note::
|
||||
All contracts can be converted to ``address`` type, so it is possible to query the balance of the
|
||||
|
Loading…
Reference in New Issue
Block a user