diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-20 02:34:04 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:10 +0800 |
commit | 880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13 (patch) | |
tree | 908bdc1b8b71704899ec88da9849bf67b12730a7 /packages/utils/src/abi_encoder/data_type.ts | |
parent | 8a8b904a292063d1adb3df0a84023610a3985f7f (diff) | |
download | dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar.gz dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar.bz2 dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar.lz dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar.xz dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.tar.zst dexon-sol-tools-880540f4b8fd8dd7a7f1a93cf7fbcdc17e1fbb13.zip |
Fixed issue with decoding negative ints with width < 256
Diffstat (limited to 'packages/utils/src/abi_encoder/data_type.ts')
-rw-r--r-- | packages/utils/src/abi_encoder/data_type.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/utils/src/abi_encoder/data_type.ts b/packages/utils/src/abi_encoder/data_type.ts index f5a8087ea..15de12a2f 100644 --- a/packages/utils/src/abi_encoder/data_type.ts +++ b/packages/utils/src/abi_encoder/data_type.ts @@ -41,7 +41,8 @@ export abstract class DataType { } public decode(calldata: string, rules?: DecodingRules): any { - const rawCalldata = new RawCalldata(calldata); + const rawCalldata = new RawCalldata(calldata, false); + console.log(`HERE DUDE ${JSON.stringify(rawCalldata)}`); const rules_ = rules ? rules : DataType.DEFAULT_DECODING_RULES; const value = this.generateValue(rawCalldata, rules_); return value; @@ -277,6 +278,7 @@ export abstract class MemberDataType extends DataType { value = []; _.each(members, (member: DataType, idx: number) => { let memberValue = member.generateValue(calldata, rules); + console.log(`MEMBER VALUE: ${memberValue}`); (value as any[]).push(memberValue); }); } |