SafeMath

Git Source

Functions

add

function add(uint256 a, uint256 b) internal pure returns (uint256);

sub

function sub(uint256 a, uint256 b) internal pure returns (uint256);

sub

function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256);

mul

function mul(uint256 a, uint256 b) internal pure returns (uint256);

div

function div(uint256 a, uint256 b) internal pure returns (uint256);

div

function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256);

mod

function mod(uint256 a, uint256 b) internal pure returns (uint256);

mod

function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256);

sqrrt

function sqrrt(uint256 a) internal pure returns (uint256 c);

percentageAmount

function percentageAmount(uint256 total_, uint8 percentage_) internal pure returns (uint256 percentAmount_);

substractPercentage

function substractPercentage(uint256 total_, uint8 percentageToSub_) internal pure returns (uint256 result_);

percentageOfTotal

function percentageOfTotal(uint256 part_, uint256 total_) internal pure returns (uint256 percent_);

average

function average(uint256 a, uint256 b) internal pure returns (uint256);

quadraticPricing

function quadraticPricing(uint256 payment_, uint256 multiplier_) internal pure returns (uint256);

bondingCurve

function bondingCurve(uint256 supply_, uint256 multiplier_) internal pure returns (uint256);