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/abi-gen | |
parent | 61fc3346c2fe2adc33dfe84aa50780d61e10efdf (diff) | |
download | dexon-0x-contracts-eecf09f51564df4f63139f26e65efa1102a9958d.tar.gz dexon-0x-contracts-eecf09f51564df4f63139f26e65efa1102a9958d.tar.zst dexon-0x-contracts-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/abi-gen')
-rw-r--r-- | packages/abi-gen/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index 9ceebe02b..ecef33b16 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -125,7 +125,7 @@ for (const abiFileName of abiFileNames) { } const methodAbis = ABI.filter((abi: AbiDefinition) => abi.type === ABI_TYPE_METHOD) as MethodAbi[]; - const methodAbisSanitized = abiUtils.renameOverloadedMethods(methodAbis) as MethodAbi[]; + const sanitizedMethodAbis = abiUtils.renameOverloadedMethods(methodAbis) as MethodAbi[]; const methodsData = _.map(methodAbis, (methodAbi, methodAbiIndex: number) => { _.forEach(methodAbi.inputs, (input, inputIndex: number) => { if (_.isEmpty(input.name)) { @@ -138,7 +138,7 @@ for (const abiFileName of abiFileNames) { ...methodAbi, singleReturnValue: methodAbi.outputs.length === 1, hasReturnValue: methodAbi.outputs.length !== 0, - tsName: methodAbisSanitized[methodAbiIndex].name, + tsName: sanitizedMethodAbis[methodAbiIndex].name, functionSignature: abiUtils.getFunctionSignature(methodAbi), }; return methodData; |