diff options
Diffstat (limited to 'packages/types')
-rw-r--r-- | packages/types/CHANGELOG.md | 2 | ||||
-rw-r--r-- | packages/types/src/index.ts | 10 |
2 files changed, 12 insertions, 0 deletions
diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 899482c4c..e75d0ddcb 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -1,3 +1,5 @@ # CHANGELOG ## vx.x.x + + * Added BlockLiteralParam and BlockParam, refactored out of 0x.js types. (#355) 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<LogWithDecodedArgs<DecodedLogArgs> | 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; |