Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
chore: tslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioberger committed Oct 17, 2018
1 parent 87fabbb commit bdae4ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/base-contract/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { abiUtils, BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { FunctionAbi } from 'ethereum-protocol';
import {
AbiDefinition,
AbiType,
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions packages/sol-compiler/src/utils/encoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions packages/sol-doc/src/sol_doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand Down
1 change: 1 addition & 0 deletions packages/utils/src/abi_decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bdae4ba

Please sign in to comment.