aboutsummaryrefslogtreecommitdiffstats
path: root/packages/0x.js
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-24 05:16:32 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-24 05:16:32 +0800
commit3fe94891d3569a4615f4aa32d47f0065b5957fe9 (patch)
tree83d4e4ccf7748d2100aa935c457de0a893eaec9c /packages/0x.js
parentd0abc60176dba3116cb3986d298ab5164c1fe49c (diff)
parentf6b81f588d98e09e7a5806902d94e2892d029481 (diff)
downloaddexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.gz
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.bz2
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.lz
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.xz
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.tar.zst
dexon-sol-tools-3fe94891d3569a4615f4aa32d47f0065b5957fe9.zip
Merge branch 'v2-prototype' into feature/website/wallet-flex-box
* v2-prototype: (95 commits) Add missing dep to website Upgrade solidity parser Fix trace test Fix linter issues Move contract utils Fix prettier Fix NameResolver Fix prettier Remove 0x.js as a dependency from website Enable 0x.js tests Fix small bug in order-utils Address feedback Fix Tslint error caused by "PromiseLike" value Fix Tslint error caused by "PromiseLike" value Update dogfood url fix contract-wrappers version Parse compiler.json in SolCompilerArtifactsAdapter Fix TokenTransferProxy artifact name since it's now suffixed with _v1 Update yarn.lock Fix signature verification test ...
Diffstat (limited to 'packages/0x.js')
-rw-r--r--packages/0x.js/CHANGELOG.json3
-rw-r--r--packages/0x.js/CHANGELOG.md7
-rw-r--r--packages/0x.js/package.json38
-rw-r--r--packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts16
-rw-r--r--packages/0x.js/test/artifacts_test.ts4
-rw-r--r--packages/0x.js/test/global_hooks.ts3
-rw-r--r--packages/0x.js/test/utils/web3_wrapper.ts5
7 files changed, 47 insertions, 29 deletions
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
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 2fff1c058..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"
},
@@ -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",
@@ -68,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",
@@ -100,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"
},
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/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,
};
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<void> {
// 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,
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 };