aboutsummaryrefslogtreecommitdiffstats
path: root/packages/base-contract/src
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-04-10 02:55:23 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-04-10 10:25:07 +0800
commiteecf09f51564df4f63139f26e65efa1102a9958d (patch)
tree2ab49214ca5f1aef196d1899de8091908feabb82 /packages/base-contract/src
parent61fc3346c2fe2adc33dfe84aa50780d61e10efdf (diff)
downloaddexon-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/src')
-rw-r--r--packages/base-contract/src/index.ts13
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]);
+ });
}
}