UNPKG

ethers-maths

Version:

➗ Useful ethers-based math libraries to ease the journey through off-chain fixed-point arithmetics

12 lines (11 loc) 527 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HALF_RAY = exports.HALF_WAD = exports.HALF_PERCENT = exports.WAD_SQUARED = exports.RAY = exports.WAD = exports.PERCENT = void 0; const utils_1 = require("./utils"); exports.PERCENT = (0, utils_1.pow10)(4); exports.WAD = (0, utils_1.pow10)(18); exports.RAY = (0, utils_1.pow10)(27); exports.WAD_SQUARED = exports.WAD ** 2n; exports.HALF_PERCENT = exports.PERCENT / 2n; exports.HALF_WAD = exports.WAD / 2n; exports.HALF_RAY = exports.RAY / 2n;