mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Update docs to reflect deprecation warning
This commit is contained in:
parent
e7543d487d
commit
83a937423f
@ -562,6 +562,11 @@ is removed from the state. Removing the contract in theory sounds like a good
|
||||
idea, but it is potentially dangerous, as if someone sends Ether to removed
|
||||
contracts, the Ether is forever lost.
|
||||
|
||||
.. warning::
|
||||
From version 0.8.18 and up, the use of ``selfdestruct`` in both Solidity and Yul will trigger a
|
||||
deprecation warning, since the ``SELFDESTRUCT`` opcode will eventually undergo breaking changes in behaviour
|
||||
as stated in `EIP-6049 <https://eips.ethereum.org/EIPS/eip-6049>`_.
|
||||
|
||||
.. warning::
|
||||
Even if a contract is removed by ``selfdestruct``, it is still part of the
|
||||
history of the blockchain and probably retained by most Ethereum nodes.
|
||||
|
@ -327,11 +327,13 @@ Contract Related
|
||||
- the receiving contract's receive function is not executed.
|
||||
- the contract is only really destroyed at the end of the transaction and ``revert`` s might "undo" the destruction.
|
||||
|
||||
|
||||
|
||||
|
||||
Furthermore, all functions of the current contract are callable directly including the current function.
|
||||
|
||||
.. warning::
|
||||
From version 0.8.18 and up, the use of ``selfdestruct`` in both Solidity and Yul will trigger a
|
||||
deprecation warning, since the ``SELFDESTRUCT`` opcode will eventually undergo breaking changes in behaviour
|
||||
as stated in `EIP-6049 <https://eips.ethereum.org/EIPS/eip-6049>`_.
|
||||
|
||||
.. note::
|
||||
Prior to version 0.5.0, there was a function called ``suicide`` with the same
|
||||
semantics as ``selfdestruct``.
|
||||
|
@ -899,6 +899,7 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a
|
||||
| revert(p, s) | `-` | B | end execution, revert state changes, return data mem[p...(p+s)) |
|
||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||
| selfdestruct(a) | `-` | F | end execution, destroy current contract and send funds to a |
|
||||
| | | | (deprecated) |
|
||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||
| invalid() | `-` | F | end execution with invalid instruction |
|
||||
+-------------------------+-----+---+-----------------------------------------------------------------+
|
||||
@ -956,6 +957,11 @@ the ``dup`` and ``swap`` instructions as well as ``jump`` instructions, labels a
|
||||
Please note that irrelevant to which EVM version is selected in the compiler, the semantics of
|
||||
instructions depend on the final chain of deployment.
|
||||
|
||||
.. warning::
|
||||
From version 0.8.18 and up, the use of ``selfdestruct`` in both Solidity and Yul will trigger a
|
||||
deprecation warning, since the ``SELFDESTRUCT`` opcode will eventually undergo breaking changes in behaviour
|
||||
as stated in `EIP-6049 <https://eips.ethereum.org/EIPS/eip-6049>`_.
|
||||
|
||||
In some internal dialects, there are additional functions:
|
||||
|
||||
datasize, dataoffset, datacopy
|
||||
|
@ -311,7 +311,7 @@ vector<YulString> AsmAnalyzer::operator()(FunctionCall const& _funCall)
|
||||
|
||||
if (BuiltinFunction const* f = m_dialect.builtin(_funCall.functionName.name))
|
||||
{
|
||||
if (_funCall.functionName.name.str() == "selfdestruct")
|
||||
if (_funCall.functionName.name == "selfdestruct"_yulstring)
|
||||
m_errorReporter.warning(
|
||||
1699_error,
|
||||
nativeLocationOf(_funCall.functionName),
|
||||
|
Loading…
Reference in New Issue
Block a user