diff options
Diffstat (limited to 'packages/utils/src/abi_encoder/abstract_data_types/types/set.ts')
-rw-r--r-- | packages/utils/src/abi_encoder/abstract_data_types/types/set.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts b/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts index 637abfb7d..aeea7919f 100644 --- a/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts +++ b/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts @@ -50,7 +50,7 @@ export abstract class Set extends DataType { public generateValue(calldata: RawCalldata, rules: DecodingRules): any[] | object { let members = this._members; // Case 1: This is an array of undefined length, which means that `this._members` was not - // populated in the constructor. So, construct the set of members it now. + // populated in the constructor. So we must construct the set of members now. if (this._isArray && _.isUndefined(this._arrayLength)) { const arrayLengthBuf = calldata.popWord(); const arrayLengthHex = ethUtil.bufferToHex(arrayLengthBuf); @@ -176,7 +176,7 @@ export abstract class Set extends DataType { private _createMembersWithKeys(dataItem: DataItem): [DataType[], MemberIndexByName] { // Sanity check if (_.isUndefined(dataItem.components)) { - throw new Error(`Expected components`); + throw new Error(`Tried to create a set using key/value pairs, but no components were defined by the input DataItem '${dataItem.name}'.`); } // Create one member for each component of `dataItem` const members: DataType[] = []; |