mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Grammar fix
This commit is contained in:
parent
62e4ce3387
commit
0d98436de6
@ -221,7 +221,7 @@ Operators:
|
|||||||
|
|
||||||
.. warning::
|
.. warning::
|
||||||
If you convert a type that uses a larger byte size to an ``address``, for example ``bytes32``, then the ``address`` is truncated.
|
If you convert a type that uses a larger byte size to an ``address``, for example ``bytes32``, then the ``address`` is truncated.
|
||||||
To reduce conversion ambiguity version 0.4.24 and higher of the compiler force you make the truncation explicit in the conversion.
|
To reduce conversion ambiguity, starting with version 0.4.24, the compiler will force you to make the truncation explicit in the conversion.
|
||||||
Take for example the 32-byte value ``0x111122223333444455556666777788889999AAAABBBBCCCCDDDDEEEEFFFFCCCC``.
|
Take for example the 32-byte value ``0x111122223333444455556666777788889999AAAABBBBCCCCDDDDEEEEFFFFCCCC``.
|
||||||
|
|
||||||
You can use ``address(uint160(bytes20(b)))``, which results in ``0x111122223333444455556666777788889999aAaa``,
|
You can use ``address(uint160(bytes20(b)))``, which results in ``0x111122223333444455556666777788889999aAaa``,
|
||||||
@ -336,7 +336,7 @@ on ``call``.
|
|||||||
* ``code`` and ``codehash``
|
* ``code`` and ``codehash``
|
||||||
|
|
||||||
You can query the deployed code for any smart contract. Use ``.code`` to get the EVM bytecode as a
|
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
|
``bytes memory``, which might be empty. Use ``.codehash`` to get the Keccak-256 hash of that code
|
||||||
(as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
|
(as a ``bytes32``). Note that ``addr.codehash`` is cheaper than using ``keccak256(addr.code)``.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
Loading…
Reference in New Issue
Block a user