From 839db68571037f6fff8273aaade6ea0bd14ea8a5 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 16 May 2018 14:59:10 +0200 Subject: Fix TSLint rules --- .../src/schemas/zero_ex_public_network_config_schema.ts | 16 +++++++++++++++- packages/0x.js/test/global_hooks.ts | 3 ++- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts index 9da31481a..f7f6727f0 100644 --- a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts +++ b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts @@ -1,9 +1,23 @@ +const networkNameToId: { [networkName: string]: number } = { + mainnet: 1, + ropsten: 3, + rinkeby: 4, + kovan: 42, + ganache: 50, +}; + export const zeroExPublicNetworkConfigSchema = { id: '/ZeroExPublicNetworkConfig', properties: { networkId: { type: 'number', - enum: [1, 3, 4, 42, 50], + enum: [ + networkNameToId.mainnet, + networkNameToId.ropsten, + networkNameToId.rinkeby, + networkNameToId.kovan, + networkNameToId.ganache, + ], }, gasPrice: { $ref: '/Number' }, zrxContractAddress: { $ref: '/Address' }, diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts index 53b3ef545..fa1dfae38 100644 --- a/packages/0x.js/test/global_hooks.ts +++ b/packages/0x.js/test/global_hooks.ts @@ -8,7 +8,8 @@ import { provider } from './utils/web3_wrapper'; before('migrate contracts', async function(): Promise { // HACK: Since the migrations take longer then our global mocha timeout limit // we manually increase it for this before hook. - this.timeout(20000); + const mochaTestTimeoutMs = 20000; + this.timeout(mochaTestTimeoutMs); const txDefaults = { gas: devConstants.GAS_ESTIMATE, from: devConstants.TESTRPC_FIRST_ADDRESS, -- cgit v1.2.3 From 1a35107a1d14aa5b6296d3d5230a8930a28b7540 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 22 May 2018 10:16:38 -0700 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 3 ++- packages/0x.js/CHANGELOG.md | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 5e4a726b1..2a219180d 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -11,7 +11,8 @@ "Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage", "pr": 579 } - ] + ], + "timestamp": 1527008270 }, { "timestamp": 1525477860, diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 353e0de29..f7ceaa552 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,7 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v0.37.2 - _May 5, 2018_ +## v0.38.0 - _May 22, 2018_ + + * Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579) + * Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage (#579) + +## v0.37.2 - _May 4, 2018_ * Dependencies updated -- cgit v1.2.3 From 031f97e97c1fc303860339878b3f73d4ed30596e Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 22 May 2018 10:26:47 -0700 Subject: Publish - 0x.js@0.38.0 - @0xproject/abi-gen@0.3.0 - @0xproject/assert@0.2.10 - @0xproject/base-contract@0.3.2 - @0xproject/connect@0.6.13 - @0xproject/contract-wrappers@0.0.2 - contracts@2.1.29 - @0xproject/dev-utils@0.4.2 - @0xproject/fill-scenarios@0.0.2 - @0xproject/json-schemas@0.7.24 - @0xproject/metacoin@0.0.7 - @0xproject/migrations@0.0.6 - @0xproject/monorepo-scripts@0.1.20 - @0xproject/order-utils@0.0.5 - @0xproject/order-watcher@0.0.2 - @0xproject/react-docs-example@0.0.12 - @0xproject/react-docs@0.0.12 - @0xproject/react-shared@0.1.7 - @0xproject/sol-compiler@0.5.0 - @0xproject/sol-cov@0.0.11 - @0xproject/sol-resolver@0.0.5 - @0xproject/sra-report@0.1.0 - @0xproject/subproviders@0.10.2 - @0xproject/testnet-faucets@1.0.30 - @0xproject/tslint-config@0.4.18 - @0xproject/types@0.7.0 - @0xproject/typescript-typings@0.3.2 - @0xproject/utils@0.6.2 - @0xproject/web3-wrapper@0.6.4 - @0xproject/website@0.0.33 --- packages/0x.js/package.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 7d9107bba..a498124b6 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.37.2", + "version": "0.38.0", "engines": { "node": ">=6.12" }, @@ -66,12 +66,12 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0xproject/abi-gen": "^0.2.13", - "@0xproject/dev-utils": "^0.4.1", - "@0xproject/migrations": "^0.0.5", - "@0xproject/monorepo-scripts": "^0.1.19", - "@0xproject/sol-compiler": "^0.4.3", - "@0xproject/tslint-config": "^0.4.17", + "@0xproject/abi-gen": "^0.3.0", + "@0xproject/dev-utils": "^0.4.2", + "@0xproject/migrations": "^0.0.6", + "@0xproject/monorepo-scripts": "^0.1.20", + "@0xproject/sol-compiler": "^0.5.0", + "@0xproject/tslint-config": "^0.4.18", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "^8.0.53", @@ -98,16 +98,16 @@ "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.2.9", - "@0xproject/base-contract": "^0.3.1", - "@0xproject/contract-wrappers": "^0.0.1", - "@0xproject/order-utils": "^0.0.4", - "@0xproject/order-watcher": "^0.0.1", - "@0xproject/sol-compiler": "^0.4.3", - "@0xproject/types": "^0.6.3", - "@0xproject/typescript-typings": "^0.3.1", - "@0xproject/utils": "^0.6.1", - "@0xproject/web3-wrapper": "^0.6.3", + "@0xproject/assert": "^0.2.10", + "@0xproject/base-contract": "^0.3.2", + "@0xproject/contract-wrappers": "^0.0.2", + "@0xproject/order-utils": "^0.0.5", + "@0xproject/order-watcher": "^0.0.2", + "@0xproject/sol-compiler": "^0.5.0", + "@0xproject/types": "^0.7.0", + "@0xproject/typescript-typings": "^0.3.2", + "@0xproject/utils": "^0.6.2", + "@0xproject/web3-wrapper": "^0.6.4", "ethers": "^3.0.15", "lodash": "^4.17.4" }, -- cgit v1.2.3 From 1ff34bd0f4084d2f9dfd6f07447bb63684ac51ac Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 May 2018 15:14:36 +0200 Subject: Remove web3Factory.create and remove dev-tools dependency on sol-cov --- packages/0x.js/test/utils/web3_wrapper.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts index b0ccfa546..71a0dc1c2 100644 --- a/packages/0x.js/test/utils/web3_wrapper.ts +++ b/packages/0x.js/test/utils/web3_wrapper.ts @@ -2,8 +2,7 @@ import { devConstants, web3Factory } from '@0xproject/dev-utils'; import { Provider } from '@0xproject/types'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; -const web3 = web3Factory.create({ shouldUseInProcessGanache: true }); -const provider: Provider = web3.currentProvider; -const web3Wrapper = new Web3Wrapper(web3.currentProvider); +const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true }); +const web3Wrapper = new Web3Wrapper(provider); export { provider, web3Wrapper }; -- cgit v1.2.3 From f8c628b0c7b750e1096dcc507190525feb8bd572 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 22 May 2018 10:16:38 -0700 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 3 ++- packages/0x.js/CHANGELOG.md | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 5e4a726b1..2a219180d 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -11,7 +11,8 @@ "Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage", "pr": 579 } - ] + ], + "timestamp": 1527008270 }, { "timestamp": 1525477860, diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 353e0de29..f7ceaa552 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,7 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v0.37.2 - _May 5, 2018_ +## v0.38.0 - _May 22, 2018_ + + * Renamed createOrderStateWatcher to createOrderWatcherAsync since it is now async (#579) + * Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage (#579) + +## v0.37.2 - _May 4, 2018_ * Dependencies updated -- cgit v1.2.3 From 84a1b5612de3b22bbe6b8b01a997234771d98005 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 22 May 2018 10:26:47 -0700 Subject: Publish - 0x.js@0.38.0 - @0xproject/abi-gen@0.3.0 - @0xproject/assert@0.2.10 - @0xproject/base-contract@0.3.2 - @0xproject/connect@0.6.13 - @0xproject/contract-wrappers@0.0.2 - contracts@2.1.29 - @0xproject/dev-utils@0.4.2 - @0xproject/fill-scenarios@0.0.2 - @0xproject/json-schemas@0.7.24 - @0xproject/metacoin@0.0.7 - @0xproject/migrations@0.0.6 - @0xproject/monorepo-scripts@0.1.20 - @0xproject/order-utils@0.0.5 - @0xproject/order-watcher@0.0.2 - @0xproject/react-docs-example@0.0.12 - @0xproject/react-docs@0.0.12 - @0xproject/react-shared@0.1.7 - @0xproject/sol-compiler@0.5.0 - @0xproject/sol-cov@0.0.11 - @0xproject/sol-resolver@0.0.5 - @0xproject/sra-report@0.1.0 - @0xproject/subproviders@0.10.2 - @0xproject/testnet-faucets@1.0.30 - @0xproject/tslint-config@0.4.18 - @0xproject/types@0.7.0 - @0xproject/typescript-typings@0.3.2 - @0xproject/utils@0.6.2 - @0xproject/web3-wrapper@0.6.4 - @0xproject/website@0.0.33 --- packages/0x.js/package.json | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 2fff1c058..6eff2fd9b 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "0.37.2", + "version": "0.38.0", "engines": { "node": ">=6.12" }, @@ -68,12 +68,12 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0xproject/abi-gen": "^0.2.13", - "@0xproject/dev-utils": "^0.4.1", - "@0xproject/migrations": "^0.0.5", - "@0xproject/monorepo-scripts": "^0.1.19", - "@0xproject/sol-compiler": "^0.4.3", - "@0xproject/tslint-config": "^0.4.17", + "@0xproject/abi-gen": "^0.3.0", + "@0xproject/dev-utils": "^0.4.2", + "@0xproject/migrations": "^0.0.6", + "@0xproject/monorepo-scripts": "^0.1.20", + "@0xproject/sol-compiler": "^0.5.0", + "@0xproject/tslint-config": "^0.4.18", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "^8.0.53", @@ -100,16 +100,16 @@ "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.2.9", - "@0xproject/base-contract": "^0.3.1", - "@0xproject/contract-wrappers": "^0.0.1", - "@0xproject/order-utils": "^0.0.4", - "@0xproject/order-watcher": "^0.0.1", - "@0xproject/sol-compiler": "^0.4.3", - "@0xproject/types": "^0.6.3", - "@0xproject/typescript-typings": "^0.3.1", - "@0xproject/utils": "^0.6.1", - "@0xproject/web3-wrapper": "^0.6.3", + "@0xproject/assert": "^0.2.10", + "@0xproject/base-contract": "^0.3.2", + "@0xproject/contract-wrappers": "^0.0.2", + "@0xproject/order-utils": "^0.0.5", + "@0xproject/order-watcher": "^0.0.2", + "@0xproject/sol-compiler": "^0.5.0", + "@0xproject/types": "^0.7.0", + "@0xproject/typescript-typings": "^0.3.2", + "@0xproject/utils": "^0.6.2", + "@0xproject/web3-wrapper": "^0.6.4", "ethers": "^3.0.15", "lodash": "^4.17.4" }, -- cgit v1.2.3 From 447b305e3c50145696be715bc6f43523b0770220 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 22 May 2018 11:18:09 -0700 Subject: Suppport subcalls in constructor --- packages/0x.js/test/artifacts_test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/test/artifacts_test.ts b/packages/0x.js/test/artifacts_test.ts index ca554a4f5..982fb8e63 100644 --- a/packages/0x.js/test/artifacts_test.ts +++ b/packages/0x.js/test/artifacts_test.ts @@ -15,7 +15,7 @@ const TIMEOUT = 10000; describe('Artifacts', () => { describe('contracts are deployed on kovan', () => { const kovanRpcUrl = constants.KOVAN_RPC_URL; - const provider = web3Factory.create({ rpcUrl: kovanRpcUrl }).currentProvider; + const provider = web3Factory.getRpcProvider({ rpcUrl: kovanRpcUrl }); const config = { networkId: constants.KOVAN_NETWORK_ID, }; @@ -32,7 +32,7 @@ describe('Artifacts', () => { }); describe('contracts are deployed on ropsten', () => { const ropstenRpcUrl = constants.ROPSTEN_RPC_URL; - const provider = web3Factory.create({ rpcUrl: ropstenRpcUrl }).currentProvider; + const provider = web3Factory.getRpcProvider({ rpcUrl: ropstenRpcUrl }); const config = { networkId: constants.ROPSTEN_NETWORK_ID, }; -- cgit v1.2.3 From 17cfd7b001a046e1014257da6b77b28c7a291e54 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 23 May 2018 08:37:43 -0700 Subject: Enable 0x.js tests --- packages/0x.js/package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'packages/0x.js') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 6eff2fd9b..a498124b6 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -28,9 +28,7 @@ "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "test:commonjs": "run-s build:commonjs run_mocha", - "_comment": {"run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", - "note": "The `run_mocha` test has been commented out by @hysz (greg@0xproject.com) until the migration package and 0x.js have been updated for V2."}, - "run_mocha": "", + "run_mocha": "mocha lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", "manual:postpublish": "yarn build; node ./scripts/postpublish.js", "docs:stage": "node scripts/stage_docs.js", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", -- cgit v1.2.3