mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Review suggestions.
This commit is contained in:
parent
4f5a95d569
commit
057db59844
@ -354,7 +354,7 @@ We now want to describe the inline assembly language in detail.
|
||||
|
||||
.. warning::
|
||||
Inline assembly is a way to access the Ethereum Virtual Machine
|
||||
at a low level. This discards and allows you to bypass several safety
|
||||
at a low level. This discards several important safety
|
||||
features of Solidity.
|
||||
|
||||
Example
|
||||
|
@ -107,6 +107,11 @@ and stall those. Please be explicit about such cases in the documentation of you
|
||||
Sending and Receiving Ether
|
||||
===========================
|
||||
|
||||
- Neither contracts nor "external accounts" are currently able to prevent that someone sends them Ether.
|
||||
Contracts can react on and reject a regular transfer, but there are ways
|
||||
to move Ether without creating a message call. One way is to simply "mine to"
|
||||
the contract address and the second way is using ``selfdestruct(x)``.
|
||||
|
||||
- If a contract receives Ether (without a function being called), the fallback function is executed.
|
||||
If it does not have a fallback function, the Ether will be rejected (by throwing an exception).
|
||||
During the execution of the fallback function, the contract can only rely
|
||||
@ -134,11 +139,6 @@ Sending and Receiving Ether
|
||||
means for the recipient to block progress in the sending contract. Again, the best practice here is to use
|
||||
a :ref:`"withdraw" pattern instead of a "send" pattern <withdrawal_pattern>`.
|
||||
|
||||
- Contracts currently cannot prevent that someone sends them Ether.
|
||||
They can react on and reject a regular transfer, but there are ways
|
||||
to move Ether without creating a message call. One way is to simply "mine to"
|
||||
the contract address and the second way is using ``selfdestruct(x)``.
|
||||
|
||||
Callstack Depth
|
||||
===============
|
||||
|
||||
@ -192,7 +192,7 @@ Now someone tricks you into sending ether to the address of this attack wallet:
|
||||
}
|
||||
}
|
||||
|
||||
If your wallet had checked ``msg.sender`` for authorization, it would get the address of the attack wallet, instead of the owner address. But by checking tx.origin, it gets the original address that kicked off the transaction, which is still the owner address. The attack wallet instantly drains all your funds.
|
||||
If your wallet had checked ``msg.sender`` for authorization, it would get the address of the attack wallet, instead of the owner address. But by checking ``tx.origin``, it gets the original address that kicked off the transaction, which is still the owner address. The attack wallet instantly drains all your funds.
|
||||
|
||||
|
||||
Minor Details
|
||||
|
Loading…
Reference in New Issue
Block a user