diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-10 02:55:23 +0800 |
---|---|---|
committer | Greg Hysen <greg.hysen@gmail.com> | 2018-04-10 10:25:07 +0800 |
commit | eecf09f51564df4f63139f26e65efa1102a9958d (patch) | |
tree | 2ab49214ca5f1aef196d1899de8091908feabb82 /packages/base-contract | |
parent | 61fc3346c2fe2adc33dfe84aa50780d61e10efdf (diff) | |
download | dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar.gz dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar.bz2 dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar.lz dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar.xz dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.tar.zst dexon-sol-tools-eecf09f51564df4f63139f26e65efa1102a9958d.zip |
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.
Diffstat (limited to 'packages/base-contract')
-rw-r--r-- | packages/base-contract/src/index.ts | 13 |
1 files changed, 5 insertions, 8 deletions
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]); + }); } } |