Merge pull request #7732 from ethereum/explainSelfdestruct

[DOC] Some more explanation for selfdestruct.
This commit is contained in:
chriseth 2019-11-26 16:09:05 +01:00 committed by GitHub
commit 38a4bfd034
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -262,7 +262,15 @@ Contract Related
the current contract, explicitly convertible to :ref:`address`
``selfdestruct(address payable recipient)``:
destroy the current contract, sending its funds to the given :ref:`address`
Destroy the current contract, sending its funds to the given :ref:`address`
and end execution.
Note that ``selfdestruct`` has some peculiarities inherited from the EVM:
- 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.