mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
fix docs
Co-authored-by: r0qs <rodrigo.saramago@protonmail.com>
This commit is contained in:
parent
5d7533b540
commit
ce0fbae00b
@ -65,7 +65,7 @@ inheritance.
|
|||||||
Types defined inside interfaces and other contract-like structures
|
Types defined inside interfaces and other contract-like structures
|
||||||
can be accessed from other contracts: ``Token.TokenType`` or ``Token.Coin``.
|
can be accessed from other contracts: ``Token.TokenType`` or ``Token.Coin``.
|
||||||
|
|
||||||
.. warning:
|
.. warning::
|
||||||
|
|
||||||
Interfaces have supported ``enum`` types since :doc:`Solidity version 0.5.0 <050-breaking-changes>`, make
|
Interfaces have supported ``enum`` types since :doc:`Solidity version 0.5.0 <050-breaking-changes>`, make
|
||||||
sure the pragma version specifies this version as a minimum.
|
sure the pragma version specifies this version as a minimum.
|
||||||
|
@ -636,7 +636,7 @@ expression type.
|
|||||||
It is also helpful to cast the called contract's variable as the type of the
|
It is also helpful to cast the called contract's variable as the type of the
|
||||||
most derived type in case of inheritance.
|
most derived type in case of inheritance.
|
||||||
|
|
||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
// SPDX-License-Identifier: GPL-3.0
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >=0.8.0;
|
pragma solidity >=0.8.0;
|
||||||
@ -697,8 +697,9 @@ storage for ``address`` variables, therefore if ``B.a`` had type ``address``
|
|||||||
the encoding would assume that its storage does not change in between
|
the encoding would assume that its storage does not change in between
|
||||||
transactions to ``B``.
|
transactions to ``B``.
|
||||||
|
|
||||||
.. code-block:: solidity
|
.. code-block:: solidity
|
||||||
|
|
||||||
|
// SPDX-License-Identifier: GPL-3.0
|
||||||
pragma solidity >=0.8.0;
|
pragma solidity >=0.8.0;
|
||||||
|
|
||||||
contract A {
|
contract A {
|
||||||
|
@ -380,7 +380,7 @@ The following properties are available for a contract type ``C``:
|
|||||||
In addition to the properties above, the following properties are available
|
In addition to the properties above, the following properties are available
|
||||||
for an interface type ``I``:
|
for an interface type ``I``:
|
||||||
|
|
||||||
``type(I).interfaceId``:
|
``type(I).interfaceId``
|
||||||
A ``bytes4`` value containing the `EIP-165 <https://eips.ethereum.org/EIPS/eip-165>`_
|
A ``bytes4`` value containing the `EIP-165 <https://eips.ethereum.org/EIPS/eip-165>`_
|
||||||
interface identifier of the given interface ``I``. This identifier is defined as the ``XOR`` of all
|
interface identifier of the given interface ``I``. This identifier is defined as the ``XOR`` of all
|
||||||
function selectors defined within the interface itself - excluding all inherited functions.
|
function selectors defined within the interface itself - excluding all inherited functions.
|
||||||
|
Loading…
Reference in New Issue
Block a user