diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-18 00:36:21 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-18 00:36:21 +0800 |
commit | 87fabbb943779d868d29c437f078a341cb177b2b (patch) | |
tree | 74d365e7af81538fc7a56e2882603527bff913bb /packages/sol-compiler | |
parent | a31f3b542f96b0a332c9b6424d5bf21f5a4dd8b9 (diff) | |
download | dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar.gz dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar.bz2 dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar.lz dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar.xz dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.tar.zst dexon-sol-tools-87fabbb943779d868d29c437f078a341cb177b2b.zip |
chore: Fix remaining necessary casts
Diffstat (limited to 'packages/sol-compiler')
-rw-r--r-- | packages/sol-compiler/src/utils/encoder.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/sol-compiler/src/utils/encoder.ts b/packages/sol-compiler/src/utils/encoder.ts index 0f2d75691..6527304d6 100644 --- a/packages/sol-compiler/src/utils/encoder.ts +++ b/packages/sol-compiler/src/utils/encoder.ts @@ -1,4 +1,4 @@ -import { AbiDefinition, AbiType, ContractAbi, DataItem } from 'ethereum-types'; +import { AbiDefinition, AbiType, ConstructorAbi, ContractAbi, DataItem } from 'ethereum-types'; import * as _ from 'lodash'; import * as web3Abi from 'web3-eth-abi'; @@ -7,7 +7,8 @@ export const encoder = { const constructorTypes: string[] = []; _.each(abi, (element: AbiDefinition) => { if (element.type === AbiType.Constructor) { - _.each(element.inputs, (input: DataItem) => { + const constuctorAbi = element as ConstructorAbi; + _.each(constuctorAbi.inputs, (input: DataItem) => { constructorTypes.push(input.type); }); } |