How to use the config function from bignumber.js
Find comprehensive JavaScript bignumber.js.config code examples handpicked from public code repositorys.
206 207 208 209 210 211 212 213 214 215
*/ function get_dx_slippage(currentTick, tickSpacing, sqrtPriceX96, liquidity, tokenDecimals) { const base = new BigNumber(1.0001); const decimalFactor = new BigNumber(10).pow(tokenDecimals); let dx = new BigNumber(0); BigNumber.config({ POW_PRECISION: 10 }); const _96bits = new BigNumber(2).pow(new BigNumber(96)); let currSqrtPrice = new BigNumber(sqrtPriceX96).div(_96bits); let currTick = getNextLowerTick(Number(currentTick), tickSpacing);
4
0
1
+ 63 other calls in file
GitHub: NikPeg/swapp
648 649 650 651 652 653 654 655 656 657
* suffix {string} * * (The values assigned to the above FORMAT object properties are not checked for validity.) * * E.g. * BigNumber.config({ DECIMAL_PLACES : 20, ROUNDING_MODE : 4 }) * * Ignore properties/parameters set to null or undefined, except for ALPHABET. * * Return an object with the properties current values.
0
0
0
bignumber.js.BigNumber is the most popular function in bignumber.js (869 examples)