/reach-safe-math

This is a module built for the Reach framework. It is heavily inspired by the work OpenZepplin has done in the SafeMath.sol util.

Primary LanguageShellMIT LicenseMIT

reach-safe-math

This is a module built for the Reach framework. It is heavily inspired by the work OpenZepplin has done in the SafeMath.sol util.

Usage

Reach Documentation

import * as safeMath from '@xBacked-DAO/reach-safe-math';

Alternatively

import { tryDiv } from '@xBacked-DAO/reach-safe-math';

Then, to install the packages so compilation works use the install-pkgs flag like below.

./reach compile program.rsh --install-pkgs

⚠️ Note: this does not compile your program, run ./reach compile program.rsh after the install and add .reach to your .gitignore file.