diff options
Diffstat (limited to 'packages/0x.js')
-rw-r--r-- | packages/0x.js/CHANGELOG.md | 4 | ||||
-rw-r--r-- | packages/0x.js/package.json | 39 | ||||
-rw-r--r-- | packages/0x.js/src/0x.ts | 1 | ||||
-rw-r--r-- | packages/0x.js/src/artifacts/EtherToken.json | 3 | ||||
-rw-r--r-- | packages/0x.js/src/artifacts/Exchange.json | 3 | ||||
-rw-r--r-- | packages/0x.js/src/artifacts/TokenRegistry.json | 3 | ||||
-rw-r--r-- | packages/0x.js/src/artifacts/TokenTransferProxy.json | 3 | ||||
-rw-r--r-- | packages/0x.js/src/artifacts/ZRX.json | 3 | ||||
-rw-r--r-- | packages/0x.js/src/contract_wrappers/exchange_wrapper.ts | 2 | ||||
-rw-r--r-- | packages/0x.js/src/types.ts | 2 |
10 files changed, 44 insertions, 19 deletions
diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 1a09eaf28..ec44bfc16 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -1,8 +1,10 @@ # CHANGELOG -## v0.30.1 - _January 18, 2018_ +## v0.30.1 - _TBD, 2018_ * Fix a bug allowing negative fill values (#212) + * Fix a bug that made it impossible to pass a custom ZRX address (#341) + * Add Rinkeby testnet addresses to artifacts (#337) ## v0.30.0 - _January 17, 2018_ diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 1405e1bf7..10d923501 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,25 +1,28 @@ { "name": "0x.js", - "version": "0.30.0", + "version": "0.30.2", "description": "A javascript library for interacting with the 0x protocol", - "keywords": ["0x.js", "0xproject", "ethereum", "tokens", "exchange"], + "keywords": [ + "0x.js", + "0xproject", + "ethereum", + "tokens", + "exchange" + ], "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { "prebuild": "run-s clean generate_contract_wrappers", "build": "run-p build:umd:prod build:commonjs; exit 0;", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", - "upload_docs_json": - "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", - "generate_contract_wrappers": - "node ../abi-gen/lib/index.js --abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --templates contract_templates --output src/contract_wrappers/generated", + "upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json", + "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --templates contract_templates --output src/contract_wrappers/generated", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", "test:circleci": "run-s test:coverage report_test_coverage", "test": "run-s clean test:commonjs", "test:coverage": "nyc npm run test --all", "report_test_coverage": "nyc report --reporter=text-lcov | coveralls", - "update_contracts": - "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", + "update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;", "clean": "shx rm -rf _bundles lib test_temp", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts;", @@ -38,10 +41,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/abi-gen": "^0.1.2", - "@0xproject/dev-utils": "^0.0.5", - "@0xproject/tslint-config": "^0.4.2", - "@0xproject/types": "^0.1.4", + "@0xproject/abi-gen": "^0.1.4", + "@0xproject/dev-utils": "^0.0.7", + "@0xproject/tslint-config": "^0.4.4", "@types/bintrees": "^1.0.2", "@types/jsonschema": "^1.1.1", "@types/lodash": "^4.14.86", @@ -52,7 +54,7 @@ "awesome-typescript-loader": "^3.1.3", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-as-promised-typescript-typings": "^0.0.4", + "chai-as-promised-typescript-typings": "^0.0.6", "chai-bignumber": "^2.0.1", "chai-typescript-typings": "^0.0.2", "copyfiles": "^1.2.0", @@ -73,14 +75,15 @@ "typedoc": "~0.8.0", "typescript": "~2.6.1", "web3-provider-engine": "^13.0.1", - "web3-typescript-typings": "^0.9.4", + "web3-typescript-typings": "^0.9.6", "webpack": "^3.1.0" }, "dependencies": { - "@0xproject/assert": "^0.0.11", - "@0xproject/json-schemas": "^0.7.3", - "@0xproject/utils": "^0.2.0", - "@0xproject/web3-wrapper": "^0.1.5", + "@0xproject/assert": "^0.0.13", + "@0xproject/json-schemas": "^0.7.5", + "@0xproject/types": "^0.1.6", + "@0xproject/utils": "^0.2.2", + "@0xproject/web3-wrapper": "^0.1.7", "bintrees": "^1.0.2", "bn.js": "^4.11.8", "ethereumjs-abi": "^0.6.4", diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index e1b0ef08e..503a937c4 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -191,6 +191,7 @@ export class ZeroEx { this._abiDecoder, this.token, config.exchangeContractAddress, + config.zrxContractAddress, ); this.tokenRegistry = new TokenRegistryWrapper( this._web3Wrapper, diff --git a/packages/0x.js/src/artifacts/EtherToken.json b/packages/0x.js/src/artifacts/EtherToken.json index 91fba7f0a..26cca57cd 100644 --- a/packages/0x.js/src/artifacts/EtherToken.json +++ b/packages/0x.js/src/artifacts/EtherToken.json @@ -274,6 +274,9 @@ "3": { "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a" }, + "4": { + "address": "0xc778417e063141139fce010982780140aa0cd5ab" + }, "42": { "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1" }, diff --git a/packages/0x.js/src/artifacts/Exchange.json b/packages/0x.js/src/artifacts/Exchange.json index 45e277c45..af8db7360 100644 --- a/packages/0x.js/src/artifacts/Exchange.json +++ b/packages/0x.js/src/artifacts/Exchange.json @@ -597,6 +597,9 @@ "3": { "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac" }, + "4": { + "address": "0x1d16ef40fac01cec8adac2ac49427b9384192c05" + }, "42": { "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364" }, diff --git a/packages/0x.js/src/artifacts/TokenRegistry.json b/packages/0x.js/src/artifacts/TokenRegistry.json index 81780074c..0f583628c 100644 --- a/packages/0x.js/src/artifacts/TokenRegistry.json +++ b/packages/0x.js/src/artifacts/TokenRegistry.json @@ -534,6 +534,9 @@ "3": { "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed" }, + "4": { + "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6" + }, "42": { "address": "0xf18e504561f4347bea557f3d4558f559dddbae7f" }, diff --git a/packages/0x.js/src/artifacts/TokenTransferProxy.json b/packages/0x.js/src/artifacts/TokenTransferProxy.json index 9b6a6cdf9..8cf551ddb 100644 --- a/packages/0x.js/src/artifacts/TokenTransferProxy.json +++ b/packages/0x.js/src/artifacts/TokenTransferProxy.json @@ -174,6 +174,9 @@ "3": { "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6" }, + "4": { + "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d" + }, "42": { "address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4" }, diff --git a/packages/0x.js/src/artifacts/ZRX.json b/packages/0x.js/src/artifacts/ZRX.json index 1bd973178..e40b8f268 100644 --- a/packages/0x.js/src/artifacts/ZRX.json +++ b/packages/0x.js/src/artifacts/ZRX.json @@ -7,6 +7,9 @@ "3": { "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d" }, + "4": { + "address": "0x00f58d6d585f84b2d7267940cede30ce2fe6eae8" + }, "42": { "address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570" }, diff --git a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts index be88cdb20..2b6117729 100644 --- a/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/0x.js/src/contract_wrappers/exchange_wrapper.ts @@ -87,11 +87,13 @@ export class ExchangeWrapper extends ContractWrapper { abiDecoder: AbiDecoder, tokenWrapper: TokenWrapper, contractAddressIfExists?: string, + zrxContractAddressIfExists?: string, ) { super(web3Wrapper, networkId, abiDecoder); this._tokenWrapper = tokenWrapper; this._orderValidationUtils = new OrderValidationUtils(this); this._contractAddressIfExists = contractAddressIfExists; + this._zrxContractAddressIfExists = zrxContractAddressIfExists; } /** * Returns the unavailable takerAmount of an order. Unavailable amount is defined as the total diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts index 2decd92ba..3c93910e9 100644 --- a/packages/0x.js/src/types.ts +++ b/packages/0x.js/src/types.ts @@ -290,6 +290,7 @@ export interface OrderStateWatcherConfig { * networkId: The id of the underlying ethereum network your provider is connected to. (1-mainnet, 42-kovan, 50-testrpc) * gasPrice: Gas price to use with every transaction * exchangeContractAddress: The address of an exchange contract to use + * zrxContractAddress: The address of the ZRX contract to use * tokenRegistryContractAddress: The address of a token registry contract to use * tokenTransferProxyContractAddress: The address of the token transfer proxy contract to use * orderWatcherConfig: All the configs related to the orderWatcher @@ -298,6 +299,7 @@ export interface ZeroExConfig { networkId: number; gasPrice?: BigNumber; exchangeContractAddress?: string; + zrxContractAddress?: string; tokenRegistryContractAddress?: string; tokenTransferProxyContractAddress?: string; orderWatcherConfig?: OrderStateWatcherConfig; |