aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-07-28 02:51:30 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-07-28 02:51:30 +0800
commitc851c3763060ca4cf9e37d75e36e534f9b7d9294 (patch)
tree82bb74e4521804377869c099cf5eba019f06d4d5 /packages/utils/src
parenta0d7b1efa59cf7322a97ef75268c372068592976 (diff)
parent44d1be27e626c4e80ccf80d3f070a890c45f02ac (diff)
downloaddexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar.gz
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar.bz2
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar.lz
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar.xz
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.tar.zst
dexon-sol-tools-c851c3763060ca4cf9e37d75e36e534f9b7d9294.zip
Merge branch 'development' of https://github.com/0xProject/0x-monorepo into feature/website/upgrade-allowance-toggles-to-locks-and-checks
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/configured_bignumber.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts
index e44c062c2..2b22b6938 100644
--- a/packages/utils/src/configured_bignumber.ts
+++ b/packages/utils/src/configured_bignumber.ts
@@ -1,9 +1,14 @@
import { BigNumber } from 'bignumber.js';
-// By default BigNumber's `toString` method converts to exponential notation if the value has
-// more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
BigNumber.config({
+ // By default BigNumber's `toString` method converts to exponential notation if the value has
+ // more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
EXPONENTIAL_AT: 1000,
+ // Note(albrow): This is the lowest value for which
+ // `x.div(y).floor() === x.divToInt(y)`
+ // for all values of x and y <= MAX_UINT256, where MAX_UINT256 is the
+ // maximum number represented by the uint256 type in Solidity (2^256-1).
+ DECIMAL_PLACES: 78,
});
export { BigNumber };