writing docs

This commit is contained in:
Demian Elias Brener
2016-12-18 19:52:20 -03:00
parent 8ba40d066f
commit ec07dce76f
19 changed files with 345 additions and 314 deletions

24
docs/source/safemath.rst Normal file
View File

@ -0,0 +1,24 @@
SafeMath
=============================================
Provides functions of mathematical operations with safety checks.
assert(bool assertion) internal
"""""""""""""""""""""""""""""""""""""""""""""""""
Throws an error if the passed result is false. Used in this contract by checking mathematical expressions.
safeMul(uint a, uint b) internal returns (uint)
"""""""""""""""""""""""""""""""""""""""""""""""""
Multiplies two unisgned integers. Asserts that dividing the product by the non-zero multiplicand results in the multiplier.
safeSub(uint a, unit b) internal returns (uint)
"""""""""""""""""""""""""""""""""""""""""""""""""
Checks that b is not greater than a before subtracting.
safeAdd(unit a, unit b) internal returns (uint)
"""""""""""""""""""""""""""""""""""""""""""""""""
Checks that the result is greater than both a and b.