diff options
author | Fabio Berger <me@fabioberger.com> | 2018-10-18 01:23:06 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-10-18 01:23:06 +0800 |
commit | bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295 (patch) | |
tree | f76f4ec6147580eb1dd5d70207c8360e7e2f5413 /packages | |
parent | 87fabbb943779d868d29c437f078a341cb177b2b (diff) | |
download | dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar.gz dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar.bz2 dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar.lz dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar.xz dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.tar.zst dexon-sol-tools-bdae4ba2a2c9b7b3b41c352c628cb11cd4a1f295.zip |
chore: tslint fix
Diffstat (limited to 'packages')
-rw-r--r-- | packages/base-contract/src/index.ts | 2 | ||||
-rw-r--r-- | packages/sol-compiler/src/utils/encoder.ts | 1 | ||||
-rw-r--r-- | packages/sol-doc/src/sol_doc.ts | 4 | ||||
-rw-r--r-- | packages/utils/src/abi_decoder.ts | 1 |
4 files changed, 7 insertions, 1 deletions
diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 354362d45..73550ffd4 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -1,6 +1,5 @@ import { abiUtils, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import { FunctionAbi } from 'ethereum-protocol'; import { AbiDefinition, AbiType, @@ -130,6 +129,7 @@ export class BaseContract { if (abiDefinition.type !== AbiType.Function) { return false; } + // tslint:disable-next-line:no-unnecessary-type-assertion const abiFunctionSignature = abiUtils.getFunctionSignature(abiDefinition as MethodAbi); if (abiFunctionSignature === functionSignature) { return true; diff --git a/packages/sol-compiler/src/utils/encoder.ts b/packages/sol-compiler/src/utils/encoder.ts index 6527304d6..40b103fd5 100644 --- a/packages/sol-compiler/src/utils/encoder.ts +++ b/packages/sol-compiler/src/utils/encoder.ts @@ -7,6 +7,7 @@ export const encoder = { const constructorTypes: string[] = []; _.each(abi, (element: AbiDefinition) => { if (element.type === AbiType.Constructor) { + // tslint:disable-next-line:no-unnecessary-type-assertion const constuctorAbi = element as ConstructorAbi; _.each(constuctorAbi.inputs, (input: DataItem) => { constructorTypes.push(input.type); diff --git a/packages/sol-doc/src/sol_doc.ts b/packages/sol-doc/src/sol_doc.ts index 35ba2c6e8..686e9ca34 100644 --- a/packages/sol-doc/src/sol_doc.ts +++ b/packages/sol-doc/src/sol_doc.ts @@ -324,18 +324,22 @@ export class SolDoc { switch (abiDefinition.type) { case 'constructor': docSection.constructors.push( + // tslint:disable-next-line:no-unnecessary-type-assertion this._genConstructorDoc(contractName, abiDefinition as ConstructorAbi, compiledContract.devdoc), ); break; case 'event': + // tslint:disable-next-line:no-unnecessary-type-assertion (docSection.events as Event[]).push(SolDoc._genEventDoc(abiDefinition as EventAbi)); // note that we're not sending devdoc to this._genEventDoc(). // that's because the type of the events array doesn't have any fields for documentation! break; case 'function': + // tslint:disable-next-line:no-unnecessary-type-assertion docSection.methods.push(this._genMethodDoc(abiDefinition as MethodAbi, compiledContract.devdoc)); break; case 'fallback': + // tslint:disable-next-line:no-unnecessary-type-assertion docSection.methods.push( SolDoc._genFallbackDoc(abiDefinition as FallbackAbi, compiledContract.devdoc), ); diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 9cc863909..c0b2c7950 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -99,6 +99,7 @@ export class AbiDecoder { const ethersInterface = new ethers.utils.Interface(abiArray); _.map(abiArray, (abi: AbiDefinition) => { if (abi.type === AbiType.Event) { + // tslint:disable-next-line:no-unnecessary-type-assertion const eventAbi = abi as EventAbi; const topic = ethersInterface.events[eventAbi.name].topic; const numIndexedArgs = _.reduce(eventAbi.inputs, (sum, input) => (input.indexed ? sum + 1 : sum), 0); |