aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/encoder.ts
diff options
context:
space:
mode:
authorRemco Bloemen <remco@wicked.ventures>2018-11-09 01:32:40 +0800
committerRemco Bloemen <remco@wicked.ventures>2018-11-09 01:32:40 +0800
commitd71362af993d3797dbdbfcac245ad57f0086bce3 (patch)
tree888826fe23c2d06d6c9191fb3a238e14f9fe4aac /packages/sol-compiler/src/utils/encoder.ts
parenta5665a68756c905637c551fc48c9b7011a55c237 (diff)
parentf6abc007ffb249e4bbf85b8a7a77309d43e0a147 (diff)
downloaddexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar.gz
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar.bz2
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar.lz
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar.xz
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.tar.zst
dexon-0x-contracts-d71362af993d3797dbdbfcac245ad57f0086bce3.zip
Merge remote-tracking branch 'origin/development' into feature/utils/prettybignum
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);
});
}