diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-11-20 05:07:34 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-11-29 08:38:10 +0800 |
commit | 0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a (patch) | |
tree | 4e5a53539c0aaf25368179ffba42d80b5b233cd8 /packages/utils/src/abi_encoder/data_type.ts | |
parent | b213cb39747ba0b78138d5a1db07b511bd9fd3b8 (diff) | |
download | dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar.gz dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar.bz2 dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar.lz dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar.xz dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.tar.zst dexon-0x-contracts-0c0bcb44d3ef6d68c9c7c05be25641ef57a7287a.zip |
All 71 tests passing. Both for function encoding and individual types.
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, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_encoder/data_type.ts b/packages/utils/src/abi_encoder/data_type.ts index 21c08ef54..243b221ef 100644 --- a/packages/utils/src/abi_encoder/data_type.ts +++ b/packages/utils/src/abi_encoder/data_type.ts @@ -40,8 +40,8 @@ export abstract class DataType { return calldataHex; } - public decode(calldata: string, rules?: DecodingRules): any { - const rawCalldata = new RawCalldata(calldata, true); // @TODO Sohuld not hardcode false here + public decode(calldata: string, rules?: DecodingRules, hasSelector: boolean = false): any { + const rawCalldata = new RawCalldata(calldata, hasSelector); const rules_ = rules ? rules : DataType.DEFAULT_DECODING_RULES; const value = this.generateValue(rawCalldata, rules_); return value; |