From 688d277b30b287f66f0dbd49f2a23cab8b256219 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Mon, 12 Nov 2018 17:36:33 -0800 Subject: Configure linter with --format stylish and fix linter errors --- packages/pipeline/src/parsers/web3/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/pipeline/src/parsers/web3/index.ts') diff --git a/packages/pipeline/src/parsers/web3/index.ts b/packages/pipeline/src/parsers/web3/index.ts index 11571278b..2ead4c0e4 100644 --- a/packages/pipeline/src/parsers/web3/index.ts +++ b/packages/pipeline/src/parsers/web3/index.ts @@ -2,6 +2,10 @@ import { BlockWithoutTransactionData, Transaction as EthTransaction } from 'ethe import { Block, Transaction } from '../../entities'; +/** + * Parses a raw block and returns a Block entity. + * @param rawBlock a raw block (e.g. returned from web3-wrapper). + */ export function parseBlock(rawBlock: BlockWithoutTransactionData): Block { if (rawBlock.hash == null) { throw new Error('Tried to parse raw block but hash was null'); @@ -17,6 +21,10 @@ export function parseBlock(rawBlock: BlockWithoutTransactionData): Block { return block; } +/** + * Parses a raw transaction and returns a Transaction entity. + * @param rawBlock a raw transaction (e.g. returned from web3-wrapper). + */ export function parseTransaction(rawTransaction: EthTransaction): Transaction { if (rawTransaction.blockHash == null) { throw new Error('Tried to parse raw transaction but blockHash was null'); -- cgit v1.2.3