Skip to main content

SafeMathU8

Table of contents

Constructors

Methods

Constructors

constructor

new SafeMathU8(): SafeMathU8

Returns

SafeMathU8

Methods

add

add(a, b): u8

Parameters

NameType
au8
bu8

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

NameType
au8
bu8

Returns

u8

Returns the integer division of two unsigned integers. Reverts with custom message on division by zero. The result is rounded towards zero.

Defined in

assembly/libraries/SafeMath.ts:99