From dfeb1dec9ed27c32a92175bbbcc496fb56fa2f3b Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Mon, 1 Apr 2019 13:02:26 +0200 Subject: [PATCH] Add rounding warning Move warning --- docs/control-structures.rst | 1 - docs/security-considerations.rst | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/control-structures.rst b/docs/control-structures.rst index fa59a4adf..c8be772f4 100644 --- a/docs/control-structures.rst +++ b/docs/control-structures.rst @@ -72,7 +72,6 @@ all function arguments have to be copied to memory. When calling functions of other contracts, you can specify the amount of Wei or gas sent with the call with the special options ``.value()`` and ``.gas()``, respectively. Any Wei you send to the contract is added to the total balance of the contract: - :: pragma solidity >=0.4.0 <0.7.0; diff --git a/docs/security-considerations.rst b/docs/security-considerations.rst index 8c1b02473..61609ec6d 100644 --- a/docs/security-considerations.rst +++ b/docs/security-considerations.rst @@ -149,6 +149,9 @@ Sending and Receiving Ether into the sending contract or other state changes you might not have thought of. So it allows for great flexibility for honest users but also for malicious actors. +- Use the most precise units to represent the wei amount as possible, as you lose + any that is rounded due to a lack of precision. + - If you want to send Ether using ``address.transfer``, there are certain details to be aware of: 1. If the recipient is a contract, it causes its fallback function to be executed which can, in turn, call back the sending contract.