You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/types/value-types.rst
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -331,7 +331,9 @@ on ``call``.
331
331
332
332
* ``code`` and ``codehash``
333
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.
334
+
You can query the deployed code for any smart contract. Use ``.code`` to get the EVM bytecode as a
335
+
``bytes memory``, which might be empty. Use ``.codehash`` get the Keccak-256 hash of that code
336
+
(as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
335
337
336
338
.. note::
337
339
All contracts can be converted to ``address`` type, so it is possible to query the balance of the
0 commit comments