aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js/src
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-02-07 03:27:01 +0800
committerJacob Evans <jacob@dekz.net>2018-02-07 03:27:11 +0800
commit67d7540907b6467c4cdc6a23815ad152517b3328 (patch)
treee79791b69b72d71fe6d10d4cd4bd01a85eb3451d /packages/0x.js/src
parent225baeb5cb8aed85d3e94a1d82a3c42ff5820d0e (diff)
downloaddexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar.gz
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar.bz2
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar.lz
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar.xz
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.tar.zst
dexon-sol-tools-67d7540907b6467c4cdc6a23815ad152517b3328.zip
Move BlockParam and BlockParamLiteral to shared types
Diffstat (limited to 'packages/0x.js/src')
-rw-r--r--packages/0x.js/src/index.ts4
-rw-r--r--packages/0x.js/src/types.ts14
2 files changed, 4 insertions, 14 deletions
diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts
index 41e67e177..1e12ab4b8 100644
--- a/packages/0x.js/src/index.ts
+++ b/packages/0x.js/src/index.ts
@@ -2,7 +2,6 @@ export { ZeroEx } from './0x';
export {
Order,
- BlockParamLiteral,
SignedOrder,
ECSignature,
ZeroExError,
@@ -14,7 +13,6 @@ export {
TokenEvents,
IndexedFilterValues,
BlockRange,
- BlockParam,
OrderCancellationRequest,
OrderFillRequest,
LogErrorContractEventArgs,
@@ -44,6 +42,6 @@ export {
OrderState,
} from './types';
-export { ContractEventArg, LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
+export { BlockParamLiteral, BlockParam, ContractEventArg, LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
export { TransactionReceipt } from '@0xproject/types';
diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts
index a0deb91c9..a2d1b9eb4 100644
--- a/packages/0x.js/src/types.ts
+++ b/packages/0x.js/src/types.ts
@@ -1,5 +1,7 @@
-import { ContractEventArg, LogWithDecodedArgs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
+
+import { BlockParam, BlockParamLiteral, ContractEventArg, LogWithDecodedArgs } from '@0xproject/types';
+
import * as Web3 from 'web3';
export enum ZeroExError {
@@ -219,16 +221,6 @@ export interface IndexedFilterValues {
[index: string]: ContractEventArg;
}
-// 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;
-
export interface BlockRange {
fromBlock: BlockParam;
toBlock: BlockParam;