Remove type-level validation
This commit is contained in:
@@ -16,8 +16,6 @@ export {
|
|||||||
ContractEventArgs,
|
ContractEventArgs,
|
||||||
Web3Provider,
|
Web3Provider,
|
||||||
ZeroExConfig,
|
ZeroExConfig,
|
||||||
ZeroExPublicNetworkConfig,
|
|
||||||
ZeroExPrivateNetworkConfig,
|
|
||||||
MethodOpts,
|
MethodOpts,
|
||||||
OrderTransactionOpts,
|
OrderTransactionOpts,
|
||||||
TransactionOpts,
|
TransactionOpts,
|
||||||
|
|||||||
@@ -195,26 +195,6 @@ export interface OrderStateWatcherConfig {
|
|||||||
cleanupJobIntervalMs?: number;
|
cleanupJobIntervalMs?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ZeroExPublicNetworkConfig {
|
|
||||||
networkId: 1 | 3 | 4 | 42 | 50;
|
|
||||||
gasPrice?: BigNumber;
|
|
||||||
exchangeContractAddress?: string;
|
|
||||||
zrxContractAddress?: string;
|
|
||||||
tokenRegistryContractAddress?: string;
|
|
||||||
tokenTransferProxyContractAddress?: string;
|
|
||||||
orderWatcherConfig?: OrderStateWatcherConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ZeroExPrivateNetworkConfig {
|
|
||||||
networkId: number;
|
|
||||||
gasPrice?: BigNumber;
|
|
||||||
exchangeContractAddress: string;
|
|
||||||
zrxContractAddress: string;
|
|
||||||
tokenRegistryContractAddress: string;
|
|
||||||
tokenTransferProxyContractAddress: string;
|
|
||||||
orderWatcherConfig?: OrderStateWatcherConfig;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 3-ropsten, 4-rinkeby, 42-kovan, 50-testrpc)
|
* networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 3-ropsten, 4-rinkeby, 42-kovan, 50-testrpc)
|
||||||
* gasPrice: Gas price to use with every transaction
|
* gasPrice: Gas price to use with every transaction
|
||||||
@@ -224,7 +204,15 @@ export interface ZeroExPrivateNetworkConfig {
|
|||||||
* tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use
|
* tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use
|
||||||
* orderWatcherConfig: All the configs related to the orderWatcher
|
* orderWatcherConfig: All the configs related to the orderWatcher
|
||||||
*/
|
*/
|
||||||
export type ZeroExConfig = ZeroExPublicNetworkConfig | ZeroExPrivateNetworkConfig;
|
export interface ZeroExConfig {
|
||||||
|
networkId: number;
|
||||||
|
gasPrice?: BigNumber;
|
||||||
|
exchangeContractAddress?: string;
|
||||||
|
zrxContractAddress?: string;
|
||||||
|
tokenRegistryContractAddress?: string;
|
||||||
|
tokenTransferProxyContractAddress?: string;
|
||||||
|
orderWatcherConfig?: OrderStateWatcherConfig;
|
||||||
|
}
|
||||||
|
|
||||||
export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken';
|
export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken';
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import {
|
|||||||
TransferContractEventArgs,
|
TransferContractEventArgs,
|
||||||
ZeroEx,
|
ZeroEx,
|
||||||
ZeroExError,
|
ZeroExError,
|
||||||
ZeroExPublicNetworkConfig,
|
|
||||||
} from '../src';
|
} from '../src';
|
||||||
import { DoneCallback } from '../src/types';
|
import { DoneCallback } from '../src/types';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
export const constants = {
|
export const constants = {
|
||||||
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
||||||
ROPSTEN_NETWORK_ID: 3 as 3,
|
ROPSTEN_NETWORK_ID: 3,
|
||||||
KOVAN_NETWORK_ID: 42 as 42,
|
KOVAN_NETWORK_ID: 42,
|
||||||
TESTRPC_NETWORK_ID: 50 as 50,
|
TESTRPC_NETWORK_ID: 50,
|
||||||
KOVAN_RPC_URL: 'https://kovan.infura.io/',
|
KOVAN_RPC_URL: 'https://kovan.infura.io/',
|
||||||
ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
|
ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
|
||||||
ZRX_DECIMALS: 18,
|
ZRX_DECIMALS: 18,
|
||||||
|
|||||||
@@ -101,8 +101,6 @@ const docsInfoConfig: DocsInfoConfig = {
|
|||||||
'ApprovalContractEventArgs',
|
'ApprovalContractEventArgs',
|
||||||
'TokenContractEventArgs',
|
'TokenContractEventArgs',
|
||||||
'ZeroExConfig',
|
'ZeroExConfig',
|
||||||
'ZeroExPublicNetworkConfig',
|
|
||||||
'ZeroExPrivateNetworkConfig',
|
|
||||||
'TransactionReceiptWithDecodedLogs',
|
'TransactionReceiptWithDecodedLogs',
|
||||||
'LogWithDecodedArgs',
|
'LogWithDecodedArgs',
|
||||||
'EtherTokenEvents',
|
'EtherTokenEvents',
|
||||||
|
|||||||
Reference in New Issue
Block a user