aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/encoder.ts
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-10-18 18:35:07 +0800
committerFabio Berger <me@fabioberger.com>2018-10-18 18:35:07 +0800
commitcdd650d0eb83153a992922c6ffff35b494f299d3 (patch)
treefc12135e69ae74403a26408d2d7625e8a3fe334e /packages/sol-compiler/src/utils/encoder.ts
parentc333d093b585fa0250a6973f2d396eb3cf227334 (diff)
parentbd8ba14bf46cb901e14f0ee718ac01cdbc833e86 (diff)
downloaddexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar.gz
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar.bz2
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar.lz
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar.xz
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.tar.zst
dexon-sol-tools-cdd650d0eb83153a992922c6ffff35b494f299d3.zip
merge development
Diffstat (limited to 'packages/sol-compiler/src/utils/encoder.ts')
-rw-r--r--packages/sol-compiler/src/utils/encoder.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/sol-compiler/src/utils/encoder.ts b/packages/sol-compiler/src/utils/encoder.ts
index 0f2d75691..40b103fd5 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,9 @@ export const encoder = {
const constructorTypes: string[] = [];
_.each(abi, (element: AbiDefinition) => {
if (element.type === AbiType.Constructor) {
- _.each(element.inputs, (input: DataItem) => {
+ // tslint:disable-next-line:no-unnecessary-type-assertion
+ const constuctorAbi = element as ConstructorAbi;
+ _.each(constuctorAbi.inputs, (input: DataItem) => {
constructorTypes.push(input.type);
});
}