Merge remote-tracking branch 'upstream/development' into sol-doc
This commit is contained in:
commit
d3edb9721c
@ -51,7 +51,7 @@ jobs:
|
||||
test-contracts-geth:
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: albrow/0x-devnet
|
||||
- image: 0xorg/devnet
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
resource_class: medium+
|
||||
docker:
|
||||
- image: circleci/node:9
|
||||
- image: verdaccio/verdaccio
|
||||
- image: 0xorg/verdaccio
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.4",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.5 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,9 +41,9 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/migrations": "^1.0.11",
|
||||
"@0xproject/monorepo-scripts": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
@ -73,16 +73,16 @@
|
||||
"webpack": "^3.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/contract-wrappers": "^1.0.4",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/order-watcher": "^1.0.4",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/contract-wrappers": "^1.0.5",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/order-watcher": "^1.0.5",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/abi-gen",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -31,7 +31,7 @@
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"glob": "^7.1.2",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/assert",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -44,9 +44,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"lodash": "^4.17.5",
|
||||
"valid-url": "^1.0.9"
|
||||
},
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.0-rc.1",
|
||||
"changes": [
|
||||
|
@ -1 +1,14 @@
|
||||
<!--
|
||||
changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
|
||||
Edit the package's CHANGELOG.json file only.
|
||||
-->
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.0 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.0-rc.1 - _Invalid date_
|
||||
|
||||
* Init
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/asset-buyer",
|
||||
"version": "1.0.0-rc.1",
|
||||
"version": "1.0.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -36,16 +36,16 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/connect": "^2.0.2",
|
||||
"@0xproject/contract-wrappers": "^1.0.4",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.1",
|
||||
"@0xproject/subproviders": "^2.0.2",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/connect": "^2.0.3",
|
||||
"@0xproject/contract-wrappers": "^1.0.5",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.6",
|
||||
"lodash": "^4.17.10"
|
||||
},
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { APIOrder, HttpClient, OrderbookResponse } from '@0xproject/connect';
|
||||
import { HttpClient } from '@0xproject/connect';
|
||||
import { APIOrder, OrderbookResponse } from '@0xproject/types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/base-contract",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,8 +41,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
|
@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "2.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Import SRA-related types from @0xproject/types",
|
||||
"pr": 1085
|
||||
}
|
||||
],
|
||||
"timestamp": 1537875740
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.2",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.3 - _September 25, 2018_
|
||||
|
||||
* Import SRA-related types from @0xproject/types (#1085)
|
||||
|
||||
## v2.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/connect",
|
||||
"version": "2.0.2",
|
||||
"version": "2.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -43,12 +43,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"lodash": "^4.17.5",
|
||||
"query-string": "^5.0.1",
|
||||
"sinon": "^4.0.0",
|
||||
|
@ -1,19 +1,10 @@
|
||||
import { assert } from '@0xproject/assert';
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { SignedOrder } from '@0xproject/types';
|
||||
import { fetchAsync } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as queryString from 'query-string';
|
||||
|
||||
import { schemas as clientSchemas } from './schemas/schemas';
|
||||
import {
|
||||
APIOrder,
|
||||
AssetPairsRequestOpts,
|
||||
AssetPairsResponse,
|
||||
Client,
|
||||
FeeRecipientsResponse,
|
||||
HttpRequestOptions,
|
||||
HttpRequestType,
|
||||
OrderbookRequest,
|
||||
OrderbookResponse,
|
||||
OrderConfigRequest,
|
||||
@ -22,7 +13,14 @@ import {
|
||||
OrdersResponse,
|
||||
PagedRequestOpts,
|
||||
RequestOpts,
|
||||
} from './types';
|
||||
SignedOrder,
|
||||
} from '@0xproject/types';
|
||||
import { fetchAsync } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as queryString from 'query-string';
|
||||
|
||||
import { schemas as clientSchemas } from './schemas/schemas';
|
||||
import { Client, HttpRequestOptions, HttpRequestType } from './types';
|
||||
import { relayerResponseJsonParsers } from './utils/relayer_response_json_parsers';
|
||||
|
||||
const TRAILING_SLASHES_REGEX = /\/+$/;
|
||||
|
@ -1,23 +1,20 @@
|
||||
export { HttpClient } from './http_client';
|
||||
export { ordersChannelFactory } from './orders_channel_factory';
|
||||
export { Client, OrdersChannel, OrdersChannelHandler } from './types';
|
||||
export {
|
||||
Client,
|
||||
OrderConfigRequest,
|
||||
OrderConfigResponse,
|
||||
OrdersChannel,
|
||||
OrdersChannelHandler,
|
||||
OrdersChannelSubscriptionOpts,
|
||||
OrderbookRequest,
|
||||
OrderbookResponse,
|
||||
OrdersRequestOpts,
|
||||
PagedRequestOpts,
|
||||
APIOrder,
|
||||
AssetPairsRequestOpts,
|
||||
RequestOpts,
|
||||
AssetPairsResponse,
|
||||
FeeRecipientsResponse,
|
||||
APIOrder,
|
||||
OrderbookRequest,
|
||||
OrderbookResponse,
|
||||
OrderConfigRequest,
|
||||
OrderConfigResponse,
|
||||
OrdersChannelSubscriptionOpts,
|
||||
OrdersRequestOpts,
|
||||
OrdersResponse,
|
||||
PagedRequestOpts,
|
||||
PaginatedCollection,
|
||||
} from './types';
|
||||
|
||||
export { SignedOrder } from '@0xproject/types';
|
||||
RequestOpts,
|
||||
SignedOrder,
|
||||
} from '@0xproject/types';
|
||||
|
@ -1,5 +1,18 @@
|
||||
import { SignedOrder } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import {
|
||||
APIOrder,
|
||||
AssetPairsItem,
|
||||
AssetPairsRequestOpts,
|
||||
FeeRecipientsResponse,
|
||||
OrderbookRequest,
|
||||
OrderbookResponse,
|
||||
OrderConfigRequest,
|
||||
OrderConfigResponse,
|
||||
OrdersChannelSubscriptionOpts,
|
||||
OrdersRequestOpts,
|
||||
PagedRequestOpts,
|
||||
PaginatedCollection,
|
||||
SignedOrder,
|
||||
} from '@0xproject/types';
|
||||
|
||||
export interface Client {
|
||||
getAssetPairsAsync: (
|
||||
@ -18,140 +31,12 @@ export interface OrdersChannel {
|
||||
close: () => void;
|
||||
}
|
||||
|
||||
/**
|
||||
* baseAssetData: The address of assetData designated as the baseToken in the currency pair calculation of price
|
||||
* quoteAssetData: The address of assetData designated as the quoteToken in the currency pair calculation of price
|
||||
* limit: Maximum number of bids and asks in orderbook snapshot
|
||||
*/
|
||||
export interface OrdersChannelSubscriptionOpts {
|
||||
baseAssetData: string;
|
||||
quoteAssetData: string;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export interface OrdersChannelHandler {
|
||||
onUpdate: (channel: OrdersChannel, subscriptionOpts: OrdersChannelSubscriptionOpts, orders: APIOrder[]) => void;
|
||||
onError: (channel: OrdersChannel, err: Error, subscriptionOpts?: OrdersChannelSubscriptionOpts) => void;
|
||||
onClose: (channel: OrdersChannel) => void;
|
||||
}
|
||||
|
||||
export type OrdersChannelMessage = UpdateOrdersChannelMessage | UnknownOrdersChannelMessage;
|
||||
|
||||
export enum OrdersChannelMessageTypes {
|
||||
Update = 'update',
|
||||
Unknown = 'unknown',
|
||||
}
|
||||
|
||||
export interface UpdateOrdersChannelMessage {
|
||||
type: OrdersChannelMessageTypes.Update;
|
||||
requestId: string;
|
||||
payload: APIOrder[];
|
||||
}
|
||||
|
||||
export interface UnknownOrdersChannelMessage {
|
||||
type: OrdersChannelMessageTypes.Unknown;
|
||||
requestId: string;
|
||||
payload: undefined;
|
||||
}
|
||||
|
||||
export enum WebsocketConnectionEventType {
|
||||
Close = 'close',
|
||||
Error = 'error',
|
||||
Message = 'message',
|
||||
}
|
||||
|
||||
export enum WebsocketClientEventType {
|
||||
Connect = 'connect',
|
||||
ConnectFailed = 'connectFailed',
|
||||
}
|
||||
|
||||
export type OrdersResponse = PaginatedCollection<APIOrder>;
|
||||
|
||||
export interface APIOrder {
|
||||
order: SignedOrder;
|
||||
metaData: object;
|
||||
}
|
||||
|
||||
export interface AssetPairsRequestOpts {
|
||||
assetDataA?: string;
|
||||
assetDataB?: string;
|
||||
}
|
||||
|
||||
export type AssetPairsResponse = PaginatedCollection<AssetPairsItem>;
|
||||
|
||||
export interface AssetPairsItem {
|
||||
assetDataA: Asset;
|
||||
assetDataB: Asset;
|
||||
}
|
||||
|
||||
export interface Asset {
|
||||
assetData: string;
|
||||
minAmount: BigNumber;
|
||||
maxAmount: BigNumber;
|
||||
precision: number;
|
||||
}
|
||||
|
||||
export interface OrdersRequestOpts {
|
||||
makerAssetProxyId?: string;
|
||||
takerAssetProxyId?: string;
|
||||
makerAssetAddress?: string;
|
||||
takerAssetAddress?: string;
|
||||
exchangeAddress?: string;
|
||||
senderAddress?: string;
|
||||
makerAssetData?: string;
|
||||
takerAssetData?: string;
|
||||
makerAddress?: string;
|
||||
takerAddress?: string;
|
||||
traderAddress?: string;
|
||||
feeRecipientAddress?: string;
|
||||
}
|
||||
|
||||
export interface OrderbookRequest {
|
||||
baseAssetData: string;
|
||||
quoteAssetData: string;
|
||||
}
|
||||
|
||||
export interface OrderbookResponse {
|
||||
bids: PaginatedCollection<APIOrder>;
|
||||
asks: PaginatedCollection<APIOrder>;
|
||||
}
|
||||
|
||||
export interface PaginatedCollection<T> {
|
||||
total: number;
|
||||
page: number;
|
||||
perPage: number;
|
||||
records: T[];
|
||||
}
|
||||
|
||||
export interface OrderConfigRequest {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
exchangeAddress: string;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
}
|
||||
|
||||
export interface OrderConfigResponse {
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
}
|
||||
|
||||
export type FeeRecipientsResponse = PaginatedCollection<string>;
|
||||
|
||||
export interface RequestOpts {
|
||||
networkId?: number;
|
||||
}
|
||||
|
||||
export interface PagedRequestOpts {
|
||||
page?: number;
|
||||
perPage?: number;
|
||||
}
|
||||
|
||||
export interface HttpRequestOptions {
|
||||
params?: object;
|
||||
payload?: object;
|
||||
|
@ -2,7 +2,7 @@ import { assert } from '@0xproject/assert';
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { OrdersChannelMessage, OrdersChannelMessageTypes } from '../types';
|
||||
import { OrdersChannelMessage, OrdersChannelMessageTypes } from '@0xproject/types';
|
||||
|
||||
import { relayerResponseJsonParsers } from './relayer_response_json_parsers';
|
||||
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
OrderbookResponse,
|
||||
OrderConfigResponse,
|
||||
OrdersResponse,
|
||||
} from '../types';
|
||||
} from '@0xproject/types';
|
||||
|
||||
import { typeConverters } from './type_converters';
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { orderParsingUtils } from '@0xproject/order-utils';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { APIOrder } from '../types';
|
||||
import { APIOrder } from '@0xproject/types';
|
||||
|
||||
export const typeConverters = {
|
||||
convertOrderbookStringFieldsToBigNumber(orderbook: any): any {
|
||||
|
@ -1,8 +1,9 @@
|
||||
import { OrdersChannelMessageTypes, OrdersChannelSubscriptionOpts } from '@0xproject/types';
|
||||
import * as _ from 'lodash';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import * as WebSocket from 'websocket';
|
||||
|
||||
import { OrdersChannel, OrdersChannelHandler, OrdersChannelMessageTypes, OrdersChannelSubscriptionOpts } from './types';
|
||||
import { OrdersChannel, OrdersChannelHandler } from './types';
|
||||
import { assert } from './utils/assert';
|
||||
import { ordersChannelMessageParser } from './utils/orders_channel_message_parser';
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { AssetPairsResponse } from '../../../src/types';
|
||||
import { AssetPairsResponse } from '@0xproject/types';
|
||||
|
||||
export const assetDataPairsResponse: AssetPairsResponse = {
|
||||
total: 43,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { FeeRecipientsResponse } from '../../../src/types';
|
||||
import { FeeRecipientsResponse } from '@0xproject/types';
|
||||
|
||||
export const feeRecipientsResponse: FeeRecipientsResponse = {
|
||||
total: 3,
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { OrderConfigResponse } from '../../../src/types';
|
||||
import { OrderConfigResponse } from '@0xproject/types';
|
||||
|
||||
export const orderConfigResponse: OrderConfigResponse = {
|
||||
senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { OrderbookResponse } from '../../../src/types';
|
||||
import { OrderbookResponse } from '@0xproject/types';
|
||||
|
||||
export const orderbookResponse: OrderbookResponse = {
|
||||
bids: {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import { OrdersResponse } from '../../../src/types';
|
||||
import { OrdersResponse } from '@0xproject/types';
|
||||
|
||||
export const ordersResponse: OrdersResponse = {
|
||||
total: 984,
|
||||
|
@ -1,12 +1,36 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note":
|
||||
"Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.",
|
||||
"pr": 1080
|
||||
},
|
||||
{
|
||||
"note":
|
||||
"Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it",
|
||||
"pr": 1080
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1537875740
|
||||
},
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
],
|
||||
"timestamp": 1537541580
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.5 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/contract-wrappers",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "Smart TS wrappers for 0x smart contracts",
|
||||
"keywords": [
|
||||
"0xproject",
|
||||
@ -41,10 +41,10 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/migrations": "^1.0.11",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "^2.2.42",
|
||||
@ -72,17 +72,17 @@
|
||||
"web3-provider-engine": "14.0.6"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/fill-scenarios": "^1.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/fill-scenarios": "^1.0.4",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethereumjs-blockstream": "6.0.0",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"ethers": "3.0.22",
|
||||
"js-sha3": "^0.7.0",
|
||||
|
@ -1,14 +1,14 @@
|
||||
import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import {
|
||||
BlockParamLiteral,
|
||||
BlockWithoutTransactionData,
|
||||
ContractAbi,
|
||||
ContractArtifact,
|
||||
FilterObject,
|
||||
LogEntry,
|
||||
LogWithDecodedArgs,
|
||||
RawLog,
|
||||
RawLogEntry,
|
||||
} from 'ethereum-types';
|
||||
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
||||
import * as _ from 'lodash';
|
||||
@ -158,7 +158,8 @@ export abstract class ContractWrapper {
|
||||
return addressIfExists;
|
||||
}
|
||||
}
|
||||
private _onLogStateChanged<ArgsType extends ContractEventArgs>(isRemoved: boolean, log: LogEntry): void {
|
||||
private _onLogStateChanged<ArgsType extends ContractEventArgs>(isRemoved: boolean, rawLog: RawLogEntry): void {
|
||||
const log: LogEntry = marshaller.unmarshalLog(rawLog);
|
||||
_.forEach(this._filters, (filter: FilterObject, filterToken: string) => {
|
||||
if (filterUtils.matchesFilter(log, filter)) {
|
||||
const decodedLog = this._tryToDecodeLogOrNoop(log) as LogWithDecodedArgs<ArgsType>;
|
||||
@ -175,8 +176,8 @@ export abstract class ContractWrapper {
|
||||
throw new Error(ContractWrappersError.SubscriptionAlreadyPresent);
|
||||
}
|
||||
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
|
||||
this._getBlockOrNullAsync.bind(this),
|
||||
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper),
|
||||
this._blockstreamGetBlockOrNullAsync.bind(this),
|
||||
this._blockstreamGetLogsAsync.bind(this),
|
||||
ContractWrapper._onBlockAndLogStreamerError.bind(this, isVerbose),
|
||||
);
|
||||
const catchAllLogFilter = {};
|
||||
@ -196,12 +197,30 @@ export abstract class ContractWrapper {
|
||||
);
|
||||
}
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _getBlockOrNullAsync(): Promise<BlockWithoutTransactionData | null> {
|
||||
const blockIfExists = await this._web3Wrapper.getBlockIfExistsAsync.bind(this._web3Wrapper);
|
||||
if (_.isUndefined(blockIfExists)) {
|
||||
return null;
|
||||
private async _blockstreamGetBlockOrNullAsync(hash: string): Promise<Block | null> {
|
||||
const shouldIncludeTransactionData = false;
|
||||
const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
|
||||
method: 'eth_getBlockByHash',
|
||||
params: [hash, shouldIncludeTransactionData],
|
||||
});
|
||||
return blockOrNull;
|
||||
}
|
||||
return blockIfExists;
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _blockstreamGetLatestBlockOrNullAsync(): Promise<Block | null> {
|
||||
const shouldIncludeTransactionData = false;
|
||||
const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
|
||||
method: 'eth_getBlockByNumber',
|
||||
params: [BlockParamLiteral.Latest, shouldIncludeTransactionData],
|
||||
});
|
||||
return blockOrNull;
|
||||
}
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _blockstreamGetLogsAsync(filterOptions: FilterObject): Promise<RawLogEntry[]> {
|
||||
const logs = await this._web3Wrapper.sendRawPayloadAsync<RawLogEntry[]>({
|
||||
method: 'eth_getLogs',
|
||||
params: [filterOptions],
|
||||
});
|
||||
return logs as RawLogEntry[];
|
||||
}
|
||||
// HACK: This should be a package-scoped method (which doesn't exist in TS)
|
||||
// We don't want this method available in the public interface for all classes
|
||||
@ -221,14 +240,14 @@ export abstract class ContractWrapper {
|
||||
delete this._blockAndLogStreamerIfExists;
|
||||
}
|
||||
private async _reconcileBlockAsync(): Promise<void> {
|
||||
const latestBlockIfExists = await this._web3Wrapper.getBlockIfExistsAsync(BlockParamLiteral.Latest);
|
||||
if (_.isUndefined(latestBlockIfExists)) {
|
||||
const latestBlockOrNull = await this._blockstreamGetLatestBlockOrNullAsync();
|
||||
if (_.isNull(latestBlockOrNull)) {
|
||||
return; // noop
|
||||
}
|
||||
// We need to coerce to Block type cause Web3.Block includes types for mempool blocks
|
||||
if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
|
||||
// If we clear the interval while fetching the block - this._blockAndLogStreamer will be undefined
|
||||
await this._blockAndLogStreamerIfExists.reconcileNewBlock((latestBlockIfExists as any) as Block);
|
||||
await this._blockAndLogStreamerIfExists.reconcileNewBlock(latestBlockOrNull);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "contracts",
|
||||
"version": "2.1.45",
|
||||
"version": "2.1.46",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -45,11 +45,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/sol-cov": "^2.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/sol-compiler": "^1.1.4",
|
||||
"@0xproject/sol-cov": "^2.1.4",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/ethereumjs-abi": "^0.6.0",
|
||||
@ -72,12 +72,12 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@types/js-combinatorics": "^0.5.29",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.0.7",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.8",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.9 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.8 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/dev-utils",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -42,11 +42,11 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@ -181,6 +181,7 @@ export interface CallData extends CallTxDataBase {
|
||||
export interface FilterObject {
|
||||
fromBlock?: number | string;
|
||||
toBlock?: number | string;
|
||||
blockHash?: string;
|
||||
address?: string;
|
||||
topics?: LogTopic[];
|
||||
}
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/fill-scenarios",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"description": "0x order fill scenario generator",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@ -26,7 +26,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/lodash": "4.14.104",
|
||||
"copyfiles": "^2.0.0",
|
||||
@ -37,12 +37,12 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.2",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.3 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/json-schemas",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -45,7 +45,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@types/lodash.foreach": "^4.5.3",
|
||||
"@types/lodash.values": "^4.3.3",
|
||||
"@types/mocha": "^2.2.42",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/metacoin",
|
||||
"version": "0.0.19",
|
||||
"version": "0.0.20",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -28,15 +28,15 @@
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/sol-cov": "^2.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/sol-cov": "^2.1.4",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@types/mocha": "^5.2.2",
|
||||
"copyfiles": "^2.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
@ -45,8 +45,8 @@
|
||||
"run-s": "^0.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/sol-compiler": "^1.1.4",
|
||||
"chai": "^4.0.1",
|
||||
"chai-as-promised": "^7.1.0",
|
||||
"chai-bignumber": "^2.0.1",
|
||||
|
1
packages/migrations/.gitignore
vendored
Normal file
1
packages/migrations/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
artifacts/development
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.11",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.10",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.11 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.10 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/migrations",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -30,10 +30,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@types/yargs": "^10.0.0",
|
||||
"copyfiles": "^2.0.0",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
@ -44,13 +44,13 @@
|
||||
"yargs": "^10.0.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/sol-compiler": "^1.1.4",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethers": "3.0.22",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-utils",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -38,7 +38,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bn.js": "^4.11.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
@ -57,13 +57,13 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@types/node": "*",
|
||||
"bn.js": "^4.11.8",
|
||||
"ethereum-types": "^1.0.7",
|
||||
|
@ -114,7 +114,7 @@ export class OrderStateUtils {
|
||||
* @return State relevant to the signedOrder, as well as whether the signedOrder is "valid".
|
||||
* Validity is defined as a non-zero amount of the order can still be filled.
|
||||
*/
|
||||
public async getOpenOrderStateAsync(signedOrder: SignedOrder): Promise<OrderState> {
|
||||
public async getOpenOrderStateAsync(signedOrder: SignedOrder, transactionHash?: string): Promise<OrderState> {
|
||||
const orderRelevantState = await this.getOpenOrderRelevantStateAsync(signedOrder);
|
||||
const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
|
||||
const isOrderCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(orderHash);
|
||||
@ -134,6 +134,7 @@ export class OrderStateUtils {
|
||||
isValid: true,
|
||||
orderHash,
|
||||
orderRelevantState,
|
||||
transactionHash,
|
||||
};
|
||||
return orderState;
|
||||
} else {
|
||||
@ -141,6 +142,7 @@ export class OrderStateUtils {
|
||||
isValid: false,
|
||||
orderHash,
|
||||
error: orderValidationResult.error,
|
||||
transactionHash,
|
||||
};
|
||||
return orderState;
|
||||
}
|
||||
|
@ -120,5 +120,25 @@ describe('OrderStateUtils', () => {
|
||||
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
|
||||
expect(orderState.isValid).to.eq(false);
|
||||
});
|
||||
it('should include the transactionHash in orderState if supplied in method invocation', async () => {
|
||||
const makerAssetAmount = new BigNumber(10);
|
||||
const takerAssetAmount = new BigNumber(10000000000000000);
|
||||
const takerBalance = takerAssetAmount;
|
||||
const orderFilledAmount = new BigNumber(0);
|
||||
const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
|
||||
const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount);
|
||||
const [signedOrder] = testOrderFactory.generateTestSignedOrders(
|
||||
{
|
||||
makerAssetAmount,
|
||||
takerAssetAmount,
|
||||
},
|
||||
1,
|
||||
);
|
||||
|
||||
const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
|
||||
const transactionHash = '0xdeadbeef';
|
||||
const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
|
||||
expect(orderState.transactionHash).to.eq(transactionHash);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1,12 +1,41 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.0",
|
||||
"changes": [
|
||||
{
|
||||
"note":
|
||||
"Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.",
|
||||
"pr": 1080
|
||||
},
|
||||
{
|
||||
"note":
|
||||
"Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it",
|
||||
"pr": 1080
|
||||
},
|
||||
{
|
||||
"note":
|
||||
"Add `transactionHash` to `OrderState` emitted by `OrderWatcher` subscriptions if the order's state change originated from a transaction.",
|
||||
"pr": 1087
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "1.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
],
|
||||
"timestamp": 1537875740
|
||||
},
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
],
|
||||
"timestamp": 1537541580
|
||||
},
|
||||
{
|
||||
"version": "1.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.5 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.4 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-watcher",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.5",
|
||||
"description": "An order watcher daemon that watches for order validity",
|
||||
"keywords": [
|
||||
"0x",
|
||||
@ -42,9 +42,9 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.9",
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/migrations": "^1.0.10",
|
||||
"@0xproject/abi-gen": "^1.0.10",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/migrations": "^1.0.11",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/bintrees": "^1.0.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
@ -70,19 +70,19 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/base-contract": "^2.0.3",
|
||||
"@0xproject/contract-wrappers": "^1.0.4",
|
||||
"@0xproject/fill-scenarios": "^1.0.3",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/order-utils": "^1.0.3",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/base-contract": "^2.0.4",
|
||||
"@0xproject/contract-wrappers": "^1.0.5",
|
||||
"@0xproject/fill-scenarios": "^1.0.4",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/order-utils": "^1.0.4",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"bintrees": "^1.0.2",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethereumjs-blockstream": "6.0.0",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { intervalUtils, logUtils } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { BlockParamLiteral, BlockWithoutTransactionData, LogEntry, Provider } from 'ethereum-types';
|
||||
import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { BlockParamLiteral, FilterObject, LogEntry, Provider, RawLogEntry } from 'ethereum-types';
|
||||
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
@ -20,7 +20,6 @@ enum LogEventState {
|
||||
*/
|
||||
export class EventWatcher {
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
private readonly _stateLayer: BlockParamLiteral;
|
||||
private readonly _isVerbose: boolean;
|
||||
private _blockAndLogStreamerIfExists: BlockAndLogStreamer<Block, Log> | undefined;
|
||||
private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
|
||||
@ -35,7 +34,6 @@ export class EventWatcher {
|
||||
) {
|
||||
this._isVerbose = isVerbose;
|
||||
this._web3Wrapper = new Web3Wrapper(provider);
|
||||
this._stateLayer = stateLayer;
|
||||
this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs)
|
||||
? DEFAULT_EVENT_POLLING_INTERVAL_MS
|
||||
: pollingIntervalIfExistsMs;
|
||||
@ -62,8 +60,8 @@ export class EventWatcher {
|
||||
throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
|
||||
}
|
||||
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
|
||||
this._getBlockOrNullAsync.bind(this),
|
||||
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper),
|
||||
this._blockstreamGetBlockOrNullAsync.bind(this),
|
||||
this._blockstreamGetLogsAsync.bind(this),
|
||||
this._onBlockAndLogStreamerError.bind(this),
|
||||
);
|
||||
const catchAllLogFilter = {};
|
||||
@ -83,12 +81,30 @@ export class EventWatcher {
|
||||
);
|
||||
}
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _getBlockOrNullAsync(): Promise<BlockWithoutTransactionData | null> {
|
||||
const blockIfExists = await this._web3Wrapper.getBlockIfExistsAsync.bind(this._web3Wrapper);
|
||||
if (_.isUndefined(blockIfExists)) {
|
||||
return null;
|
||||
private async _blockstreamGetBlockOrNullAsync(hash: string): Promise<Block | null> {
|
||||
const shouldIncludeTransactionData = false;
|
||||
const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
|
||||
method: 'eth_getBlockByHash',
|
||||
params: [hash, shouldIncludeTransactionData],
|
||||
});
|
||||
return blockOrNull;
|
||||
}
|
||||
return blockIfExists;
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _blockstreamGetLatestBlockOrNullAsync(): Promise<Block | null> {
|
||||
const shouldIncludeTransactionData = false;
|
||||
const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
|
||||
method: 'eth_getBlockByNumber',
|
||||
params: [BlockParamLiteral.Latest, shouldIncludeTransactionData],
|
||||
});
|
||||
return blockOrNull;
|
||||
}
|
||||
// This method only exists in order to comply with the expected interface of Blockstream's constructor
|
||||
private async _blockstreamGetLogsAsync(filterOptions: FilterObject): Promise<RawLogEntry[]> {
|
||||
const logs = await this._web3Wrapper.sendRawPayloadAsync<RawLogEntry[]>({
|
||||
method: 'eth_getLogs',
|
||||
params: [filterOptions],
|
||||
});
|
||||
return logs as RawLogEntry[];
|
||||
}
|
||||
private _stopBlockAndLogStream(): void {
|
||||
if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
|
||||
@ -103,19 +119,20 @@ export class EventWatcher {
|
||||
private async _onLogStateChangedAsync(
|
||||
callback: EventWatcherCallback,
|
||||
isRemoved: boolean,
|
||||
log: LogEntry,
|
||||
rawLog: RawLogEntry,
|
||||
): Promise<void> {
|
||||
const log: LogEntry = marshaller.unmarshalLog(rawLog);
|
||||
await this._emitDifferencesAsync(log, isRemoved ? LogEventState.Removed : LogEventState.Added, callback);
|
||||
}
|
||||
private async _reconcileBlockAsync(): Promise<void> {
|
||||
const latestBlockIfExists = await this._web3Wrapper.getBlockIfExistsAsync(this._stateLayer);
|
||||
if (_.isUndefined(latestBlockIfExists)) {
|
||||
const latestBlockOrNull = await this._blockstreamGetLatestBlockOrNullAsync();
|
||||
if (_.isNull(latestBlockOrNull)) {
|
||||
return; // noop
|
||||
}
|
||||
// We need to coerce to Block type cause Web3.Block includes types for mempool blocks
|
||||
if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
|
||||
// If we clear the interval while fetching the block - this._blockAndLogStreamer will be undefined
|
||||
await this._blockAndLogStreamerIfExists.reconcileNewBlock((latestBlockIfExists as any) as Block);
|
||||
await this._blockAndLogStreamerIfExists.reconcileNewBlock(latestBlockOrNull);
|
||||
}
|
||||
}
|
||||
private async _emitDifferencesAsync(
|
||||
|
@ -275,6 +275,7 @@ export class OrderWatcher {
|
||||
return; // noop
|
||||
}
|
||||
const decodedLog = (maybeDecodedLog as any) as LogWithDecodedArgs<ContractEventArgs>;
|
||||
const transactionHash = decodedLog.transactionHash;
|
||||
switch (decodedLog.event) {
|
||||
case ERC20TokenEvents.Approval:
|
||||
case ERC721TokenEvents.Approval: {
|
||||
@ -290,7 +291,7 @@ export class OrderWatcher {
|
||||
args._owner,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
} else {
|
||||
// ERC721
|
||||
@ -303,7 +304,7 @@ export class OrderWatcher {
|
||||
args._owner,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -322,7 +323,7 @@ export class OrderWatcher {
|
||||
args._from,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
} else {
|
||||
// ERC721
|
||||
@ -336,7 +337,7 @@ export class OrderWatcher {
|
||||
args._from,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -350,7 +351,7 @@ export class OrderWatcher {
|
||||
args._owner,
|
||||
tokenAddress,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
case WETH9Events.Deposit: {
|
||||
@ -363,7 +364,7 @@ export class OrderWatcher {
|
||||
args._owner,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
case WETH9Events.Withdrawal: {
|
||||
@ -376,7 +377,7 @@ export class OrderWatcher {
|
||||
args._owner,
|
||||
tokenAssetData,
|
||||
);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
case ExchangeEvents.Fill: {
|
||||
@ -387,7 +388,7 @@ export class OrderWatcher {
|
||||
const orderHash = args.orderHash;
|
||||
const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
|
||||
if (isOrderWatched) {
|
||||
await this._emitRevalidateOrdersAsync([orderHash]);
|
||||
await this._emitRevalidateOrdersAsync([orderHash], transactionHash);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -399,7 +400,7 @@ export class OrderWatcher {
|
||||
const orderHash = args.orderHash;
|
||||
const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
|
||||
if (isOrderWatched) {
|
||||
await this._emitRevalidateOrdersAsync([orderHash]);
|
||||
await this._emitRevalidateOrdersAsync([orderHash], transactionHash);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -410,7 +411,7 @@ export class OrderWatcher {
|
||||
this._orderFilledCancelledLazyStore.deleteAllIsCancelled();
|
||||
// Revalidate orders
|
||||
const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByMaker(args.makerAddress);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes);
|
||||
await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -418,12 +419,12 @@ export class OrderWatcher {
|
||||
throw errorUtils.spawnSwitchErr('decodedLog.event', decodedLog.event);
|
||||
}
|
||||
}
|
||||
private async _emitRevalidateOrdersAsync(orderHashes: string[]): Promise<void> {
|
||||
private async _emitRevalidateOrdersAsync(orderHashes: string[], transactionHash?: string): Promise<void> {
|
||||
for (const orderHash of orderHashes) {
|
||||
const signedOrder = this._orderByOrderHash[orderHash];
|
||||
// Most of these calls will never reach the network because the data is fetched from stores
|
||||
// and only updated when cache is invalidated
|
||||
const orderState = await this._orderStateUtils.getOpenOrderStateAsync(signedOrder);
|
||||
const orderState = await this._orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
|
||||
if (_.isUndefined(this._callbackIfExists)) {
|
||||
break; // Unsubscribe was called
|
||||
}
|
||||
|
@ -250,6 +250,32 @@ describe('OrderWatcher', () => {
|
||||
await contractWrappers.exchange.fillOrderAsync(signedOrder, fillableAmount, takerAddress);
|
||||
})().catch(done);
|
||||
});
|
||||
it('should include transactionHash in emitted orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
|
||||
(async () => {
|
||||
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
|
||||
makerAssetData,
|
||||
takerAssetData,
|
||||
makerAddress,
|
||||
takerAddress,
|
||||
fillableAmount,
|
||||
);
|
||||
await orderWatcher.addOrderAsync(signedOrder);
|
||||
|
||||
let transactionHash: string;
|
||||
const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
|
||||
expect(orderState.isValid).to.be.false();
|
||||
const invalidOrderState = orderState as OrderStateInvalid;
|
||||
expect(invalidOrderState.transactionHash).to.be.equal(transactionHash);
|
||||
});
|
||||
orderWatcher.subscribe(callback);
|
||||
|
||||
transactionHash = await contractWrappers.exchange.fillOrderAsync(
|
||||
signedOrder,
|
||||
fillableAmount,
|
||||
takerAddress,
|
||||
);
|
||||
})().catch(done);
|
||||
});
|
||||
it('should emit orderStateValid when watched order partially filled', (done: DoneCallback) => {
|
||||
(async () => {
|
||||
signedOrder = await fillScenarios.createFillableSignedOrderAsync(
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-docs",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -23,7 +23,7 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/compare-versions": "^3.0.0",
|
||||
"copyfiles": "^2.0.0",
|
||||
@ -33,9 +33,9 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/react-shared": "^1.0.10",
|
||||
"@0xproject/types": "^1.0.1-rc.6",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/react-shared": "^1.0.11",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "^0.20.0",
|
||||
"@types/node": "*",
|
||||
|
@ -135,7 +135,10 @@ function renderTypeParameter(
|
||||
): React.ReactNode {
|
||||
const typeParam = (
|
||||
<span>
|
||||
{`<${typeParameter.name} extends `}
|
||||
{`<${typeParameter.name}`}
|
||||
{!_.isUndefined(typeParameter.type) && (
|
||||
<span>
|
||||
{' extends '}
|
||||
<Type
|
||||
type={typeParameter.type}
|
||||
sectionName={sectionName}
|
||||
@ -143,6 +146,8 @@ function renderTypeParameter(
|
||||
docsInfo={docsInfo}
|
||||
isInPopover={isInPopover}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{`>`}
|
||||
</span>
|
||||
);
|
||||
|
@ -419,7 +419,10 @@ export class TypeDocUtils {
|
||||
return func;
|
||||
}
|
||||
private _convertTypeParameter(entity: TypeDocNode, sectionName: string): TypeParameter {
|
||||
const type = this._convertType(entity.type, sectionName);
|
||||
let type;
|
||||
if (!_.isUndefined(entity.type)) {
|
||||
type = this._convertType(entity.type, sectionName);
|
||||
}
|
||||
const parameter = {
|
||||
name: entity.name,
|
||||
type,
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.11",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.10",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.11 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.10 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-shared",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.11",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -24,7 +24,7 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"copyfiles": "^2.0.0",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.1.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.1.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.1.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-compiler",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,7 +41,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
"@types/mkdirp": "^0.5.2",
|
||||
"@types/require-from-string": "^1.2.0",
|
||||
@ -64,13 +64,13 @@
|
||||
"zeppelin-solidity": "1.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/json-schemas": "^1.0.2",
|
||||
"@0xproject/sol-resolver": "^1.0.9",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/json-schemas": "^1.0.3",
|
||||
"@0xproject/sol-resolver": "^1.0.10",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@types/yargs": "^11.0.0",
|
||||
"chalk": "^2.3.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "2.1.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.1.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.1.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.1.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-cov",
|
||||
"version": "2.1.3",
|
||||
"version": "2.1.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,12 +41,12 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/dev-utils": "^1.0.8",
|
||||
"@0xproject/sol-compiler": "^1.1.3",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"@0xproject/dev-utils": "^1.0.9",
|
||||
"@0xproject/sol-compiler": "^1.1.4",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"glob": "^7.1.2",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-resolver",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -30,7 +30,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"lodash": "^4.17.5"
|
||||
},
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sra-report",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -33,13 +33,13 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/connect": "1.0.4",
|
||||
"@0xproject/json-schemas": "^0.8.3",
|
||||
"@0xproject/order-utils": "^0.0.9",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"chalk": "^2.3.0",
|
||||
"lodash": "^4.17.5",
|
||||
"newman": "^3.9.3",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.2",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.3 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sra-spec",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^1.0.2"
|
||||
"@0xproject/json-schemas": "^1.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^1.0.7",
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "2.0.4",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "2.0.3",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v2.0.4 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v2.0.3 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/subproviders",
|
||||
"version": "2.0.3",
|
||||
"version": "2.0.4",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -28,11 +28,11 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^1.0.9",
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/assert": "^1.0.10",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"@ledgerhq/hw-app-eth": "^4.3.0",
|
||||
"@ledgerhq/hw-transport-u2f": "^4.3.0",
|
||||
"@types/eth-lightwallet": "^3.0.0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/testnet-faucets",
|
||||
"version": "1.0.47",
|
||||
"version": "1.0.48",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -17,11 +17,11 @@
|
||||
"author": "Fabio Berger",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"0x.js": "^1.0.4",
|
||||
"@0xproject/subproviders": "^2.0.3",
|
||||
"0x.js": "^1.0.5",
|
||||
"@0xproject/subproviders": "^2.0.4",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@0xproject/utils": "^1.0.9",
|
||||
"@0xproject/web3-wrapper": "^2.0.3",
|
||||
"@0xproject/utils": "^1.0.10",
|
||||
"@0xproject/web3-wrapper": "^3.0.0",
|
||||
"body-parser": "^1.17.1",
|
||||
"ethereum-types": "^1.0.7",
|
||||
"ethereumjs-tx": "^1.3.5",
|
||||
|
@ -5,8 +5,13 @@
|
||||
{
|
||||
"note": "Add ObjectMap type",
|
||||
"pr": 1037
|
||||
},
|
||||
{
|
||||
"note": "Add SRA types from connect",
|
||||
"pr": 1085
|
||||
}
|
||||
]
|
||||
],
|
||||
"timestamp": 1537875740
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
|
@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.1.0 - _September 25, 2018_
|
||||
|
||||
* Add ObjectMap type (#1037)
|
||||
* Add SRA types from connect (#1085)
|
||||
|
||||
## v1.0.2 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/types",
|
||||
"version": "1.0.2",
|
||||
"version": "1.1.0",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@ -111,12 +111,14 @@ export interface OrderStateValid {
|
||||
isValid: true;
|
||||
orderHash: string;
|
||||
orderRelevantState: OrderRelevantState;
|
||||
transactionHash?: string;
|
||||
}
|
||||
|
||||
export interface OrderStateInvalid {
|
||||
isValid: false;
|
||||
orderHash: string;
|
||||
error: ExchangeContractErrs;
|
||||
transactionHash?: string;
|
||||
}
|
||||
|
||||
export type OrderState = OrderStateValid | OrderStateInvalid;
|
||||
@ -244,6 +246,134 @@ export interface ObjectMap<T> {
|
||||
[key: string]: T;
|
||||
}
|
||||
|
||||
/**
|
||||
* baseAssetData: The address of assetData designated as the baseToken in the currency pair calculation of price
|
||||
* quoteAssetData: The address of assetData designated as the quoteToken in the currency pair calculation of price
|
||||
* limit: Maximum number of bids and asks in orderbook snapshot
|
||||
*/
|
||||
export interface OrdersChannelSubscriptionOpts {
|
||||
baseAssetData: string;
|
||||
quoteAssetData: string;
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export type OrdersChannelMessage = UpdateOrdersChannelMessage | UnknownOrdersChannelMessage;
|
||||
|
||||
export enum OrdersChannelMessageTypes {
|
||||
Update = 'update',
|
||||
Unknown = 'unknown',
|
||||
}
|
||||
|
||||
export interface UpdateOrdersChannelMessage {
|
||||
type: OrdersChannelMessageTypes.Update;
|
||||
requestId: string;
|
||||
payload: APIOrder[];
|
||||
}
|
||||
|
||||
export interface UnknownOrdersChannelMessage {
|
||||
type: OrdersChannelMessageTypes.Unknown;
|
||||
requestId: string;
|
||||
payload: undefined;
|
||||
}
|
||||
|
||||
export enum WebsocketConnectionEventType {
|
||||
Close = 'close',
|
||||
Error = 'error',
|
||||
Message = 'message',
|
||||
}
|
||||
|
||||
export enum WebsocketClientEventType {
|
||||
Connect = 'connect',
|
||||
ConnectFailed = 'connectFailed',
|
||||
}
|
||||
|
||||
export type OrdersResponse = PaginatedCollection<APIOrder>;
|
||||
|
||||
export interface APIOrder {
|
||||
order: SignedOrder;
|
||||
metaData: object;
|
||||
}
|
||||
|
||||
export interface AssetPairsRequestOpts {
|
||||
assetDataA?: string;
|
||||
assetDataB?: string;
|
||||
}
|
||||
|
||||
export type AssetPairsResponse = PaginatedCollection<AssetPairsItem>;
|
||||
|
||||
export interface AssetPairsItem {
|
||||
assetDataA: Asset;
|
||||
assetDataB: Asset;
|
||||
}
|
||||
|
||||
export interface Asset {
|
||||
assetData: string;
|
||||
minAmount: BigNumber;
|
||||
maxAmount: BigNumber;
|
||||
precision: number;
|
||||
}
|
||||
|
||||
export interface OrdersRequestOpts {
|
||||
makerAssetProxyId?: string;
|
||||
takerAssetProxyId?: string;
|
||||
makerAssetAddress?: string;
|
||||
takerAssetAddress?: string;
|
||||
exchangeAddress?: string;
|
||||
senderAddress?: string;
|
||||
makerAssetData?: string;
|
||||
takerAssetData?: string;
|
||||
makerAddress?: string;
|
||||
takerAddress?: string;
|
||||
traderAddress?: string;
|
||||
feeRecipientAddress?: string;
|
||||
}
|
||||
|
||||
export interface OrderbookRequest {
|
||||
baseAssetData: string;
|
||||
quoteAssetData: string;
|
||||
}
|
||||
|
||||
export interface OrderbookResponse {
|
||||
bids: PaginatedCollection<APIOrder>;
|
||||
asks: PaginatedCollection<APIOrder>;
|
||||
}
|
||||
|
||||
export interface PaginatedCollection<T> {
|
||||
total: number;
|
||||
page: number;
|
||||
perPage: number;
|
||||
records: T[];
|
||||
}
|
||||
|
||||
export interface OrderConfigRequest {
|
||||
makerAddress: string;
|
||||
takerAddress: string;
|
||||
makerAssetAmount: BigNumber;
|
||||
takerAssetAmount: BigNumber;
|
||||
makerAssetData: string;
|
||||
takerAssetData: string;
|
||||
exchangeAddress: string;
|
||||
expirationTimeSeconds: BigNumber;
|
||||
}
|
||||
|
||||
export interface OrderConfigResponse {
|
||||
makerFee: BigNumber;
|
||||
takerFee: BigNumber;
|
||||
feeRecipientAddress: string;
|
||||
senderAddress: string;
|
||||
}
|
||||
|
||||
export type FeeRecipientsResponse = PaginatedCollection<string>;
|
||||
|
||||
export interface RequestOpts {
|
||||
networkId?: number;
|
||||
}
|
||||
|
||||
export interface PagedRequestOpts {
|
||||
page?: number;
|
||||
perPage?: number;
|
||||
}
|
||||
|
||||
export interface TypeDocType {
|
||||
type: TypeDocTypes;
|
||||
value: string;
|
||||
|
@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1537875740,
|
||||
"version": "1.0.10",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1537541580,
|
||||
"version": "1.0.9",
|
||||
|
@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v1.0.10 - _September 25, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v1.0.9 - _September 21, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/utils",
|
||||
"version": "1.0.9",
|
||||
"version": "1.0.10",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@ -41,7 +41,7 @@
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^1.0.2",
|
||||
"@0xproject/types": "^1.1.0",
|
||||
"@0xproject/typescript-typings": "^2.0.1",
|
||||
"@types/node": "*",
|
||||
"abortcontroller-polyfill": "^1.1.9",
|
||||
|
3
packages/verdaccio/Dockerfile
Normal file
3
packages/verdaccio/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM verdaccio/verdaccio
|
||||
|
||||
ADD conf.yaml /verdaccio/conf/config.yaml
|
18
packages/verdaccio/README.md
Normal file
18
packages/verdaccio/README.md
Normal file
@ -0,0 +1,18 @@
|
||||
## 0x Verdaccio
|
||||
|
||||
This package contains a Dockerfile and conf.yaml file for configuring our own
|
||||
Docker image for Verdaccio.
|
||||
|
||||
See https://verdaccio.org/docs/en/configuration for more information.
|
||||
|
||||
## Build
|
||||
|
||||
In the root directory for _this package_, run:
|
||||
|
||||
`sudo docker build . -t 0x-verdaccio`
|
||||
|
||||
## Run
|
||||
|
||||
To start Verdaccio run:
|
||||
|
||||
`sudo docker run --rm -i -p 4873:4873 0x-verdaccio`
|
71
packages/verdaccio/conf.yaml
Normal file
71
packages/verdaccio/conf.yaml
Normal file
@ -0,0 +1,71 @@
|
||||
#
|
||||
# Copied from https://github.com/verdaccio/verdaccio/blob/90fc216649ecd8df31d3706b5c17555fa0a35e4a/conf/docker.yaml
|
||||
# Only the uplinks section has been modified.
|
||||
#
|
||||
# This is the config file used for the docker images.
|
||||
# It allows all users to do anything, so don't use it on production systems.
|
||||
#
|
||||
# Do not configure host and port under `listen` in this file
|
||||
# as it will be ignored when using docker.
|
||||
# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
|
||||
#
|
||||
# Look here for more config file examples:
|
||||
# https://github.com/verdaccio/verdaccio/tree/master/conf
|
||||
#
|
||||
|
||||
# path to a directory with all packages
|
||||
storage: /verdaccio/storage
|
||||
# path to a directory with plugins to include
|
||||
plugins: /verdaccio/plugins
|
||||
|
||||
web:
|
||||
# WebUI is enabled as default, if you want disable it, just uncomment this line
|
||||
enable: false
|
||||
|
||||
auth:
|
||||
htpasswd:
|
||||
file: /verdaccio/conf/htpasswd
|
||||
# Maximum amount of users allowed to register, defaults to "+infinity".
|
||||
# You can set this to -1 to disable registration.
|
||||
#max_users: 1000
|
||||
|
||||
# a list of other known repositories we can talk to
|
||||
uplinks:
|
||||
npmjs:
|
||||
url: https://registry.npmjs.org/
|
||||
cache: true
|
||||
max_fails: 5
|
||||
|
||||
packages:
|
||||
'@*/*':
|
||||
# scoped packages
|
||||
access: $all
|
||||
publish: $authenticated
|
||||
proxy: npmjs
|
||||
|
||||
'**':
|
||||
# allow all users (including non-authenticated users) to read and
|
||||
# publish all packages
|
||||
#
|
||||
# you can specify usernames/groupnames (depending on your auth plugin)
|
||||
# and three keywords: "$all", "$anonymous", "$authenticated"
|
||||
access: $all
|
||||
|
||||
# allow all known users to publish packages
|
||||
# (anyone can register by default, remember?)
|
||||
publish: $authenticated
|
||||
|
||||
# if package is not available locally, proxy requests to 'npmjs' registry
|
||||
proxy: npmjs
|
||||
|
||||
# To use `npm audit` uncomment the following section
|
||||
# middlewares:
|
||||
# audit:
|
||||
# enabled: true
|
||||
|
||||
# log settings
|
||||
logs:
|
||||
- {type: stdout, format: pretty, level: http}
|
||||
#- {type: file, path: verdaccio.log, level: info}
|
||||
|
||||
max_body_size: 100mb
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user