Revert to abi-gen-wrappers. Clean package.json
This commit is contained in:
parent
44aa6a2b38
commit
56310b7bd4
@ -55,11 +55,11 @@
|
||||
"truffle": "^5.0.32",
|
||||
"tslint": "5.11.0",
|
||||
"typedoc": "^0.15.0",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.5.0-beta.3",
|
||||
"ethereum-types": "^2.2.0-beta.2"
|
||||
"@0x/base-contract": "^5.5.0-beta.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -63,6 +63,9 @@
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "*",
|
||||
"@0x/contracts-test-utils": "^3.2.0-beta.3",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^3.0.0",
|
||||
@ -79,11 +82,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.5.0-beta.3",
|
||||
"@0x/contracts-test-utils": "^3.2.0-beta.3",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@ -61,6 +61,9 @@
|
||||
"@0x/tslint-config": "^3.1.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "*",
|
||||
@ -79,10 +82,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.5.0-beta.3",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2"
|
||||
"@0x/base-contract": "^5.5.0-beta.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -63,6 +63,8 @@
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "*",
|
||||
@ -82,9 +84,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/base-contract": "^5.5.0-beta.3",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2"
|
||||
"@0x/base-contract": "^5.5.0-beta.3"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
|
@ -65,6 +65,9 @@
|
||||
"@0x/ts-doc-gen": "^0.0.22",
|
||||
"@0x/tslint-config": "^3.1.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "*",
|
||||
@ -91,10 +94,7 @@
|
||||
"@0x/contracts-erc20": "^2.3.0-beta.3",
|
||||
"@0x/contracts-erc721": "^2.2.0-beta.3",
|
||||
"@0x/order-utils": "^8.5.0-beta.3",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"lodash": "^4.17.11"
|
||||
},
|
||||
"publishConfig": {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -42,10 +42,7 @@
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.2.0-beta.2",
|
||||
"@0x/contract-addresses": "^3.3.0-beta.4",
|
||||
"@0x/contracts-dev-utils": "^0.1.0-beta.3",
|
||||
"@0x/contracts-erc20": "^2.3.0-beta.3",
|
||||
"@0x/contracts-exchange": "^2.2.0-beta.3",
|
||||
"@0x/contracts-exchange-forwarder": "^3.1.0-beta.3",
|
||||
"@0x/abi-gen-wrappers": "^5.4.0-beta.3",
|
||||
"@0x/json-schemas": "^4.1.0-beta.2",
|
||||
"@0x/order-utils": "^8.5.0-beta.3",
|
||||
"@0x/orderbook": "^0.1.0-beta.3",
|
||||
|
@ -1,66 +1,62 @@
|
||||
export { WSOpts } from '@0x/mesh-rpc-client';
|
||||
export {
|
||||
JSONRPCRequestPayload,
|
||||
JSONRPCResponsePayload,
|
||||
JSONRPCResponseError,
|
||||
JSONRPCErrorCallback,
|
||||
SupportedProvider,
|
||||
Web3JsProvider,
|
||||
GanacheProvider,
|
||||
EIP1193Provider,
|
||||
ZeroExProvider,
|
||||
AcceptedRejectedOrders,
|
||||
AddedRemovedOrders,
|
||||
BaseOrderProvider,
|
||||
MeshOrderProviderOpts,
|
||||
Orderbook,
|
||||
OrderSet,
|
||||
OrderStore,
|
||||
RejectedOrder,
|
||||
SRAPollingOrderProviderOpts,
|
||||
SRAWebsocketOrderProviderOpts,
|
||||
} from '@0x/orderbook';
|
||||
export { APIOrder, Asset, AssetPairsItem, Order, SignedOrder } from '@0x/types';
|
||||
export { BigNumber } from '@0x/utils';
|
||||
export {
|
||||
ConstructorStateMutability,
|
||||
DataItem,
|
||||
EIP1193Event,
|
||||
EIP1193Provider,
|
||||
EventParameter,
|
||||
GanacheProvider,
|
||||
JSONRPCErrorCallback,
|
||||
JSONRPCRequestPayload,
|
||||
JSONRPCResponseError,
|
||||
JSONRPCResponsePayload,
|
||||
MethodAbi,
|
||||
StateMutability,
|
||||
SupportedProvider,
|
||||
TupleDataItem,
|
||||
Web3JsProvider,
|
||||
Web3JsV1Provider,
|
||||
Web3JsV2Provider,
|
||||
Web3JsV3Provider,
|
||||
MethodAbi,
|
||||
DataItem,
|
||||
StateMutability,
|
||||
EventParameter,
|
||||
TupleDataItem,
|
||||
ConstructorStateMutability,
|
||||
ZeroExProvider,
|
||||
} from 'ethereum-types';
|
||||
|
||||
export { SignedOrder, AssetPairsItem, APIOrder, Asset, Order } from '@0x/types';
|
||||
export { BigNumber } from '@0x/utils';
|
||||
|
||||
export { InsufficientAssetLiquidityError } from './errors';
|
||||
export { SwapQuoteConsumer } from './quote_consumers/swap_quote_consumer';
|
||||
export { SwapQuoter } from './swap_quoter';
|
||||
export { ProtocolFeeUtils } from './utils/protocol_fee_utils';
|
||||
export { affiliateFeeUtils } from './utils/affiliate_fee_utils';
|
||||
export { InsufficientAssetLiquidityError } from './errors';
|
||||
|
||||
export {
|
||||
SwapQuoterError,
|
||||
SwapQuoteConsumerError,
|
||||
SwapQuoterOpts,
|
||||
SwapQuote,
|
||||
SwapQuoteConsumerOpts,
|
||||
CalldataInfo,
|
||||
ExtensionContractType,
|
||||
LiquidityForTakerMakerAssetDataPair,
|
||||
SwapQuoteGetOutputOpts,
|
||||
PrunedSignedOrder,
|
||||
SwapQuoteExecutionOpts,
|
||||
SwapQuoteInfo,
|
||||
ForwarderExtensionContractOpts,
|
||||
GetExtensionContractTypeOpts,
|
||||
SmartContractParamsInfo,
|
||||
LiquidityForTakerMakerAssetDataPair,
|
||||
MarketBuySwapQuote,
|
||||
MarketSellSwapQuote,
|
||||
PrunedSignedOrder,
|
||||
SmartContractParamsInfo,
|
||||
SwapQuote,
|
||||
SwapQuoteConsumerBase,
|
||||
SwapQuoteConsumerOpts,
|
||||
SwapQuoteExecutionOpts,
|
||||
SwapQuoteGetOutputOpts,
|
||||
SwapQuoteInfo,
|
||||
SwapQuoteRequestOpts,
|
||||
SwapQuoterError,
|
||||
SwapQuoterOpts,
|
||||
SwapQuoteConsumerError,
|
||||
} from './types';
|
||||
|
||||
export {
|
||||
Orderbook,
|
||||
MeshOrderProviderOpts,
|
||||
SRAPollingOrderProviderOpts,
|
||||
SRAWebsocketOrderProviderOpts,
|
||||
BaseOrderProvider,
|
||||
OrderStore,
|
||||
AcceptedRejectedOrders,
|
||||
RejectedOrder,
|
||||
AddedRemovedOrders,
|
||||
OrderSet,
|
||||
} from '@0x/orderbook';
|
||||
|
||||
export { WSOpts } from '@0x/mesh-rpc-client';
|
||||
export { affiliateFeeUtils } from './utils/affiliate_fee_utils';
|
||||
export { ProtocolFeeUtils } from './utils/protocol_fee_utils';
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { ExchangeContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { AbiEncoder, providerUtils } from '@0x/utils';
|
||||
import { SupportedProvider, ZeroExProvider } from '@0x/web3-wrapper';
|
||||
import { MethodAbi } from 'ethereum-types';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { DevUtilsContract, ForwarderContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ForwarderContract } from '@0x/contracts-exchange-forwarder';
|
||||
import { AbiEncoder, providerUtils } from '@0x/utils';
|
||||
import { SupportedProvider, ZeroExProvider } from '@0x/web3-wrapper';
|
||||
import { MethodAbi } from 'ethereum-types';
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { DevUtilsContract, ExchangeContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses, getContractAddressesForChainOrThrow } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { schemas } from '@0x/json-schemas';
|
||||
import { SignedOrder } from '@0x/order-utils';
|
||||
import { MeshOrderProviderOpts, Orderbook, SRAPollingOrderProviderOpts } from '@0x/orderbook';
|
||||
@ -158,7 +157,7 @@ export class SwapQuoter {
|
||||
this._contractAddresses = getContractAddressesForChainOrThrow(chainId);
|
||||
this._devUtilsContract = new DevUtilsContract(this._contractAddresses.devUtils, provider);
|
||||
this._exchangeContract = new ExchangeContract(this._contractAddresses.exchange, provider);
|
||||
this._protocolFeeUtils = new ProtocolFeeUtils(this._exchangeContract);
|
||||
this._protocolFeeUtils = new ProtocolFeeUtils();
|
||||
this._orderPruner = new OrderPruner(this._devUtilsContract, {
|
||||
expiryBufferMs: this.expiryBufferMs,
|
||||
permittedOrderFeeTypes: this.permittedOrderFeeTypes,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { DevUtilsContract } from '@0x/abi-gen-wrappers';
|
||||
import { orderCalculationUtils } from '@0x/order-utils';
|
||||
import { OrderStatus, SignedOrder } from '@0x/types';
|
||||
import * as _ from 'lodash';
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { Order } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import * as _ from 'lodash';
|
||||
@ -7,21 +6,9 @@ import { constants } from '../constants';
|
||||
import { SwapQuoterError } from '../types';
|
||||
|
||||
export class ProtocolFeeUtils {
|
||||
private readonly _exchangeContract: ExchangeContract;
|
||||
|
||||
constructor(exchangeContract: ExchangeContract) {
|
||||
this._exchangeContract = exchangeContract;
|
||||
}
|
||||
|
||||
// TODO(dave4506) Add a debounce, cache or some form of a throttle to this function, doesn't change often.
|
||||
// tslint:disable-next-line:prefer-function-over-method
|
||||
public async getProtocolFeeMultiplierAsync(): Promise<BigNumber> {
|
||||
const protocolFeeCollector = await this._exchangeContract.protocolFeeCollector().callAsync();
|
||||
if (protocolFeeCollector === constants.NULL_ADDRESS) {
|
||||
return constants.ZERO_AMOUNT;
|
||||
} else {
|
||||
const protocolFeeMultiplier = await this._exchangeContract.protocolFeeMultiplier().callAsync();
|
||||
return protocolFeeMultiplier;
|
||||
}
|
||||
return new BigNumber(150000);
|
||||
}
|
||||
|
||||
// tslint:disable-next-line: prefer-function-over-method
|
||||
|
@ -1,6 +1,5 @@
|
||||
import { DevUtilsContract, WETH9Contract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { WETH9Contract } from '@0x/contracts-erc20';
|
||||
import { SignedOrder } from '@0x/types';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { SupportedProvider, Web3Wrapper } from '@0x/web3-wrapper';
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { DevUtilsContract, ERC20TokenContract, ExchangeContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ERC20TokenContract } from '@0x/contracts-erc20';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { constants as devConstants, OrderFactory } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle, tokenUtils } from '@0x/dev-utils';
|
||||
import { migrateOnceAsync } from '@0x/migrations';
|
||||
@ -132,7 +130,7 @@ describe('ExchangeSwapQuoteConsumer', () => {
|
||||
};
|
||||
const privateKey = devConstants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
|
||||
orderFactory = new OrderFactory(privateKey, defaultOrderParams);
|
||||
protocolFeeUtils = new ProtocolFeeUtils(exchangeContract);
|
||||
protocolFeeUtils = new ProtocolFeeUtils();
|
||||
expectMakerAndTakerBalancesForTakerAssetAsync = expectMakerAndTakerBalancesAsyncFactory(
|
||||
erc20TakerTokenContract,
|
||||
makerAddress,
|
||||
|
@ -1,8 +1,5 @@
|
||||
import { DevUtilsContract, ERC20TokenContract, ExchangeContract, ForwarderContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ERC20TokenContract } from '@0x/contracts-erc20';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { ForwarderContract } from '@0x/contracts-exchange-forwarder';
|
||||
import { constants as devConstants, OrderFactory } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle, tokenUtils } from '@0x/dev-utils';
|
||||
import { migrateOnceAsync } from '@0x/migrations';
|
||||
@ -137,7 +134,7 @@ describe('ForwarderSwapQuoteConsumer', () => {
|
||||
};
|
||||
const privateKey = devConstants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
|
||||
orderFactory = new OrderFactory(privateKey, defaultOrderParams);
|
||||
protocolFeeUtils = new ProtocolFeeUtils(exchangeContract);
|
||||
protocolFeeUtils = new ProtocolFeeUtils();
|
||||
expectMakerAndTakerBalancesAsync = expectMakerAndTakerBalancesAsyncFactory(
|
||||
erc20TokenContract,
|
||||
makerAddress,
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { DevUtilsContract, ERC20TokenContract, ExchangeContract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { ERC20TokenContract } from '@0x/contracts-erc20';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { constants as devConstants, getLatestBlockTimestampAsync, OrderFactory } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle, tokenUtils } from '@0x/dev-utils';
|
||||
import { migrateOnceAsync } from '@0x/migrations';
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { DevUtilsContract, ExchangeContract, WETH9Contract } from '@0x/abi-gen-wrappers';
|
||||
import { ContractAddresses } from '@0x/contract-addresses';
|
||||
import { DevUtilsContract } from '@0x/contracts-dev-utils';
|
||||
import { WETH9Contract } from '@0x/contracts-erc20';
|
||||
import { ExchangeContract } from '@0x/contracts-exchange';
|
||||
import { constants as devConstants, OrderFactory } from '@0x/contracts-test-utils';
|
||||
import { BlockchainLifecycle, tokenUtils } from '@0x/dev-utils';
|
||||
import { migrateOnceAsync } from '@0x/migrations';
|
||||
@ -123,7 +121,7 @@ describe('swapQuoteConsumerUtils', () => {
|
||||
};
|
||||
const privateKey = devConstants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
|
||||
orderFactory = new OrderFactory(privateKey, defaultOrderParams);
|
||||
protocolFeeUtils = new ProtocolFeeUtils(exchangeContract);
|
||||
protocolFeeUtils = new ProtocolFeeUtils();
|
||||
forwarderOrderFactory = new OrderFactory(privateKey, defaultForwarderOrderParams);
|
||||
|
||||
swapQuoteConsumer = new SwapQuoteConsumer(provider, {
|
||||
|
@ -33,6 +33,9 @@
|
||||
"@0x/tslint-config": "^3.1.0-beta.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"chai": "^4.0.1",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^6.2.0",
|
||||
@ -44,11 +47,8 @@
|
||||
"dependencies": {
|
||||
"@0x/assert": "^2.2.0-beta.2",
|
||||
"@0x/json-schemas": "^4.1.0-beta.2",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"ethereumjs-account": "^3.0.0",
|
||||
"ethereumjs-blockstream": "^7.0.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
|
@ -47,6 +47,10 @@
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/web3-provider-engine": "^14.0.0",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"@types/node": "*",
|
||||
"chai": "^4.0.1",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"mocha": "^6.2.0",
|
||||
@ -60,18 +64,14 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0x/abi-gen-wrappers": "^5.4.0-beta.3",
|
||||
"@0x/contracts-dev-utils": "^0.1.0-beta.3",
|
||||
"@0x/assert": "^2.2.0-beta.2",
|
||||
"@0x/contract-addresses": "^3.3.0-beta.4",
|
||||
"@0x/contract-artifacts": "^2.3.0-beta.3",
|
||||
"@0x/contracts-dev-utils": "^0.1.0-beta.3",
|
||||
"@0x/json-schemas": "^4.1.0-beta.2",
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"@0x/utils": "^4.6.0-beta.2",
|
||||
"@0x/web3-wrapper": "^6.1.0-beta.2",
|
||||
"@types/node": "*",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
|
@ -151,7 +151,7 @@ describe('MeshOrderProvider', () => {
|
||||
provider = new MeshOrderProvider({ websocketEndpoint }, orderStore);
|
||||
await provider.createSubscriptionForAssetPairAsync(makerAssetData, takerAssetData);
|
||||
connection.sendUTF(eventResponse);
|
||||
await utils.delayAsync(5);
|
||||
await utils.delayAsync(100);
|
||||
const orders = orderStore.getOrderSetForAssets(makerAssetData, takerAssetData);
|
||||
expect(orders.size()).toBe(1);
|
||||
});
|
||||
@ -162,11 +162,11 @@ describe('MeshOrderProvider', () => {
|
||||
provider = new MeshOrderProvider({ websocketEndpoint }, orderStore);
|
||||
await provider.createSubscriptionForAssetPairAsync(makerAssetData, takerAssetData);
|
||||
connection.sendUTF(added);
|
||||
await utils.delayAsync(5);
|
||||
await utils.delayAsync(100);
|
||||
const orders = orderStore.getOrderSetForAssets(makerAssetData, takerAssetData);
|
||||
expect(orders.size()).toBe(1);
|
||||
connection.sendUTF(removed);
|
||||
await utils.delayAsync(5);
|
||||
await utils.delayAsync(100);
|
||||
expect(orders.size()).toBe(0);
|
||||
});
|
||||
});
|
||||
@ -230,11 +230,11 @@ describe('MeshOrderProvider', () => {
|
||||
expect(addOrdersStub.callCount).toBe(0);
|
||||
const added = JSON.stringify(addedResponse);
|
||||
connection.sendUTF(added);
|
||||
await utils.delayAsync(5);
|
||||
await utils.delayAsync(100);
|
||||
expect(orders.size()).toBe(1);
|
||||
// Drop the connection and check orders are re-validated
|
||||
connection.drop();
|
||||
await utils.delayAsync(5);
|
||||
await utils.delayAsync(100);
|
||||
expect(addOrdersStub.callCount).toBe(1);
|
||||
});
|
||||
});
|
||||
|
@ -48,11 +48,11 @@
|
||||
"@0x/types": "^2.5.0-beta.2",
|
||||
"@0x/typescript-typings": "^4.4.0-beta.2",
|
||||
"@types/node": "*",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"abortcontroller-polyfill": "^1.1.9",
|
||||
"bignumber.js": "~9.0.0",
|
||||
"chalk": "^2.3.0",
|
||||
"detect-node": "2.0.3",
|
||||
"ethereum-types": "^2.2.0-beta.2",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "~4.0.4",
|
||||
"isomorphic-fetch": "2.2.1",
|
||||
|
182
yarn.lock
182
yarn.lock
@ -680,6 +680,12 @@
|
||||
lodash "^4.17.11"
|
||||
uuid "^3.3.2"
|
||||
|
||||
"@0x/contract-addresses@3.3.0-beta.3":
|
||||
version "3.3.0-beta.3"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contract-addresses/-/contract-addresses-3.3.0-beta.3.tgz#0fa8ad47e22aecdb99f9a044ba3c705c4173b61e"
|
||||
dependencies:
|
||||
lodash "^4.17.11"
|
||||
|
||||
"@0x/contract-addresses@^3.0.1", "@0x/contract-addresses@^3.0.2", "@0x/contract-addresses@^3.2.0":
|
||||
version "3.2.0"
|
||||
resolved "https://registry.npmjs.org/@0x/contract-addresses/-/contract-addresses-3.2.0.tgz#606307696d9622764220a34e9d4638b899093eec"
|
||||
@ -690,6 +696,18 @@
|
||||
version "2.2.2"
|
||||
resolved "https://registry.npmjs.org/@0x/contract-artifacts/-/contract-artifacts-2.2.2.tgz#e6d771afb58d0b59c19c5364af5a42a3dfd17219"
|
||||
|
||||
"@0x/contract-wrappers@12.2.0-beta.2":
|
||||
version "12.2.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contract-wrappers/-/contract-wrappers-12.2.0-beta.2.tgz#62b3c13e35282df14734d1f6b1a617ed51901a27"
|
||||
dependencies:
|
||||
"@0x/abi-gen-wrappers" "^5.4.0-beta.2"
|
||||
"@0x/base-contract" "^5.5.0-beta.2"
|
||||
"@0x/contract-addresses" "^3.3.0-beta.3"
|
||||
"@0x/contract-artifacts" "^2.3.0-beta.3"
|
||||
"@0x/order-utils" "^8.5.0-beta.2"
|
||||
ethers "~4.0.4"
|
||||
http-status-codes "^1.3.2"
|
||||
|
||||
"@0x/contract-wrappers@^9.1.6":
|
||||
version "9.1.8"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contract-wrappers/-/contract-wrappers-9.1.8.tgz#5923d35af3e4b442a57d02f74e02620b2d5b1356"
|
||||
@ -714,6 +732,72 @@
|
||||
lodash "^4.17.11"
|
||||
uuid "^3.3.2"
|
||||
|
||||
"@0x/contracts-erc20@2.3.0-beta.2":
|
||||
version "2.3.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contracts-erc20/-/contracts-erc20-2.3.0-beta.2.tgz#218239f5594fdbbf8c1ff757a6356ac6fb787421"
|
||||
dependencies:
|
||||
"@0x/base-contract" "^5.5.0-beta.2"
|
||||
"@0x/types" "^2.5.0-beta.2"
|
||||
"@0x/typescript-typings" "^4.4.0-beta.2"
|
||||
ethereum-types "^2.2.0-beta.2"
|
||||
|
||||
"@0x/contracts-erc20@^2.2.7":
|
||||
version "2.2.14"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contracts-erc20/-/contracts-erc20-2.2.14.tgz#bac2528a590c0f9668811cfd23948a941ae0ad30"
|
||||
dependencies:
|
||||
"@0x/base-contract" "^5.4.0"
|
||||
"@0x/contracts-utils" "^3.2.4"
|
||||
"@0x/types" "^2.4.3"
|
||||
"@0x/typescript-typings" "^4.3.0"
|
||||
"@0x/utils" "^4.5.2"
|
||||
"@0x/web3-wrapper" "^6.0.13"
|
||||
ethereum-types "^2.1.6"
|
||||
lodash "^4.17.11"
|
||||
|
||||
"@0x/contracts-utils@^3.2.4":
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/@0x/contracts-utils/-/contracts-utils-3.2.4.tgz#b5ae80684ac0542eb59925f52113ce2c8b1bdb2b"
|
||||
dependencies:
|
||||
"@0x/base-contract" "^5.4.0"
|
||||
"@0x/order-utils" "^8.4.0"
|
||||
"@0x/types" "^2.4.3"
|
||||
"@0x/typescript-typings" "^4.3.0"
|
||||
"@0x/utils" "^4.5.2"
|
||||
"@0x/web3-wrapper" "^6.0.13"
|
||||
bn.js "^4.11.8"
|
||||
ethereum-types "^2.1.6"
|
||||
ethereumjs-util "^5.1.1"
|
||||
lodash "^4.17.11"
|
||||
|
||||
"@0x/coordinator-server@^0.1.3":
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@0x/coordinator-server/-/coordinator-server-0.1.3.tgz#5fbb7c11bb641aa5386797769cab9a68a7d15b79"
|
||||
dependencies:
|
||||
"@0x/assert" "^2.1.0"
|
||||
"@0x/contract-addresses" "^3.0.1"
|
||||
"@0x/contract-wrappers" "^9.1.6"
|
||||
"@0x/contracts-erc20" "^2.2.7"
|
||||
"@0x/json-schemas" "^3.0.11"
|
||||
"@0x/order-utils" "^8.2.1"
|
||||
"@0x/subproviders" "^4.1.1"
|
||||
"@0x/types" "^2.4.0"
|
||||
"@0x/typescript-typings" "^4.2.3"
|
||||
"@0x/utils" "^4.4.0"
|
||||
"@0x/web3-wrapper" "^6.0.7"
|
||||
"@babel/polyfill" "^7.0.0"
|
||||
body-parser "^1.18.3"
|
||||
cors "^2.8.5"
|
||||
express "^4.16.3"
|
||||
express-async-handler "^1.1.4"
|
||||
forever "^0.15.3"
|
||||
http-status-codes "^1.3.0"
|
||||
jsonschema "^1.2.4"
|
||||
lodash "^4.17.11"
|
||||
reflect-metadata "^0.1.10"
|
||||
sqlite3 "^4.0.2"
|
||||
typeorm "0.2.7"
|
||||
websocket "^1.0.25"
|
||||
|
||||
"@0x/coordinator-server@^1.0.3":
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@0x/coordinator-server/-/coordinator-server-1.0.3.tgz#736640edc5960bd65674436f96050fd7b4da7ac3"
|
||||
@ -743,21 +827,6 @@
|
||||
typeorm "0.2.7"
|
||||
websocket "^1.0.25"
|
||||
|
||||
"@0x/dev-utils@^2.2.6":
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-2.3.3.tgz#9b6df00fea357fa6da02b35ca93fc89d100e1992"
|
||||
integrity sha512-Pi664W/jj1U6WU+kHEPyKpflBnmKRsclB69RaL7wpnvOOFjAPhFV2/0FvIZ25w62rMzKEpfD1/1NcZ7NjAk7OQ==
|
||||
dependencies:
|
||||
"@0x/subproviders" "^5.0.4"
|
||||
"@0x/types" "^2.4.3"
|
||||
"@0x/typescript-typings" "^4.3.0"
|
||||
"@0x/utils" "^4.5.2"
|
||||
"@0x/web3-wrapper" "^6.0.13"
|
||||
"@types/web3-provider-engine" "^14.0.0"
|
||||
chai "^4.0.1"
|
||||
ethereum-types "^2.1.6"
|
||||
lodash "^4.17.11"
|
||||
|
||||
"@0x/json-schemas@^3.0.11", "@0x/json-schemas@^3.1.11":
|
||||
version "3.1.13"
|
||||
resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-3.1.13.tgz#4b9010f1bdeaf2aef1daba1753aa2e5ecf57f654"
|
||||
@ -789,7 +858,29 @@
|
||||
uuid "^3.3.2"
|
||||
websocket "^1.0.29"
|
||||
|
||||
"@0x/order-utils@^8.2.1", "@0x/order-utils@^8.2.3", "@0x/order-utils@^8.2.4", "@0x/order-utils@^8.4.0":
|
||||
"@0x/order-utils@8.5.0-beta.2":
|
||||
version "8.5.0-beta.2"
|
||||
resolved "https://registry.yarnpkg.com/@0x/order-utils/-/order-utils-8.5.0-beta.2.tgz#ffd3da985e79aab4d0308ab33e399ec51c835ec1"
|
||||
dependencies:
|
||||
"@0x/abi-gen-wrappers" "^5.4.0-beta.2"
|
||||
"@0x/assert" "^2.2.0-beta.2"
|
||||
"@0x/contract-addresses" "^3.3.0-beta.3"
|
||||
"@0x/contract-artifacts" "^2.3.0-beta.3"
|
||||
"@0x/contracts-dev-utils" "^0.1.0-beta.2"
|
||||
"@0x/json-schemas" "^4.1.0-beta.2"
|
||||
"@0x/types" "^2.5.0-beta.2"
|
||||
"@0x/typescript-typings" "^4.4.0-beta.2"
|
||||
"@0x/utils" "^4.6.0-beta.2"
|
||||
"@0x/web3-wrapper" "^6.1.0-beta.2"
|
||||
"@types/node" "*"
|
||||
bn.js "^4.11.8"
|
||||
ethereum-types "^2.2.0-beta.2"
|
||||
ethereumjs-abi "0.6.5"
|
||||
ethereumjs-util "^5.1.1"
|
||||
ethers "~4.0.4"
|
||||
lodash "^4.17.11"
|
||||
|
||||
"@0x/order-utils@^8.2.1", "@0x/order-utils@^8.2.3", "@0x/order-utils@^8.4.0":
|
||||
version "8.4.0"
|
||||
resolved "https://registry.npmjs.org/@0x/order-utils/-/order-utils-8.4.0.tgz#f7fe9c73f9fd82ab05ec3c04951049e904aab46a"
|
||||
dependencies:
|
||||
@ -840,34 +931,6 @@
|
||||
optionalDependencies:
|
||||
"@ledgerhq/hw-transport-node-hid" "^4.3.0"
|
||||
|
||||
"@0x/subproviders@^5.0.4":
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-5.0.4.tgz#e4b165634ef6a50c4bd41baacf0dbd2a9390c2f8"
|
||||
integrity sha512-1LiGcOXkP5eUOl/0JRqkrqYtCvIL4NJj1GbbLIRq4TvkfqrRbF7zJM2SaayxPo3Z48zVsqk0ZE5+RrNAdK/Rrg==
|
||||
dependencies:
|
||||
"@0x/assert" "^2.1.6"
|
||||
"@0x/types" "^2.4.3"
|
||||
"@0x/typescript-typings" "^4.3.0"
|
||||
"@0x/utils" "^4.5.2"
|
||||
"@0x/web3-wrapper" "^6.0.13"
|
||||
"@ledgerhq/hw-app-eth" "^4.3.0"
|
||||
"@ledgerhq/hw-transport-u2f" "4.24.0"
|
||||
"@types/hdkey" "^0.7.0"
|
||||
"@types/web3-provider-engine" "^14.0.0"
|
||||
bip39 "^2.5.0"
|
||||
bn.js "^4.11.8"
|
||||
ethereum-types "^2.1.6"
|
||||
ethereumjs-tx "^1.3.5"
|
||||
ethereumjs-util "^5.1.1"
|
||||
ganache-core "^2.6.0"
|
||||
hdkey "^0.7.1"
|
||||
json-rpc-error "2.0.0"
|
||||
lodash "^4.17.11"
|
||||
semaphore-async-await "^1.5.1"
|
||||
web3-provider-engine "14.0.6"
|
||||
optionalDependencies:
|
||||
"@ledgerhq/hw-transport-node-hid" "^4.3.0"
|
||||
|
||||
"@0x/ts-doc-gen@^0.0.22":
|
||||
version "0.0.22"
|
||||
resolved "https://registry.yarnpkg.com/@0x/ts-doc-gen/-/ts-doc-gen-0.0.22.tgz#c9c215899695dcd4320a1711291be40050ddbc0e"
|
||||
@ -2049,12 +2112,6 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/bn.js@^4.11.0":
|
||||
version "4.11.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.0.tgz#401cb20874f0a7b8414e46308a99c449759b7de9"
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/cheerio@*":
|
||||
version "0.22.9"
|
||||
resolved "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.9.tgz#b5990152604c2ada749b7f88cab3476f21f39d7b"
|
||||
@ -3075,7 +3132,6 @@ atob@^2.0.0:
|
||||
atob@^2.1.1:
|
||||
version "2.1.2"
|
||||
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
|
||||
integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==
|
||||
|
||||
awesome-typescript-loader@^5.2.1:
|
||||
version "5.2.1"
|
||||
@ -3333,7 +3389,6 @@ babel-jest@^24.8.0:
|
||||
babel-loader@^7.1.5:
|
||||
version "7.1.5"
|
||||
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-7.1.5.tgz#e3ee0cd7394aa557e013b02d3e492bfd07aa6d68"
|
||||
integrity sha512-iCHfbieL5d1LfOQeeVJEUyD9rTwBcP/fcEbRCfempxTDuqrKpu0AZjLAQHEQa3Yqyj9ORKe2iHfoj4rHLf7xpw==
|
||||
dependencies:
|
||||
find-cache-dir "^1.0.0"
|
||||
loader-utils "^1.0.2"
|
||||
@ -5551,7 +5606,6 @@ css-what@2.1:
|
||||
css@2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
|
||||
integrity sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==
|
||||
dependencies:
|
||||
inherits "^2.0.3"
|
||||
source-map "^0.6.1"
|
||||
@ -11590,20 +11644,7 @@ merge@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
|
||||
|
||||
merkle-patricia-tree@2.3.1, merkle-patricia-tree@^2.1.2:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz#7d4e7263a9c85c1679187cad4a6d71f48d524c71"
|
||||
dependencies:
|
||||
async "^1.4.2"
|
||||
ethereumjs-util "^5.0.0"
|
||||
level-ws "0.0.0"
|
||||
levelup "^1.2.1"
|
||||
memdown "^1.0.0"
|
||||
readable-stream "^2.0.0"
|
||||
rlp "^2.0.0"
|
||||
semaphore ">=1.0.1"
|
||||
|
||||
merkle-patricia-tree@2.3.2, merkle-patricia-tree@^2.3.2:
|
||||
merkle-patricia-tree@2.3.1, merkle-patricia-tree@2.3.2, merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2:
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a"
|
||||
dependencies:
|
||||
@ -13824,7 +13865,6 @@ railroad-diagrams@^1.0.0:
|
||||
ramda@0.21.0:
|
||||
version "0.21.0"
|
||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35"
|
||||
integrity sha1-oAGr7bP/YQd9T/HVd9RN536NCjU=
|
||||
|
||||
randexp@0.4.6:
|
||||
version "0.4.6"
|
||||
@ -14629,7 +14669,6 @@ rx-lite@*, rx-lite@^4.0.8:
|
||||
rx@4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
|
||||
integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=
|
||||
|
||||
rxjs@^5.0.0-beta.11:
|
||||
version "5.5.11"
|
||||
@ -15284,7 +15323,6 @@ source-map-resolve@^0.5.0:
|
||||
source-map-resolve@^0.5.2:
|
||||
version "0.5.2"
|
||||
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
|
||||
integrity sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==
|
||||
dependencies:
|
||||
atob "^2.1.1"
|
||||
decode-uri-component "^0.2.0"
|
||||
@ -15780,7 +15818,6 @@ sver-compat@^1.5.0:
|
||||
svg-react-loader@^0.4.6:
|
||||
version "0.4.6"
|
||||
resolved "https://registry.yarnpkg.com/svg-react-loader/-/svg-react-loader-0.4.6.tgz#b263efb3e3d2fff4c682a729351aba5f185051a1"
|
||||
integrity sha512-HVEypjWQsQuJdBIPzXGxpmQsQts7QwfQuYgK1rah6BVCMoLNSCh/ESKVNd7/tHq8DkWYHHTyaUMDA1FjqZYrgA==
|
||||
dependencies:
|
||||
css "2.2.4"
|
||||
loader-utils "1.1.0"
|
||||
@ -16267,7 +16304,6 @@ traverse-chain@~0.1.0:
|
||||
traverse@0.6.6:
|
||||
version "0.6.6"
|
||||
resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
|
||||
integrity sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=
|
||||
|
||||
treeify@^1.0.1:
|
||||
version "1.1.0"
|
||||
@ -17941,7 +17977,6 @@ xml-name-validator@^3.0.0:
|
||||
xml2js@0.4.17:
|
||||
version "0.4.17"
|
||||
resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868"
|
||||
integrity sha1-F76T6q4/O3eTWceVtBlwWogX6Gg=
|
||||
dependencies:
|
||||
sax ">=0.6.0"
|
||||
xmlbuilder "^4.1.0"
|
||||
@ -17956,7 +17991,6 @@ xml2js@0.4.19, xml2js@^0.4.17:
|
||||
xmlbuilder@^4.1.0:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
|
||||
integrity sha1-qlijBBoGb5DqoWwvU4n/GfP0YaU=
|
||||
dependencies:
|
||||
lodash "^4.0.0"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user