diff options
Diffstat (limited to 'packages/order-watcher')
-rw-r--r-- | packages/order-watcher/package.json | 13 | ||||
-rw-r--r-- | packages/order-watcher/src/monorepo_scripts/postpublish.ts | 8 | ||||
-rw-r--r-- | packages/order-watcher/src/order_watcher/order_watcher.ts | 6 | ||||
-rw-r--r-- | packages/order-watcher/src/utils/assert.ts | 4 |
4 files changed, 16 insertions, 15 deletions
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index ba4fed358..ad3570533 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -13,7 +13,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 copy_artifacts generate_contract_wrappers", "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", @@ -24,12 +24,16 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", "update_artifacts": "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;", - "clean": "shx rm -rf _bundles lib test_temp scripts test/artifacts src/generated_contract_wrappers", + "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/generated_contract_wrappers", "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { - "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token" + "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token", + "postpublish": { + "assets": [], + "shouldPublishDocs": true + } }, "repository": { "type": "git", @@ -43,7 +47,6 @@ "@0xproject/abi-gen": "^1.0.5", "@0xproject/dev-utils": "^1.0.4", "@0xproject/migrations": "^1.0.4", - "@0xproject/monorepo-scripts": "^1.0.5", "@0xproject/sol-compiler": "^1.0.5", "@0xproject/tslint-config": "^1.0.5", "@types/bintrees": "^1.0.2", diff --git a/packages/order-watcher/src/monorepo_scripts/postpublish.ts b/packages/order-watcher/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/order-watcher/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); diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts index e2d6fc270..d4c5cca4b 100644 --- a/packages/order-watcher/src/order_watcher/order_watcher.ts +++ b/packages/order-watcher/src/order_watcher/order_watcher.ts @@ -87,6 +87,12 @@ export class OrderWatcher { private readonly _cleanupJobInterval: number; private _cleanupJobIntervalIdIfExists?: NodeJS.Timer; private _callbackIfExists?: OnOrderStateChangeCallback; + /** + * Instantiate a new OrderWatcher + * @param provider Web3 provider to use for JSON RPC calls + * @param networkId NetworkId to watch orders on + * @param partialConfig Optional configurations + */ constructor( provider: Provider, networkId: number, diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts index a891a60d2..e4a1e2c7b 100644 --- a/packages/order-watcher/src/utils/assert.ts +++ b/packages/order-watcher/src/utils/assert.ts @@ -7,7 +7,7 @@ import { BigNumber } from '@0xproject/utils'; // tslint:enable:no-unused-variable import { Provider } from 'ethereum-types'; -import { isValidSignatureAsync } from '@0xproject/order-utils'; +import { signatureUtils } from '@0xproject/order-utils'; export const assert = { ...sharedAssert, @@ -17,7 +17,7 @@ export const assert = { signature: string, signerAddress: string, ): Promise<void> { - const isValid = await isValidSignatureAsync(provider, orderHash, signature, signerAddress); + const isValid = await signatureUtils.isValidSignatureAsync(provider, orderHash, signature, signerAddress); assert.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`); }, }; |