aboutsummaryrefslogtreecommitdiffstats
path: root/docs/security-considerations.rst
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-09-05 23:59:55 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-09-13 21:15:49 +0800
commit12aaca16458861e9b622818d49a82c1a7026594e (patch)
tree7b51c4893c6646134618b6c20574317ec014f225 /docs/security-considerations.rst
parent9214c7c34f5e4501a50cb29de964bbf04131f9a3 (diff)
downloaddexon-solidity-12aaca16458861e9b622818d49a82c1a7026594e.tar.gz
dexon-solidity-12aaca16458861e9b622818d49a82c1a7026594e.tar.zst
dexon-solidity-12aaca16458861e9b622818d49a82c1a7026594e.zip
Add payable and non-payable state mutability to AddressType.
Diffstat (limited to 'docs/security-considerations.rst')
-rw-r--r--docs/security-considerations.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst
index 3bcd9566..8df12b7c 100644
--- a/docs/security-considerations.rst
+++ b/docs/security-considerations.rst
@@ -192,7 +192,7 @@ Never use tx.origin for authorization. Let's say you have a wallet contract like
owner = msg.sender;
}
- function transferTo(address dest, uint amount) public {
+ function transferTo(address payable dest, uint amount) public {
require(tx.origin == owner);
dest.transfer(amount);
}
@@ -205,11 +205,11 @@ Now someone tricks you into sending ether to the address of this attack wallet:
pragma solidity >0.4.24;
interface TxUserWallet {
- function transferTo(address dest, uint amount) external;
+ function transferTo(address payable dest, uint amount) external;
}
contract TxAttackWallet {
- address owner;
+ address payable owner;
constructor() public {
owner = msg.sender;