From eecf09f51564df4f63139f26e65efa1102a9958d Mon Sep 17 00:00:00 2001 From: Greg Hysen Date: Mon, 9 Apr 2018 11:55:23 -0700 Subject: Added a detailed description of `renameOverloadedMethods` (special thanks to @fabioberger). Updated Javascript styles in the Abi-Gen and Utils packages, around support for function overloading. --- packages/base-contract/src/index.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'packages/base-contract') diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index f6cea53fa..bfa99fac1 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -89,13 +89,10 @@ export class BaseContract { const methodAbis = this.abi.filter( (abiDefinition: AbiDefinition) => abiDefinition.type === AbiType.Function, ) as MethodAbi[]; - this._ethersInterfacesByFunctionSignature = _.transform( - methodAbis, - (result: EthersInterfaceByFunctionSignature, methodAbi) => { - const functionSignature = abiUtils.getFunctionSignature(methodAbi); - result[functionSignature] = new ethersContracts.Interface([methodAbi]); - }, - {}, - ); + this._ethersInterfacesByFunctionSignature = {}; + _.each(methodAbis, methodAbi => { + const functionSignature = abiUtils.getFunctionSignature(methodAbi); + this._ethersInterfacesByFunctionSignature[functionSignature] = new ethersContracts.Interface([methodAbi]); + }); } } -- cgit v1.2.3