From f4a2e227e1a7224fbbe9c99d9aa033d176a9c4de Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sun, 29 Jul 2018 21:58:39 +0200 Subject: Remove all in-package monorepo-scripts by adding doc gen/upload and aggregate release note publishing to publish script --- packages/contract-wrappers/package.json | 8 +++----- packages/contract-wrappers/src/monorepo_scripts/postpublish.ts | 8 -------- 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 packages/contract-wrappers/src/monorepo_scripts/postpublish.ts (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index ed0278caa..d21dfe505 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -12,7 +12,7 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", - "build": "yarn pre_build && tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "build": "yarn pre_build && tsc", "pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 generate_contract_wrappers copy_artifacts", "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token|ZRXToken|ERC20Token|ERC721Token|WETH9|ERC20Proxy|ERC721Proxy).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers", "lint": "tslint --project . --exclude **/src/contract_wrappers/**/* --exclude **/lib/**/*", @@ -24,9 +24,8 @@ "update_artifacts_v2_beta": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json src/artifacts; done;", "update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;", "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", - "clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/contract_wrappers/generated src/artifacts", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts", + "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit" }, "config": { "contracts_v2_beta": "Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken", @@ -44,7 +43,6 @@ "@0xproject/abi-gen": "^1.0.4", "@0xproject/dev-utils": "^1.0.3", "@0xproject/migrations": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/sol-compiler": "^1.0.4", "@0xproject/subproviders": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", diff --git a/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts b/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/contract-wrappers/src/monorepo_scripts/postpublish.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { postpublishUtils } from '@0xproject/monorepo-scripts'; - -import * as packageJSON from '../package.json'; -import * as tsConfigJSON from '../tsconfig.json'; - -const cwd = `${__dirname}/..`; -// tslint:disable-next-line:no-floating-promises -postpublishUtils.runAsync(packageJSON, tsConfigJSON, cwd); -- cgit v1.2.3 From 0132286cab49ff6c705abd70cdd89e36b3550c27 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 2 Aug 2018 00:01:02 +0200 Subject: Add contract-wrappers page and make topBar component more concise --- packages/contract-wrappers/package.json | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index d21dfe505..7b6e5c3b4 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -25,11 +25,16 @@ "update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;", "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit" + "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", + "docs:json": "typedoc --excludePrivate --excludeExternals --ignoreCompilerErrors --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "contracts_v2_beta": "Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken", - "contracts_v2": "DummyERC20Token DummyERC721Token" + "contracts_v2": "DummyERC20Token DummyERC721Token", + "postpublish": { + "assets": [], + "shouldPublishDocs": true + } }, "repository": { "type": "git", @@ -66,6 +71,7 @@ "sinon": "^4.0.0", "source-map-support": "^0.5.0", "tslint": "5.11.0", + "typedoc": "0xProject/typedoc", "typescript": "2.7.1", "web3-provider-engine": "14.0.6" }, -- cgit v1.2.3 From b92b745ab7a65dae808bf4fc465a8bc160ed8349 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 2 Aug 2018 00:01:16 +0200 Subject: Don't ignore compiler errors --- packages/contract-wrappers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 7b6e5c3b4..cbb12534e 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -26,7 +26,7 @@ "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", - "docs:json": "typedoc --excludePrivate --excludeExternals --ignoreCompilerErrors --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "contracts_v2_beta": "Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken", -- cgit v1.2.3 From 3ee3fc2fb35b5ecc8237363d6307b7135ed4f927 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 3 Aug 2018 17:13:10 +0200 Subject: Add missing doc comments --- .../src/contract_wrappers/erc20_proxy_wrapper.ts | 8 ++++++++ .../src/contract_wrappers/erc20_token_wrapper.ts | 8 ++++++++ .../src/contract_wrappers/erc721_proxy_wrapper.ts | 8 ++++++++ .../src/contract_wrappers/erc721_token_wrapper.ts | 8 ++++++++ .../src/contract_wrappers/ether_token_wrapper.ts | 8 ++++++++ .../src/contract_wrappers/exchange_wrapper.ts | 17 +++++++++++++++-- 6 files changed, 55 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index 821d1a8a2..d60d4339b 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -16,6 +16,14 @@ export class ERC20ProxyWrapper extends ContractWrapper { public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi; private _erc20ProxyContractIfExists?: ERC20ProxyContract; private _contractAddressIfExists?: string; + /** + * Instantiate ERC20ProxyWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.erc20Proxy). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param contractAddressIfExists The contract address to use. This is usually pulled from + * the artifacts but needs to be specified when using with your own custom testnet. + */ constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) { super(web3Wrapper, networkId); this._contractAddressIfExists = contractAddressIfExists; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts index 17bda5085..7ff0ee72e 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts @@ -34,6 +34,14 @@ export class ERC20TokenWrapper extends ContractWrapper { public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS; private _tokenContractsByAddress: { [address: string]: ERC20TokenContract }; private _erc20ProxyWrapper: ERC20ProxyWrapper; + /** + * Instantiate ERC20TokenWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.erc20Token). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param erc20ProxyWrapper The ERC20ProxyWrapper instance to use + * @param blockPollingIntervalMs The block polling interval to use for active subscriptions + */ constructor( web3Wrapper: Web3Wrapper, networkId: number, diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index 38ecd4687..c17905cb7 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -16,6 +16,14 @@ export class ERC721ProxyWrapper extends ContractWrapper { public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi; private _erc721ProxyContractIfExists?: ERC721ProxyContract; private _contractAddressIfExists?: string; + /** + * Instantiate ERC721ProxyWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.erc721Proxy). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param contractAddressIfExists The contract address to use. This is usually pulled from + * the artifacts but needs to be specified when using with your own custom testnet. + */ constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) { super(web3Wrapper, networkId); this._contractAddressIfExists = contractAddressIfExists; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts index 7231e0bde..6e0eede70 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts @@ -33,6 +33,14 @@ export class ERC721TokenWrapper extends ContractWrapper { public abi: ContractAbi = artifacts.ERC721Token.compilerOutput.abi; private _tokenContractsByAddress: { [address: string]: ERC721TokenContract }; private _erc721ProxyWrapper: ERC721ProxyWrapper; + /** + * Instantiate ERC721TokenWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.erc721Token). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param erc721ProxyWrapper The ERC721ProxyWrapper instance to use + * @param blockPollingIntervalMs The block polling interval to use for active subscriptions + */ constructor( web3Wrapper: Web3Wrapper, networkId: number, diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts index 5046d3667..d7b6effd8 100644 --- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts @@ -24,6 +24,14 @@ export class EtherTokenWrapper extends ContractWrapper { [address: string]: WETH9Contract; } = {}; private _erc20TokenWrapper: ERC20TokenWrapper; + /** + * Instantiate EtherTokenWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.etherToken). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param erc20TokenWrapper The ERC20TokenWrapper instance to use + * @param blockPollingIntervalMs The block polling interval to use for active subscriptions + */ constructor( web3Wrapper: Web3Wrapper, networkId: number, diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 3e7619228..5beb35a27 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -34,6 +34,17 @@ export class ExchangeWrapper extends ContractWrapper { private _exchangeContractIfExists?: ExchangeContract; private _contractAddressIfExists?: string; private _zrxContractAddressIfExists?: string; + /** + * Instantiate ExchangeWrapper. We recommend you don't instantiate this yourself, rather + * use it through the ContractWrappers class property (contractWrappers.exchange). + * @param web3Wrapper Web3Wrapper instance to use + * @param networkId Desired networkId + * @param contractAddressIfExists The exchange contract address to use. This is usually pulled from + * the artifacts but needs to be specified when using with your own custom testnet. + * @param zrxContractAddressIfExists The ZRXToken contract address to use. This is usually pulled from + * the artifacts but needs to be specified when using with your own custom testnet. + * @param blockPollingIntervalMs The block polling interval to use for active subscriptions + */ constructor( web3Wrapper: Web3Wrapper, networkId: number, @@ -626,7 +637,7 @@ export class ExchangeWrapper extends ContractWrapper { } /** * Batch version of cancelOrderAsync. Executes multiple cancels atomically in a single transaction. - * @param orders An array of orders to cancel. + * @param orders An array of orders to cancel.Optional arguments this method accepts. * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ @@ -665,6 +676,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param leftSignedOrder First order to match. * @param rightSignedOrder Second order to match. * @param takerAddress The address that sends the transaction and gets the spread. + * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ @decorators.asyncZeroExErrorHandler @@ -723,6 +735,7 @@ export class ExchangeWrapper extends ContractWrapper { * @param signerAddress Address that should have signed the given hash. * @param signature Proof that the hash has been signed by signer. * @param senderAddress Address that should send the transaction. + * @param orderTransactionOpts Optional arguments this method accepts. * @returns Transaction hash. */ @decorators.asyncZeroExErrorHandler @@ -881,7 +894,7 @@ export class ExchangeWrapper extends ContractWrapper { /** * Cancel a given order. * @param order An object that conforms to the Order or SignedOrder interface. The order you would like to cancel. - * @param transactionOpts Optional arguments this method accepts. + * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ @decorators.asyncZeroExErrorHandler -- cgit v1.2.3 From d85ce6ac758a9a726c298b972a7c557e01f2ab2f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 3 Aug 2018 17:15:14 +0200 Subject: Make signature_util into an object literal so related functions are rendered together in the docs --- packages/contract-wrappers/src/utils/assert.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts index 842b16fa0..652e5bec3 100644 --- a/packages/contract-wrappers/src/utils/assert.ts +++ b/packages/contract-wrappers/src/utils/assert.ts @@ -1,7 +1,7 @@ import { assert as sharedAssert } from '@0xproject/assert'; // HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable -import { isValidSignatureAsync } from '@0xproject/order-utils'; +import { signatureUtils } from '@0xproject/order-utils'; import { ECSignature } from '@0xproject/types'; // tslint:disable-line:no-unused-variable import { BigNumber } from '@0xproject/utils'; // tslint:disable-line:no-unused-variable import { Web3Wrapper } from '@0xproject/web3-wrapper'; @@ -15,7 +15,7 @@ export const assert = { signature: string, signerAddress: string, ): Promise { - const isValid = await isValidSignatureAsync(provider, orderHash, signature, signerAddress); + const isValid = await signatureUtils.isValidSignatureAsync(provider, orderHash, signature, signerAddress); this.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); }, isValidSubscriptionToken(variableName: string, subscriptionToken: string): void { -- cgit v1.2.3 From 4e6322beb55302e10770c4e16bf480e17bbf27e9 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 6 Aug 2018 15:26:39 -0400 Subject: Add missing type exports --- packages/contract-wrappers/CHANGELOG.json | 9 +++++++++ packages/contract-wrappers/src/index.ts | 1 + 2 files changed, 10 insertions(+) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index d9eef089f..4c12cd592 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.0.1-rc.3", + "changes": [ + { + "note": "Export missing ExchangeSignatureValidatorApprovalEventArgs type", + "pr": 924 + } + ] + }, { "version": "1.0.1-rc.2", "changes": [ diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index e5485d7a6..da9453640 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -74,6 +74,7 @@ export { export { ExchangeCancelUpToEventArgs, ExchangeAssetProxyRegisteredEventArgs, + ExchangeSignatureValidatorApprovalEventArgs, ExchangeFillEventArgs, ExchangeCancelEventArgs, ExchangeEventArgs, -- cgit v1.2.3 From 1d9408a8e04aaea35bcf517fd3332b9bcc62bba0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 14 Aug 2018 14:39:59 -0700 Subject: Fix additional merge conflicts --- packages/contract-wrappers/test/calldata_optimization_utils_test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts index a4cea772f..a3abb8503 100644 --- a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts +++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts @@ -1,4 +1,4 @@ -import { orderFactory } from '@0xproject/order-utils'; +import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; -- cgit v1.2.3 From 8bebffb14775234d5cc8dd730ba6d55ebfa941c7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 14 Aug 2018 16:25:37 -0700 Subject: Flesh out 0x.js index.ts and added some exports to other index.ts in the process --- packages/contract-wrappers/src/index.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 41d60f05a..647636cb0 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -25,6 +25,7 @@ export { OnOrderStateChangeCallback, OrderStatus, OrderInfo, + ContractEvents, } from './types'; export { -- cgit v1.2.3 From def575b9952908e8eebb1881a5dc0fe2e663a7c8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 16 Aug 2018 15:31:43 -0700 Subject: Remove outdating comment --- .../contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts | 3 +-- .../contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts | 3 +-- .../contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts | 3 +-- .../contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts | 3 +-- .../contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts | 3 +-- packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 3 +-- 6 files changed, 6 insertions(+), 12 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index d60d4339b..ff027d78a 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -17,8 +17,7 @@ export class ERC20ProxyWrapper extends ContractWrapper { private _erc20ProxyContractIfExists?: ERC20ProxyContract; private _contractAddressIfExists?: string; /** - * Instantiate ERC20ProxyWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.erc20Proxy). + * Instantiate ERC20ProxyWrapper * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param contractAddressIfExists The contract address to use. This is usually pulled from diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts index 7ff0ee72e..4625cef6a 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts @@ -35,8 +35,7 @@ export class ERC20TokenWrapper extends ContractWrapper { private _tokenContractsByAddress: { [address: string]: ERC20TokenContract }; private _erc20ProxyWrapper: ERC20ProxyWrapper; /** - * Instantiate ERC20TokenWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.erc20Token). + * Instantiate ERC20TokenWrapper * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param erc20ProxyWrapper The ERC20ProxyWrapper instance to use diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index c17905cb7..933c1dc27 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -17,8 +17,7 @@ export class ERC721ProxyWrapper extends ContractWrapper { private _erc721ProxyContractIfExists?: ERC721ProxyContract; private _contractAddressIfExists?: string; /** - * Instantiate ERC721ProxyWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.erc721Proxy). + * Instantiate ERC721ProxyWrapper * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param contractAddressIfExists The contract address to use. This is usually pulled from diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts index 6e0eede70..590dbbf74 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts @@ -34,8 +34,7 @@ export class ERC721TokenWrapper extends ContractWrapper { private _tokenContractsByAddress: { [address: string]: ERC721TokenContract }; private _erc721ProxyWrapper: ERC721ProxyWrapper; /** - * Instantiate ERC721TokenWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.erc721Token). + * Instantiate ERC721TokenWrapper * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param erc721ProxyWrapper The ERC721ProxyWrapper instance to use diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts index d7b6effd8..1ac01812e 100644 --- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts @@ -25,8 +25,7 @@ export class EtherTokenWrapper extends ContractWrapper { } = {}; private _erc20TokenWrapper: ERC20TokenWrapper; /** - * Instantiate EtherTokenWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.etherToken). + * Instantiate EtherTokenWrapper. * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param erc20TokenWrapper The ERC20TokenWrapper instance to use diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 0febd154f..0eaae358e 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -35,8 +35,7 @@ export class ExchangeWrapper extends ContractWrapper { private _contractAddressIfExists?: string; private _zrxContractAddressIfExists?: string; /** - * Instantiate ExchangeWrapper. We recommend you don't instantiate this yourself, rather - * use it through the ContractWrappers class property (contractWrappers.exchange). + * Instantiate ExchangeWrapper * @param web3Wrapper Web3Wrapper instance to use * @param networkId Desired networkId * @param contractAddressIfExists The exchange contract address to use. This is usually pulled from -- cgit v1.2.3 From f29263c477dac0fb9f5dcbbafe1a053d0a3b1a0d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 20 Aug 2018 13:49:29 +0100 Subject: Cleanup contract-wrappers index.ts --- packages/contract-wrappers/src/index.ts | 50 +++++++++++++--------- .../contract-wrappers/test/erc20_wrapper_test.ts | 3 +- .../contract-wrappers/test/erc721_wrapper_test.ts | 2 +- .../test/ether_token_wrapper_test.ts | 3 +- .../test/exchange_wrapper_test.ts | 10 +---- .../test/forwarder_wrapper_test.ts | 10 +---- .../contract-wrappers/test/subscription_test.ts | 3 +- 7 files changed, 41 insertions(+), 40 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 647636cb0..723df42fc 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -9,46 +9,56 @@ export { ForwarderWrapper } from './contract_wrappers/forwarder_wrapper'; export { ContractWrappersError, - EventCallback, - ContractEvent, - Token, IndexedFilterValues, BlockRange, - OrderFillRequest, ContractEventArgs, ContractWrappersConfig, MethodOpts, OrderTransactionOpts, TransactionOpts, - LogEvent, - DecodedLogEvent, - OnOrderStateChangeCallback, OrderStatus, OrderInfo, ContractEvents, } from './types'; -export { - Order, - SignedOrder, - ECSignature, - OrderStateValid, - OrderStateInvalid, - OrderState, - AssetProxyId, -} from '@0xproject/types'; +export { Order, SignedOrder, AssetProxyId } from '@0xproject/types'; export { BlockParamLiteral, - FilterObject, BlockParam, ContractEventArg, - LogWithDecodedArgs, Provider, - TransactionReceipt, - TransactionReceiptWithDecodedLogs, + ContractAbi, + LogEntry, + RawLog, + JSONRPCRequestPayload, + JSONRPCResponsePayload, + JSONRPCErrorCallback, + DecodedLogEntry, + LogEntryEvent, + AbiDefinition, + DecodedLogEntryEvent, + LogWithDecodedArgs, + FunctionAbi, + EventAbi, + EventParameter, + DecodedLogArgs, + MethodAbi, + ConstructorAbi, + FallbackAbi, + DataItem, + ConstructorStateMutability, + StateMutability, } from 'ethereum-types'; +export { + ContractArtifact, + GeneratedCompilerOptions, + ContractNetworks, + Source, + ContractNetworkData, +} from '@0xproject/sol-compiler'; + export { WETH9Events, WETH9WithdrawalEventArgs, diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts index cf7ac527e..fde587dec 100644 --- a/packages/contract-wrappers/test/erc20_wrapper_test.ts +++ b/packages/contract-wrappers/test/erc20_wrapper_test.ts @@ -11,12 +11,13 @@ import { BlockRange, ContractWrappers, ContractWrappersError, - DecodedLogEvent, ERC20TokenApprovalEventArgs, ERC20TokenEvents, ERC20TokenTransferEventArgs, } from '../src'; +import { DecodedLogEvent } from '../src/types'; + import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; import { tokenUtils } from './utils/token_utils'; diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts index f005ac2e0..ab6ff0984 100644 --- a/packages/contract-wrappers/test/erc721_wrapper_test.ts +++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts @@ -11,12 +11,12 @@ import { BlockRange, ContractWrappers, ContractWrappersError, - DecodedLogEvent, ERC721TokenApprovalEventArgs, ERC721TokenApprovalForAllEventArgs, ERC721TokenEvents, ERC721TokenTransferEventArgs, } from '../src'; +import { DecodedLogEvent } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts index 48bd6d3f6..c15b8c016 100644 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts @@ -10,7 +10,6 @@ import { BlockRange, ContractWrappers, ContractWrappersError, - DecodedLogEvent, WETH9ApprovalEventArgs, WETH9DepositEventArgs, WETH9Events, @@ -18,6 +17,8 @@ import { WETH9WithdrawalEventArgs, } from '../src'; +import { DecodedLogEvent } from '../src/types'; + import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; import { tokenUtils } from './utils/token_utils'; diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index fa3b49eb9..6762c1d43 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -7,14 +7,8 @@ import * as chai from 'chai'; import { BlockParamLiteral } from 'ethereum-types'; import 'mocha'; -import { - ContractWrappers, - DecodedLogEvent, - ExchangeCancelEventArgs, - ExchangeEvents, - ExchangeFillEventArgs, - OrderStatus, -} from '../src'; +import { ContractWrappers, ExchangeCancelEventArgs, ExchangeEvents, ExchangeFillEventArgs, OrderStatus } from '../src'; +import { DecodedLogEvent } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts index 3f3b40e0b..d0b21225c 100644 --- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts +++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts @@ -7,14 +7,8 @@ import * as chai from 'chai'; import { BlockParamLiteral } from 'ethereum-types'; import 'mocha'; -import { - ContractWrappers, - DecodedLogEvent, - ExchangeCancelEventArgs, - ExchangeEvents, - ExchangeFillEventArgs, - OrderStatus, -} from '../src'; +import { ContractWrappers, ExchangeCancelEventArgs, ExchangeEvents, ExchangeFillEventArgs, OrderStatus } from '../src'; +import { DecodedLogEvent } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts index 80d17576f..81b9012bd 100644 --- a/packages/contract-wrappers/test/subscription_test.ts +++ b/packages/contract-wrappers/test/subscription_test.ts @@ -5,7 +5,8 @@ import * as _ from 'lodash'; import 'mocha'; import * as Sinon from 'sinon'; -import { ContractWrappers, DecodedLogEvent, ERC20TokenApprovalEventArgs, ERC20TokenEvents, Token } from '../src'; +import { ContractWrappers, ERC20TokenApprovalEventArgs, ERC20TokenEvents } from '../src'; +import { DecodedLogEvent } from '../src/types'; import { chaiSetup } from './utils/chai_setup'; import { constants } from './utils/constants'; -- cgit v1.2.3 From 1f65de60b4790a4602cddd74036a39e0dc87c314 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 21 Aug 2018 11:18:12 +0100 Subject: Move sol-compiler dep to `dependencies` now that types from it are exported in index.ts --- packages/contract-wrappers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 401157dff..ffd4345f4 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -48,7 +48,6 @@ "@0xproject/abi-gen": "^1.0.5", "@0xproject/dev-utils": "^1.0.4", "@0xproject/migrations": "^1.0.4", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/subproviders": "^1.0.5", "@0xproject/tslint-config": "^1.0.5", "@types/lodash": "4.14.104", @@ -81,6 +80,7 @@ "@0xproject/fill-scenarios": "^1.0.1-rc.3", "@0xproject/json-schemas": "^1.0.1-rc.4", "@0xproject/order-utils": "^1.0.1-rc.3", + "@0xproject/sol-compiler": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", "@0xproject/typescript-typings": "^1.0.4", "@0xproject/utils": "^1.0.5", -- cgit v1.2.3 From 141c51eaf5cbfdb3a177d257b5f72634cc5f7759 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 21 Aug 2018 16:35:13 +0100 Subject: Add missing exports to 0x.js and contract-wrappers index.ts --- packages/contract-wrappers/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 723df42fc..f7c10dcce 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -19,6 +19,8 @@ export { OrderStatus, OrderInfo, ContractEvents, + EventCallback, + DecodedLogEvent, } from './types'; export { Order, SignedOrder, AssetProxyId } from '@0xproject/types'; -- cgit v1.2.3 From 1bbd7bf870730dfe2146819e3740522990eb83ca Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 21 Aug 2018 23:20:01 +0100 Subject: Add generated_docs dir to clean command --- packages/contract-wrappers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index ffd4345f4..86ffa1114 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -24,7 +24,7 @@ "update_artifacts_v2_beta": "for i in ${npm_package_config_contracts_v2_beta}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-beta-testnet/$i.json src/artifacts; done;", "update_artifacts_v2": "for i in ${npm_package_config_contracts_v2}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;", "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", - "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts", + "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/contract_wrappers/generated src/artifacts generated_docs", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, -- cgit v1.2.3 From 301cb296ec77e8af5c1722679e04cb983c848153 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 21 Aug 2018 23:58:06 +0100 Subject: Move types from sol-compiler to types so they can be used in other places without requiring sol-compiler as a dep --- packages/contract-wrappers/package.json | 1 - packages/contract-wrappers/src/artifacts.ts | 2 +- packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts | 2 +- packages/contract-wrappers/src/index.ts | 5 +---- 4 files changed, 3 insertions(+), 7 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 86ffa1114..6ce7a775b 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -80,7 +80,6 @@ "@0xproject/fill-scenarios": "^1.0.1-rc.3", "@0xproject/json-schemas": "^1.0.1-rc.4", "@0xproject/order-utils": "^1.0.1-rc.3", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", "@0xproject/typescript-typings": "^1.0.4", "@0xproject/utils": "^1.0.5", diff --git a/packages/contract-wrappers/src/artifacts.ts b/packages/contract-wrappers/src/artifacts.ts index 2481b311a..7e67544d2 100644 --- a/packages/contract-wrappers/src/artifacts.ts +++ b/packages/contract-wrappers/src/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as DummyERC20Token from './artifacts/DummyERC20Token.json'; import * as DummyERC721Token from './artifacts/DummyERC721Token.json'; diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts index daf70253a..490a6c50a 100644 --- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts @@ -1,6 +1,6 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ContractArtifact } from 'ethereum-types'; import { BlockParamLiteral, ContractAbi, FilterObject, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types'; import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index f7c10dcce..7b9f3cd12 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -51,15 +51,12 @@ export { DataItem, ConstructorStateMutability, StateMutability, -} from 'ethereum-types'; - -export { ContractArtifact, GeneratedCompilerOptions, ContractNetworks, Source, ContractNetworkData, -} from '@0xproject/sol-compiler'; +} from 'ethereum-types'; export { WETH9Events, -- cgit v1.2.3 From 22de88035c35731f0a93fc0acb87c185c1e2730c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 11:28:31 +0100 Subject: Fix index.ts given fix in doc generation --- packages/contract-wrappers/src/index.ts | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 7b9f3cd12..941aa1e40 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -11,14 +11,12 @@ export { ContractWrappersError, IndexedFilterValues, BlockRange, - ContractEventArgs, ContractWrappersConfig, MethodOpts, OrderTransactionOpts, TransactionOpts, OrderStatus, OrderInfo, - ContractEvents, EventCallback, DecodedLogEvent, } from './types'; @@ -31,15 +29,10 @@ export { ContractEventArg, Provider, ContractAbi, - LogEntry, - RawLog, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, - DecodedLogEntry, - LogEntryEvent, AbiDefinition, - DecodedLogEntryEvent, LogWithDecodedArgs, FunctionAbi, EventAbi, @@ -51,11 +44,6 @@ export { DataItem, ConstructorStateMutability, StateMutability, - ContractArtifact, - GeneratedCompilerOptions, - ContractNetworks, - Source, - ContractNetworkData, } from 'ethereum-types'; export { -- cgit v1.2.3 From d907b403788576c7d4fe51090a561f1e951126e2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 13:12:42 +0100 Subject: Fix remaining merge issues --- packages/contract-wrappers/src/index.ts | 2 ++ packages/contract-wrappers/src/utils/transaction_encoder.ts | 6 +++--- packages/contract-wrappers/test/transaction_encoder_test.ts | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index 941aa1e40..5e691fc21 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -7,6 +7,8 @@ export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper'; export { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper'; export { ForwarderWrapper } from './contract_wrappers/forwarder_wrapper'; +export { TransactionEncoder } from './utils/transaction_encoder'; + export { ContractWrappersError, IndexedFilterValues, diff --git a/packages/contract-wrappers/src/utils/transaction_encoder.ts b/packages/contract-wrappers/src/utils/transaction_encoder.ts index 5c2a94b74..8821079dc 100644 --- a/packages/contract-wrappers/src/utils/transaction_encoder.ts +++ b/packages/contract-wrappers/src/utils/transaction_encoder.ts @@ -1,5 +1,5 @@ import { schemas } from '@0xproject/json-schemas'; -import { EIP712Schema, EIP712Types, EIP712Utils } from '@0xproject/order-utils'; +import { EIP712Schema, EIP712Types, eip712Utils } from '@0xproject/order-utils'; import { Order, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import _ = require('lodash'); @@ -41,11 +41,11 @@ export class TransactionEncoder { signerAddress, data, }; - const executeTransactionHashBuff = EIP712Utils.structHash( + const executeTransactionHashBuff = eip712Utils.structHash( EIP712_ZEROEX_TRANSACTION_SCHEMA, executeTransactionData, ); - const eip721MessageBuffer = EIP712Utils.createEIP712Message(executeTransactionHashBuff, exchangeAddress); + const eip721MessageBuffer = eip712Utils.createEIP712Message(executeTransactionHashBuff, exchangeAddress); const messageHex = `0x${eip721MessageBuffer.toString('hex')}`; return messageHex; } diff --git a/packages/contract-wrappers/test/transaction_encoder_test.ts b/packages/contract-wrappers/test/transaction_encoder_test.ts index 10222dbc1..e76c5b12d 100644 --- a/packages/contract-wrappers/test/transaction_encoder_test.ts +++ b/packages/contract-wrappers/test/transaction_encoder_test.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils, ecSignOrderHashAsync, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils'; +import { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils'; import { SignedOrder, SignerType } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import 'mocha'; @@ -80,7 +80,7 @@ describe('TransactionEncoder', () => { ): Promise => { const salt = generatePseudoRandomSalt(); const encodedTransaction = encoder.getTransactionHex(data, salt, signerAddress); - const signature = await ecSignOrderHashAsync( + const signature = await signatureUtils.ecSignOrderHashAsync( provider, encodedTransaction, signerAddress, -- cgit v1.2.3 From fb4fbc0e133c37c270c46d43fd84428a9423e896 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 15:10:02 +0100 Subject: Update contract-wrappers CHANGELOG --- packages/contract-wrappers/CHANGELOG.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index a1f505001..796c51be0 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -3,8 +3,12 @@ "version": "1.0.1-rc.4", "changes": [ { - "note": "Export missing ExchangeSignatureValidatorApprovalEventArgs type", - "pr": 924 + "note": "Export missing types: TransactionEncoder, EventCallback, DecodedLogEvent, ContractAbi, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, AbiDefinition, LogWithDecodedArgs, FunctionAbi, EventAbi, EventParameter, DecodedLogArgs, MethodAbi, ConstructorAbi, FallbackAbi, DataItem, ConstructorStateMutability, StateMutability & ExchangeSignatureValidatorApprovalEventArgs", + "pr": 924 + }, + { + "note": "Remove superfluous exported types: EventCallback, ContractEvent, Token, OrderFillRequest, ContractEventArgs, LogEvent, DecodedLogEvent, OnOrderStateChangeCallback, ECSignature, OrderStateValid, OrderStateInvalid, OrderState, FilterObject, LogWithDecodedArgs, TransactionReceipt & TransactionReceiptWithDecodedLogs", + "pr": 924 }, { "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction", -- cgit v1.2.3 From 392c00a698ff774c13bcd63f458df3cea478cf99 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 15:10:32 +0100 Subject: Fix prettier --- packages/contract-wrappers/CHANGELOG.json | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 796c51be0..f80929140 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -3,12 +3,14 @@ "version": "1.0.1-rc.4", "changes": [ { - "note": "Export missing types: TransactionEncoder, EventCallback, DecodedLogEvent, ContractAbi, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, AbiDefinition, LogWithDecodedArgs, FunctionAbi, EventAbi, EventParameter, DecodedLogArgs, MethodAbi, ConstructorAbi, FallbackAbi, DataItem, ConstructorStateMutability, StateMutability & ExchangeSignatureValidatorApprovalEventArgs", - "pr": 924 + "note": + "Export missing types: TransactionEncoder, EventCallback, DecodedLogEvent, ContractAbi, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, AbiDefinition, LogWithDecodedArgs, FunctionAbi, EventAbi, EventParameter, DecodedLogArgs, MethodAbi, ConstructorAbi, FallbackAbi, DataItem, ConstructorStateMutability, StateMutability & ExchangeSignatureValidatorApprovalEventArgs", + "pr": 924 }, { - "note": "Remove superfluous exported types: EventCallback, ContractEvent, Token, OrderFillRequest, ContractEventArgs, LogEvent, DecodedLogEvent, OnOrderStateChangeCallback, ECSignature, OrderStateValid, OrderStateInvalid, OrderState, FilterObject, LogWithDecodedArgs, TransactionReceipt & TransactionReceiptWithDecodedLogs", - "pr": 924 + "note": + "Remove superfluous exported types: EventCallback, ContractEvent, Token, OrderFillRequest, ContractEventArgs, LogEvent, DecodedLogEvent, OnOrderStateChangeCallback, ECSignature, OrderStateValid, OrderStateInvalid, OrderState, FilterObject, LogWithDecodedArgs, TransactionReceipt & TransactionReceiptWithDecodedLogs", + "pr": 924 }, { "note": "Added Transaction Encoder for use with 0x Exchange executeTransaction", -- cgit v1.2.3 From 40b202f8c0907cb729cc0d7d755a6810c8b1ff06 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 15:53:19 +0100 Subject: Update all CHANGELOGs --- packages/contract-wrappers/CHANGELOG.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index f80929140..645315db8 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -4,12 +4,12 @@ "changes": [ { "note": - "Export missing types: TransactionEncoder, EventCallback, DecodedLogEvent, ContractAbi, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, AbiDefinition, LogWithDecodedArgs, FunctionAbi, EventAbi, EventParameter, DecodedLogArgs, MethodAbi, ConstructorAbi, FallbackAbi, DataItem, ConstructorStateMutability, StateMutability & ExchangeSignatureValidatorApprovalEventArgs", + "Export missing types: `TransactionEncoder`, `EventCallback`, `DecodedLogEvent`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `LogWithDecodedArgs`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`", "pr": 924 }, { "note": - "Remove superfluous exported types: EventCallback, ContractEvent, Token, OrderFillRequest, ContractEventArgs, LogEvent, DecodedLogEvent, OnOrderStateChangeCallback, ECSignature, OrderStateValid, OrderStateInvalid, OrderState, FilterObject, LogWithDecodedArgs, TransactionReceipt & TransactionReceiptWithDecodedLogs", + "Remove superfluous exported types: `EventCallback`, `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `DecodedLogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `LogWithDecodedArgs`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", "pr": 924 }, { -- cgit v1.2.3 From 69b436babee4959a0bb6b5c78e3ea26e2a2f9720 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 23:13:59 +0100 Subject: Refactor publish script so that root package.json configs.packagesWithDocs is canonical source of which packages have doc pages --- packages/contract-wrappers/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index c06ef9650..f8477e878 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -32,8 +32,7 @@ "contracts_v2_beta": "AssetProxyOwner Exchange ERC20Proxy ERC20Token ERC721Proxy ERC721Token WETH9 ZRXToken Forwarder OrderValidator", "contracts_v2": "DummyERC20Token DummyERC721Token", "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "repository": { -- cgit v1.2.3 From 167c4f851945e86eb08502b3f85fcb8befb2508e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 23:24:54 +0100 Subject: Fix changelogs --- packages/contract-wrappers/CHANGELOG.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 645315db8..8e86d7d58 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -4,12 +4,12 @@ "changes": [ { "note": - "Export missing types: `TransactionEncoder`, `EventCallback`, `DecodedLogEvent`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `LogWithDecodedArgs`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`", + "Export missing types: `TransactionEncoder`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`", "pr": 924 }, { "note": - "Remove superfluous exported types: `EventCallback`, `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `DecodedLogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `LogWithDecodedArgs`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", + "Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", "pr": 924 }, { -- cgit v1.2.3 From a6cdc38d532b897442bac74bc3fd1735c85317ba Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 22 Aug 2018 23:25:06 +0100 Subject: Add/improve comments --- packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 7b1663daa..cfef0f107 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -637,7 +637,7 @@ export class ExchangeWrapper extends ContractWrapper { } /** * Batch version of cancelOrderAsync. Executes multiple cancels atomically in a single transaction. - * @param orders An array of orders to cancel.Optional arguments this method accepts. + * @param orders An array of orders to cancel. * @param orderTransactionOpts Optional arguments this method accepts. * @return Transaction hash. */ -- cgit v1.2.3 From 0577ab96b8056b05dca1024227af53dad4ef5322 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 23 Aug 2018 14:29:22 +0100 Subject: Upgrade Typedoc to 0.12.0, which works with TS 3.x --- packages/contract-wrappers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/contract-wrappers') diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index f8477e878..67cca9ec0 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -69,7 +69,7 @@ "sinon": "^4.0.0", "source-map-support": "^0.5.0", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1", "web3-provider-engine": "14.0.6" }, -- cgit v1.2.3