aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/encoder.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-18 00:36:21 +0800
committerFabio Berger <me@fabioberger.com>2018-10-18 00:36:21 +0800
commit87fabbb943779d868d29c437f078a341cb177b2b (patch)
tree74d365e7af81538fc7a56e2882603527bff913bb /packages/sol-compiler/src/utils/encoder.ts
parenta31f3b542f96b0a332c9b6424d5bf21f5a4dd8b9 (diff)
downloaddexon-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/src/utils/encoder.ts')
-rw-r--r--packages/sol-compiler/src/utils/encoder.ts5
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);
});
}