SafeMathU8
Table of contents
Constructors
Methods
Constructors
constructor
• new SafeMathU8(): SafeMathU8
Returns
Methods
add
▸ add(a
, b
): u8
Parameters
Name | Type |
---|---|
a | u8 |
b | u8 |
Returns
u8
Returns the addition of two unsigned integers, reverting on overflow.
Defined in
assembly/libraries/SafeMath.ts:85
sub
▸ sub(a
, b
): u8
Parameters
Name | Type |
---|---|
a | u8 |
b | u8 |
Returns
u8
Returns the integer division of two unsigned integers. Reverts with custom message on division by zero. The result is rounded towards zero.