aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 20:22:06 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 23:25:26 +0800
commitd304c062eb429d144c0f961864d185cde85a27e5 (patch)
treefac9da8ac164330c34ddc4b0e941d61158deeec1
parent3eef888e25eb9d6d8b9444d109c1cf8e8cd6e781 (diff)
downloaddexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar.gz
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar.bz2
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar.lz
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar.xz
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.tar.zst
dexon-sol-tools-d304c062eb429d144c0f961864d185cde85a27e5.zip
Convert address strings to lower case before parsing them as BigNumbers
-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) {