aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sol-compiler/src/utils/encoder.ts
diff options
context:
space:
mode:
authorKadinsky <kandinsky454@protonmail.ch>2018-10-18 19:14:32 +0800
committerGitHub <noreply@github.com>2018-10-18 19:14:32 +0800
commit47dc384ea36fecbcf01eb9b3f20936331b43a0c6 (patch)
treee53a0c2d20b9f3271916144528f2214b32a3a83a /packages/sol-compiler/src/utils/encoder.ts
parentc333d093b585fa0250a6973f2d396eb3cf227334 (diff)
parente7c6f2a35795610645598deba2c14ceeda6acc89 (diff)
downloaddexon-0x-contracts-47dc384ea36fecbcf01eb9b3f20936331b43a0c6.tar.gz
dexon-0x-contracts-47dc384ea36fecbcf01eb9b3f20936331b43a0c6.tar.zst
dexon-0x-contracts-47dc384ea36fecbcf01eb9b3f20936331b43a0c6.zip
Merge pull request #1140 from 0xProject/reSkinReferenceDocs
Move Doc Reference Pages & Wiki into Developer Section of Website
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);
});
}