Move FAQ item about truncation checks

Move warning

Updates from feedback

Link to security note and fix link rendering

Move solution to security docs and turn warning to a warning
This commit is contained in:
Chris Ward
2019-01-22 13:54:58 +02:00
parent fd3bdcb747
commit 96fae0c220
3 changed files with 9 additions and 15 deletions
+5
View File
@@ -39,6 +39,11 @@ Operators:
* Shift operators: ``<<`` (left shift), ``>>`` (right shift)
* Arithmetic operators: ``+``, ``-``, unary ``-``, ``*``, ``/``, ``%`` (modulo), ``**`` (exponentiation)
.. warning::
Integers in Solidity are restricted to a certain range. For example, with ``uint32``, this is ``0`` up to ``2**32 - 1``.
If the result of some operation on those numbers does not fit inside this range, it is truncated. These truncations can have
serious consequences that you should :ref:`be aware of and mitigate against<underflow-overflow>`.
Comparisons
^^^^^^^^^^^