Skip to content

Commit 78f0be5

Browse files
committed
Document address members code and codehash
1 parent bc4436c commit 78f0be5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/types/value-types.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,10 @@ on ``call``.
329329
regardless of whether state is read from or written to, as this can have many pitfalls.
330330
Also, access to gas might change in the future.
331331

332+
* ``code`` and ``codehash``
333+
334+
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.
335+
332336
.. note::
333337
All contracts can be converted to ``address`` type, so it is possible to query the balance of the
334338
current contract using ``address(this).balance``.

0 commit comments

Comments
 (0)