From 67d7540907b6467c4cdc6a23815ad152517b3328 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Tue, 6 Feb 2018 11:27:01 -0800 Subject: Move BlockParam and BlockParamLiteral to shared types --- packages/types/src/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/types/src/index.ts') diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 7b53b52c4..cb17936f7 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -56,3 +56,13 @@ export enum SolidityTypes { export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt { logs: Array | Web3.LogEntry>; } + +// Earliest is omitted by design. It is simply an alias for the `0` constant and +// is thus not very helpful. Moreover, this type is used in places that only accept +// `latest` or `pending`. +export enum BlockParamLiteral { + Latest = 'latest', + Pending = 'pending', +} + +export type BlockParam = BlockParamLiteral | number; -- cgit v1.2.3