aboutsummaryrefslogtreecommitdiffstats
path: root/packages/utils/src
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 21:01:11 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 23:25:26 +0800
commit0a279794642bde667a51401bd7cf2b2a1079c788 (patch)
tree9ebfbac791950c3a1b1e261f80c417e372420f60 /packages/utils/src
parenta3cb722469e90a676ac00bcd7a9934dbb6e52468 (diff)
downloaddexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar.gz
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar.bz2
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar.lz
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar.xz
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.tar.zst
dexon-sol-tools-0a279794642bde667a51401bd7cf2b2a1079c788.zip
Convert address strings to lower case before parsing them as BigNumbers
Diffstat (limited to 'packages/utils/src')
-rw-r--r--packages/utils/src/abi_decoder.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
index 2da46db35..28b6418d8 100644
--- a/packages/utils/src/abi_decoder.ts
+++ b/packages/utils/src/abi_decoder.ts
@@ -69,7 +69,7 @@ export class AbiDecoder {
}
if (param.type === SolidityTypes.Address) {
const baseHex = 16;
- value = addressUtils.padZeros(new BigNumber(value).toString(baseHex));
+ value = addressUtils.padZeros(new BigNumber((value as string).toLowerCase()).toString(baseHex));
} else if (param.type === SolidityTypes.Uint256 || param.type === SolidityTypes.Uint) {
value = new BigNumber(value);
} else if (param.type === SolidityTypes.Uint8) {