Compare commits
22 Commits
@0xproject
...
@0xproject
Author | SHA1 | Date | |
---|---|---|---|
|
599554b785 | ||
|
d57d282cab | ||
|
562bef98e2 | ||
|
900f819be8 | ||
|
e7337c2451 | ||
|
dc81193132 | ||
|
fa868b4963 | ||
|
62945ad363 | ||
|
61c38d35be | ||
|
4e0ec72896 | ||
|
c28289e9a8 | ||
|
e7e9ddf232 | ||
|
f03784ba37 | ||
|
2445e23c0b | ||
|
cd29483187 | ||
|
9bacbdab48 | ||
|
551d484fb7 | ||
|
ff66432b83 | ||
|
a7ae82a2d1 | ||
|
5f34b5a80e | ||
|
8fca2a8116 | ||
|
5472500119 |
@@ -3,7 +3,7 @@ version: 2
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
environment:
|
||||
CONTRACTS_COMMIT_HASH: '9ed05f5'
|
||||
working_directory: ~/repo
|
||||
@@ -11,12 +11,12 @@ jobs:
|
||||
- checkout
|
||||
- run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
key: dependency-cache-v1-{{ checksum "package.json" }}
|
||||
- run:
|
||||
name: yarn
|
||||
command: yarn --frozen-lockfile
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "package.json" }}
|
||||
key: dependency-cache-v1-{{ checksum "package.json" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
- run: wget https://s3.amazonaws.com/testrpc-shapshots/${CONTRACTS_COMMIT_HASH}.zip
|
||||
@@ -29,7 +29,7 @@ jobs:
|
||||
- ~/repo
|
||||
test-installation:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -38,7 +38,7 @@ jobs:
|
||||
- run: yarn test:installation
|
||||
test-0xjs:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -55,7 +55,7 @@ jobs:
|
||||
- ~/repo/packages/0x.js/coverage/lcov.info
|
||||
test-contracts:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -72,7 +72,7 @@ jobs:
|
||||
- ~/repo/packages/contracts/coverage/lcov.info
|
||||
test-sol-compiler:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -89,7 +89,7 @@ jobs:
|
||||
- ~/repo/packages/sol-compiler/coverage/lcov.info
|
||||
test-rest:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
@@ -131,7 +131,7 @@ jobs:
|
||||
lint:
|
||||
working_directory: ~/repo
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
@@ -140,7 +140,7 @@ jobs:
|
||||
prettier:
|
||||
working_directory: ~/repo
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
steps:
|
||||
- restore_cache:
|
||||
keys:
|
||||
@@ -148,7 +148,7 @@ jobs:
|
||||
- run: yarn prettier:ci
|
||||
submit-coverage:
|
||||
docker:
|
||||
- image: circleci/node:6.12
|
||||
- image: circleci/node:9
|
||||
working_directory: ~/repo
|
||||
steps:
|
||||
- restore_cache:
|
||||
|
@@ -37,7 +37,7 @@
|
||||
"async-child-process": "1.1.1",
|
||||
"coveralls": "^3.0.0",
|
||||
"ganache-cli": "^6.1.0",
|
||||
"lcov-result-merger": "^2.0.0",
|
||||
"lcov-result-merger": "^3.0.0",
|
||||
"lerna": "^2.5.1",
|
||||
"npm-run-all": "4.1.2",
|
||||
"prettier": "1.12.1",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.38.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.38.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.38.5 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.38.4 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "0x.js",
|
||||
"version": "0.38.4",
|
||||
"version": "0.38.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -66,11 +66,11 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/migrations": "^0.0.8",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/migrations": "^0.0.9",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
"@types/node": "9.6.0",
|
||||
@@ -97,16 +97,16 @@
|
||||
"webpack": "3.11.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/contract-wrappers": "^0.0.5",
|
||||
"@0xproject/order-utils": "^0.0.7",
|
||||
"@0xproject/order-watcher": "^0.0.6",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/contract-wrappers": "^0.1.0",
|
||||
"@0xproject/order-utils": "^0.0.8",
|
||||
"@0xproject/order-watcher": "^0.0.7",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.3.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.3.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.3.3 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.3.2 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/abi-gen",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -27,9 +27,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"chalk": "2.3.2",
|
||||
"glob": "7.1.1",
|
||||
"handlebars": "4.0.11",
|
||||
@@ -39,8 +39,8 @@
|
||||
"yargs": "11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/glob": "5.0.35",
|
||||
"@types/handlebars": "4.0.36",
|
||||
"@types/mkdirp": "0.5.2",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.2.13",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.2.12",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.2.13 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.12 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/assert",
|
||||
"version": "0.2.12",
|
||||
"version": "0.2.13",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -30,8 +30,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
"@types/valid-url": "1.0.2",
|
||||
@@ -47,9 +47,9 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"lodash": "4.17.10",
|
||||
"valid-url": "1.0.9"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.3.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"version": "0.3.4",
|
||||
"changes": [
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.3.5 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.3.4 - _June 19, 2018_
|
||||
|
||||
* Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/base-contract",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -29,8 +29,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"chai": "4.1.2",
|
||||
"copyfiles": "1.2.0",
|
||||
@@ -42,10 +42,10 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.6.16",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.6.15",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.6.16 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.6.15 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/connect",
|
||||
"version": "0.6.15",
|
||||
"version": "0.6.16",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -50,19 +50,19 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"isomorphic-fetch": "2.2.1",
|
||||
"lodash": "4.17.10",
|
||||
"query-string": "4.3.4",
|
||||
"websocket": "1.0.25"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/fetch-mock": "5.12.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
|
@@ -1,4 +1,14 @@
|
||||
[
|
||||
{
|
||||
"version": "0.1.0",
|
||||
"changes": [
|
||||
{
|
||||
"note":
|
||||
"Update Blockstream dep. to V5.0 and no longer force unsubscribe on blockstream error (which are not recoverable)"
|
||||
}
|
||||
],
|
||||
"timestamp": 1531149657
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.5",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.1.0 - _July 9, 2018_
|
||||
|
||||
* Update Blockstream dep. to V5.0 and no longer force unsubscribe on blockstream error (which are not recoverable)
|
||||
|
||||
## v0.0.5 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/contract-wrappers",
|
||||
"version": "0.0.5",
|
||||
"version": "0.1.0",
|
||||
"description": "Smart TS wrappers for 0x smart contracts",
|
||||
"keywords": [
|
||||
"0xproject",
|
||||
@@ -38,13 +38,13 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/migrations": "^0.0.8",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/subproviders": "^0.10.4",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/migrations": "^0.0.9",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/subproviders": "^0.10.5",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
"@types/node": "9.6.0",
|
||||
@@ -70,16 +70,16 @@
|
||||
"web3-provider-engine": "13.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/fill-scenarios": "^0.0.4",
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/order-utils": "^0.0.7",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"ethereumjs-blockstream": "2.0.7",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/fill-scenarios": "^0.0.5",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/order-utils": "^0.0.8",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
"ethers": "3.0.22",
|
||||
"js-sha3": "0.7.0",
|
||||
|
@@ -9,7 +9,7 @@ import {
|
||||
} from '@0xproject/types';
|
||||
import { AbiDecoder, intervalUtils } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { Block, BlockAndLogStreamer } from 'ethereumjs-blockstream';
|
||||
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import {
|
||||
@@ -38,7 +38,7 @@ const CONTRACT_NAME_TO_NOT_FOUND_ERROR: {
|
||||
export class ContractWrapper {
|
||||
protected _web3Wrapper: Web3Wrapper;
|
||||
protected _networkId: number;
|
||||
private _blockAndLogStreamerIfExists?: BlockAndLogStreamer;
|
||||
private _blockAndLogStreamerIfExists?: BlockAndLogStreamer<Block, Log> | undefined;
|
||||
private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
|
||||
private _filters: { [filterToken: string]: FilterObject };
|
||||
private _filterCallbacks: {
|
||||
@@ -46,6 +46,10 @@ export class ContractWrapper {
|
||||
};
|
||||
private _onLogAddedSubscriptionToken: string | undefined;
|
||||
private _onLogRemovedSubscriptionToken: string | undefined;
|
||||
private static _onBlockstreamError(err: Error): void {
|
||||
// Noop on blockstream errors since they are automatically
|
||||
// recovered from and don't cause Blockstream to exit.
|
||||
}
|
||||
constructor(web3Wrapper: Web3Wrapper, networkId: number) {
|
||||
this._web3Wrapper = web3Wrapper;
|
||||
this._networkId = networkId;
|
||||
@@ -162,13 +166,14 @@ export class ContractWrapper {
|
||||
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
|
||||
this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper),
|
||||
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper),
|
||||
ContractWrapper._onBlockstreamError.bind(this),
|
||||
);
|
||||
const catchAllLogFilter = {};
|
||||
this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);
|
||||
this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
|
||||
this._reconcileBlockAsync.bind(this),
|
||||
constants.DEFAULT_BLOCK_POLLING_INTERVAL,
|
||||
this._onReconcileBlockError.bind(this),
|
||||
ContractWrapper._onBlockstreamError.bind(this),
|
||||
);
|
||||
let isRemoved = false;
|
||||
this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded(
|
||||
@@ -179,12 +184,6 @@ export class ContractWrapper {
|
||||
this._onLogStateChanged.bind(this, isRemoved),
|
||||
);
|
||||
}
|
||||
private _onReconcileBlockError(err: Error): void {
|
||||
const filterTokens = _.keys(this._filterCallbacks);
|
||||
_.each(filterTokens, filterToken => {
|
||||
this._unsubscribe(filterToken, err);
|
||||
});
|
||||
}
|
||||
private _setNetworkId(networkId: number): void {
|
||||
this._networkId = networkId;
|
||||
}
|
||||
|
@@ -51,34 +51,6 @@ describe('SubscriptionTest', () => {
|
||||
_.each(stubs, s => s.restore());
|
||||
stubs = [];
|
||||
});
|
||||
it('Should receive the Error when an error occurs while fetching the block', (done: DoneCallback) => {
|
||||
(async () => {
|
||||
const errMsg = 'Error fetching block';
|
||||
const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
|
||||
stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getBlockAsync').throws(new Error(errMsg))];
|
||||
contractWrappers.token.subscribe(tokenAddress, TokenEvents.Approval, indexFilterValues, callback);
|
||||
await contractWrappers.token.setAllowanceAsync(
|
||||
tokenAddress,
|
||||
coinbase,
|
||||
addressWithoutFunds,
|
||||
allowanceAmount,
|
||||
);
|
||||
})().catch(done);
|
||||
});
|
||||
it('Should receive the Error when an error occurs while reconciling the new block', (done: DoneCallback) => {
|
||||
(async () => {
|
||||
const errMsg = 'Error fetching logs';
|
||||
const callback = callbackErrorReporter.assertNodeCallbackError(done, errMsg);
|
||||
stubs = [Sinon.stub((contractWrappers as any)._web3Wrapper, 'getLogsAsync').throws(new Error(errMsg))];
|
||||
contractWrappers.token.subscribe(tokenAddress, TokenEvents.Approval, indexFilterValues, callback);
|
||||
await contractWrappers.token.setAllowanceAsync(
|
||||
tokenAddress,
|
||||
coinbase,
|
||||
addressWithoutFunds,
|
||||
allowanceAmount,
|
||||
);
|
||||
})().catch(done);
|
||||
});
|
||||
it('Should allow unsubscribeAll to be called successfully after an error', (done: DoneCallback) => {
|
||||
(async () => {
|
||||
const callback = (err: Error | null, logEvent?: DecodedLogEvent<ApprovalContractEventArgs>) => _.noop;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
import { BaseContract } from '@0xproject/base-contract';
|
||||
import { ContractArtifact } from '@0xproject/sol-compiler';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, DataItem, MethodAbi, Provider, TxData, TxDataPayable } from '@0xproject/types';
|
||||
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, DataItem, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from '@0xproject/types';
|
||||
import { BigNumber, classUtils, logUtils, promisify } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as ethers from 'ethers';
|
||||
|
@@ -1,4 +1,4 @@
|
||||
export interface {{name}}ContractEventArgs {
|
||||
export interface {{name}}ContractEventArgs extends DecodedLogArgs {
|
||||
{{#each inputs}}
|
||||
{{name}}: {{#returnType type components}}{{/returnType}};
|
||||
{{/each}}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "contracts",
|
||||
"version": "2.1.33",
|
||||
"version": "2.1.34",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -42,9 +42,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/node": "9.6.0",
|
||||
"@types/yargs": "10.0.2",
|
||||
@@ -64,13 +64,13 @@
|
||||
"yargs": "11.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"0x.js": "^0.38.4",
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"0x.js": "^0.38.5",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"bn.js": "4.11.7",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.4.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.4.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.4.5 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.4.4 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/dev-utils",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -29,8 +29,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
"chai": "4.1.2",
|
||||
@@ -44,11 +44,11 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/sol-cov": "^0.1.1",
|
||||
"@0xproject/subproviders": "^0.10.4",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/sol-cov": "^0.1.2",
|
||||
"@0xproject/subproviders": "^0.10.5",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"lodash": "4.17.10",
|
||||
"web3": "0.20.6",
|
||||
"web3-provider-engine": "13.8.0"
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.0.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.5 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.4 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/fill-scenarios",
|
||||
"version": "0.0.4",
|
||||
"version": "0.0.5",
|
||||
"description": "0x order fill scenario generator",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@@ -23,10 +23,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
@@ -36,12 +36,12 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/order-utils": "^0.0.7",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/order-utils": "^0.0.8",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.8.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.8.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.8.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.8.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/json-schemas",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -45,15 +45,15 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@types/node": "9.6.0",
|
||||
"jsonschema": "1.2.2",
|
||||
"lodash.values": "4.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@types/lodash.foreach": "4.5.3",
|
||||
"@types/lodash.values": "4.3.3",
|
||||
"@types/mocha": "2.2.48",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/metacoin",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -26,21 +26,21 @@
|
||||
"author": "",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/sol-cov": "^0.1.1",
|
||||
"@0xproject/subproviders": "^0.10.4",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/sol-cov": "^0.1.2",
|
||||
"@0xproject/subproviders": "^0.10.5",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10",
|
||||
"web3-provider-engine": "13.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"chai": "4.1.2",
|
||||
"chai-as-promised": "7.1.1",
|
||||
"chai-bignumber": "2.0.1",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.0.9",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.8",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.9 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.8 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -668,5 +668,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x48bacb9266a570d521063ef5dd96e61686dbe788",
|
||||
"links": {},
|
||||
"constructorArgs": "[\"0x1d7022f5b17d2f8b695918fb48fa1089c9f85401\",\"0x1dc4c1cefef38a777b15aa20260a54e584b16c48\"]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -715,5 +715,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x34d402f14d58e001d8efbe6585051bf9706aa064",
|
||||
"links": {},
|
||||
"constructorArgs": "[[\"0x5409ed021d9299bf6814279a6a1411a7e866a631\",\"0x6ecbe1db9ef729cbe972c83fb886247691fb6beb\"],\"2\",\"0\",\"0x1dc4c1cefef38a777b15aa20260a54e584b16c48\"]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -590,5 +590,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -226,5 +226,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -322,5 +322,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -278,5 +278,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"networks": {}
|
||||
"networks": {
|
||||
"50": {
|
||||
"address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401",
|
||||
"links": {},
|
||||
"constructorArgs": "[]"
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/migrations",
|
||||
"version": "0.0.8",
|
||||
"version": "0.0.9",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -24,10 +24,10 @@
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"npm-run-all": "4.1.2",
|
||||
"shx": "0.2.2",
|
||||
@@ -35,11 +35,11 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.2.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.2.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.2.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/monorepo-scripts",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
|
@@ -34,17 +34,17 @@ async function checkGitTagsForNextVersionAndDeleteIfExistAsync(
|
||||
const packageLocation = lernaPackage.location;
|
||||
const nextVersion = await utils.getNextPackageVersionAsync(currentVersion, packageName, packageLocation);
|
||||
|
||||
const localTagVersions = localTagVersionsByPackageName[packageName];
|
||||
if (_.includes(localTagVersions, nextVersion)) {
|
||||
const tagName = `${packageName}@${nextVersion}`;
|
||||
await utils.removeLocalTagAsync(tagName);
|
||||
}
|
||||
|
||||
const remoteTagVersions = remoteTagVersionsByPackageName[packageName];
|
||||
if (_.includes(remoteTagVersions, nextVersion)) {
|
||||
const tagName = `:refs/tags/${packageName}@${nextVersion}`;
|
||||
await utils.removeRemoteTagAsync(tagName);
|
||||
}
|
||||
|
||||
const localTagVersions = localTagVersionsByPackageName[packageName];
|
||||
if (_.includes(localTagVersions, nextVersion)) {
|
||||
const tagName = `${packageName}@${nextVersion}`;
|
||||
await utils.removeLocalTagAsync(tagName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,9 +166,25 @@ async function checkPublishRequiredSetupAsync(): Promise<void> {
|
||||
} catch (err) {
|
||||
throw new Error('You must setup your AWS credentials by running `aws configure`. Do this and try again.');
|
||||
}
|
||||
|
||||
utils.log('Checking that git branch is up to date with upstream...');
|
||||
await execAsync('git fetch');
|
||||
const res = await execAsync('git status -bs'); // s - short format, b - branch info
|
||||
/**
|
||||
* Possible outcomes
|
||||
* ## branch_name...origin/branch_name [behind n]
|
||||
* ## branch_name...origin/branch_name [ahead n]
|
||||
* ## branch_name...origin/branch_name
|
||||
*/
|
||||
const gitShortStatusHeader = res.stdout.split('\n')[0];
|
||||
if (gitShortStatusHeader.includes('behind')) {
|
||||
throw new Error('Your branch is behind upstream. Please pull before publishing.');
|
||||
} else if (gitShortStatusHeader.includes('ahead')) {
|
||||
throw new Error('Your branch is ahead of upstream. Please push before publishing.');
|
||||
}
|
||||
}
|
||||
|
||||
prepublishChecksAsync().catch(err => {
|
||||
utils.log(err);
|
||||
utils.log(err.message);
|
||||
process.exit(1);
|
||||
});
|
||||
|
@@ -44,6 +44,9 @@ export const utils = {
|
||||
nextVersionIfValid = semver.inc(currentVersion, 'patch');
|
||||
}
|
||||
const lastEntry = changelog[0];
|
||||
if (semver.gt(currentVersion, lastEntry.version)) {
|
||||
throw new Error(`Package.json version cannot be greater then last CHANGELOG entry. Check: ${packageName}`);
|
||||
}
|
||||
nextVersionIfValid = semver.eq(lastEntry.version, currentVersion)
|
||||
? semver.inc(currentVersion, 'patch')
|
||||
: lastEntry.version;
|
||||
@@ -100,19 +103,23 @@ export const utils = {
|
||||
return tagVersionByPackageName;
|
||||
},
|
||||
async removeLocalTagAsync(tagName: string): Promise<void> {
|
||||
const result = await execAsync(`git tag -d ${tagName}`, {
|
||||
cwd: constants.monorepoRootPath,
|
||||
});
|
||||
if (!_.isEmpty(result.stderr)) {
|
||||
throw new Error(`Failed to delete local git tag. Got err: ${result.stderr}`);
|
||||
try {
|
||||
await execAsync(`git tag -d ${tagName}`, {
|
||||
cwd: constants.monorepoRootPath,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new Error(`Failed to delete local git tag. Got err: ${err}`);
|
||||
}
|
||||
this.log(`Removed local tag: ${tagName}`);
|
||||
},
|
||||
async removeRemoteTagAsync(tagName: string): Promise<void> {
|
||||
const result = await execAsync(`git push origin ${tagName}`, {
|
||||
cwd: constants.monorepoRootPath,
|
||||
});
|
||||
if (!_.isEmpty(result.stderr)) {
|
||||
throw new Error(`Failed to delete remote git tag. Got err: ${result.stderr}`);
|
||||
try {
|
||||
await execAsync(`git push origin ${tagName}`, {
|
||||
cwd: constants.monorepoRootPath,
|
||||
});
|
||||
} catch (err) {
|
||||
throw new Error(`Failed to delete remote git tag. Got err: ${err}`);
|
||||
}
|
||||
this.log(`Removed remote tag: ${tagName}`);
|
||||
},
|
||||
};
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.8 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.7 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-utils",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -43,9 +43,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"chai": "4.1.2",
|
||||
"chai-as-promised": "7.1.1",
|
||||
@@ -62,12 +62,12 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"@types/node": "9.6.0",
|
||||
"bn.js": "4.11.7",
|
||||
"ethereumjs-abi": "0.6.5",
|
||||
|
@@ -1,4 +1,18 @@
|
||||
[
|
||||
{
|
||||
"version": "0.0.7",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Switch out simple getLogs polling with ethereumjs-blockstream",
|
||||
"pr": 825
|
||||
},
|
||||
{
|
||||
"note": "Do not stop subscription if error is encountered",
|
||||
"pr": 825
|
||||
}
|
||||
],
|
||||
"timestamp": 1531149657
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.6",
|
||||
|
@@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.7 - _July 9, 2018_
|
||||
|
||||
* Switch out simple getLogs polling with ethereumjs-blockstream (#825)
|
||||
* Do not stop subscription if error is encountered (#825)
|
||||
|
||||
## v0.0.6 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/order-watcher",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "An order watcher daemon that watches for order validity",
|
||||
"keywords": [
|
||||
"0x",
|
||||
@@ -39,12 +39,12 @@
|
||||
"node": ">=6.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^0.3.2",
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/migrations": "^0.0.8",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/sol-compiler": "^0.5.2",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/abi-gen": "^0.3.3",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/migrations": "^0.0.9",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/sol-compiler": "^0.5.3",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/bintrees": "1.0.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
@@ -70,17 +70,19 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/base-contract": "^0.3.4",
|
||||
"@0xproject/contract-wrappers": "^0.0.5",
|
||||
"@0xproject/fill-scenarios": "^0.0.4",
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/order-utils": "^0.0.7",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/base-contract": "^0.3.5",
|
||||
"@0xproject/contract-wrappers": "^0.1.0",
|
||||
"@0xproject/fill-scenarios": "^0.0.5",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/order-utils": "^0.0.8",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"bintrees": "1.0.2",
|
||||
"ethereum-types": "^0.0.2",
|
||||
"ethereumjs-blockstream": "5.0.0",
|
||||
"ethers": "3.0.22",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { BlockParamLiteral, LogEntry } from '@0xproject/types';
|
||||
import { intervalUtils } from '@0xproject/utils';
|
||||
import { intervalUtils, logUtils } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { EventWatcherCallback, OrderWatcherError } from '../types';
|
||||
@@ -19,81 +20,115 @@ enum LogEventState {
|
||||
*/
|
||||
export class EventWatcher {
|
||||
private _web3Wrapper: Web3Wrapper;
|
||||
private _blockAndLogStreamerIfExists: BlockAndLogStreamer<Block, Log> | undefined;
|
||||
private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
|
||||
private _onLogAddedSubscriptionToken: string | undefined;
|
||||
private _onLogRemovedSubscriptionToken: string | undefined;
|
||||
private _pollingIntervalMs: number;
|
||||
private _intervalIdIfExists?: NodeJS.Timer;
|
||||
private _lastEvents: LogEntry[] = [];
|
||||
private _stateLayer: BlockParamLiteral;
|
||||
private _isVerbose: boolean;
|
||||
constructor(
|
||||
web3Wrapper: Web3Wrapper,
|
||||
pollingIntervalIfExistsMs: undefined | number,
|
||||
stateLayer: BlockParamLiteral = BlockParamLiteral.Latest,
|
||||
isVerbose: boolean,
|
||||
) {
|
||||
this._isVerbose = isVerbose;
|
||||
this._web3Wrapper = web3Wrapper;
|
||||
this._stateLayer = stateLayer;
|
||||
this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs)
|
||||
? DEFAULT_EVENT_POLLING_INTERVAL_MS
|
||||
: pollingIntervalIfExistsMs;
|
||||
this._blockAndLogStreamerIfExists = undefined;
|
||||
this._blockAndLogStreamIntervalIfExists = undefined;
|
||||
this._onLogAddedSubscriptionToken = undefined;
|
||||
this._onLogRemovedSubscriptionToken = undefined;
|
||||
}
|
||||
public subscribe(callback: EventWatcherCallback): void {
|
||||
assert.isFunction('callback', callback);
|
||||
if (!_.isUndefined(this._intervalIdIfExists)) {
|
||||
if (!_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
|
||||
throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
|
||||
}
|
||||
this._intervalIdIfExists = intervalUtils.setAsyncExcludingInterval(
|
||||
this._pollForBlockchainEventsAsync.bind(this, callback),
|
||||
this._pollingIntervalMs,
|
||||
(err: Error) => {
|
||||
this.unsubscribe();
|
||||
callback(err);
|
||||
},
|
||||
);
|
||||
this._startBlockAndLogStream(callback);
|
||||
}
|
||||
public unsubscribe(): void {
|
||||
this._lastEvents = [];
|
||||
if (!_.isUndefined(this._intervalIdIfExists)) {
|
||||
intervalUtils.clearAsyncExcludingInterval(this._intervalIdIfExists);
|
||||
delete this._intervalIdIfExists;
|
||||
if (_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
|
||||
throw new Error(OrderWatcherError.SubscriptionNotFound);
|
||||
}
|
||||
this._stopBlockAndLogStream();
|
||||
}
|
||||
private async _pollForBlockchainEventsAsync(callback: EventWatcherCallback): Promise<void> {
|
||||
const pendingEvents = await this._getEventsAsync();
|
||||
if (_.isUndefined(pendingEvents)) {
|
||||
// HACK: This should never happen, but happens frequently on CI due to a ganache bug
|
||||
return;
|
||||
private _startBlockAndLogStream(callback: EventWatcherCallback): void {
|
||||
if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
|
||||
throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
|
||||
}
|
||||
if (pendingEvents.length === 0) {
|
||||
// HACK: Sometimes when node rebuilds the pending block we get back the empty result.
|
||||
// We don't want to emit a lot of removal events and bring them back after a couple of miliseconds,
|
||||
// that's why we just ignore those cases.
|
||||
return;
|
||||
}
|
||||
const removedEvents = _.differenceBy(this._lastEvents, pendingEvents, JSON.stringify);
|
||||
const newEvents = _.differenceBy(pendingEvents, this._lastEvents, JSON.stringify);
|
||||
await this._emitDifferencesAsync(removedEvents, LogEventState.Removed, callback);
|
||||
await this._emitDifferencesAsync(newEvents, LogEventState.Added, callback);
|
||||
this._lastEvents = pendingEvents;
|
||||
}
|
||||
private async _getEventsAsync(): Promise<LogEntry[]> {
|
||||
const eventFilter = {
|
||||
fromBlock: this._stateLayer,
|
||||
toBlock: this._stateLayer,
|
||||
};
|
||||
const events = await this._web3Wrapper.getLogsAsync(eventFilter);
|
||||
return events;
|
||||
this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
|
||||
this._web3Wrapper.getBlockAsync.bind(this._web3Wrapper, this._stateLayer),
|
||||
this._web3Wrapper.getLogsAsync.bind(this._web3Wrapper, eventFilter),
|
||||
this._onBlockAndLogStreamerError.bind(this),
|
||||
);
|
||||
const catchAllLogFilter = {};
|
||||
this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);
|
||||
this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
|
||||
this._reconcileBlockAsync.bind(this),
|
||||
this._pollingIntervalMs,
|
||||
this._onBlockAndLogStreamerError.bind(this),
|
||||
);
|
||||
let isRemoved = false;
|
||||
this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded(
|
||||
this._onLogStateChangedAsync.bind(this, callback, isRemoved),
|
||||
);
|
||||
isRemoved = true;
|
||||
this._onLogRemovedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogRemoved(
|
||||
this._onLogStateChangedAsync.bind(this, callback, isRemoved),
|
||||
);
|
||||
}
|
||||
private _stopBlockAndLogStream(): void {
|
||||
if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
|
||||
throw new Error(OrderWatcherError.SubscriptionNotFound);
|
||||
}
|
||||
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string);
|
||||
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string);
|
||||
intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamIntervalIfExists as NodeJS.Timer);
|
||||
delete this._blockAndLogStreamerIfExists;
|
||||
delete this._blockAndLogStreamIntervalIfExists;
|
||||
}
|
||||
private async _onLogStateChangedAsync(
|
||||
callback: EventWatcherCallback,
|
||||
isRemoved: boolean,
|
||||
log: LogEntry,
|
||||
): Promise<void> {
|
||||
await this._emitDifferencesAsync(log, isRemoved ? LogEventState.Removed : LogEventState.Added, callback);
|
||||
}
|
||||
private async _reconcileBlockAsync(): Promise<void> {
|
||||
const latestBlock = await this._web3Wrapper.getBlockAsync(BlockParamLiteral.Latest);
|
||||
// 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((latestBlock as any) as Block);
|
||||
}
|
||||
}
|
||||
private async _emitDifferencesAsync(
|
||||
logs: LogEntry[],
|
||||
log: LogEntry,
|
||||
logEventState: LogEventState,
|
||||
callback: EventWatcherCallback,
|
||||
): Promise<void> {
|
||||
for (const log of logs) {
|
||||
const logEvent = {
|
||||
removed: logEventState === LogEventState.Removed,
|
||||
...log,
|
||||
};
|
||||
if (!_.isUndefined(this._intervalIdIfExists)) {
|
||||
callback(null, logEvent);
|
||||
}
|
||||
const logEvent = {
|
||||
removed: logEventState === LogEventState.Removed,
|
||||
...log,
|
||||
};
|
||||
if (!_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
|
||||
callback(null, logEvent);
|
||||
}
|
||||
}
|
||||
private _onBlockAndLogStreamerError(err: Error): void {
|
||||
// Since Blockstream errors are all recoverable, we simply log them if the verbose
|
||||
// config is passed in.
|
||||
if (this._isVerbose) {
|
||||
logUtils.warn(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -19,6 +19,8 @@ export class ExpirationWatcher {
|
||||
private _expirationMarginMs: number;
|
||||
private _orderExpirationCheckingIntervalIdIfExists?: NodeJS.Timer;
|
||||
constructor(expirationMarginIfExistsMs?: number, orderExpirationCheckingIntervalIfExistsMs?: number) {
|
||||
this._orderExpirationCheckingIntervalMs =
|
||||
orderExpirationCheckingIntervalIfExistsMs || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
|
||||
this._expirationMarginMs = expirationMarginIfExistsMs || DEFAULT_EXPIRATION_MARGIN_MS;
|
||||
this._orderExpirationCheckingIntervalMs =
|
||||
expirationMarginIfExistsMs || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
|
||||
|
@@ -14,7 +14,7 @@ import {
|
||||
Provider,
|
||||
SignedOrder,
|
||||
} from '@0xproject/types';
|
||||
import { AbiDecoder, intervalUtils } from '@0xproject/utils';
|
||||
import { errorUtils, intervalUtils } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
@@ -39,7 +39,6 @@ import {
|
||||
} from '../generated_contract_wrappers/token';
|
||||
import { OnOrderStateChangeCallback, OrderWatcherConfig, OrderWatcherError } from '../types';
|
||||
import { assert } from '../utils/assert';
|
||||
import { utils } from '../utils/utils';
|
||||
|
||||
import { EventWatcher } from './event_watcher';
|
||||
import { ExpirationWatcher } from './expiration_watcher';
|
||||
@@ -94,7 +93,8 @@ export class OrderWatcher {
|
||||
const pollingIntervalIfExistsMs = _.isUndefined(config) ? undefined : config.eventPollingIntervalMs;
|
||||
const stateLayer =
|
||||
_.isUndefined(config) || _.isUndefined(config.stateLayer) ? BlockParamLiteral.Latest : config.stateLayer;
|
||||
this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, stateLayer);
|
||||
const isVerbose = !_.isUndefined(config) && !_.isUndefined(config.isVerbose) ? config.isVerbose : false;
|
||||
this._eventWatcher = new EventWatcher(this._web3Wrapper, pollingIntervalIfExistsMs, stateLayer, isVerbose);
|
||||
this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
|
||||
this._contractWrappers.token,
|
||||
stateLayer,
|
||||
@@ -237,7 +237,6 @@ export class OrderWatcher {
|
||||
if (!_.isNull(err)) {
|
||||
if (!_.isUndefined(this._callbackIfExists)) {
|
||||
this._callbackIfExists(err);
|
||||
this.unsubscribe();
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -344,7 +343,7 @@ export class OrderWatcher {
|
||||
return; // noop
|
||||
|
||||
default:
|
||||
throw utils.spawnSwitchErr('decodedLog.event', decodedLog.event);
|
||||
throw errorUtils.spawnSwitchErr('decodedLog.event', decodedLog.event);
|
||||
}
|
||||
}
|
||||
private async _emitRevalidateOrdersAsync(orderHashes: string[]): Promise<void> {
|
||||
|
@@ -1,18 +1,4 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
import {
|
||||
BlockParam,
|
||||
BlockParamLiteral,
|
||||
ContractAbi,
|
||||
ContractEventArg,
|
||||
ExchangeContractErrs,
|
||||
FilterObject,
|
||||
LogEntryEvent,
|
||||
LogWithDecodedArgs,
|
||||
Order,
|
||||
OrderState,
|
||||
SignedOrder,
|
||||
} from '@0xproject/types';
|
||||
import { BlockParamLiteral, LogEntryEvent, OrderState } from '@0xproject/types';
|
||||
|
||||
export enum OrderWatcherError {
|
||||
SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT',
|
||||
@@ -30,11 +16,12 @@ export type EventWatcherCallback = (err: null | Error, log?: LogEntryEvent) => v
|
||||
* stateLayer: Optional blockchain state layer OrderWatcher will monitor for new events. Default=latest.
|
||||
*/
|
||||
export interface OrderWatcherConfig {
|
||||
stateLayer: BlockParamLiteral;
|
||||
orderExpirationCheckingIntervalMs?: number;
|
||||
eventPollingIntervalMs?: number;
|
||||
expirationMarginMs?: number;
|
||||
cleanupJobIntervalMs?: number;
|
||||
stateLayer: BlockParamLiteral;
|
||||
isVerbose?: boolean;
|
||||
}
|
||||
|
||||
export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void;
|
||||
|
@@ -1,12 +1,10 @@
|
||||
import { assert as sharedAssert } from '@0xproject/assert';
|
||||
// We need those two unused imports because they're actually used by sharedAssert which gets injected here
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
// tslint:disable:no-unused-variable
|
||||
import { Schema } from '@0xproject/json-schemas';
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
import { ECSignature } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
// tslint:enable:no-unused-variable
|
||||
|
||||
import { isValidSignature } from '@0xproject/order-utils';
|
||||
|
||||
|
@@ -1,9 +1,6 @@
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
|
||||
export const utils = {
|
||||
spawnSwitchErr(name: string, value: any): Error {
|
||||
return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
|
||||
},
|
||||
getCurrentUnixTimestampSec(): BigNumber {
|
||||
const milisecondsInASecond = 1000;
|
||||
return new BigNumber(Date.now() / milisecondsInASecond).round();
|
||||
|
@@ -1,127 +0,0 @@
|
||||
import { callbackErrorReporter, web3Factory } from '@0xproject/dev-utils';
|
||||
import { DoneCallback, LogEntry, LogEntryEvent } from '@0xproject/types';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'make-promises-safe';
|
||||
import 'mocha';
|
||||
import * as Sinon from 'sinon';
|
||||
|
||||
import { EventWatcher } from '../src/order_watcher/event_watcher';
|
||||
|
||||
import { chaiSetup } from './utils/chai_setup';
|
||||
import { provider } from './utils/web3_wrapper';
|
||||
|
||||
chaiSetup.configure();
|
||||
const expect = chai.expect;
|
||||
|
||||
describe('EventWatcher', () => {
|
||||
let stubs: Sinon.SinonStub[] = [];
|
||||
let eventWatcher: EventWatcher;
|
||||
let web3Wrapper: Web3Wrapper;
|
||||
const logA: LogEntry = {
|
||||
address: '0x71d271f8b14adef568f8f28f1587ce7271ac4ca5',
|
||||
blockHash: null,
|
||||
blockNumber: null,
|
||||
data: '',
|
||||
logIndex: null,
|
||||
topics: [],
|
||||
transactionHash: '0x004881d38cd4a8f72f1a0d68c8b9b8124504706041ff37019c1d1ed6bfda8e17',
|
||||
transactionIndex: 0,
|
||||
};
|
||||
const logB: LogEntry = {
|
||||
address: '0x8d12a197cb00d4747a1fe03395095ce2a5cc6819',
|
||||
blockHash: null,
|
||||
blockNumber: null,
|
||||
data: '',
|
||||
logIndex: null,
|
||||
topics: ['0xf341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567'],
|
||||
transactionHash: '0x01ef3c048b18d9b09ea195b4ed94cf8dd5f3d857a1905ff886b152cfb1166f25',
|
||||
transactionIndex: 0,
|
||||
};
|
||||
const logC: LogEntry = {
|
||||
address: '0x1d271f8b174adef58f1587ce68f8f27271ac4ca5',
|
||||
blockHash: null,
|
||||
blockNumber: null,
|
||||
data: '',
|
||||
logIndex: null,
|
||||
topics: ['0xf341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb567'],
|
||||
transactionHash: '0x01ef3c048b18d9b09ea195b4ed94cf8dd5f3d857a1905ff886b152cfb1166f25',
|
||||
transactionIndex: 0,
|
||||
};
|
||||
before(async () => {
|
||||
const pollingIntervalMs = 10;
|
||||
web3Wrapper = new Web3Wrapper(provider);
|
||||
eventWatcher = new EventWatcher(web3Wrapper, pollingIntervalMs);
|
||||
});
|
||||
afterEach(() => {
|
||||
// clean up any stubs after the test has completed
|
||||
_.each(stubs, s => s.restore());
|
||||
stubs = [];
|
||||
eventWatcher.unsubscribe();
|
||||
});
|
||||
it('correctly emits initial log events', (done: DoneCallback) => {
|
||||
const logs: LogEntry[] = [logA, logB];
|
||||
const expectedLogEvents = [
|
||||
{
|
||||
removed: false,
|
||||
...logA,
|
||||
},
|
||||
{
|
||||
removed: false,
|
||||
...logB,
|
||||
},
|
||||
];
|
||||
const getLogsStub = Sinon.stub(web3Wrapper, 'getLogsAsync');
|
||||
getLogsStub.onCall(0).returns(logs);
|
||||
stubs.push(getLogsStub);
|
||||
const expectedToBeCalledOnce = false;
|
||||
const callback = callbackErrorReporter.reportNodeCallbackErrors(done, expectedToBeCalledOnce)(
|
||||
(event: LogEntryEvent) => {
|
||||
const expectedLogEvent = expectedLogEvents.shift();
|
||||
expect(event).to.be.deep.equal(expectedLogEvent);
|
||||
if (_.isEmpty(expectedLogEvents)) {
|
||||
done();
|
||||
}
|
||||
},
|
||||
);
|
||||
eventWatcher.subscribe(callback);
|
||||
});
|
||||
it('correctly computes the difference and emits only changes', (done: DoneCallback) => {
|
||||
const initialLogs: LogEntry[] = [logA, logB];
|
||||
const changedLogs: LogEntry[] = [logA, logC];
|
||||
const expectedLogEvents = [
|
||||
{
|
||||
removed: false,
|
||||
...logA,
|
||||
},
|
||||
{
|
||||
removed: false,
|
||||
...logB,
|
||||
},
|
||||
{
|
||||
removed: true,
|
||||
...logB,
|
||||
},
|
||||
{
|
||||
removed: false,
|
||||
...logC,
|
||||
},
|
||||
];
|
||||
const getLogsStub = Sinon.stub(web3Wrapper, 'getLogsAsync');
|
||||
getLogsStub.onCall(0).returns(initialLogs);
|
||||
getLogsStub.onCall(1).returns(changedLogs);
|
||||
stubs.push(getLogsStub);
|
||||
const expectedToBeCalledOnce = false;
|
||||
const callback = callbackErrorReporter.reportNodeCallbackErrors(done, expectedToBeCalledOnce)(
|
||||
(event: LogEntryEvent) => {
|
||||
const expectedLogEvent = expectedLogEvents.shift();
|
||||
expect(event).to.be.deep.equal(expectedLogEvent);
|
||||
if (_.isEmpty(expectedLogEvents)) {
|
||||
done();
|
||||
}
|
||||
},
|
||||
);
|
||||
eventWatcher.subscribe(callback);
|
||||
});
|
||||
});
|
@@ -1,16 +1,14 @@
|
||||
import { ContractWrappers } from '@0xproject/contract-wrappers';
|
||||
import { BlockchainLifecycle, callbackErrorReporter, devConstants } from '@0xproject/dev-utils';
|
||||
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
|
||||
import { FillScenarios } from '@0xproject/fill-scenarios';
|
||||
import { getOrderHashHex } from '@0xproject/order-utils';
|
||||
import { DoneCallback, Token } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'make-promises-safe';
|
||||
import 'mocha';
|
||||
import * as Sinon from 'sinon';
|
||||
|
||||
import { artifacts } from '../src/artifacts';
|
||||
import { ExpirationWatcher } from '../src/order_watcher/expiration_watcher';
|
||||
import { utils } from '../src/utils/utils';
|
||||
|
||||
@@ -108,7 +106,7 @@ describe('ExpirationWatcher', () => {
|
||||
);
|
||||
const orderHash = getOrderHashHex(signedOrder);
|
||||
expirationWatcher.addOrder(orderHash, signedOrder.expirationUnixTimestampSec.times(MILISECONDS_IN_SECOND));
|
||||
const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done)(async (hash: string) => {
|
||||
const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done)(async (_hash: string) => {
|
||||
done(new Error('Emitted expiration went before the order actually expired'));
|
||||
});
|
||||
expirationWatcher.subscribe(callbackAsync);
|
||||
|
@@ -1,5 +1,6 @@
|
||||
// tslint:disable:no-unnecessary-type-assertion
|
||||
import { ContractWrappers } from '@0xproject/contract-wrappers';
|
||||
import { BlockchainLifecycle, callbackErrorReporter, devConstants } from '@0xproject/dev-utils';
|
||||
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
|
||||
import { FillScenarios } from '@0xproject/fill-scenarios';
|
||||
import { getOrderHashHex } from '@0xproject/order-utils';
|
||||
import {
|
||||
@@ -15,7 +16,6 @@ import { BigNumber } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as chai from 'chai';
|
||||
import * as _ from 'lodash';
|
||||
import 'make-promises-safe';
|
||||
import 'mocha';
|
||||
|
||||
import { OrderWatcher } from '../src/order_watcher/order_watcher';
|
||||
@@ -46,15 +46,15 @@ describe('OrderWatcher', () => {
|
||||
let taker: string;
|
||||
let signedOrder: SignedOrder;
|
||||
let orderWatcher: OrderWatcher;
|
||||
const config = {
|
||||
networkId: constants.TESTRPC_NETWORK_ID,
|
||||
};
|
||||
const decimals = constants.ZRX_DECIMALS;
|
||||
const fillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals);
|
||||
before(async () => {
|
||||
contractWrappers = new ContractWrappers(provider, config);
|
||||
const networkId = await web3Wrapper.getNetworkIdAsync();
|
||||
orderWatcher = new OrderWatcher(provider, constants.TESTRPC_NETWORK_ID);
|
||||
const config = {
|
||||
networkId,
|
||||
};
|
||||
contractWrappers = new ContractWrappers(provider, config);
|
||||
orderWatcher = new OrderWatcher(provider, networkId);
|
||||
exchangeContractAddress = contractWrappers.exchange.getContractAddress();
|
||||
userAddresses = await web3Wrapper.getAvailableAddressesAsync();
|
||||
[, maker, taker] = userAddresses;
|
||||
@@ -157,7 +157,7 @@ describe('OrderWatcher', () => {
|
||||
fillableAmount,
|
||||
);
|
||||
orderWatcher.addOrder(signedOrder);
|
||||
const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
|
||||
const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((_orderState: OrderState) => {
|
||||
throw new Error('OrderState callback fired for irrelevant order');
|
||||
});
|
||||
orderWatcher.subscribe(callback);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/react-docs-example",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -26,7 +26,7 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "0.18.0",
|
||||
"@types/node": "9.6.0",
|
||||
@@ -50,7 +50,7 @@
|
||||
"webpack-dev-server": "2.11.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/react-docs": "^0.0.14",
|
||||
"@0xproject/react-docs": "^0.0.15",
|
||||
"basscss": "8.0.4",
|
||||
"lodash": "4.17.10",
|
||||
"material-ui": "0.17.4",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.0.15",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.14",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.15 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.14 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-docs",
|
||||
"version": "0.0.14",
|
||||
"version": "0.0.15",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -25,9 +25,9 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"shx": "0.2.2",
|
||||
@@ -35,8 +35,8 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/react-shared": "^0.2.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/react-shared": "^0.2.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/material-ui": "0.18.0",
|
||||
"@types/node": "9.6.0",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.2.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.2.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.2.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.2.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/react-shared",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -25,9 +25,9 @@
|
||||
"url": "https://github.com/0xProject/0x-monorepo.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"shx": "0.2.2",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.5.3",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.5.2",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.5.3 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.5.2 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-compiler",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.3",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -49,9 +49,9 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/dev-utils": "^0.4.4",
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/dev-utils": "^0.4.5",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/mkdirp": "0.5.2",
|
||||
"@types/require-from-string": "1.2.0",
|
||||
"@types/semver": "5.5.0",
|
||||
@@ -72,12 +72,12 @@
|
||||
"zeppelin-solidity": "1.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/sol-resolver": "^0.0.7",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/web3-wrapper": "^0.7.1",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/sol-resolver": "^0.0.8",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@0xproject/web3-wrapper": "^0.7.2",
|
||||
"@types/yargs": "10.0.2",
|
||||
"chalk": "2.3.2",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.1.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.1.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.1.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-cov",
|
||||
"version": "0.1.1",
|
||||
"version": "0.1.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -46,10 +46,10 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md",
|
||||
"dependencies": {
|
||||
"@0xproject/subproviders": "^0.10.4",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/subproviders": "^0.10.5",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
"glob": "7.1.1",
|
||||
"istanbul": "0.4.5",
|
||||
@@ -59,8 +59,8 @@
|
||||
"solidity-parser-antlr": "0.2.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/istanbul": "0.4.30",
|
||||
"@types/mkdirp": "0.5.2",
|
||||
"@types/mocha": "2.2.48",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.0.8",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.0.7",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.0.8 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.0.7 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sol-resolver",
|
||||
"version": "0.0.7",
|
||||
"version": "0.0.8",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -24,8 +24,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/resolver/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"shx": "0.2.2",
|
||||
@@ -33,7 +33,7 @@
|
||||
"typescript": "2.7.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.0.3",
|
||||
"lodash": "4.17.10"
|
||||
},
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.1.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.1.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.1.5 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.1.4 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/sra-report",
|
||||
"version": "0.1.4",
|
||||
"version": "0.1.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -31,20 +31,20 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md",
|
||||
"dependencies": {
|
||||
"0x.js": "^0.38.4",
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/connect": "^0.6.15",
|
||||
"@0xproject/json-schemas": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"0x.js": "^0.38.5",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/connect": "^0.6.16",
|
||||
"@0xproject/json-schemas": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"chalk": "2.3.2",
|
||||
"lodash": "4.17.10",
|
||||
"newman": "3.9.3",
|
||||
"yargs": "11.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
"@types/nock": "9.1.2",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "0.10.5",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Update web3-provider-engine to v14.0.6 including the leaked global.XMLHttpRequest bug fix"
|
||||
}
|
||||
],
|
||||
"timestamp": 1531149657
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.10.4",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.10.5 - _July 9, 2018_
|
||||
|
||||
* Update web3-provider-engine to v14.0.6 including the leaked global.XMLHttpRequest bug fix
|
||||
|
||||
## v0.10.4 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/subproviders",
|
||||
"version": "0.10.4",
|
||||
"version": "0.10.5",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -39,10 +39,10 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/assert": "^0.2.12",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/assert": "^0.2.13",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@ledgerhq/hw-app-eth": "4.7.3",
|
||||
"@ledgerhq/hw-transport-u2f": "4.7.3",
|
||||
"bip39": "2.5.0",
|
||||
@@ -54,12 +54,12 @@
|
||||
"lodash": "4.17.10",
|
||||
"semaphore-async-await": "1.5.1",
|
||||
"web3": "0.20.6",
|
||||
"web3-provider-engine": "13.8.0"
|
||||
"web3-provider-engine": "14.0.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"@types/bip39": "2.4.0",
|
||||
"@types/lodash": "4.14.104",
|
||||
"@types/mocha": "2.2.48",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "@0xproject/testnet-faucets",
|
||||
"version": "1.0.34",
|
||||
"version": "1.0.35",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -18,11 +18,11 @@
|
||||
"author": "Fabio Berger",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"0x.js": "^0.38.4",
|
||||
"@0xproject/subproviders": "^0.10.4",
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/typescript-typings": "^0.4.1",
|
||||
"@0xproject/utils": "^0.7.1",
|
||||
"0x.js": "^0.38.5",
|
||||
"@0xproject/subproviders": "^0.10.5",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"@0xproject/typescript-typings": "^0.4.2",
|
||||
"@0xproject/utils": "^0.7.2",
|
||||
"body-parser": "1.18.2",
|
||||
"ethereumjs-tx": "1.3.4",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
@@ -33,7 +33,7 @@
|
||||
"web3-provider-engine": "13.8.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"@types/body-parser": "1.16.8",
|
||||
"@types/express": "4.11.1",
|
||||
"@types/lodash": "4.14.104",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.4.21",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.4.20",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.4.21 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.4.20 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/tslint-config",
|
||||
"version": "0.4.20",
|
||||
"version": "0.4.21",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/tslint-config/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@types/lodash": "4.14.104",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
|
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1531149657,
|
||||
"version": "0.8.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.8.1",
|
||||
|
@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.8.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
||||
## v0.8.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/types",
|
||||
"version": "0.8.1",
|
||||
"version": "0.8.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -24,8 +24,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/tslint-config": "^0.4.20",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"@0xproject/tslint-config": "^0.4.21",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"shx": "0.2.2",
|
||||
|
@@ -1,10 +1,32 @@
|
||||
[
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Dependencies updated"
|
||||
"note": "Improve 'web3-provider-engine' typings",
|
||||
"pr": 768
|
||||
},
|
||||
{
|
||||
"note": "Additional error type for `ethers.js`",
|
||||
"pr": 763
|
||||
}
|
||||
],
|
||||
"timestamp": 1531149657
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.4.0",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Add types for `react-joyride`"
|
||||
},
|
||||
{
|
||||
"note": "Add types for `react-popper`, remove types for `react-joyride`"
|
||||
},
|
||||
{
|
||||
"note":
|
||||
"Remove types for blockies, bn.js, compare-versions, ethereumjs-abi, ethereumjs-tx, find-versions, hdkey, is-mobile, solidity-parser-antlr, xml-js as they were moved to DefinitelyTyped",
|
||||
"pr": 641
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@@ -5,9 +5,16 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.4.1 - _June 19, 2018_
|
||||
## v0.4.2 - _July 9, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
* Improve 'web3-provider-engine' typings (#768)
|
||||
* Additional error type for `ethers.js` (#763)
|
||||
|
||||
## v0.4.0 - _June 19, 2018_
|
||||
|
||||
* Add types for `react-joyride`
|
||||
* Add types for `react-popper`, remove types for `react-joyride`
|
||||
* Remove types for blockies, bn.js, compare-versions, ethereumjs-abi, ethereumjs-tx, find-versions, hdkey, is-mobile, solidity-parser-antlr, xml-js as they were moved to DefinitelyTyped (#641)
|
||||
|
||||
## v0.4.0 - _June 1, 2018_
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@0xproject/typescript-typings",
|
||||
"version": "0.4.1",
|
||||
"version": "0.4.2",
|
||||
"engines": {
|
||||
"node": ">=6.12"
|
||||
},
|
||||
@@ -25,11 +25,11 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/typescript-typings#readme",
|
||||
"dependencies": {
|
||||
"@0xproject/types": "^0.8.1",
|
||||
"@0xproject/types": "^0.8.2",
|
||||
"bignumber.js": "~4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@0xproject/monorepo-scripts": "^0.2.1",
|
||||
"@0xproject/monorepo-scripts": "^0.2.2",
|
||||
"copyfiles": "1.2.0",
|
||||
"make-promises-safe": "1.1.0",
|
||||
"shx": "0.2.2"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
declare module 'ethers' {
|
||||
import { TxData } from '@0xproject/types';
|
||||
import { TxData } from 'ethereum-types';
|
||||
|
||||
export interface TransactionDescription {
|
||||
name: string;
|
||||
@@ -31,4 +31,7 @@ declare module 'ethers' {
|
||||
public static getDeployTransaction(bytecode: string, abi: any, ...args: any[]): Partial<TxData>;
|
||||
constructor(address: string, abi: any, provider: any);
|
||||
}
|
||||
const enum errors {
|
||||
INVALID_ARGUMENT = 'INVALID_ARGUMENT',
|
||||
}
|
||||
}
|
||||
|
@@ -1,10 +1,18 @@
|
||||
declare module 'web3-provider-engine' {
|
||||
interface Web3ProviderEngineOptions {
|
||||
pollingInterval?: number;
|
||||
blockTracker?: any;
|
||||
blockTrackerProvider?: any;
|
||||
}
|
||||
class Web3ProviderEngine {
|
||||
constructor(options?: Web3ProviderEngineOptions);
|
||||
public on(event: string, handler: () => void): void;
|
||||
public send(payload: any): void;
|
||||
public sendAsync(payload: any, callback: (error: any, response: any) => void): void;
|
||||
public addProvider(provider: any): void;
|
||||
public start(): void;
|
||||
// start block polling
|
||||
public start(callback?: () => void): void;
|
||||
// stop block polling
|
||||
public stop(): void;
|
||||
}
|
||||
export = Web3ProviderEngine;
|
||||
|
@@ -1,4 +1,21 @@
|
||||
[
|
||||
{
|
||||
"version": "0.7.2",
|
||||
"changes": [
|
||||
{
|
||||
"note": "Added errorUtils.spawnSwitchErr"
|
||||
},
|
||||
{
|
||||
"note": "Add logUtils.warn",
|
||||
"pr": 589
|
||||
},
|
||||
{
|
||||
"note": "Fixes uncaught Error in abi_decoder",
|
||||
"pr": 763
|
||||
}
|
||||
],
|
||||
"timestamp": 1531149657
|
||||
},
|
||||
{
|
||||
"timestamp": 1529397769,
|
||||
"version": "0.7.1",
|
||||
|
@@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only.
|
||||
|
||||
CHANGELOG
|
||||
|
||||
## v0.7.2 - _July 9, 2018_
|
||||
|
||||
* Added errorUtils.spawnSwitchErr
|
||||
* Add logUtils.warn (#589)
|
||||
* Fixes uncaught Error in abi_decoder (#763)
|
||||
|
||||
## v0.7.1 - _June 19, 2018_
|
||||
|
||||
* Dependencies updated
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user