From f4a2e227e1a7224fbbe9c99d9aa033d176a9c4de Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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 --- package.json | 2 +- packages/0x.js/package.json | 27 +-- packages/0x.js/src/monorepo_scripts/postpublish.ts | 8 - packages/0x.js/src/monorepo_scripts/stage_docs.ts | 8 - packages/abi-gen/package.json | 8 +- .../abi-gen/src/monorepo_scripts/postpublish.ts | 8 - packages/assert/package.json | 8 +- .../assert/src/monorepo_scripts/postpublish.ts | 8 - packages/base-contract/package.json | 8 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/connect/package.json | 17 +- .../connect/src/monorepo_scripts/postpublish.ts | 8 - .../connect/src/monorepo_scripts/stage_docs.ts | 8 - packages/contract-wrappers/package.json | 8 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/dev-utils/package.json | 8 +- .../dev-utils/src/monorepo_scripts/postpublish.ts | 8 - packages/ethereum-types/package.json | 16 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../src/monorepo_scripts/stage_docs.ts | 8 - packages/fill-scenarios/package.json | 8 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/json-schemas/package.json | 19 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../src/monorepo_scripts/stage_docs.ts | 8 - packages/migrations/package.json | 4 +- .../migrations/src/monorepo_scripts/postpublish.ts | 8 - packages/monorepo-scripts/package.json | 10 +- .../src/doc_generate_and_upload.ts | 215 +++++++++++++++++++++ packages/monorepo-scripts/src/index.ts | 1 - packages/monorepo-scripts/src/postpublish_utils.ts | 202 ------------------- packages/monorepo-scripts/src/publish.ts | 98 +++++++++- packages/order-utils/package.json | 21 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../order-utils/src/monorepo_scripts/stage_docs.ts | 8 - packages/order-watcher/package.json | 8 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/react-docs/package.json | 6 +- .../react-docs/src/monorepo_scripts/postpublish.ts | 8 - packages/react-shared/package.json | 6 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/sol-compiler/package.json | 19 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../src/monorepo_scripts/stage_docs.ts | 8 - packages/sol-cov/package.json | 20 +- .../sol-cov/src/monorepo_scripts/postpublish.ts | 8 - .../sol-cov/src/monorepo_scripts/stage_docs.ts | 8 - packages/sol-resolver/package.json | 8 +- .../src/monorepo_scripts/postpublish.ts | 8 - packages/sra-report/package.json | 6 +- .../sra-report/src/monorepo_scripts/postpublish.ts | 8 - packages/subproviders/package.json | 19 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../src/monorepo_scripts/stage_docs.ts | 8 - .../tslint-config/monorepo_scripts/globals.d.ts | 6 - .../tslint-config/monorepo_scripts/postpublish.ts | 8 - packages/tslint-config/package.json | 8 +- packages/types/package.json | 8 +- packages/types/src/monorepo_scripts/postpublish.ts | 8 - .../monorepo_scripts/globals.d.ts | 6 - .../monorepo_scripts/postpublish.ts | 8 - packages/typescript-typings/package.json | 5 +- packages/utils/package.json | 8 +- packages/utils/src/monorepo_scripts/postpublish.ts | 8 - packages/web3-wrapper/package.json | 20 +- .../src/monorepo_scripts/postpublish.ts | 8 - .../src/monorepo_scripts/stage_docs.ts | 8 - 67 files changed, 400 insertions(+), 705 deletions(-) delete mode 100644 packages/0x.js/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/0x.js/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/abi-gen/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/assert/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/base-contract/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/connect/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/connect/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/contract-wrappers/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/dev-utils/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/ethereum-types/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/ethereum-types/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/fill-scenarios/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/json-schemas/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/json-schemas/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/migrations/src/monorepo_scripts/postpublish.ts create mode 100644 packages/monorepo-scripts/src/doc_generate_and_upload.ts delete mode 100644 packages/monorepo-scripts/src/postpublish_utils.ts delete mode 100644 packages/order-utils/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/order-utils/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/order-watcher/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/react-docs/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/react-shared/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/sol-compiler/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/sol-compiler/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/sol-cov/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/sol-cov/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/sol-resolver/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/sra-report/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/subproviders/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/subproviders/src/monorepo_scripts/stage_docs.ts delete mode 100644 packages/tslint-config/monorepo_scripts/globals.d.ts delete mode 100644 packages/tslint-config/monorepo_scripts/postpublish.ts delete mode 100644 packages/types/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/typescript-typings/monorepo_scripts/globals.d.ts delete mode 100644 packages/typescript-typings/monorepo_scripts/postpublish.ts delete mode 100644 packages/utils/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/web3-wrapper/src/monorepo_scripts/postpublish.ts delete mode 100644 packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts diff --git a/package.json b/package.json index 438fe5b68..5f50e58b6 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "rebuild": "run-s clean build", "rebuild:no_website": "run-s clean build:no_website", "test": "wsrun test $PKG --fast-exit --serial --exclude-missing", - "stage_docs": "wsrun docs:stage $PKG --fast-exit --parallel --exclude-missing", + "generate_docs": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js", "lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing", "comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete." }, diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 3b92752e1..16040cf26 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -16,7 +16,7 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", - "build": "yarn pre_build && yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "build": "yarn pre_build && yarn build:all", "build:all": "run-p build:umd:prod build:commonjs; exit 0;", "pre_build": "run-s update_artifacts generate_contract_wrappers", "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", @@ -28,14 +28,11 @@ "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers", + "clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && yarn copy_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "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:stage": "node scripts/stage_docs.js", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "contracts": "ZRXToken", @@ -44,22 +41,7 @@ "packages/0x.js/_bundles/index.js", "packages/0x.js/_bundles/index.min.js" ], - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts", - "../contract-wrappers/src/types.ts", - "../contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts", - "../contract-wrappers/src/contract_wrappers/exchange_wrapper.ts", - "../contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts", - "../contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts", - "../contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts", - "../contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts", - "../order-watcher/src/order_watcher/order_watcher.ts" - ], - "s3BucketPath": "s3://doc-jsons/0x.js/", - "s3StagingBucketPath": "s3://staging-doc-jsons/0x.js/" - } + "shouldPublishDocs": true } }, "repository": { @@ -71,7 +53,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/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", diff --git a/packages/0x.js/src/monorepo_scripts/postpublish.ts b/packages/0x.js/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/0x.js/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/0x.js/src/monorepo_scripts/stage_docs.ts b/packages/0x.js/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/0x.js/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index 2732cdb64..99234204c 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -10,14 +10,13 @@ "scripts": { "watch_without_deps": "tsc -w", "lint": "tslint --project .", - "clean": "shx rm -rf lib scripts", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", + "clean": "shx rm -rf lib", + "build": "tsc", "test": "yarn run_mocha", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:circleci": "yarn test:coverage", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info" }, "bin": { "abi-gen": "bin/abi-gen.js" @@ -46,7 +45,6 @@ "yargs": "^10.0.3" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/glob": "5.0.35", "@types/handlebars": "^4.0.36", diff --git a/packages/abi-gen/src/monorepo_scripts/postpublish.ts b/packages/abi-gen/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/abi-gen/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/assert/package.json b/packages/assert/package.json index 27fd51923..a54ca9651 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -9,16 +9,15 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib test_temp scripts", + "build": "tsc", + "clean": "shx rm -rf lib test_temp", "lint": "tslint --project .", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "test:circleci": "yarn test:coverage", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "test:circleci": "yarn test:coverage" }, "license": "Apache-2.0", "repository": { @@ -30,7 +29,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", diff --git a/packages/assert/src/monorepo_scripts/postpublish.ts b/packages/assert/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/assert/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/base-contract/package.json b/packages/base-contract/package.json index 7ac629bbf..74a83664f 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -9,16 +9,15 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", + "build": "tsc", + "clean": "shx rm -rf lib", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "lint": "tslint --project . --exclude **/src/contract_wrappers/**/*", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "lint": "tslint --project . --exclude **/src/contract_wrappers/**/*" }, "license": "Apache-2.0", "repository": { @@ -30,7 +29,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "chai": "^4.0.1", diff --git a/packages/base-contract/src/monorepo_scripts/postpublish.ts b/packages/base-contract/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/base-contract/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/connect/package.json b/packages/connect/package.json index 57bd27c5e..423fada00 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -16,8 +16,8 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib test_temp scripts", + "build": "tsc", + "clean": "shx rm -rf lib test_temp", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "lint": "tslint --project .", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", @@ -26,18 +26,12 @@ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { "assets": [], - "docPublishConfigs": { - "s3BucketPath": "s3://doc-jsons/connect/", - "s3StagingBucketPath": "s3://staging-doc-jsons/connect/" - } + "shouldPublishDocs": true } }, "repository": { @@ -62,7 +56,6 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/fetch-mock": "^5.12.2", "@types/lodash": "4.14.104", @@ -82,7 +75,7 @@ "nyc": "^11.0.1", "shx": "^0.2.2", "tslint": "5.11.0", - "typedoc": "~0.8.0", + "typedoc": "0xProject/typedoc", "typescript": "2.7.1" }, "publishConfig": { diff --git a/packages/connect/src/monorepo_scripts/postpublish.ts b/packages/connect/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/connect/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/connect/src/monorepo_scripts/stage_docs.ts b/packages/connect/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/connect/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); 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); diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 2c7c53194..24d5c4c05 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -9,16 +9,15 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "build": "tsc", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf lib scripts", - "lint": "tslint --project .", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "clean": "shx rm -rf lib", + "lint": "tslint --project ." }, "license": "Apache-2.0", "repository": { @@ -30,7 +29,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", diff --git a/packages/dev-utils/src/monorepo_scripts/postpublish.ts b/packages/dev-utils/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/dev-utils/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/ethereum-types/package.json b/packages/ethereum-types/package.json index 7ed99d419..a09c66085 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -9,20 +9,15 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", + "build": "tsc", + "clean": "shx rm -rf lib", "lint": "tslint --project .", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { - "docPublishConfigs": { - "s3BucketPath": "s3://doc-jsons/ethereum-types/", - "s3StagingBucketPath": "s3://staging-doc-jsons/ethereum-types/" - } + "assets": [], + "shouldPublishDocs": true } }, "license": "Apache-2.0", @@ -35,7 +30,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/ethereum-types/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "copyfiles": "^1.2.0", "make-promises-safe": "^1.1.0", diff --git a/packages/ethereum-types/src/monorepo_scripts/postpublish.ts b/packages/ethereum-types/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/ethereum-types/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/ethereum-types/src/monorepo_scripts/stage_docs.ts b/packages/ethereum-types/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/ethereum-types/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 281575107..5cf221b2e 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -6,14 +6,13 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", - "build": "yarn pre_build && tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", + "build": "yarn pre_build && tsc", "pre_build": "run-s update_artifacts generate_contract_wrappers", "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json lib/artifacts; done;", "generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts src/generated_contract_wrappers", - "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "clean": "shx rm -rf lib src/generated_contract_wrappers", + "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*" }, "config": { "contracts": "Exchange DummyERC20Token DummyERC721Token" @@ -29,7 +28,6 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md", "devDependencies": { "@0xproject/abi-gen": "^1.0.4", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/sol-compiler": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", diff --git a/packages/fill-scenarios/src/monorepo_scripts/postpublish.ts b/packages/fill-scenarios/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/fill-scenarios/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/json-schemas/package.json b/packages/json-schemas/package.json index 4793fc0d5..72db8c649 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -16,24 +16,14 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test_temp scripts", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "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", - "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" + "clean": "shx rm -rf lib test_temp", + "build": "tsc", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { "assets": [], - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/json-schemas/", - "s3StagingBucketPath": "s3://staging-doc-jsons/json-schemas/" - } + "shouldPublishDocs": true } }, "repository": { @@ -53,7 +43,6 @@ "lodash.values": "^4.3.0" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@0xproject/utils": "^1.0.4", "@types/lodash.foreach": "^4.5.3", diff --git a/packages/json-schemas/src/monorepo_scripts/postpublish.ts b/packages/json-schemas/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/json-schemas/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/json-schemas/src/monorepo_scripts/stage_docs.ts b/packages/json-schemas/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/json-schemas/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 0a1186f6a..02111d22d 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -9,8 +9,7 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", - "build": "yarn pre_build && tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js", + "build": "yarn pre_build && tsc", "pre_build": "run-s copy_artifacts generate_contract_wrappers", "copy_artifacts": "copyfiles 'artifacts/**/*' ./lib", "clean": "shx rm -rf lib src/contract_wrappers", @@ -40,7 +39,6 @@ "devDependencies": { "@0xproject/abi-gen": "^1.0.4", "@0xproject/dev-utils": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@0xproject/types": "^1.0.1-rc.3", "@types/yargs": "^10.0.0", diff --git a/packages/migrations/src/monorepo_scripts/postpublish.ts b/packages/migrations/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/migrations/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/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 128bdcff5..24f1607c0 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -17,7 +17,8 @@ "script:deps_versions": "node ./lib/deps_versions.js", "script:prepublish_checks": "node ./lib/prepublish_checks.js", "script:publish": "IS_DRY_RUN=true node ./lib/publish.js", - "script:find_unused_deps": "node ./lib/find_unused_dependencies.js" + "script:find_unused_deps": "node ./lib/find_unused_dependencies.js", + "script:doc_generate_and_upload": "node ./lib/doc_generate_and_upload.js" }, "repository": { "type": "git", @@ -38,8 +39,7 @@ "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", "shx": "^0.2.2", - "tslint": "5.11.0", - "typescript": "2.7.1" + "tslint": "5.11.0" }, "dependencies": { "@lerna/batch-packages": "^3.0.0-beta.18", @@ -58,7 +58,9 @@ "rimraf": "^2.6.2", "semver": "5.5.0", "semver-diff": "^2.1.0", - "semver-sort": "0.0.4" + "semver-sort": "0.0.4", + "typedoc": "0xProject/typedoc", + "typescript": "2.7.1" }, "publishConfig": { "access": "public" diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts new file mode 100644 index 000000000..b6a4801e3 --- /dev/null +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -0,0 +1,215 @@ +import { readFileSync, writeFileSync } from 'fs'; +import * as _ from 'lodash'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; +import * as ts from 'typescript'; +import * as yargs from 'yargs'; + +import { constants } from './constants'; +import { utils } from './utils/utils'; + +export interface ExportPathToExportedItems { + [pkgName: string]: string[]; +} + +const args = yargs + .option('package', { + describe: 'Monorepo sub-package for which to generate DocJSON', + type: 'string', + demandOption: true, + }) + .option('isStaging', { + describe: 'Whether we with to publish docs to staging or production', + type: 'boolean', + demandOption: true, + }) + .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; + +(async () => { + const packageName = args.package; + const isStaging = args.isStaging; + + await generateAndUploadDocsAsync(packageName, isStaging); +})(); + +export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { + const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; + const indexPath = `${pathToPackage}/src/index.ts`; + const exportPathToExportedItems = getExportPathToExportedItems(indexPath); + + const monorepoPackages = utils.getPackages(constants.monorepoRootPath); + const pkg = _.find(monorepoPackages, monorepoPackage => { + return _.includes(monorepoPackage.packageJson.name, packageName); + }); + if (_.isUndefined(pkg)) { + throw new Error(`Couldn't find a package.json for ${packageName}`); + } + + const packageJson = pkg.packageJson; + const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); + if (!shouldPublishDocs) { + utils.log( + `GENERATE_UPLOAD_DOCS: ${ + packageJson.name + } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, + ); + return; + } + + const pkgNameToPath: { [name: string]: string } = {}; + _.each(monorepoPackages, pkg => { + pkgNameToPath[pkg.packageJson.name] = pkg.location; + }); + + // For each dep that is another one of our monorepo packages, we fetch it's index.ts + // and see which specific files we must pass to TypeDoc. + let typeDocExtraFileIncludes: string[] = []; + _.each(exportPathToExportedItems, (exportedItems, exportPath) => { + const isInternalToPkg = _.startsWith(exportPath, '.'); + if (isInternalToPkg) { + const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); + typeDocExtraFileIncludes.push(pathToInternalPkg); + } + const pathIfExists = pkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + const typeDocSourceIncludes = new Set(); + const pathToIndex = `${pathIfExists}/src/index.ts`; + const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); + _.each(exportedItems, exportName => { + _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { + if (!_.startsWith(innerExportPath, './')) { + // noop. Not an internal export... but rather an external one. Should we follow it? + return; + } + if (_.includes(innerExportItems, exportName)) { + const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); + typeDocSourceIncludes.add(absoluteSrcPath); + } + }); + }); + // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types + // directly, meaning no internal paths will exist to follow. This, we add the index file. + // TODO: Maybe we should add the index for all packages? + if (typeDocSourceIncludes.size === 0) { + typeDocSourceIncludes.add(pathToIndex); + } + typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; + }); + + // Generate Typedoc JSON file + const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); + const projectFiles = typeDocExtraFileIncludes.join(' '); + const cwd = path.join(constants.monorepoRootPath, 'packages/0x.js/'); + // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the + // packages root dir, does not work. It only works when called via a `package.json` script located + // in the packages root. + await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { + cwd, + }); + + // For each entry, see if it was exported in index.ts. If not, remove it. + const typedocOutputString = readFileSync(jsonFilePath).toString(); + const typedocOutput = JSON.parse(typedocOutputString); + const finalTypeDocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (file, i) => { + const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); + // Map file "name" to exportPath... HOW?! + _.each(file.children, (child, j) => { + if (!_.includes(exportItems, child.name)) { + delete finalTypeDocOutput.children[i].children[j]; + } + }); + finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); + }); + // Write modified TypeDoc JSON, without all the unexported stuff + writeFileSync(jsonFilePath, JSON.stringify(finalTypeDocOutput, null, 2)); + + const fileName = `v${packageJson.version}.json`; + utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); + const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; + const s3Url = `${S3BucketPath}${fileName}`; + await execAsync( + `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, + { + cwd, + }, + ); + utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); + // Remove the generated docs directory + await execAsync(`rm -rf ${jsonFilePath}`, { + cwd, + }); +} + +function findExportItemsGivenTypedocName( + exportPathToExportedItems: ExportPathToExportedItems, + packageName: string, + typedocName: string, +): string[] { + const typeDocNameWithoutQuotes = _.replace(typedocName, '"', ''); + const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; + const exportPaths = _.keys(exportPathToExportedItems); + const sanitizedExportPaths = _.map(exportPaths, exportPath => { + if (_.startsWith(exportPath, './')) { + const sanitizedExportPath = path.join(packageName, 'src', exportPath); + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + const monorepoPrefix = '@0xproject/'; + if (_.startsWith(exportPath, monorepoPrefix)) { + const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + sanitizedExportPathToExportPath[exportPath] = exportPath; + return exportPath; + }); + const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPaths, p => { + return _.startsWith(typeDocNameWithoutQuotes, p); + }); + if (_.isUndefined(matchingSanitizedExportPathIfExists)) { + throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); + } + const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; + return exportPathToExportedItems[matchingExportPath]; +} + +function getExportPathToExportedItems(pkgPath: string): ExportPathToExportedItems { + const sourceFile = ts.createSourceFile( + 'indexFile', + readFileSync(pkgPath).toString(), + ts.ScriptTarget.ES2017, + /*setParentNodes */ true, + ); + const exportPathToExportedItems = _getExportPathToExportedItems(sourceFile); + return exportPathToExportedItems; +} + +function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedItems { + const exportPathToExportedItems: ExportPathToExportedItems = {}; + processNode(sf); + + function processNode(node: ts.Node): void { + switch (node.kind) { + case ts.SyntaxKind.ExportDeclaration: + // console.log(node); + const exportClause = (node as any).exportClause; + const pkgName = exportClause.parent.moduleSpecifier.text; + _.each(exportClause.elements, element => { + exportPathToExportedItems[pkgName] = _.isUndefined(exportPathToExportedItems[pkgName]) + ? [element.name.escapedText] + : [...exportPathToExportedItems[pkgName], element.name.escapedText]; + }); + break; + + default: + // noop + break; + } + + ts.forEachChild(node, processNode); + } + return exportPathToExportedItems; +} diff --git a/packages/monorepo-scripts/src/index.ts b/packages/monorepo-scripts/src/index.ts index 95c96ebe8..e69de29bb 100644 --- a/packages/monorepo-scripts/src/index.ts +++ b/packages/monorepo-scripts/src/index.ts @@ -1 +0,0 @@ -export { postpublishUtils } from './postpublish_utils'; diff --git a/packages/monorepo-scripts/src/postpublish_utils.ts b/packages/monorepo-scripts/src/postpublish_utils.ts deleted file mode 100644 index 8e445a045..000000000 --- a/packages/monorepo-scripts/src/postpublish_utils.ts +++ /dev/null @@ -1,202 +0,0 @@ -import { execAsync } from 'async-child-process'; -import * as promisify from 'es6-promisify'; -import * as fs from 'fs'; -import * as _ from 'lodash'; -import * as path from 'path'; -import * as publishRelease from 'publish-release'; - -import { constants } from './constants'; -import { configs } from './utils/configs'; -import { utils } from './utils/utils'; - -const publishReleaseAsync = promisify(publishRelease); -const generatedDocsDirectoryName = 'generated_docs'; - -export interface PostpublishConfigs { - cwd: string; - packageName: string; - version: string; - assets: string[]; - docPublishConfigs: DocPublishConfigs; -} - -export interface DocPublishConfigs { - fileIncludes: string[]; - s3BucketPath: string; - s3StagingBucketPath: string; -} - -export const postpublishUtils = { - generateConfig(packageJSON: any, tsConfigJSON: any, cwd: string): PostpublishConfigs { - if (_.isUndefined(packageJSON.name)) { - throw new Error('name field required in package.json. Cannot publish release notes to Github.'); - } - if (_.isUndefined(packageJSON.version)) { - throw new Error('version field required in package.json. Cannot publish release notes to Github.'); - } - const postpublishConfig = _.get(packageJSON, 'config.postpublish', {}); - const postpublishConfigs: PostpublishConfigs = { - cwd, - packageName: packageJSON.name, - version: packageJSON.version, - assets: _.get(postpublishConfig, 'assets', []), - docPublishConfigs: { - fileIncludes: [ - ...tsConfigJSON.include, - ..._.get(postpublishConfig, 'docPublishConfigs.extraFileIncludes', []), - ], - s3BucketPath: _.get(postpublishConfig, 'docPublishConfigs.s3BucketPath'), - s3StagingBucketPath: _.get(postpublishConfig, 'docPublishConfigs.s3StagingBucketPath'), - }, - }; - return postpublishConfigs; - }, - async runAsync(packageJSON: any, tsConfigJSON: any, cwd: string): Promise<void> { - if (configs.IS_LOCAL_PUBLISH) { - return; - } - const postpublishConfigs = postpublishUtils.generateConfig(packageJSON, tsConfigJSON, cwd); - await postpublishUtils.publishReleaseNotesAsync( - postpublishConfigs.packageName, - postpublishConfigs.version, - postpublishConfigs.assets, - ); - if ( - !_.isUndefined(postpublishConfigs.docPublishConfigs.s3BucketPath) || - !_.isUndefined(postpublishConfigs.docPublishConfigs.s3StagingBucketPath) - ) { - utils.log('POSTPUBLISH: Release successful, generating docs...'); - await postpublishUtils.generateAndUploadDocsAsync( - postpublishConfigs.cwd, - postpublishConfigs.docPublishConfigs.fileIncludes, - postpublishConfigs.version, - postpublishConfigs.docPublishConfigs.s3BucketPath, - ); - } else { - utils.log(`POSTPUBLISH: No S3Bucket config found for ${packageJSON.name}. Skipping doc JSON generation.`); - } - }, - async publishDocsToStagingAsync(packageJSON: any, tsConfigJSON: any, cwd: string): Promise<void> { - const postpublishConfigs = postpublishUtils.generateConfig(packageJSON, tsConfigJSON, cwd); - if (_.isUndefined(postpublishConfigs.docPublishConfigs.s3StagingBucketPath)) { - utils.log('config.postpublish.docPublishConfigs.s3StagingBucketPath entry in package.json not found!'); - return; - } - - utils.log('POSTPUBLISH: Generating docs...'); - await postpublishUtils.generateAndUploadDocsAsync( - postpublishConfigs.cwd, - postpublishConfigs.docPublishConfigs.fileIncludes, - postpublishConfigs.version, - postpublishConfigs.docPublishConfigs.s3StagingBucketPath, - ); - }, - async publishReleaseNotesAsync(packageName: string, version: string, assets: string[]): Promise<void> { - const notes = postpublishUtils.getReleaseNotes(packageName, version); - const releaseName = postpublishUtils.getReleaseName(packageName, version); - const tag = postpublishUtils.getTag(packageName, version); - postpublishUtils.adjustAssetPaths(assets); - utils.log('POSTPUBLISH: Releasing ', releaseName, '...'); - await publishReleaseAsync({ - token: constants.githubPersonalAccessToken, - owner: '0xProject', - repo: '0x-monorepo', - tag, - name: releaseName, - notes, - draft: false, - prerelease: false, - reuseRelease: true, - reuseDraftOnly: false, - assets, - }); - }, - getReleaseNotes(packageName: string, version: string): string { - const packageNameWithNamespace = packageName.replace('@0xproject/', ''); - const changelogJSONPath = path.join( - constants.monorepoRootPath, - 'packages', - packageNameWithNamespace, - 'CHANGELOG.json', - ); - const changelogJSON = fs.readFileSync(changelogJSONPath, 'utf-8'); - const changelogs = JSON.parse(changelogJSON); - const latestLog = changelogs[0]; - // We sanity check that the version for the changelog notes we are about to publish to Github - // correspond to the new version of the package. - if (version !== latestLog.version) { - throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); - } - let notes = ''; - _.each(latestLog.changes, change => { - notes += `* ${change.note}`; - if (change.pr) { - notes += ` (#${change.pr})`; - } - notes += `\n`; - }); - return notes; - }, - getTag(packageName: string, version: string): string { - return `${packageName}@${version}`; - }, - getReleaseName(subPackageName: string, version: string): string { - const releaseName = `${subPackageName} v${version}`; - return releaseName; - }, - // Asset paths should described from the monorepo root. This method prefixes - // the supplied path with the absolute path to the monorepo root. - adjustAssetPaths(assets: string[]): string[] { - const finalAssets: string[] = []; - _.each(assets, (asset: string) => { - finalAssets.push(`${constants.monorepoRootPath}/${asset}`); - }); - return finalAssets; - }, - adjustFileIncludePaths(fileIncludes: string[], cwd: string): string[] { - const fileIncludesAdjusted = _.map(fileIncludes, fileInclude => { - let includePath = _.startsWith(fileInclude, './') - ? `${cwd}/${fileInclude.substr(2)}` - : `${cwd}/${fileInclude}`; - - // HACK: tsconfig.json needs wildcard directory endings as `/**/*` - // but TypeDoc needs it as `/**` in order to pick up files at the root - if (_.endsWith(includePath, '/**/*')) { - // tslint:disable-next-line:custom-no-magic-numbers - includePath = includePath.slice(0, -2); - } - return includePath; - }); - return fileIncludesAdjusted; - }, - async generateAndUploadDocsAsync( - cwd: string, - fileIncludes: string[], - version: string, - S3BucketPath: string, - ): Promise<void> { - const fileIncludesAdjusted = postpublishUtils.adjustFileIncludePaths(fileIncludes, cwd); - const projectFiles = fileIncludesAdjusted.join(' '); - const jsonFilePath = `${cwd}/${generatedDocsDirectoryName}/index.json`; - const result = await execAsync( - `JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, - { - cwd, - }, - ); - if (!_.isEmpty(result.stderr)) { - throw new Error(result.stderr); - } - const fileName = `v${version}.json`; - utils.log(`POSTPUBLISH: Doc generation successful, uploading docs... as ${fileName}`); - const s3Url = S3BucketPath + fileName; - await execAsync(`S3_URL=${s3Url} yarn upload_docs_json`, { - cwd, - }); - // Remove the generated docs directory - await execAsync(`rm -rf ${generatedDocsDirectoryName}`, { - cwd, - }); - utils.log(`POSTPUBLISH: Docs uploaded to S3 bucket: ${S3BucketPath}`); - }, -}; diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 5992131db..7444c64b1 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -8,12 +8,16 @@ import { exec as execAsync } from 'promisify-child-process'; import * as prompt from 'prompt'; import semver = require('semver'); import semverSort = require('semver-sort'); +import * as publishRelease from 'publish-release'; + +const publishReleaseAsync = promisify(publishRelease); import { constants } from './constants'; import { Package, PackageToNextVersion, VersionChangelog } from './types'; import { changelogUtils } from './utils/changelog_utils'; import { configs } from './utils/configs'; import { utils } from './utils/utils'; +import { generateAndUploadDocsAsync } from './doc_generate_and_upload'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; @@ -70,15 +74,27 @@ const packageNameToWebsitePath: { [name: string]: string } = { }); utils.log(`Calling 'lerna publish'...`); await lernaPublishAsync(packageToNextVersion); + const isStaging = false; + await generateAndUploadDocJsonsAsync(updatedPublicPackages, isStaging); + await publishReleaseNotesAsync(updatedPublicPackages); })().catch(err => { utils.log(err); process.exit(1); }); +async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean) { + for (const pkg of updatedPublicPackages) { + const packageName = pkg.packageJson.name; + const nameWithoutPrefix = packageName.replace('@0xproject/', ''); + await generateAndUploadDocsAsync(nameWithoutPrefix, isStaging); + } +} + async function confirmDocPagesRenderAsync(packages: Package[]): Promise<void> { // push docs to staging utils.log("Upload all docJson's to S3 staging..."); - await execAsync(`yarn stage_docs`, { cwd: constants.monorepoRootPath }); + const isStaging = true; + await generateAndUploadDocJsonsAsync(packages, isStaging); // deploy website to staging utils.log('Deploy website to staging...'); @@ -178,6 +194,86 @@ async function updateChangeLogsAsync(updatedPublicPackages: Package[]): Promise< return packageToNextVersion; } +async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { + // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) + const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); + const latestGitCommit = result.stdout; + const shortenedGitCommit = latestGitCommit.slice(0, 7); + const tagName = `monorepo@${shortenedGitCommit}`; + // TODO: We might need to handle the case where the tag already exists locally + await execAsync('git tag ${tagName}'); + await execAsync('git push origin ${tagName}'); + const releaseName = `0x monorepo - ${shortenedGitCommit}`; + + let assets: string[] = []; + let aggregateNotes = ''; + _.each(updatedPublishPackages, pkg => { + const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); + aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; + + const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); + if (!_.isUndefined(packageAssets)) { + assets = [...assets, ...packageAssets]; + } + }); + adjustAssetPaths(assets); + + utils.log('PUBLISH: Releasing ', releaseName, '...'); + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 + await publishReleaseAsync({ + token: constants.githubPersonalAccessToken, + owner: '0xProject', + tag: tagName, + repo: '0x-monorepo', + name: releaseName, + notes: aggregateNotes, + draft: false, + prerelease: false, + reuseRelease: true, + reuseDraftOnly: false, + assets, + }); +} + +// Asset paths should described from the monorepo root. This method prefixes +// the supplied path with the absolute path to the monorepo root. +function adjustAssetPaths(assets: string[]): string[] { + const finalAssets: string[] = []; + _.each(assets, (asset: string) => { + finalAssets.push(`${constants.monorepoRootPath}/${asset}`); + }); + return finalAssets; +} + +function getReleaseNotesForPackage(packageName: string, version: string): string { + const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); + const changelogJSONPath = path.join( + constants.monorepoRootPath, + 'packages', + packageNameWithoutNamespace, + 'CHANGELOG.json', + ); + const changelogJSON = fs.readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + // We sanity check that the version for the changelog notes we are about to publish to Github + // correspond to the new version of the package. + if (version !== latestLog.version) { + throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); + } + let notes = ''; + _.each(latestLog.changes, change => { + notes += `* ${change.note}`; + if (change.pr) { + notes += ` (#${change.pr})`; + } + notes += `\n`; + }); + return notes; +} + async function lernaPublishAsync(packageToNextVersion: { [name: string]: string }): Promise<void> { const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index cab917a82..21575162c 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -9,10 +9,9 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", - "build": "run-s pre_build transpile copy_monorepo_scripts", + "build": "run-s pre_build transpile", "pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 generate_contract_wrappers", "transpile": "tsc", - "copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator|DummyERC20Token|ERC20Proxy|ERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "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 lib/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 lib/src/artifacts; done;", @@ -22,25 +21,16 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf lib scripts lib/src/artifacts src/generated_contract_wrappers", + "clean": "shx rm -rf lib lib/src/artifacts src/generated_contract_wrappers", "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "contracts_v2_beta": "IWallet IValidator Exchange ERC20Proxy ERC20Token", "contracts_v2": "DummyERC20Token", "postpublish": { - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/order-utils/", - "s3StagingBucketPath": "s3://staging-doc-jsons/order-utils/" - } + "assets": [], + "shouldPublishDocs": true } }, "license": "Apache-2.0", @@ -54,7 +44,6 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { "@0xproject/dev-utils": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", diff --git a/packages/order-utils/src/monorepo_scripts/postpublish.ts b/packages/order-utils/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/order-utils/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-utils/src/monorepo_scripts/stage_docs.ts b/packages/order-utils/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/order-utils/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index e4226f017..2b7507f02 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,9 +24,8 @@ "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", - "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/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" }, "config": { "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token" @@ -43,7 +42,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/tslint-config": "^1.0.4", "@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/react-docs/package.json b/packages/react-docs/package.json index 1028f7fd6..e8db040be 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -9,10 +9,9 @@ "types": "lib/index.d.ts", "scripts": { "lint": "tslint --project .", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", + "build": "tsc", "watch_without_deps": "tsc -w", - "clean": "shx rm -rf lib scripts", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "clean": "shx rm -rf lib" }, "author": "Fabio Berger", "license": "Apache-2.0", @@ -26,7 +25,6 @@ }, "devDependencies": { "@0xproject/dev-utils": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/compare-versions": "^3.0.0", "copyfiles": "^1.2.0", diff --git a/packages/react-docs/src/monorepo_scripts/postpublish.ts b/packages/react-docs/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/react-docs/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/react-shared/package.json b/packages/react-shared/package.json index bb9211752..6b4501e83 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -9,10 +9,9 @@ "types": "lib/index.d.ts", "scripts": { "lint": "tslint --project .", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", + "build": "tsc", "watch_without_deps": "tsc -w", - "clean": "shx rm -rf lib scripts", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "clean": "shx rm -rf lib" }, "author": "Fabio Berger", "license": "Apache-2.0", @@ -26,7 +25,6 @@ }, "devDependencies": { "@0xproject/dev-utils": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "copyfiles": "^1.2.0", "make-promises-safe": "^1.1.0", diff --git a/packages/react-shared/src/monorepo_scripts/postpublish.ts b/packages/react-shared/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/react-shared/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/sol-compiler/package.json b/packages/sol-compiler/package.json index c03477544..b0dfa455f 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -9,7 +9,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_contract_fixtures", "update_contract_fixtures": "copyfiles 'test/fixtures/contracts/**/*' ./lib", "test": "yarn run_mocha", @@ -17,26 +17,16 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf lib scripts", + "clean": "shx rm -rf lib", "migrate": "npm run build; node lib/src/cli.js migrate", "lint": "tslint --project .", "test:circleci": "yarn test:coverage", - "docs:stage": "node scripts/stage_docs.js", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js", - "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { "assets": [], - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/sol-compiler/", - "s3StagingBucketPath": "s3://staging-doc-jsons/sol-compiler/" - } + "shouldPublishDocs": true } }, "bin": { @@ -54,7 +44,6 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { "@0xproject/dev-utils": "^1.0.3", - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", diff --git a/packages/sol-compiler/src/monorepo_scripts/postpublish.ts b/packages/sol-compiler/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/sol-compiler/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/sol-compiler/src/monorepo_scripts/stage_docs.ts b/packages/sol-compiler/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/sol-compiler/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index ee87543db..ad6a6a0a2 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -9,7 +9,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 copy_test_fixtures", "lint": "tslint --project .", "test": "run-s compile_test run_mocha", @@ -18,26 +18,15 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib scripts test/fixtures/artifacts src/artifacts", + "clean": "shx rm -rf lib test/fixtures/artifacts src/artifacts", "copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib", "compile_test": "sol-compiler compile", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { "assets": [], - "docPublishConfigs": { - "extraFileIncludes": [ - "../subproviders/src/types.ts", - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/sol-cov/", - "s3StagingBucketPath": "s3://staging-doc-jsons/sol-cov/" - } + "shouldPublishDocs": true } }, "repository": { @@ -69,7 +58,6 @@ "solidity-parser-antlr": "^0.2.12" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/istanbul": "^0.4.30", "@types/loglevel": "^1.5.3", diff --git a/packages/sol-cov/src/monorepo_scripts/postpublish.ts b/packages/sol-cov/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/sol-cov/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/sol-cov/src/monorepo_scripts/stage_docs.ts b/packages/sol-cov/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/sol-cov/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json index dd5915237..908417659 100644 --- a/packages/sol-resolver/package.json +++ b/packages/sol-resolver/package.json @@ -9,10 +9,9 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", - "lint": "tslint --project .", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project ." }, "repository": { "type": "git", @@ -24,7 +23,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/resolver/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "copyfiles": "^1.2.0", "make-promises-safe": "^1.1.0", diff --git a/packages/sol-resolver/src/monorepo_scripts/postpublish.ts b/packages/sol-resolver/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/sol-resolver/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/sra-report/package.json b/packages/sra-report/package.json index 57e91a93c..8749384ee 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -9,8 +9,8 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "clean": "shx rm -rf lib scripts", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "clean": "shx rm -rf lib", + "build": "tsc", "lint": "tslint --project .", "test:circleci": "yarn test:coverage", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", @@ -20,7 +20,6 @@ "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" }, "bin": { "sra-report": "bin/sra-report.js" @@ -48,7 +47,6 @@ "yargs": "^10.0.3" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.48", diff --git a/packages/sra-report/src/monorepo_scripts/postpublish.ts b/packages/sra-report/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/sra-report/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/subproviders/package.json b/packages/subproviders/package.json index 5e0153765..ad8ab9d29 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -9,8 +9,8 @@ "license": "Apache-2.0", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", + "build": "tsc", + "clean": "shx rm -rf lib", "lint": "tslint --project .", "run_mocha_unit": "mocha --require source-map-support/register --require make-promises-safe lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", "run_mocha_integration": "mocha --require source-map-support/register --require make-promises-safe lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", @@ -21,22 +21,12 @@ "test:all": "run-s test:unit test:integration", "test:unit": "run-s clean build run_mocha_unit", "test:integration": "run-s clean build run_mocha_integration", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { "assets": [], - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/subproviders/", - "s3StagingBucketPath": "s3://staging-doc-jsons/subproviders/" - } + "shouldPublishDocs": true } }, "dependencies": { @@ -62,7 +52,6 @@ "web3-provider-engine": "14.0.6" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/bip39": "^2.4.0", "@types/bn.js": "^4.11.0", diff --git a/packages/subproviders/src/monorepo_scripts/postpublish.ts b/packages/subproviders/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/subproviders/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/subproviders/src/monorepo_scripts/stage_docs.ts b/packages/subproviders/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/subproviders/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); diff --git a/packages/tslint-config/monorepo_scripts/globals.d.ts b/packages/tslint-config/monorepo_scripts/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/tslint-config/monorepo_scripts/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/tslint-config/monorepo_scripts/postpublish.ts b/packages/tslint-config/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/tslint-config/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/tslint-config/package.json b/packages/tslint-config/package.json index f6fdb3649..10b82aaf1 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -8,10 +8,9 @@ "main": "tslint.json", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", - "lint": "tslint --project .", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project ." }, "repository": { "type": "git", @@ -34,7 +33,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/tslint-config/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@types/lodash": "4.14.104", "copyfiles": "^1.2.0", "make-promises-safe": "^1.1.0", diff --git a/packages/types/package.json b/packages/types/package.json index d2fefa136..88fa2b95a 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,10 +9,9 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", - "lint": "tslint --project .", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project ." }, "license": "Apache-2.0", "repository": { @@ -24,7 +23,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "copyfiles": "^1.2.0", "make-promises-safe": "^1.1.0", diff --git a/packages/types/src/monorepo_scripts/postpublish.ts b/packages/types/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/types/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/typescript-typings/monorepo_scripts/globals.d.ts b/packages/typescript-typings/monorepo_scripts/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/typescript-typings/monorepo_scripts/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/typescript-typings/monorepo_scripts/postpublish.ts b/packages/typescript-typings/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/typescript-typings/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/typescript-typings/package.json b/packages/typescript-typings/package.json index 34f2a224a..32235accb 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -7,9 +7,7 @@ "description": "0x project typescript type definitions", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 1 './lib/**/*' ./scripts", - "clean": "shx rm -rf scripts", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "build": "tsc" }, "repository": { "type": "git", @@ -32,7 +30,6 @@ "popper.js": "1.14.3" }, "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "copyfiles": "^1.2.0", "shx": "^0.2.2" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index b1a0d8eb9..b2ce9a17e 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -9,10 +9,9 @@ "types": "lib/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", - "lint": "tslint --project .", - "manual:postpublish": "yarn build; node ./scripts/postpublish.js" + "build": "tsc", + "clean": "shx rm -rf lib", + "lint": "tslint --project ." }, "license": "Apache-2.0", "repository": { @@ -24,7 +23,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/utils/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "copyfiles": "^1.2.0", diff --git a/packages/utils/src/monorepo_scripts/postpublish.ts b/packages/utils/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/utils/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/web3-wrapper/package.json b/packages/web3-wrapper/package.json index d0f55c905..42f17aaac 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -9,8 +9,8 @@ "types": "lib/src/index.d.ts", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "clean": "shx rm -rf lib scripts", + "build": "tsc", + "clean": "shx rm -rf lib", "lint": "tslint --project .", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", @@ -18,21 +18,12 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "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", - "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" + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { "postpublish": { - "docPublishConfigs": { - "extraFileIncludes": [ - "../types/src/index.ts", - "../ethereum-types/src/index.ts" - ], - "s3BucketPath": "s3://doc-jsons/web3-wrapper/", - "s3StagingBucketPath": "s3://staging-doc-jsons/web3-wrapper/" - } + "assets": [], + "shouldPublishDocs": true } }, "license": "Apache-2.0", @@ -45,7 +36,6 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md", "devDependencies": { - "@0xproject/monorepo-scripts": "^1.0.4", "@0xproject/tslint-config": "^1.0.4", "@types/lodash": "4.14.104", "chai": "^4.0.1", diff --git a/packages/web3-wrapper/src/monorepo_scripts/postpublish.ts b/packages/web3-wrapper/src/monorepo_scripts/postpublish.ts deleted file mode 100644 index dcb99d0f7..000000000 --- a/packages/web3-wrapper/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/web3-wrapper/src/monorepo_scripts/stage_docs.ts b/packages/web3-wrapper/src/monorepo_scripts/stage_docs.ts deleted file mode 100644 index e732ac8eb..000000000 --- a/packages/web3-wrapper/src/monorepo_scripts/stage_docs.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.publishDocsToStagingAsync(packageJSON, tsConfigJSON, cwd); -- cgit v1.2.3 From 4579e1637d9f4d0d7badb23336af6785330c6ecc Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 21:59:09 +0200 Subject: Add missing exports discovered by generating compact typedoc JSON --- packages/order-utils/src/index.ts | 13 ++++++++++++- packages/sol-compiler/src/index.ts | 3 +-- packages/sol-cov/src/index.ts | 2 +- packages/subproviders/src/index.ts | 4 ++++ packages/web3-wrapper/src/index.ts | 14 ++++++++++++++ 5 files changed, 32 insertions(+), 4 deletions(-) diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 76be63bb8..da53f620a 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -13,7 +13,16 @@ export { orderFactory } from './order_factory'; export { constants } from './constants'; export { crypto } from './crypto'; export { generatePseudoRandomSalt } from './salt'; -export { OrderError, MessagePrefixType, MessagePrefixOpts, EIP712Parameter, EIP712Schema, EIP712Types } from './types'; +export { + OrderError, + MessagePrefixType, + MessagePrefixOpts, + EIP712Parameter, + EIP712Schema, + EIP712Types, + TradeSide, + TransferType, +} from './types'; export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher'; export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store'; @@ -24,3 +33,5 @@ export { assetDataUtils } from './asset_data_utils'; export { EIP712Utils } from './eip712_utils'; export { OrderValidationUtils } from './order_validation_utils'; export { ExchangeTransferSimulator } from './exchange_transfer_simulator'; +export { Provider } from 'ethereum-types'; +export { SignedOrder, Order, ECSignature, ERC20AssetData, ERC721AssetData, AssetProxyId } from '@0xproject/types'; diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index 15c166992..de2de796e 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,3 +1,2 @@ export { Compiler } from './compiler'; -export { CompilerOptions } from './utils/types'; -export { ContractArtifact, ContractNetworks } from './utils/types'; +export { CompilerOptions, ContractArtifact, ContractNetworks } from './utils/types'; diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index 003a27374..0e70878ad 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -5,4 +5,4 @@ export { RevertTraceSubprovider } from './revert_trace_subprovider'; export { SolCompilerArtifactAdapter } from './artifact_adapters/sol_compiler_artifact_adapter'; export { TruffleArtifactAdapter } from './artifact_adapters/truffle_artifact_adapter'; export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; -export { ContractData } from './types'; +export { ContractData, TraceInfo, Subtrace, SourceRange, Coverage } from './types'; diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 9d4480e59..905590539 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -26,6 +26,8 @@ export { LedgerEthereumClient, NonceSubproviderErrors, LedgerSubproviderConfigs, + PartialTxParams, + DerivedHDKeyInfo, } from './types'; /** @@ -37,3 +39,5 @@ export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerE const ledgerEthClient = new Eth(ledgerConnection); return ledgerEthClient; } + +export { JSONRPCRequestPayload, Provider } from 'ethereum-types'; diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index 6787e0102..b6d1bf1b2 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -1,2 +1,16 @@ export { Web3Wrapper } from './web3_wrapper'; export { Web3WrapperErrors, NodeType } from './types'; +export { + BlockParam, + TxData, + Provider, + TransactionReceipt, + Transaction, + TraceParams, + TransactionTrace, + BlockWithoutTransactionData, + LogEntry, + FilterObject, + CallData, + TransactionReceiptWithDecodedLogs, +} from 'ethereum-types'; -- cgit v1.2.3 From 9f7479711e64eaedbd23466f946df262f67a5097 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 22:29:56 +0200 Subject: Improve doc gen script --- .../src/doc_generate_and_upload.ts | 32 ++++++++++++---------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index b6a4801e3..592c36ae2 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -19,7 +19,7 @@ const args = yargs demandOption: true, }) .option('isStaging', { - describe: 'Whether we with to publish docs to staging or production', + describe: 'Whether we wish to publish docs to staging or production', type: 'boolean', demandOption: true, }) @@ -65,23 +65,27 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // and see which specific files we must pass to TypeDoc. let typeDocExtraFileIncludes: string[] = []; _.each(exportPathToExportedItems, (exportedItems, exportPath) => { + const pathIfExists = pkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + const isInternalToPkg = _.startsWith(exportPath, '.'); if (isInternalToPkg) { const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); typeDocExtraFileIncludes.push(pathToInternalPkg); } - const pathIfExists = pkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { - return; // It's an external package - } const typeDocSourceIncludes = new Set(); const pathToIndex = `${pathIfExists}/src/index.ts`; const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); _.each(exportedItems, exportName => { _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { if (!_.startsWith(innerExportPath, './')) { - // noop. Not an internal export... but rather an external one. Should we follow it? - return; + throw new Error( + `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting on of ${exportedItems} which is + itself exported from an external package. To fix this, export the external dependency directly, + not indirectly through ${exportPath}.`, + ); } if (_.includes(innerExportItems, exportName)) { const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); @@ -90,21 +94,20 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); }); // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types - // directly, meaning no internal paths will exist to follow. This, we add the index file. - // TODO: Maybe we should add the index for all packages? - if (typeDocSourceIncludes.size === 0) { - typeDocSourceIncludes.add(pathToIndex); - } + // directly, meaning no internal paths will exist to follow. Other packages also have direct exports + // in their index.ts, so we always add it to the source files passed to TypeDoc + typeDocSourceIncludes.add(pathToIndex); + typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; }); // Generate Typedoc JSON file const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages/0x.js/'); + const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the // packages root dir, does not work. It only works when called via a `package.json` script located - // in the packages root. + // in the package's root. await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { cwd, }); @@ -115,7 +118,6 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const finalTypeDocOutput = _.clone(typedocOutput); _.each(typedocOutput.children, (file, i) => { const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); - // Map file "name" to exportPath... HOW?! _.each(file.children, (child, j) => { if (!_.includes(exportItems, child.name)) { delete finalTypeDocOutput.children[i].children[j]; -- cgit v1.2.3 From 454af2bda3ab30204b3398f2dec62214c03d880d Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 22:49:34 +0200 Subject: Fix package.json --- packages/sra-report/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json index 8749384ee..26fd0a403 100644 --- a/packages/sra-report/package.json +++ b/packages/sra-report/package.json @@ -19,7 +19,7 @@ "rebuild_and_test": "run-s clean build test", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", + "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit" }, "bin": { "sra-report": "bin/sra-report.js" -- cgit v1.2.3 From 11778db05a6cfa526091cdf4602eee62edf18638 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:00:33 +0200 Subject: Remove no longer necessary include --- packages/typescript-typings/tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/typescript-typings/tsconfig.json b/packages/typescript-typings/tsconfig.json index bc453af4b..a9a644b17 100644 --- a/packages/typescript-typings/tsconfig.json +++ b/packages/typescript-typings/tsconfig.json @@ -2,6 +2,5 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "lib" - }, - "include": ["./monorepo_scripts/**/*"] + } } -- cgit v1.2.3 From fe2787fcc1d6684f2ded76c965b645414ab23718 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:00:44 +0200 Subject: Add back the 'clean' command --- packages/typescript-typings/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index 32235accb..8e2196a4c 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -7,7 +7,8 @@ "description": "0x project typescript type definitions", "scripts": { "watch_without_deps": "tsc -w", - "build": "tsc" + "build": "tsc", + "clean": "shx rm -rf lib" }, "repository": { "type": "git", -- cgit v1.2.3 From bb9237b0f41ffb484ff603a3e556919482187fbf Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:01:21 +0200 Subject: Make monorepo-scripts a private package now that no other package depends on it --- packages/monorepo-scripts/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 24f1607c0..2a885e389 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,4 +1,5 @@ { + "private": true, "name": "@0xproject/monorepo-scripts", "version": "1.0.4", "engines": { -- cgit v1.2.3 From 1b24064c9f62b0b5638a5dab1878278e8e01649e Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:34:42 +0200 Subject: Move publish_release_notes to own script and other publish cleanup --- packages/monorepo-scripts/package.json | 3 +- packages/monorepo-scripts/src/constants.ts | 1 + packages/monorepo-scripts/src/publish.ts | 100 +------------------ .../monorepo-scripts/src/publish_release_notes.ts | 110 +++++++++++++++++++++ 4 files changed, 116 insertions(+), 98 deletions(-) create mode 100644 packages/monorepo-scripts/src/publish_release_notes.ts diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 2a885e389..d7b83e37e 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -19,7 +19,8 @@ "script:prepublish_checks": "node ./lib/prepublish_checks.js", "script:publish": "IS_DRY_RUN=true node ./lib/publish.js", "script:find_unused_deps": "node ./lib/find_unused_dependencies.js", - "script:doc_generate_and_upload": "node ./lib/doc_generate_and_upload.js" + "script:doc_generate_and_upload": "node ./lib/doc_generate_and_upload.js", + "script:publish_release_notes": "node ./lib/publish_release_notes.js" }, "repository": { "type": "git", diff --git a/packages/monorepo-scripts/src/constants.ts b/packages/monorepo-scripts/src/constants.ts index e5d3348bd..acb4b211e 100644 --- a/packages/monorepo-scripts/src/constants.ts +++ b/packages/monorepo-scripts/src/constants.ts @@ -5,4 +5,5 @@ export const constants = { stagingWebsite: 'http://staging-0xproject.s3-website-us-east-1.amazonaws.com', lernaExecutable: path.join('node_modules', '@0x-lerna-fork', 'lerna', 'cli.js'), githubPersonalAccessToken: process.env.GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS, + dependenciesUpdatedMessage: 'Dependencies updated', }; diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 7444c64b1..faaa268fc 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -8,9 +8,6 @@ import { exec as execAsync } from 'promisify-child-process'; import * as prompt from 'prompt'; import semver = require('semver'); import semverSort = require('semver-sort'); -import * as publishRelease from 'publish-release'; - -const publishReleaseAsync = promisify(publishRelease); import { constants } from './constants'; import { Package, PackageToNextVersion, VersionChangelog } from './types'; @@ -18,22 +15,11 @@ import { changelogUtils } from './utils/changelog_utils'; import { configs } from './utils/configs'; import { utils } from './utils/utils'; import { generateAndUploadDocsAsync } from './doc_generate_and_upload'; +import { publishReleaseNotesAsync } from './publish_release_notes'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; const TODAYS_TIMESTAMP = moment().unix(); -const packageNameToWebsitePath: { [name: string]: string } = { - '0x.js': '0xjs', - 'web3-wrapper': 'web3_wrapper', - contracts: 'contracts', - connect: 'connect', - 'json-schemas': 'json-schemas', - 'sol-compiler': 'sol-compiler', - 'sol-cov': 'sol-cov', - subproviders: 'subproviders', - 'order-utils': 'order-utils', - 'ethereum-types': 'ethereum-types', -}; (async () => { // Fetch public, updated Lerna packages @@ -111,7 +97,7 @@ async function confirmDocPagesRenderAsync(packages: Package[]): Promise<void> { _.each(packagesWithDocs, pkg => { const name = pkg.packageJson.name; const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0xproject/')[1] : name; - const docSegmentIfExists = packageNameToWebsitePath[nameWithoutPrefix]; + const docSegmentIfExists = nameWithoutPrefix; if (_.isUndefined(docSegmentIfExists)) { throw new Error( `Found package '${name}' with doc commands but no corresponding docSegment in monorepo_scripts @@ -163,7 +149,7 @@ async function updateChangeLogsAsync(updatedPublicPackages: Package[]): Promise< version: nextPatchVersionIfValid, changes: [ { - note: 'Dependencies updated', + note: constants.dependenciesUpdatedMessage, }, ], }; @@ -194,86 +180,6 @@ async function updateChangeLogsAsync(updatedPublicPackages: Package[]): Promise< return packageToNextVersion; } -async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { - // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) - const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); - const latestGitCommit = result.stdout; - const shortenedGitCommit = latestGitCommit.slice(0, 7); - const tagName = `monorepo@${shortenedGitCommit}`; - // TODO: We might need to handle the case where the tag already exists locally - await execAsync('git tag ${tagName}'); - await execAsync('git push origin ${tagName}'); - const releaseName = `0x monorepo - ${shortenedGitCommit}`; - - let assets: string[] = []; - let aggregateNotes = ''; - _.each(updatedPublishPackages, pkg => { - const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); - aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; - - const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); - if (!_.isUndefined(packageAssets)) { - assets = [...assets, ...packageAssets]; - } - }); - adjustAssetPaths(assets); - - utils.log('PUBLISH: Releasing ', releaseName, '...'); - // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded - // Ideally we would like to name the assets after the package they are from - // Source: https://github.com/remixz/publish-release/issues/39 - await publishReleaseAsync({ - token: constants.githubPersonalAccessToken, - owner: '0xProject', - tag: tagName, - repo: '0x-monorepo', - name: releaseName, - notes: aggregateNotes, - draft: false, - prerelease: false, - reuseRelease: true, - reuseDraftOnly: false, - assets, - }); -} - -// Asset paths should described from the monorepo root. This method prefixes -// the supplied path with the absolute path to the monorepo root. -function adjustAssetPaths(assets: string[]): string[] { - const finalAssets: string[] = []; - _.each(assets, (asset: string) => { - finalAssets.push(`${constants.monorepoRootPath}/${asset}`); - }); - return finalAssets; -} - -function getReleaseNotesForPackage(packageName: string, version: string): string { - const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); - const changelogJSONPath = path.join( - constants.monorepoRootPath, - 'packages', - packageNameWithoutNamespace, - 'CHANGELOG.json', - ); - const changelogJSON = fs.readFileSync(changelogJSONPath, 'utf-8'); - const changelogs = JSON.parse(changelogJSON); - const latestLog = changelogs[0]; - // We sanity check that the version for the changelog notes we are about to publish to Github - // correspond to the new version of the package. - if (version !== latestLog.version) { - throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); - } - let notes = ''; - _.each(latestLog.changes, change => { - notes += `* ${change.note}`; - if (change.pr) { - notes += ` (#${change.pr})`; - } - notes += `\n`; - }); - return notes; -} - async function lernaPublishAsync(packageToNextVersion: { [name: string]: string }): Promise<void> { const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts new file mode 100644 index 000000000..acfac0be7 --- /dev/null +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -0,0 +1,110 @@ +import { readFileSync } from 'fs'; +import * as _ from 'lodash'; +import * as promisify from 'es6-promisify'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; +import * as publishRelease from 'publish-release'; + +import { constants } from './constants'; +import { Package } from './types'; +import { utils } from './utils/utils'; + +const publishReleaseAsync = promisify(publishRelease); + +(async () => { + console.log('I RAN! - publishReleaseNotesAsync'); + const shouldIncludePrivate = false; + const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); + + await publishReleaseNotesAsync(allUpdatedPackages); +})(); + +export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { + // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) + const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); + const latestGitCommit = result.stdout; + const shortenedGitCommit = latestGitCommit.slice(0, 7); + const tagName = `monorepo@${shortenedGitCommit}`; + + await execAsync(`git rev-parse ${tagName}`); + await execAsync('git tag ${tagName}'); + + await execAsync('git push origin ${tagName}'); + const releaseName = `0x monorepo - ${shortenedGitCommit}`; + + let assets: string[] = []; + let aggregateNotes = ''; + _.each(updatedPublishPackages, pkg => { + const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); + if (_.isEmpty(notes)) { + return; // don't include it + } + aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; + + const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); + if (!_.isUndefined(packageAssets)) { + assets = [...assets, ...packageAssets]; + } + }); + const finalAssets = adjustAssetPaths(assets); + + utils.log('Publishing release notes ', releaseName, '...'); + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 + await publishReleaseAsync({ + token: constants.githubPersonalAccessToken, + owner: '0xProject', + tag: tagName, + repo: '0x-monorepo', + name: releaseName, + notes: aggregateNotes, + draft: false, + prerelease: false, + reuseRelease: true, + reuseDraftOnly: false, + assets: finalAssets, + }); +} + +// Asset paths should described from the monorepo root. This method prefixes +// the supplied path with the absolute path to the monorepo root. +function adjustAssetPaths(assets: string[]): string[] { + const finalAssets: string[] = []; + _.each(assets, (asset: string) => { + const finalAsset = `${constants.monorepoRootPath}/${asset}`; + finalAssets.push(finalAsset); + }); + return finalAssets; +} + +function getReleaseNotesForPackage(packageName: string, version: string): string { + const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); + const changelogJSONPath = path.join( + constants.monorepoRootPath, + 'packages', + packageNameWithoutNamespace, + 'CHANGELOG.json', + ); + const changelogJSON = readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + // If only has a `Dependencies updated` changelog, we don't include it in release notes + if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { + return ''; + } + // We sanity check that the version for the changelog notes we are about to publish to Github + // correspond to the new version of the package. + // if (version !== latestLog.version) { + // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); + // } + let notes = ''; + _.each(latestLog.changes, change => { + notes += `* ${change.note}`; + if (change.pr) { + notes += ` (#${change.pr})`; + } + notes += `\n`; + }); + return notes; +} -- cgit v1.2.3 From b7ff1fe5d352b4f59664198d9fe852cbe1015357 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:34:49 +0200 Subject: Move type --- packages/monorepo-scripts/src/doc_generate_and_upload.ts | 9 +++++---- packages/monorepo-scripts/src/types.ts | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 592c36ae2..03910c460 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -6,12 +6,9 @@ import * as ts from 'typescript'; import * as yargs from 'yargs'; import { constants } from './constants'; +import { ExportPathToExportedItems } from './types'; import { utils } from './utils/utils'; -export interface ExportPathToExportedItems { - [pkgName: string]: string[]; -} - const args = yargs .option('package', { describe: 'Monorepo sub-package for which to generate DocJSON', @@ -26,8 +23,12 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { + console.log('I RAN! - generateAndUploadDocsAsync'); const packageName = args.package; const isStaging = args.isStaging; + if (_.isEmpty(packageName)) { + return; // We are not runninng in a command-line env. + } await generateAndUploadDocsAsync(packageName, isStaging); })(); diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index d9e1dfabb..4d4600abf 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -49,3 +49,7 @@ export interface Package { location: string; packageJson: PackageJSON; } + +export interface ExportPathToExportedItems { + [pkgName: string]: string[]; +} -- cgit v1.2.3 From b56fc697c41649fdb3bdeaf9709781c9fd166b08 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sun, 29 Jul 2018 23:55:28 +0200 Subject: Move logic to publishUtils so can use as command-line and script import --- .../src/doc_generate_and_upload.ts | 197 +------------- packages/monorepo-scripts/src/publish.ts | 3 +- .../monorepo-scripts/src/publish_release_notes.ts | 100 +------ .../monorepo-scripts/src/utils/publish_utils.ts | 291 +++++++++++++++++++++ 4 files changed, 294 insertions(+), 297 deletions(-) create mode 100644 packages/monorepo-scripts/src/utils/publish_utils.ts diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 03910c460..ab1f97ad8 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -1,13 +1,6 @@ -import { readFileSync, writeFileSync } from 'fs'; -import * as _ from 'lodash'; -import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; -import * as ts from 'typescript'; import * as yargs from 'yargs'; -import { constants } from './constants'; -import { ExportPathToExportedItems } from './types'; -import { utils } from './utils/utils'; +import { generateAndUploadDocsAsync } from './utils/publish_utils'; const args = yargs .option('package', { @@ -23,196 +16,8 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { - console.log('I RAN! - generateAndUploadDocsAsync'); const packageName = args.package; const isStaging = args.isStaging; - if (_.isEmpty(packageName)) { - return; // We are not runninng in a command-line env. - } await generateAndUploadDocsAsync(packageName, isStaging); })(); - -export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { - const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; - const indexPath = `${pathToPackage}/src/index.ts`; - const exportPathToExportedItems = getExportPathToExportedItems(indexPath); - - const monorepoPackages = utils.getPackages(constants.monorepoRootPath); - const pkg = _.find(monorepoPackages, monorepoPackage => { - return _.includes(monorepoPackage.packageJson.name, packageName); - }); - if (_.isUndefined(pkg)) { - throw new Error(`Couldn't find a package.json for ${packageName}`); - } - - const packageJson = pkg.packageJson; - const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); - if (!shouldPublishDocs) { - utils.log( - `GENERATE_UPLOAD_DOCS: ${ - packageJson.name - } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, - ); - return; - } - - const pkgNameToPath: { [name: string]: string } = {}; - _.each(monorepoPackages, pkg => { - pkgNameToPath[pkg.packageJson.name] = pkg.location; - }); - - // For each dep that is another one of our monorepo packages, we fetch it's index.ts - // and see which specific files we must pass to TypeDoc. - let typeDocExtraFileIncludes: string[] = []; - _.each(exportPathToExportedItems, (exportedItems, exportPath) => { - const pathIfExists = pkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { - return; // It's an external package - } - - const isInternalToPkg = _.startsWith(exportPath, '.'); - if (isInternalToPkg) { - const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); - typeDocExtraFileIncludes.push(pathToInternalPkg); - } - const typeDocSourceIncludes = new Set(); - const pathToIndex = `${pathIfExists}/src/index.ts`; - const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); - _.each(exportedItems, exportName => { - _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { - if (!_.startsWith(innerExportPath, './')) { - throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting on of ${exportedItems} which is - itself exported from an external package. To fix this, export the external dependency directly, - not indirectly through ${exportPath}.`, - ); - } - if (_.includes(innerExportItems, exportName)) { - const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); - typeDocSourceIncludes.add(absoluteSrcPath); - } - }); - }); - // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types - // directly, meaning no internal paths will exist to follow. Other packages also have direct exports - // in their index.ts, so we always add it to the source files passed to TypeDoc - typeDocSourceIncludes.add(pathToIndex); - - typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; - }); - - // Generate Typedoc JSON file - const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); - const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); - // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the - // packages root dir, does not work. It only works when called via a `package.json` script located - // in the package's root. - await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { - cwd, - }); - - // For each entry, see if it was exported in index.ts. If not, remove it. - const typedocOutputString = readFileSync(jsonFilePath).toString(); - const typedocOutput = JSON.parse(typedocOutputString); - const finalTypeDocOutput = _.clone(typedocOutput); - _.each(typedocOutput.children, (file, i) => { - const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); - _.each(file.children, (child, j) => { - if (!_.includes(exportItems, child.name)) { - delete finalTypeDocOutput.children[i].children[j]; - } - }); - finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); - }); - // Write modified TypeDoc JSON, without all the unexported stuff - writeFileSync(jsonFilePath, JSON.stringify(finalTypeDocOutput, null, 2)); - - const fileName = `v${packageJson.version}.json`; - utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); - const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; - const s3Url = `${S3BucketPath}${fileName}`; - await execAsync( - `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, - { - cwd, - }, - ); - utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); - // Remove the generated docs directory - await execAsync(`rm -rf ${jsonFilePath}`, { - cwd, - }); -} - -function findExportItemsGivenTypedocName( - exportPathToExportedItems: ExportPathToExportedItems, - packageName: string, - typedocName: string, -): string[] { - const typeDocNameWithoutQuotes = _.replace(typedocName, '"', ''); - const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; - const exportPaths = _.keys(exportPathToExportedItems); - const sanitizedExportPaths = _.map(exportPaths, exportPath => { - if (_.startsWith(exportPath, './')) { - const sanitizedExportPath = path.join(packageName, 'src', exportPath); - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; - } - const monorepoPrefix = '@0xproject/'; - if (_.startsWith(exportPath, monorepoPrefix)) { - const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; - } - sanitizedExportPathToExportPath[exportPath] = exportPath; - return exportPath; - }); - const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPaths, p => { - return _.startsWith(typeDocNameWithoutQuotes, p); - }); - if (_.isUndefined(matchingSanitizedExportPathIfExists)) { - throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); - } - const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; - return exportPathToExportedItems[matchingExportPath]; -} - -function getExportPathToExportedItems(pkgPath: string): ExportPathToExportedItems { - const sourceFile = ts.createSourceFile( - 'indexFile', - readFileSync(pkgPath).toString(), - ts.ScriptTarget.ES2017, - /*setParentNodes */ true, - ); - const exportPathToExportedItems = _getExportPathToExportedItems(sourceFile); - return exportPathToExportedItems; -} - -function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedItems { - const exportPathToExportedItems: ExportPathToExportedItems = {}; - processNode(sf); - - function processNode(node: ts.Node): void { - switch (node.kind) { - case ts.SyntaxKind.ExportDeclaration: - // console.log(node); - const exportClause = (node as any).exportClause; - const pkgName = exportClause.parent.moduleSpecifier.text; - _.each(exportClause.elements, element => { - exportPathToExportedItems[pkgName] = _.isUndefined(exportPathToExportedItems[pkgName]) - ? [element.name.escapedText] - : [...exportPathToExportedItems[pkgName], element.name.escapedText]; - }); - break; - - default: - // noop - break; - } - - ts.forEachChild(node, processNode); - } - return exportPathToExportedItems; -} diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index faaa268fc..64ba73e36 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -14,8 +14,7 @@ import { Package, PackageToNextVersion, VersionChangelog } from './types'; import { changelogUtils } from './utils/changelog_utils'; import { configs } from './utils/configs'; import { utils } from './utils/utils'; -import { generateAndUploadDocsAsync } from './doc_generate_and_upload'; -import { publishReleaseNotesAsync } from './publish_release_notes'; +import { publishReleaseNotesAsync, generateAndUploadDocsAsync } from './utils/publish_utils'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index acfac0be7..d708e8275 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -1,110 +1,12 @@ -import { readFileSync } from 'fs'; -import * as _ from 'lodash'; import * as promisify from 'es6-promisify'; -import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; import * as publishRelease from 'publish-release'; -import { constants } from './constants'; -import { Package } from './types'; import { utils } from './utils/utils'; - -const publishReleaseAsync = promisify(publishRelease); +import { publishReleaseNotesAsync } from './utils/publish_utils'; (async () => { - console.log('I RAN! - publishReleaseNotesAsync'); const shouldIncludePrivate = false; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); await publishReleaseNotesAsync(allUpdatedPackages); })(); - -export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { - // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) - const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); - const latestGitCommit = result.stdout; - const shortenedGitCommit = latestGitCommit.slice(0, 7); - const tagName = `monorepo@${shortenedGitCommit}`; - - await execAsync(`git rev-parse ${tagName}`); - await execAsync('git tag ${tagName}'); - - await execAsync('git push origin ${tagName}'); - const releaseName = `0x monorepo - ${shortenedGitCommit}`; - - let assets: string[] = []; - let aggregateNotes = ''; - _.each(updatedPublishPackages, pkg => { - const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); - if (_.isEmpty(notes)) { - return; // don't include it - } - aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; - - const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); - if (!_.isUndefined(packageAssets)) { - assets = [...assets, ...packageAssets]; - } - }); - const finalAssets = adjustAssetPaths(assets); - - utils.log('Publishing release notes ', releaseName, '...'); - // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded - // Ideally we would like to name the assets after the package they are from - // Source: https://github.com/remixz/publish-release/issues/39 - await publishReleaseAsync({ - token: constants.githubPersonalAccessToken, - owner: '0xProject', - tag: tagName, - repo: '0x-monorepo', - name: releaseName, - notes: aggregateNotes, - draft: false, - prerelease: false, - reuseRelease: true, - reuseDraftOnly: false, - assets: finalAssets, - }); -} - -// Asset paths should described from the monorepo root. This method prefixes -// the supplied path with the absolute path to the monorepo root. -function adjustAssetPaths(assets: string[]): string[] { - const finalAssets: string[] = []; - _.each(assets, (asset: string) => { - const finalAsset = `${constants.monorepoRootPath}/${asset}`; - finalAssets.push(finalAsset); - }); - return finalAssets; -} - -function getReleaseNotesForPackage(packageName: string, version: string): string { - const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); - const changelogJSONPath = path.join( - constants.monorepoRootPath, - 'packages', - packageNameWithoutNamespace, - 'CHANGELOG.json', - ); - const changelogJSON = readFileSync(changelogJSONPath, 'utf-8'); - const changelogs = JSON.parse(changelogJSON); - const latestLog = changelogs[0]; - // If only has a `Dependencies updated` changelog, we don't include it in release notes - if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { - return ''; - } - // We sanity check that the version for the changelog notes we are about to publish to Github - // correspond to the new version of the package. - // if (version !== latestLog.version) { - // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); - // } - let notes = ''; - _.each(latestLog.changes, change => { - notes += `* ${change.note}`; - if (change.pr) { - notes += ` (#${change.pr})`; - } - notes += `\n`; - }); - return notes; -} diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts new file mode 100644 index 000000000..a0a414cda --- /dev/null +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -0,0 +1,291 @@ +import * as _ from 'lodash'; +import * as promisify from 'es6-promisify'; +import * as publishRelease from 'publish-release'; + +import { constants } from '../constants'; +import { Package } from '../types'; +import { utils } from './utils'; + +import { readFileSync, writeFileSync } from 'fs'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; +import * as ts from 'typescript'; + +import { ExportPathToExportedItems } from '../types'; + +const publishReleaseAsync = promisify(publishRelease); +export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { + // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) + const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); + const latestGitCommit = result.stdout; + const shortenedGitCommit = latestGitCommit.slice(0, 7); + const tagName = `monorepo@${shortenedGitCommit}`; + + await execAsync(`git rev-parse ${tagName}`); + await execAsync('git tag ${tagName}'); + + await execAsync('git push origin ${tagName}'); + const releaseName = `0x monorepo - ${shortenedGitCommit}`; + + let assets: string[] = []; + let aggregateNotes = ''; + _.each(updatedPublishPackages, pkg => { + const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); + if (_.isEmpty(notes)) { + return; // don't include it + } + aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; + + const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); + if (!_.isUndefined(packageAssets)) { + assets = [...assets, ...packageAssets]; + } + }); + const finalAssets = adjustAssetPaths(assets); + + utils.log('Publishing release notes ', releaseName, '...'); + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 + await publishReleaseAsync({ + token: constants.githubPersonalAccessToken, + owner: '0xProject', + tag: tagName, + repo: '0x-monorepo', + name: releaseName, + notes: aggregateNotes, + draft: false, + prerelease: false, + reuseRelease: true, + reuseDraftOnly: false, + assets: finalAssets, + }); +} + +// Asset paths should described from the monorepo root. This method prefixes +// the supplied path with the absolute path to the monorepo root. +function adjustAssetPaths(assets: string[]): string[] { + const finalAssets: string[] = []; + _.each(assets, (asset: string) => { + const finalAsset = `${constants.monorepoRootPath}/${asset}`; + finalAssets.push(finalAsset); + }); + return finalAssets; +} + +function getReleaseNotesForPackage(packageName: string, version: string): string { + const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); + const changelogJSONPath = path.join( + constants.monorepoRootPath, + 'packages', + packageNameWithoutNamespace, + 'CHANGELOG.json', + ); + const changelogJSON = readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + // If only has a `Dependencies updated` changelog, we don't include it in release notes + if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { + return ''; + } + // We sanity check that the version for the changelog notes we are about to publish to Github + // correspond to the new version of the package. + // if (version !== latestLog.version) { + // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); + // } + let notes = ''; + _.each(latestLog.changes, change => { + notes += `* ${change.note}`; + if (change.pr) { + notes += ` (#${change.pr})`; + } + notes += `\n`; + }); + return notes; +} + +export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { + const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; + const indexPath = `${pathToPackage}/src/index.ts`; + const exportPathToExportedItems = getExportPathToExportedItems(indexPath); + + const monorepoPackages = utils.getPackages(constants.monorepoRootPath); + const pkg = _.find(monorepoPackages, monorepoPackage => { + return _.includes(monorepoPackage.packageJson.name, packageName); + }); + if (_.isUndefined(pkg)) { + throw new Error(`Couldn't find a package.json for ${packageName}`); + } + + const packageJson = pkg.packageJson; + const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); + if (!shouldPublishDocs) { + utils.log( + `GENERATE_UPLOAD_DOCS: ${ + packageJson.name + } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, + ); + return; + } + + const pkgNameToPath: { [name: string]: string } = {}; + _.each(monorepoPackages, pkg => { + pkgNameToPath[pkg.packageJson.name] = pkg.location; + }); + + // For each dep that is another one of our monorepo packages, we fetch it's index.ts + // and see which specific files we must pass to TypeDoc. + let typeDocExtraFileIncludes: string[] = []; + _.each(exportPathToExportedItems, (exportedItems, exportPath) => { + const pathIfExists = pkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + + const isInternalToPkg = _.startsWith(exportPath, '.'); + if (isInternalToPkg) { + const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); + typeDocExtraFileIncludes.push(pathToInternalPkg); + return; // Right? + } + const typeDocSourceIncludes = new Set(); + const pathToIndex = `${pathIfExists}/src/index.ts`; + const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); + _.each(exportedItems, exportName => { + _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { + if (!_.startsWith(innerExportPath, './') && _.includes(innerExportItems, exportName)) { + throw new Error( + `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is + itself exported from an external package. To fix this, export the external dependency directly, + not indirectly through ${innerExportPath}.`, + ); + } else if (_.includes(innerExportItems, exportName)) { + const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); + typeDocSourceIncludes.add(absoluteSrcPath); + } + }); + }); + // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types + // directly, meaning no internal paths will exist to follow. Other packages also have direct exports + // in their index.ts, so we always add it to the source files passed to TypeDoc + if (typeDocSourceIncludes.size === 0) { + typeDocSourceIncludes.add(pathToIndex); + } + + typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; + }); + + // Generate Typedoc JSON file + const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); + const projectFiles = typeDocExtraFileIncludes.join(' '); + const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); + // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the + // packages root dir, does not work. It only works when called via a `package.json` script located + // in the package's root. + await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { + cwd, + }); + + // For each entry, see if it was exported in index.ts. If not, remove it. + const typedocOutputString = readFileSync(jsonFilePath).toString(); + const typedocOutput = JSON.parse(typedocOutputString); + const finalTypeDocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (file, i) => { + const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); + _.each(file.children, (child, j) => { + if (!_.includes(exportItems, child.name)) { + delete finalTypeDocOutput.children[i].children[j]; + } + }); + finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); + }); + // Write modified TypeDoc JSON, without all the unexported stuff + writeFileSync(jsonFilePath, JSON.stringify(finalTypeDocOutput, null, 2)); + + const fileName = `v${packageJson.version}.json`; + utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); + const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; + const s3Url = `${S3BucketPath}${fileName}`; + await execAsync( + `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, + { + cwd, + }, + ); + utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); + // Remove the generated docs directory + await execAsync(`rm -rf ${jsonFilePath}`, { + cwd, + }); +} + +function findExportItemsGivenTypedocName( + exportPathToExportedItems: ExportPathToExportedItems, + packageName: string, + typedocName: string, +): string[] { + const typeDocNameWithoutQuotes = _.replace(typedocName, '"', ''); + const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; + const exportPaths = _.keys(exportPathToExportedItems); + const sanitizedExportPaths = _.map(exportPaths, exportPath => { + if (_.startsWith(exportPath, './')) { + const sanitizedExportPath = path.join(packageName, 'src', exportPath); + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + const monorepoPrefix = '@0xproject/'; + if (_.startsWith(exportPath, monorepoPrefix)) { + const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + sanitizedExportPathToExportPath[exportPath] = exportPath; + return exportPath; + }); + const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPaths, p => { + return _.startsWith(typeDocNameWithoutQuotes, p); + }); + if (_.isUndefined(matchingSanitizedExportPathIfExists)) { + throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); + } + const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; + return exportPathToExportedItems[matchingExportPath]; +} + +function getExportPathToExportedItems(pkgPath: string): ExportPathToExportedItems { + const sourceFile = ts.createSourceFile( + 'indexFile', + readFileSync(pkgPath).toString(), + ts.ScriptTarget.ES2017, + /*setParentNodes */ true, + ); + const exportPathToExportedItems = _getExportPathToExportedItems(sourceFile); + return exportPathToExportedItems; +} + +function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedItems { + const exportPathToExportedItems: ExportPathToExportedItems = {}; + processNode(sf); + + function processNode(node: ts.Node): void { + switch (node.kind) { + case ts.SyntaxKind.ExportDeclaration: + // console.log(node); + const exportClause = (node as any).exportClause; + const pkgName = exportClause.parent.moduleSpecifier.text; + _.each(exportClause.elements, element => { + exportPathToExportedItems[pkgName] = _.isUndefined(exportPathToExportedItems[pkgName]) + ? [element.name.escapedText] + : [...exportPathToExportedItems[pkgName], element.name.escapedText]; + }); + break; + + default: + // noop + break; + } + + ts.forEachChild(node, processNode); + } + return exportPathToExportedItems; +} -- cgit v1.2.3 From 79b1b6c8e08f9cc61babd75fdaff14472216d0f2 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 30 Jul 2018 15:40:10 +0200 Subject: Fix bugs in doc gen --- packages/monorepo-scripts/src/utils/publish_utils.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index a0a414cda..7209fa344 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -137,29 +137,33 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // and see which specific files we must pass to TypeDoc. let typeDocExtraFileIncludes: string[] = []; _.each(exportPathToExportedItems, (exportedItems, exportPath) => { - const pathIfExists = pkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { - return; // It's an external package - } - const isInternalToPkg = _.startsWith(exportPath, '.'); if (isInternalToPkg) { const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); typeDocExtraFileIncludes.push(pathToInternalPkg); return; // Right? } + + const pathIfExists = pkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + const typeDocSourceIncludes = new Set(); const pathToIndex = `${pathIfExists}/src/index.ts`; const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); _.each(exportedItems, exportName => { _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { - if (!_.startsWith(innerExportPath, './') && _.includes(innerExportItems, exportName)) { + if (!_.includes(innerExportItems, exportName)) { + return; + } + if (!_.startsWith(innerExportPath, './')) { throw new Error( `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is itself exported from an external package. To fix this, export the external dependency directly, not indirectly through ${innerExportPath}.`, ); - } else if (_.includes(innerExportItems, exportName)) { + } else { const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); typeDocSourceIncludes.add(absoluteSrcPath); } -- cgit v1.2.3 From 79faf7d3cb12a68ef336002b59b339f675d4c32a Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 30 Jul 2018 15:40:20 +0200 Subject: Update yarn.lock --- yarn.lock | 132 +++----------------------------------------------------------- 1 file changed, 5 insertions(+), 127 deletions(-) diff --git a/yarn.lock b/yarn.lock index 506cb2144..4f8c1fe86 100644 --- a/yarn.lock +++ b/yarn.lock @@ -565,37 +565,6 @@ lodash "4.17.10" uuid "3.2.1" -"@0xproject/contract-wrappers@^1.0.1-rc.2": - version "1.0.1-rc.1" - dependencies: - "@0xproject/assert" "^1.0.3" - "@0xproject/base-contract" "^1.0.3" - "@0xproject/fill-scenarios" "^1.0.1-rc.1" - "@0xproject/json-schemas" "^1.0.1-rc.2" - "@0xproject/order-utils" "^1.0.1-rc.1" - "@0xproject/types" "^1.0.1-rc.2" - "@0xproject/typescript-typings" "^1.0.3" - "@0xproject/utils" "^1.0.3" - "@0xproject/web3-wrapper" "^1.1.1" - ethereum-types "^1.0.3" - ethereumjs-blockstream "5.0.0" - ethereumjs-util "^5.1.1" - ethers "3.0.22" - js-sha3 "^0.7.0" - lodash "^4.17.4" - uuid "^3.1.0" - -"@0xproject/dev-utils@^1.0.3": - version "1.0.2" - dependencies: - "@0xproject/subproviders" "^1.0.3" - "@0xproject/types" "^1.0.1-rc.2" - "@0xproject/typescript-typings" "^1.0.3" - "@0xproject/utils" "^1.0.3" - "@0xproject/web3-wrapper" "^1.1.1" - ethereum-types "^1.0.3" - lodash "^4.17.4" - "@0xproject/fill-scenarios@^0.0.4": version "0.0.4" resolved "https://registry.yarnpkg.com/@0xproject/fill-scenarios/-/fill-scenarios-0.0.4.tgz#4d23c75abda7e9f117b698c0b8b142af07e0c69e" @@ -653,23 +622,6 @@ jsonschema "1.2.2" lodash.values "4.3.0" -"@0xproject/migrations@^1.0.3": - version "1.0.2" - dependencies: - "@0xproject/base-contract" "^1.0.3" - "@0xproject/order-utils" "^1.0.1-rc.1" - "@0xproject/sol-compiler" "^1.0.3" - "@0xproject/subproviders" "^1.0.3" - "@0xproject/typescript-typings" "^1.0.3" - "@0xproject/utils" "^1.0.3" - "@0xproject/web3-wrapper" "^1.1.1" - "@ledgerhq/hw-app-eth" "^4.3.0" - ethereum-types "^1.0.3" - ethers "3.0.22" - lodash "^4.17.4" - optionalDependencies: - "@ledgerhq/hw-transport-node-hid" "^4.3.0" - "@0xproject/order-utils@^0.0.7": version "0.0.7" resolved "https://registry.yarnpkg.com/@0xproject/order-utils/-/order-utils-0.0.7.tgz#eaa465782ea5745bdad54e1a851533172d993b7c" @@ -718,25 +670,6 @@ ethereumjs-util "5.1.5" lodash "4.17.10" -"@0xproject/order-utils@^1.0.1-rc.2": - version "1.0.1-rc.1" - dependencies: - "@0xproject/assert" "^1.0.3" - "@0xproject/base-contract" "^1.0.3" - "@0xproject/json-schemas" "^1.0.1-rc.2" - "@0xproject/sol-compiler" "^1.0.3" - "@0xproject/types" "^1.0.1-rc.2" - "@0xproject/typescript-typings" "^1.0.3" - "@0xproject/utils" "^1.0.3" - "@0xproject/web3-wrapper" "^1.1.1" - "@types/node" "^8.0.53" - bn.js "^4.11.8" - ethereum-types "^1.0.3" - ethereumjs-abi "0.6.5" - ethereumjs-util "^5.1.1" - ethers "3.0.22" - lodash "^4.17.4" - "@0xproject/order-watcher@^0.0.7": version "0.0.7" resolved "https://registry.yarnpkg.com/@0xproject/order-watcher/-/order-watcher-0.0.7.tgz#fbe019aa33447781096b5d562e7a3a4ec91a1da2" @@ -1014,12 +947,6 @@ dependencies: "@types/node" "*" -"@types/fs-extra@^4.0.0": - version "4.0.8" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-4.0.8.tgz#6957ddaf9173195199cb96da3db44c74700463d2" - dependencies: - "@types/node" "*" - "@types/glob@*", "@types/glob@5.0.35", "@types/glob@^5.0.33": version "5.0.35" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a" @@ -1032,7 +959,7 @@ version "4.0.36" resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.36.tgz#ff57c77fa1ab6713bb446534ddc4d979707a3a79" -"@types/handlebars@^4.0.31", "@types/handlebars@^4.0.36": +"@types/handlebars@^4.0.36": version "4.0.37" resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.37.tgz#a3bc3eba0c0f03f753cac00841a5b21e26a02c03" @@ -1042,7 +969,7 @@ dependencies: "@types/node" "*" -"@types/highlight.js@9.12.2", "@types/highlight.js@^9.1.8": +"@types/highlight.js@9.12.2": version "9.12.2" resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.2.tgz#6ee7cd395effe5ec80b515d3ff1699068cd0cd1d" @@ -1080,7 +1007,7 @@ dependencies: "@types/lodash" "*" -"@types/lodash@*", "@types/lodash@^4.14.37": +"@types/lodash@*": version "4.14.107" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.107.tgz#b2d2ae3958bfb8ff828495cbe12214af9e4d035e" @@ -1096,10 +1023,6 @@ version "1.5.3" resolved "https://registry.yarnpkg.com/@types/loglevel/-/loglevel-1.5.3.tgz#adfce55383edc5998a2170ad581b3e23d6adb5b8" -"@types/marked@0.0.28": - version "0.0.28" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.0.28.tgz#44ba754e9fa51432583e8eb30a7c4dd249b52faa" - "@types/marked@0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524" @@ -1119,10 +1042,6 @@ version "3.0.3" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" -"@types/minimatch@^2.0.29": - version "2.0.29" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" - "@types/mkdirp@^0.5.1", "@types/mkdirp@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" @@ -1275,13 +1194,6 @@ "@types/glob" "*" "@types/node" "*" -"@types/shelljs@^0.7.0": - version "0.7.8" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.8.tgz#4b4d6ee7926e58d7bca448a50ba442fd9f6715bd" - dependencies: - "@types/glob" "*" - "@types/node" "*" - "@types/sinon@^2.2.2": version "2.3.7" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-2.3.7.tgz#e92c2fed3297eae078d78d1da032b26788b4af86" @@ -5821,14 +5733,6 @@ fs-extra@^2.0.0, fs-extra@^2.1.2: graceful-fs "^4.1.2" jsonfile "^2.1.0" -fs-extra@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-5.0.0.tgz#414d0110cdd06705734d055652c5411260c31abd" @@ -8410,7 +8314,7 @@ markdown-escapes@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.2.tgz#e639cbde7b99c841c0bacc8a07982873b46d2122" -marked@^0.3.12, marked@^0.3.5: +marked@^0.3.12: version "0.3.19" resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" @@ -11788,7 +11692,7 @@ shelljs@0.8.0: interpret "^1.0.0" rechoir "^0.6.2" -shelljs@^0.7.0, shelljs@^0.7.3: +shelljs@^0.7.3: version "0.7.8" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" dependencies: @@ -13095,38 +12999,12 @@ typedoc@0xProject/typedoc: typedoc-default-themes "^0.5.0" typescript "2.7.1" -typedoc@~0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.8.0.tgz#d7172bc6a29964f451b7609c005beadadefe2361" - dependencies: - "@types/fs-extra" "^4.0.0" - "@types/handlebars" "^4.0.31" - "@types/highlight.js" "^9.1.8" - "@types/lodash" "^4.14.37" - "@types/marked" "0.0.28" - "@types/minimatch" "^2.0.29" - "@types/shelljs" "^0.7.0" - fs-extra "^4.0.0" - handlebars "^4.0.6" - highlight.js "^9.0.0" - lodash "^4.13.1" - marked "^0.3.5" - minimatch "^3.0.0" - progress "^2.0.0" - shelljs "^0.7.0" - typedoc-default-themes "^0.5.0" - typescript "2.4.1" - types-bn@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/types-bn/-/types-bn-0.0.1.tgz#4253c7c7251b14e1d77cdca6f58800e5e2b82c4b" dependencies: bn.js "4.11.7" -typescript@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.4.1.tgz#c3ccb16ddaa0b2314de031e7e6fee89e5ba346bc" - typescript@2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359" -- cgit v1.2.3 From b4f916d214dd80c11b4cb5db8af9545d5161f97d Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 30 Jul 2018 21:09:17 +0200 Subject: Standardize child naming --- packages/monorepo-scripts/src/utils/publish_utils.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 7209fa344..9b5ff378e 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -190,10 +190,21 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: cwd, }); - // For each entry, see if it was exported in index.ts. If not, remove it. + // Unfortunately TypeDoc children names will only be prefixed with the name of the package _if_ we passed + // TypeDoc files outside of the packages root path (i.e this package exports another package found in our + // monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add + // it here when necessary. const typedocOutputString = readFileSync(jsonFilePath).toString(); const typedocOutput = JSON.parse(typedocOutputString); const finalTypeDocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (child, i) => { + if (!_.includes(child.name, '/src/')) { + const nameWithoutQuotes = child.name.replace(/"/g, ''); + finalTypeDocOutput.children[i].name = `"${packageName}/src/${nameWithoutQuotes}"`; + } + }); + + // For each entry, see if it was exported in index.ts. If not, remove it. _.each(typedocOutput.children, (file, i) => { const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); _.each(file.children, (child, j) => { -- cgit v1.2.3 From ba00cd916aee451255ece0e5cc354091cc309bc5 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 30 Jul 2018 21:09:56 +0200 Subject: Remove console --- packages/monorepo-scripts/src/utils/publish_utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 9b5ff378e..ff65c779c 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -285,7 +285,6 @@ function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedI function processNode(node: ts.Node): void { switch (node.kind) { case ts.SyntaxKind.ExportDeclaration: - // console.log(node); const exportClause = (node as any).exportClause; const pkgName = exportClause.parent.moduleSpecifier.text; _.each(exportClause.elements, element => { -- cgit v1.2.3 From 92fda0a9409b1bbe3b65dd5f94f44bc2c8a26677 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:27:10 +0200 Subject: Remove unused dep so that it's not re-compiled onWatcher --- packages/0x.js/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 16040cf26..a0d4533b3 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -50,7 +50,6 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0xproject/abi-gen": "^1.0.4", "@0xproject/dev-utils": "^1.0.3", "@0xproject/migrations": "^1.0.3", "@0xproject/tslint-config": "^1.0.4", -- cgit v1.2.3 From 0413e3e77faa8dcc3f428019563f9115c82f67f1 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:27:33 +0200 Subject: Change order of index.ts since it not dictates to ordering of the docs --- packages/0x.js/src/index.ts | 53 +++++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 95ca07eea..d99ce68fc 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -1,33 +1,7 @@ export { ZeroEx } from './0x'; -export { MessagePrefixType, MessagePrefixOpts } from '@0xproject/order-utils'; export { Web3ProviderEngine, RPCSubprovider } from '@0xproject/subproviders'; -export { - ExchangeContractErrs, - Order, - SignedOrder, - ECSignature, - OrderStateValid, - OrderStateInvalid, - OrderState, - Token, - ERC20AssetData, - ERC721AssetData, - AssetProxyId, -} from '@0xproject/types'; - -export { - BlockParamLiteral, - FilterObject, - BlockParam, - LogWithDecodedArgs, - ContractEventArg, - Provider, - TransactionReceipt, - TransactionReceiptWithDecodedLogs, -} from 'ethereum-types'; - export { EventCallback, ContractEvent, @@ -64,3 +38,30 @@ export { ContractWrappersConfig, OrderInfo, } from '@0xproject/contract-wrappers'; + +export { MessagePrefixType, MessagePrefixOpts } from '@0xproject/order-utils'; + +export { + ExchangeContractErrs, + Order, + SignedOrder, + ECSignature, + OrderStateValid, + OrderStateInvalid, + OrderState, + Token, + ERC20AssetData, + ERC721AssetData, + AssetProxyId, +} from '@0xproject/types'; + +export { + BlockParamLiteral, + FilterObject, + BlockParam, + LogWithDecodedArgs, + ContractEventArg, + Provider, + TransactionReceipt, + TransactionReceiptWithDecodedLogs, +} from 'ethereum-types'; -- cgit v1.2.3 From c5fbc5c9917457be47027002010b0a28cb90f157 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:28:48 +0200 Subject: Also add artifacts to src --- packages/order-utils/package.json | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 21575162c..c49abfdae 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -10,11 +10,12 @@ "scripts": { "watch_without_deps": "yarn pre_build && tsc -w", "build": "run-s pre_build transpile", - "pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 generate_contract_wrappers", + "pre_build": "run-s update_artifacts_v2_beta update_artifacts_v2 copy_artifacts generate_contract_wrappers", "transpile": "tsc", - "generate_contract_wrappers": "abi-gen --abis 'lib/src/artifacts/@(Exchange|IWallet|IValidator|DummyERC20Token|ERC20Proxy|ERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", - "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 lib/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 lib/src/artifacts; done;", + "generate_contract_wrappers": "abi-gen --abis './src/artifacts/@(Exchange|IWallet|IValidator|DummyERC20Token|ERC20Proxy|ERC20Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", + "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", "test": "yarn run_mocha", "rebuild_and_test": "run-s build test", "test:circleci": "yarn test:coverage", -- cgit v1.2.3 From 9b24459108c826843cfddb377e66327e11b1d85b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:29:24 +0200 Subject: Add /src/artifacts in order-utils to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ef7cc0a3c..77053c958 100644 --- a/.gitignore +++ b/.gitignore @@ -84,6 +84,7 @@ packages/order-watcher/test/artifacts/ packages/contract-wrappers/test/artifacts/ packages/contract-wrappers/src/artifacts/ packages/order-watcher/src/artifacts/ +packages/order-utils/src/artifacts/ # generated contract watcher packages/0x.js/src/generated_contract_wrappers/ -- cgit v1.2.3 From 11869122b4fe00c834347f9911985d7b2572bc9b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:33:28 +0200 Subject: Update React-scroll, getting rid of the need to manually set the url hash --- packages/react-docs/package.json | 4 ++-- packages/react-docs/src/components/signature.tsx | 2 +- packages/react-docs/src/components/type.tsx | 1 + packages/react-shared/package.json | 4 ++-- packages/react-shared/src/components/anchor_title.tsx | 2 +- .../react-shared/src/components/nested_sidebar_menu.tsx | 17 +++-------------- packages/website/package.json | 4 ++-- 7 files changed, 12 insertions(+), 22 deletions(-) diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index e8db040be..c95051bde 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -41,7 +41,7 @@ "@types/node": "^8.0.53", "@types/react": "*", "@types/react-dom": "*", - "@types/react-scroll": "0.0.31", + "@types/react-scroll": "1.5.3", "basscss": "^8.0.3", "compare-versions": "^3.0.1", "lodash": "^4.17.4", @@ -49,7 +49,7 @@ "react": "15.6.1", "react-dom": "15.6.1", "react-markdown": "^3.2.2", - "react-scroll": "^1.5.2", + "react-scroll": "^1.7.10", "react-tooltip": "^3.2.7", "semver": "5.5.0" }, diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx index 77e9cc909..5f28050d2 100644 --- a/packages/react-docs/src/components/signature.tsx +++ b/packages/react-docs/src/components/signature.tsx @@ -27,7 +27,7 @@ const defaultProps = { }; export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => { - const sectionName = constants.TYPES_SECTION_NAME; + const sectionName = props.sectionName; const parameters = renderParameters(props.parameters, props.docsInfo, sectionName, props.typeDefinitionByName); const paramStringArray: any[] = []; // HACK: For now we don't put params on newlines if there are less then 2 of them. diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index e453349ef..04fcd9998 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -182,6 +182,7 @@ export function Type(props: TypeProps): any { <ScrollLink to={typeDefinitionAnchorId} offset={0} + hashSpy={true} duration={sharedConstants.DOCS_SCROLL_DURATION_MS} containerId={sharedConstants.DOCS_CONTAINER_ID} > diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 6b4501e83..9f4cfd624 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -39,7 +39,7 @@ "@types/node": "^8.0.53", "@types/react": "*", "@types/react-dom": "*", - "@types/react-scroll": "0.0.31", + "@types/react-scroll": "1.5.3", "basscss": "^8.0.3", "is-mobile": "^0.2.2", "lodash": "^4.17.4", @@ -48,7 +48,7 @@ "react-dom": "15.6.1", "react-highlight": "0xproject/react-highlight", "react-markdown": "^3.2.2", - "react-scroll": "^1.5.2", + "react-scroll": "^1.7.10", "react-tap-event-plugin": "^2.0.1" }, "publishConfig": { diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 473b994bf..451ba1729 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -69,13 +69,13 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt </div> <ScrollLink to={this.props.id} + hashSpy={true} offset={headerSizeToScrollOffset[this.props.headerSize]} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > <i className="zmdi zmdi-link" - onClick={utils.setUrlHash.bind(utils, this.props.id)} style={{ ...styles.anchor, opacity }} onMouseOver={this._setHoverState.bind(this, true)} onMouseOut={this._setHoverState.bind(this, false)} diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index aa00d5985..10bcb7d8c 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,14 +94,11 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N key={`menuItem-${menuItemName}`} to={id} offset={-10} + hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > - <MenuItem - onTouchTap={this._onMenuItemClick.bind(this, finalMenuItemName)} - style={menuItemStyles} - innerDivStyle={menuItemInnerDivStyles} - > + <MenuItem style={menuItemStyles} innerDivStyle={menuItemInnerDivStyles}> <span style={{ textTransform: 'capitalize' }}>{finalMenuItemName}</span> </MenuItem> </ScrollLink> @@ -128,12 +125,11 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N <ScrollLink to={id} offset={0} + hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} - onTouchTap={this._onMenuItemClick.bind(this, name)} > <MenuItem - onTouchTap={this._onMenuItemClick.bind(this, name)} style={{ minHeight: 35 }} innerDivStyle={{ paddingLeft: 16, @@ -150,11 +146,4 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N </ul> ); } - private _onMenuItemClick(name: string): void { - const id = utils.getIdFromName(name); - utils.setUrlHash(id); - if (!_.isUndefined(this.props.onMenuItemClick)) { - this.props.onMenuItemClick(); - } - } } diff --git a/packages/website/package.json b/packages/website/package.json index 12c729308..ef420ab07 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -49,7 +49,7 @@ "react-popper": "^1.0.0-beta.6", "react-redux": "^5.0.3", "react-router-dom": "^4.1.1", - "react-scroll": "^1.5.2", + "react-scroll": "^1.7.10", "react-tap-event-plugin": "^2.0.1", "react-tooltip": "^3.2.7", "redux": "^3.6.0", @@ -77,7 +77,7 @@ "@types/react-dom": "^16.0.3", "@types/react-redux": "^4.4.37", "@types/react-router-dom": "^4.0.4", - "@types/react-scroll": "0.0.31", + "@types/react-scroll": "1.5.3", "@types/react-tap-event-plugin": "0.0.30", "@types/redux": "^3.6.0", "awesome-typescript-loader": "^3.1.3", -- cgit v1.2.3 From 3bdf6004ca74dd9eb380aa61cf9e69c47725116a Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 17:36:37 +0200 Subject: Start refactoring docs to remove unnecessary configs given more concise TypeDoc JSON --- .../monorepo-scripts/src/utils/publish_utils.ts | 68 ++++++-- packages/react-docs-example/ts/docs.tsx | 25 --- .../react-docs/src/components/documentation.tsx | 44 +++--- .../react-docs/src/components/property_block.tsx | 70 +++++++++ packages/react-docs/src/components/type.tsx | 29 +--- .../react-docs/src/components/type_definition.tsx | 3 - packages/react-docs/src/docs_info.ts | 56 ++----- packages/react-docs/src/index.ts | 10 +- packages/react-docs/src/types.ts | 19 ++- packages/react-docs/src/utils/typedoc_utils.ts | 135 ++++++++-------- .../website/ts/containers/connect_documentation.ts | 30 ---- .../ts/containers/ethereum_types_documentation.ts | 52 ------- .../ts/containers/json_schemas_documentation.ts | 8 - .../ts/containers/order_utils_documentation.ts | 25 --- .../ts/containers/smart_contracts_documentation.ts | 1 - .../ts/containers/sol_compiler_documentation.ts | 9 -- .../website/ts/containers/sol_cov_documentation.ts | 32 ---- .../ts/containers/subproviders_documentation.ts | 47 ------ .../ts/containers/web3_wrapper_documentation.ts | 47 ------ .../ts/containers/zero_ex_js_documentation.ts | 172 --------------------- .../website/ts/pages/documentation/doc_page.tsx | 2 +- packages/website/ts/utils/doc_utils.ts | 4 +- yarn.lock | 12 +- 23 files changed, 272 insertions(+), 628 deletions(-) create mode 100644 packages/react-docs/src/components/property_block.tsx diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index ff65c779c..01d44a369 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -13,6 +13,20 @@ import * as ts from 'typescript'; import { ExportPathToExportedItems } from '../types'; +interface ExportInfo { + exportPathToExportedItems: ExportPathToExportedItems; + exportPathOrder: string[]; +} + +interface ExportNameToTypedocName { + [exportName: string]: string; +} + +interface Metadata { + exportPathToTypedocName: ExportNameToTypedocName; + exportPathOrder: string[]; +} + const publishReleaseAsync = promisify(publishRelease); export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) @@ -107,7 +121,7 @@ function getReleaseNotesForPackage(packageName: string, version: string): string export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; const indexPath = `${pathToPackage}/src/index.ts`; - const exportPathToExportedItems = getExportPathToExportedItems(indexPath); + const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath); const monorepoPackages = utils.getPackages(constants.monorepoRootPath); const pkg = _.find(monorepoPackages, monorepoPackage => { @@ -151,7 +165,8 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const typeDocSourceIncludes = new Set(); const pathToIndex = `${pathIfExists}/src/index.ts`; - const innerExportPathToExportedItems = getExportPathToExportedItems(pathToIndex); + const exportInfo = getExportPathToExportedItems(pathToIndex); + const innerExportPathToExportedItems = exportInfo.exportPathToExportedItems; _.each(exportedItems, exportName => { _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { if (!_.includes(innerExportItems, exportName)) { @@ -200,13 +215,18 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: _.each(typedocOutput.children, (child, i) => { if (!_.includes(child.name, '/src/')) { const nameWithoutQuotes = child.name.replace(/"/g, ''); - finalTypeDocOutput.children[i].name = `"${packageName}/src/${nameWithoutQuotes}"`; + const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; + finalTypeDocOutput.children[i].name = standardizedName; } }); // For each entry, see if it was exported in index.ts. If not, remove it. + const exportPathToTypedocName: ExportNameToTypedocName = {}; _.each(typedocOutput.children, (file, i) => { - const exportItems = findExportItemsGivenTypedocName(exportPathToExportedItems, packageName, file.name); + const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); + exportPathToTypedocName[exportPath] = file.name; + + const exportItems = exportPathToExportedItems[exportPath]; _.each(file.children, (child, j) => { if (!_.includes(exportItems, child.name)) { delete finalTypeDocOutput.children[i].children[j]; @@ -214,8 +234,22 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); }); + + // TODO: Add extra metadata for Class properties that are class instances + // Look in file for imports of that class, get the import name and construct a link to + // it's definition on another docs page. + + // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON + const docJson = { + metadata: { + exportPathToTypedocName, + exportPathOrder, + }, + typedocJson: finalTypeDocOutput, + }; + // Write modified TypeDoc JSON, without all the unexported stuff - writeFileSync(jsonFilePath, JSON.stringify(finalTypeDocOutput, null, 2)); + writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); const fileName = `v${packageJson.version}.json`; utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); @@ -234,11 +268,11 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); } -function findExportItemsGivenTypedocName( +function findExportPathGivenTypedocName( exportPathToExportedItems: ExportPathToExportedItems, packageName: string, typedocName: string, -): string[] { +): string { const typeDocNameWithoutQuotes = _.replace(typedocName, '"', ''); const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; const exportPaths = _.keys(exportPathToExportedItems); @@ -264,22 +298,23 @@ function findExportItemsGivenTypedocName( throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); } const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; - return exportPathToExportedItems[matchingExportPath]; + return matchingExportPath; } -function getExportPathToExportedItems(pkgPath: string): ExportPathToExportedItems { +function getExportPathToExportedItems(filePath: string): ExportInfo { const sourceFile = ts.createSourceFile( 'indexFile', - readFileSync(pkgPath).toString(), + readFileSync(filePath).toString(), ts.ScriptTarget.ES2017, /*setParentNodes */ true, ); - const exportPathToExportedItems = _getExportPathToExportedItems(sourceFile); - return exportPathToExportedItems; + const exportInfo = _getExportPathToExportedItems(sourceFile); + return exportInfo; } -function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedItems { +function _getExportPathToExportedItems(sf: ts.SourceFile): ExportInfo { const exportPathToExportedItems: ExportPathToExportedItems = {}; + const exportPathOrder: string[] = []; processNode(sf); function processNode(node: ts.Node): void { @@ -287,6 +322,7 @@ function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedI case ts.SyntaxKind.ExportDeclaration: const exportClause = (node as any).exportClause; const pkgName = exportClause.parent.moduleSpecifier.text; + exportPathOrder.push(pkgName); _.each(exportClause.elements, element => { exportPathToExportedItems[pkgName] = _.isUndefined(exportPathToExportedItems[pkgName]) ? [element.name.escapedText] @@ -301,5 +337,9 @@ function _getExportPathToExportedItems(sf: ts.SourceFile): ExportPathToExportedI ts.forEachChild(node, processNode); } - return exportPathToExportedItems; + const exportInfo = { + exportPathToExportedItems, + exportPathOrder, + }; + return exportInfo; } diff --git a/packages/react-docs-example/ts/docs.tsx b/packages/react-docs-example/ts/docs.tsx index bb605806f..9ac94bd00 100644 --- a/packages/react-docs-example/ts/docs.tsx +++ b/packages/react-docs-example/ts/docs.tsx @@ -32,33 +32,8 @@ const docsInfoConfig: DocsInfoConfig = { web3Wrapper: [docSections.web3Wrapper], types: [docSections.types], }, - sectionNameToMarkdownByVersion: { - '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - }, - }, - sectionNameToModulePath: { - [docSections.web3Wrapper]: ['"web3-wrapper/src/index"'], - [docSections.types]: ['"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [docSections.web3Wrapper], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'TxData', - 'TransactionReceipt', - 'RawLogEntry', - 'BlockParam', - 'ContractAbi', - 'FilterObject', - 'LogEntry', - 'BlockWithoutTransactionData', - 'CallData', - 'LogEntryEvent', - ], typeNameToExternalLink: { Web3: 'https://github.com/ethereum/wiki/wiki/JavaScript-API', Provider: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L150', diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index ff33220d2..4f776b237 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -1,7 +1,9 @@ import { + AnchorTitle, colors, constants as sharedConstants, EtherscanLinkSuffixes, + HeaderSizes, MarkdownSection, NestedSidebarMenu, Networks, @@ -32,8 +34,7 @@ import { Badge } from './badge'; import { Comment } from './comment'; import { EventDefinition } from './event_definition'; import { SignatureBlock } from './signature_block'; -import { SourceLink } from './source_link'; -import { Type } from './type'; +import { PropertyBlock } from './property_block'; import { TypeDefinition } from './type_definition'; const networkNameToColor: { [network: string]: string } = { @@ -129,7 +130,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta selectedVersion={this.props.selectedVersion} versions={this.props.availableVersions} sidebarHeader={this.props.sidebarHeader} - topLevelMenu={this.props.docsInfo.getMenu(this.props.selectedVersion)} + topLevelMenu={this.props.docsInfo.menu} menuSubsectionsBySection={menuSubsectionsBySection} onVersionSelected={this.props.onVersionSelected} /> @@ -172,7 +173,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta ); } private _renderDocumentation(): React.ReactNode { - const subMenus = _.values(this.props.docsInfo.getMenu()); + const subMenus = _.values(this.props.docsInfo.menu); const orderedSectionNames = _.flatten(subMenus); const typeDefinitionByName = this.props.docsInfo.getTypeDefinitionsByName(this.props.docAgnosticFormat); @@ -258,13 +259,12 @@ export class Documentation extends React.Component<DocumentationProps, Documenta {this._renderNetworkBadgesIfExists(sectionName)} </div> {docSection.comment && <Comment comment={docSection.comment} />} - {!_.isEmpty(docSection.constructors) && - this.props.docsInfo.isVisibleConstructor(sectionName) && ( - <div> - <h2 style={headerStyle}>Constructor</h2> - {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} - </div> - )} + {!_.isEmpty(docSection.constructors) && ( + <div> + <h2 style={headerStyle}>Constructor</h2> + {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} + </div> + )} {!_.isEmpty(docSection.properties) && ( <div> <h2 style={headerStyle}>Properties</h2> @@ -345,20 +345,14 @@ export class Documentation extends React.Component<DocumentationProps, Documenta } private _renderProperty(sectionName: string, property: Property): React.ReactNode { return ( - <div key={`property-${property.name}-${property.type.name}`} className="pb3"> - <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> - {property.name}:{' '} - <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} /> - </code> - {property.source && ( - <SourceLink - version={this.props.selectedVersion} - source={property.source} - sourceUrl={this.props.sourceUrl} - /> - )} - {property.comment && <Comment comment={property.comment} className="py2" />} - </div> + <PropertyBlock + key={`property-${property.name}-${property.type.name}`} + property={property} + sectionName={sectionName} + docsInfo={this.props.docsInfo} + sourceUrl={this.props.sourceUrl} + selectedVersion={this.props.selectedVersion} + /> ); } private _renderSignatureBlocks( diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx new file mode 100644 index 000000000..6e7f90c6c --- /dev/null +++ b/packages/react-docs/src/components/property_block.tsx @@ -0,0 +1,70 @@ +import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared'; +import * as React from 'react'; + +import { DocsInfo } from '../docs_info'; +import { Property } from '../types'; +import { constants } from '../utils/constants'; + +import { Comment } from './comment'; +import { Type } from './type'; +import { SourceLink } from './source_link'; + +export interface PropertyBlockProps { + property: Property; + sectionName: string; + docsInfo: DocsInfo; + sourceUrl: string; + selectedVersion: string; +} + +export interface PropertyBlockState { + shouldShowAnchor: boolean; +} + +export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyBlockState> { + constructor(props: PropertyBlockProps) { + super(props); + this.state = { + shouldShowAnchor: false, + }; + } + public render(): React.ReactNode { + const property = this.props.property; + const sectionName = this.props.sectionName; + return ( + <div + id={`${this.props.sectionName}-${property.name}`} + className="pb4" + key={`property-${property.name}-${property.type.name}`} + onMouseOver={this._setAnchorVisibility.bind(this, true)} + onMouseOut={this._setAnchorVisibility.bind(this, false)} + > + <div className="pb2" style={{ lineHeight: 1.3 }}> + <AnchorTitle + headerSize={HeaderSizes.H3} + title={property.name} + id={`${sectionName}-${property.name}`} + shouldShowAnchor={this.state.shouldShowAnchor} + /> + </div> + <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> + {property.name}:{' '} + <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} /> + </code> + {property.source && ( + <SourceLink + version={this.props.selectedVersion} + source={property.source} + sourceUrl={this.props.sourceUrl} + /> + )} + {property.comment && <Comment comment={property.comment} className="py2" />} + </div> + ); + } + private _setAnchorVisibility(shouldShowAnchor: boolean): void { + this.setState({ + shouldShowAnchor, + }); + } +} diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 04fcd9998..3504be303 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -9,6 +9,7 @@ import { DocsInfo } from '../docs_info'; import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '../types'; import { Signature } from './signature'; +import { constants } from '../utils/constants'; import { TypeDefinition } from './type_definition'; export interface TypeProps { @@ -43,7 +44,7 @@ export function Type(props: TypeProps): any { <span> <Type key={key} - type={arg.elementType} + type={arg} sectionName={props.sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} @@ -142,7 +143,6 @@ export function Type(props: TypeProps): any { let typeNameUrlIfExists; let typePrefixIfExists; - let sectionNameIfExists; if (!_.isUndefined(props.docsInfo.typeConfigs)) { typeNameUrlIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToExternalLink) ? props.docsInfo.typeConfigs.typeNameToExternalLink[typeName as string] @@ -150,9 +150,6 @@ export function Type(props: TypeProps): any { typePrefixIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToPrefix) ? props.docsInfo.typeConfigs.typeNameToPrefix[typeName as string] : undefined; - sectionNameIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToDocSection) - ? props.docsInfo.typeConfigs.typeNameToDocSection[typeName as string] - : undefined; } if (!_.isUndefined(typeNameUrlIfExists)) { typeName = ( @@ -168,16 +165,12 @@ export function Type(props: TypeProps): any { ); } else if ( (isReference || isArray) && - (props.docsInfo.isPublicType(typeName as string) || !_.isUndefined(sectionNameIfExists)) + props.typeDefinitionByName && + props.typeDefinitionByName[typeName as string] ) { const id = Math.random().toString(); - const typeDefinitionAnchorId = _.isUndefined(sectionNameIfExists) - ? `${props.sectionName}-${typeName}` - : sectionNameIfExists; - let typeDefinition; - if (props.typeDefinitionByName) { - typeDefinition = props.typeDefinitionByName[typeName as string]; - } + const typeDefinitionAnchorId = `${constants.TYPES_SECTION_NAME}-${typeName}`; + let typeDefinition = props.typeDefinitionByName[typeName as string]; typeName = ( <ScrollLink to={typeDefinitionAnchorId} @@ -186,18 +179,12 @@ export function Type(props: TypeProps): any { duration={sharedConstants.DOCS_SCROLL_DURATION_MS} containerId={sharedConstants.DOCS_CONTAINER_ID} > - {_.isUndefined(typeDefinition) || sharedUtils.isUserOnMobile() ? ( - <span - onClick={sharedUtils.setUrlHash.bind(null, typeDefinitionAnchorId)} - style={{ color: colors.lightBlueA700, cursor: 'pointer' }} - > - {typeName} - </span> + {sharedUtils.isUserOnMobile() ? ( + <span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span> ) : ( <span data-tip={true} data-for={id} - onClick={sharedUtils.setUrlHash.bind(null, typeDefinitionAnchorId)} style={{ color: colors.lightBlueA700, cursor: 'pointer', diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index c4bd7359a..a23f27181 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -37,9 +37,6 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef } public render(): React.ReactNode { const customType = this.props.customType; - if (!this.props.docsInfo.isPublicType(customType.name)) { - return null; // no-op - } let typePrefix: string; let codeSnippet: React.ReactNode; diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index b37942da6..dd3cb9a96 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -13,7 +13,7 @@ import { SectionsMap, SupportedDocJson, TypeDefinitionByName, - TypeDocNode, + GeneratedDocJson, } from './types'; import { doxityUtils } from './utils/doxity_utils'; import { typeDocUtils } from './utils/typedoc_utils'; @@ -32,6 +32,7 @@ export class DocsInfo { constructor(config: DocsInfoConfig) { this.id = config.id; this.type = config.type; + this.menu = config.menu; this.displayName = config.displayName; this.packageUrl = config.packageUrl; this.sections = config.sections; @@ -40,38 +41,8 @@ export class DocsInfo { this.typeConfigs = config.typeConfigs; this._docsInfo = config; } - public isPublicType(typeName: string): boolean { - if (_.isUndefined(this._docsInfo.typeConfigs.publicTypes)) { - return false; - } - const isPublic = _.includes(this._docsInfo.typeConfigs.publicTypes, typeName); - return isPublic; - } - public getModulePathsIfExists(sectionName: string): string[] { - const modulePathsIfExists = this._docsInfo.sectionNameToModulePath[sectionName]; - return modulePathsIfExists; - } public getMenu(selectedVersion?: string): { [section: string]: string[] } { - if (_.isUndefined(selectedVersion) || _.isUndefined(this._docsInfo.menuSubsectionToVersionWhenIntroduced)) { - return this._docsInfo.menu; - } - - const finalMenu = _.cloneDeep(this._docsInfo.menu); - if (_.isUndefined(finalMenu.contracts)) { - return finalMenu; - } - - // TODO: refactor to include more sections then simply the `contracts` section - finalMenu.contracts = _.filter(finalMenu.contracts, (contractName: string) => { - const versionIntroducedIfExists = this._docsInfo.menuSubsectionToVersionWhenIntroduced[contractName]; - if (!_.isUndefined(versionIntroducedIfExists)) { - const doesExistInSelectedVersion = compareVersions(selectedVersion, versionIntroducedIfExists) >= 0; - return doesExistInSelectedVersion; - } else { - return true; - } - }); - return finalMenu; + return this._docsInfo.menu; } public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection { const menuSubsectionsBySection = {} as MenuSubsectionsBySection; @@ -96,12 +67,18 @@ export class DocsInfo { const sortedEventNames = _.sortBy(docSection.events, 'name'); eventNames = _.map(sortedEventNames, m => m.name); } - const sortedMethodNames = _.sortBy(docSection.methods, 'name'); - const methodNames = _.map(sortedMethodNames, m => m.name); - menuSubsectionsBySection[sectionName] = [...methodNames, ...eventNames]; + const propertiesSortedByName = _.sortBy(docSection.properties, 'name'); + const propertyNames = _.map(propertiesSortedByName, m => m.name); + const methodsSortedByName = _.sortBy(docSection.methods, 'name'); + const methodNames = _.map(methodsSortedByName, m => m.name); const sortedFunctionNames = _.sortBy(docSection.functions, 'name'); const functionNames = _.map(sortedFunctionNames, m => m.name); - menuSubsectionsBySection[sectionName] = [...eventNames, ...functionNames, ...methodNames]; + menuSubsectionsBySection[sectionName] = [ + ...eventNames, + ...propertyNames, + ...functionNames, + ...methodNames, + ]; } }); return menuSubsectionsBySection; @@ -115,14 +92,11 @@ export class DocsInfo { const typeDefinitionByName = _.keyBy(typeDocSection.types, 'name') as any; return typeDefinitionByName; } - public isVisibleConstructor(sectionName: string): boolean { - return _.includes(this._docsInfo.visibleConstructors, sectionName); - } - public convertToDocAgnosticFormat(docObj: DoxityDocObj | TypeDocNode): DocAgnosticFormat { + public convertToDocAgnosticFormat(docObj: DoxityDocObj | GeneratedDocJson): DocAgnosticFormat { if (this.type === SupportedDocJson.Doxity) { return doxityUtils.convertToDocAgnosticFormat(docObj as DoxityDocObj); } else { - return typeDocUtils.convertToDocAgnosticFormat(docObj as TypeDocNode, this); + return typeDocUtils.convertToDocAgnosticFormat(docObj as GeneratedDocJson, this); } } } diff --git a/packages/react-docs/src/index.ts b/packages/react-docs/src/index.ts index 30f5011b7..e4424f679 100644 --- a/packages/react-docs/src/index.ts +++ b/packages/react-docs/src/index.ts @@ -15,6 +15,14 @@ export { Type } from './components/type'; export { DocsInfo } from './docs_info'; -export { DocsInfoConfig, DocAgnosticFormat, DoxityDocObj, DocsMenu, SupportedDocJson, TypeDocNode } from './types'; +export { + DocsInfoConfig, + DocAgnosticFormat, + DoxityDocObj, + DocsMenu, + SupportedDocJson, + TypeDocNode, + GeneratedDocJson, +} from './types'; export { constants } from './utils/constants'; diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index cbc774c2e..83ad157d1 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -10,18 +10,13 @@ export interface DocsInfoConfig { menu: DocsMenu; sections: SectionsMap; sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; - visibleConstructors: string[]; - sectionNameToModulePath?: { [sectionName: string]: string[] }; - menuSubsectionToVersionWhenIntroduced?: { [sectionName: string]: string }; contractsByVersionByNetworkId?: ContractsByVersionByNetworkId; typeConfigs?: DocsInfoTypeConfigs; } export interface DocsInfoTypeConfigs { typeNameToExternalLink?: { [typeName: string]: string }; - publicTypes?: string[]; typeNameToPrefix?: { [typeName: string]: string }; - typeNameToDocSection?: { [typeName: string]: string }; } export interface DocsMenu { @@ -292,3 +287,17 @@ export enum AbiTypes { Function = 'function', Event = 'event', } + +export interface ExportNameToTypedocName { + [exportName: string]: string; +} + +export interface Metadata { + exportPathToTypedocName: ExportNameToTypedocName; + exportPathOrder: string[]; +} + +export interface GeneratedDocJson { + metadata: Metadata; + typedocJson: TypeDocNode; +} diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index a6d938e94..1e7c29ce8 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -19,8 +19,11 @@ import { TypeParameter, TypescriptFunction, TypescriptMethod, + GeneratedDocJson, } from '../types'; +import { constants } from './constants'; + export const typeDocUtils = { isType(entity: TypeDocNode): boolean { return ( @@ -55,62 +58,68 @@ export const typeDocUtils = { }); return moduleDefinitions; }, - convertToDocAgnosticFormat(typeDocJson: TypeDocNode, docsInfo: DocsInfo): DocAgnosticFormat { - const subMenus = _.values(docsInfo.getMenu()); - const orderedSectionNames = _.flatten(subMenus); + convertToDocAgnosticFormat(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo): DocAgnosticFormat { + const exportPathOrder = generatedDocJson.metadata.exportPathOrder; + const exportPathToTypedocName = generatedDocJson.metadata.exportPathToTypedocName; + const typeDocJson = generatedDocJson.typedocJson; + + const typeDocNameOrder = _.map(exportPathOrder, exportPath => { + return exportPathToTypedocName[exportPath]; + }); + const docAgnosticFormat: DocAgnosticFormat = {}; - _.each(orderedSectionNames, sectionName => { - const modulePathsIfExists = docsInfo.getModulePathsIfExists(sectionName); - if (_.isUndefined(modulePathsIfExists)) { - return; // no-op - } - const packageDefinitions = typeDocUtils.getModuleDefinitionsBySectionName(typeDocJson, modulePathsIfExists); - let packageDefinitionWithMergedChildren; - if (_.isEmpty(packageDefinitions)) { - return; // no-op - } else if (packageDefinitions.length === 1) { - packageDefinitionWithMergedChildren = packageDefinitions[0]; - } else { - // HACK: For now, if there are two modules to display in a single section, - // we simply concat the children. This works for our limited use-case where - // we want to display types stored in two files under a single section - packageDefinitionWithMergedChildren = packageDefinitions[0]; - for (let i = 1; i < packageDefinitions.length; i++) { - packageDefinitionWithMergedChildren.children = [ - ...packageDefinitionWithMergedChildren.children, - ...packageDefinitions[i].children, - ]; + const typeEntities: TypeDocNode[] = []; + _.each(typeDocNameOrder, typeDocName => { + const fileChildIndex = _.findIndex(typeDocJson.children, child => child.name === typeDocName); + const fileChild = typeDocJson.children[fileChildIndex]; + let sectionName: string; + _.each(fileChild.children, (child, j) => { + switch (child.kindString) { + case KindString.Class: + case KindString.ObjectLiteral: { + sectionName = child.name; + docsInfo.sections[sectionName] = sectionName; + docsInfo.menu[sectionName] = [sectionName]; + const entities = child.children; + const commentObj = child.comment; + const sectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; + const docSection = typeDocUtils._convertEntitiesToDocSection(entities, docsInfo, sectionName); + docSection.comment = sectionComment; + docAgnosticFormat[sectionName] = docSection; + break; + } + case KindString.Function: { + sectionName = child.name; + docsInfo.sections[sectionName] = sectionName; + docsInfo.menu[sectionName] = [sectionName]; + const entities = [child]; + const commentObj = child.comment; + const SectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; + const docSection = typeDocUtils._convertEntitiesToDocSection(entities, docsInfo, sectionName); + docSection.comment = SectionComment; + docAgnosticFormat[sectionName] = docSection; + break; + } + case KindString.Interface: + case KindString.Variable: + case KindString.Enumeration: + case KindString.TypeAlias: + typeEntities.push(child); + break; + default: + throw errorUtils.spawnSwitchErr('kindString', child.kindString); } - } - - let entities; - let packageComment = ''; - // HACK: We assume 1 exported class per file - const classChildren = _.filter(packageDefinitionWithMergedChildren.children, (child: TypeDocNode) => { - return child.kindString === KindString.Class; }); - if (classChildren.length > 1 && sectionName !== 'types') { - throw new Error('`react-docs` only supports projects with 1 exported class per file'); - } - const isClassExport = packageDefinitionWithMergedChildren.children[0].kindString === KindString.Class; - const isObjectLiteralExport = - packageDefinitionWithMergedChildren.children[0].kindString === KindString.ObjectLiteral; - if (isClassExport) { - entities = packageDefinitionWithMergedChildren.children[0].children; - const commentObj = packageDefinitionWithMergedChildren.children[0].comment; - packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; - } else if (isObjectLiteralExport) { - entities = packageDefinitionWithMergedChildren.children[0].children; - const commentObj = packageDefinitionWithMergedChildren.children[0].comment; - packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; - } else { - entities = packageDefinitionWithMergedChildren.children; - } - - const docSection = typeDocUtils._convertEntitiesToDocSection(entities, docsInfo, sectionName); - docSection.comment = packageComment; - docAgnosticFormat[sectionName] = docSection; }); + docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; + docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; + const docSection = typeDocUtils._convertEntitiesToDocSection( + typeEntities, + docsInfo, + constants.TYPES_SECTION_NAME, + ); + docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; + return docAgnosticFormat; }, _convertEntitiesToDocSection(entities: TypeDocNode[], docsInfo: DocsInfo, sectionName: string): DocSection { @@ -175,18 +184,16 @@ export const typeDocUtils = { case KindString.Variable: case KindString.Enumeration: case KindString.TypeAlias: - if (docsInfo.isPublicType(entity.name)) { - const customType = typeDocUtils._convertCustomType( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - ); - const seenTypeNames = _.map(docSection.types, t => t.name); - const isUnseen = !_.includes(seenTypeNames, customType.name); - if (isUnseen) { - docSection.types.push(customType); - } + const customType = typeDocUtils._convertCustomType( + entity, + docsInfo.sections, + sectionName, + docsInfo.id, + ); + const seenTypeNames = _.map(docSection.types, t => t.name); + const isUnseen = !_.includes(seenTypeNames, customType.name); + if (isUnseen) { + docSection.types.push(customType); } break; diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index abf419347..74464e650 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -40,42 +40,12 @@ const docsInfoConfig: DocsInfoConfig = { [connectDocSections.installation]: InstallationMarkdownV1, }, }, - sectionNameToModulePath: { - [connectDocSections.httpClient]: ['"src/http_client"'], - [connectDocSections.webSocketOrderbookChannel]: ['"src/ws_orderbook_channel"'], - [connectDocSections.types]: ['"src/types"', '"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: connectDocSections, - visibleConstructors: [connectDocSections.httpClient, connectDocSections.webSocketOrderbookChannel], typeConfigs: { typeNameToExternalLink: { Provider: constants.URL_WEB3_PROVIDER_DOCS, BigNumber: constants.URL_BIGNUMBERJS_GITHUB, }, - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'Client', - 'FeesRequest', - 'FeesResponse', - 'OrderbookChannel', - 'OrderbookChannelHandler', - 'OrderbookChannelSubscriptionOpts', - 'OrderbookRequest', - 'OrderbookResponse', - 'OrdersRequest', - 'OrdersRequestOpts', - 'PagedRequestOpts', - 'TokenPairsItem', - 'TokenPairsRequest', - 'TokenPairsRequestOpts', - 'TokenTradeInfo', - 'WebSocketOrderbookChannelConfig', - 'Order', - 'SignedOrder', - 'ECSignature', - ], }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 0be8dd3bc..041a6bea3 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -36,60 +36,8 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.installation]: InstallationMarkdown, }, }, - sectionNameToModulePath: { - [docSections.types]: ['"index"'], - }, - visibleConstructors: [], - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'Provider', - 'JSONRPCErrorCallback', - 'Provider', - 'ContractAbi', - 'AbiDefinition', - 'FunctionAbi', - 'ConstructorStateMutability', - 'StateMutability', - 'MethodAbi', - 'ConstructorAbi', - 'FallbackAbi', - 'EventParameter', - 'EventAbi', - 'DataItem', - 'OpCode', - // 'StructLog', // TODO: This type breaks the docs so we don't render it for now - 'TransactionTrace', - 'Unit', - 'JSONRPCRequestPayload', - 'JSONRPCResponsePayload', - 'BlockWithoutTransactionData', - 'BlockWithTransactionData', - 'Transaction', - 'TxData', - 'CallData', - 'FilterObject', - 'LogTopic', - 'DecodedLogEntry', - 'DecodedLogEntryEvent', - 'LogEntryEvent', - 'LogEntry', - 'TxDataPayable', - 'TransactionReceipt', - 'AbiType', - 'ContractEventArg', - 'DecodedLogArgs', - 'LogWithDecodedArgs', - 'RawLog', - 'BlockParamLiteral', - 'BlockParam', - 'RawLogEntry', - 'SolidityTypes', - 'TransactionReceiptWithDecodedLogs', - ], typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, }, diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 523777114..3ecc0f312 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -43,16 +43,8 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.usage]: UsageMarkdownV1, }, }, - sectionNameToModulePath: { - [docSections.schemaValidator]: ['"json-schemas/src/schema_validator"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [docSections.schemaValidator], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [], typeNameToExternalLink: { Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index c6570f514..29cbf9501 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -38,33 +38,8 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.installation]: InstallationMarkdownV1, }, }, - sectionNameToModulePath: { - [docSections.usage]: [ - '"order-utils/src/order_hash"', - '"order-utils/src/signature_utils"', - '"order-utils/src/order_factory"', - '"order-utils/src/salt"', - '"order-utils/src/assert"', - '"order-utils/src/constants"', - ], - [docSections.types]: ['"order-utils/src/types"', '"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'OrderError', - 'Order', - 'SignedOrder', - 'ECSignature', - 'Provider', - 'JSONRPCRequestPayload', - 'JSONRPCResponsePayload', - 'JSONRPCErrorCallback', - ], typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, }, diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index b0a712477..e3a1bd7a6 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -34,7 +34,6 @@ const docsInfoConfig: DocsInfoConfig = { TokenRegistry: Sections.TokenRegistry, ZRXToken: Sections.ZRXToken, }, - visibleConstructors: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy], contractsByVersionByNetworkId: { '1.0.0': { [Networks.Mainnet]: { diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index b289c8f34..bd6a85c83 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -41,17 +41,8 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.usage]: UsageMarkdown, }, }, - sectionNameToModulePath: { - [docSections.compiler]: ['"sol-compiler/src/compiler"'], - [docSections.types]: ['"sol-compiler/src/utils/types"', '"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [docSections.compiler], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: ['CompilerOptions'], typeNameToExternalLink: {}, typeNameToPrefix: {}, }, diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index d78c450ed..5567eb97e 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -47,42 +47,10 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.usage]: UsageMarkdown, }, }, - sectionNameToModulePath: { - [docSections.coverageSubprovider]: ['"sol-cov/src/coverage_subprovider"'], - [docSections.abstractArtifactAdapter]: ['"sol-cov/src/artifact_adapters/abstract_artifact_adapter"'], - [docSections.solCompilerArtifactAdapter]: ['"sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter"'], - [docSections.truffleArtifactAdapter]: ['"sol-cov/src/artifact_adapters/truffle_artifact_adapter"'], - [docSections.types]: ['"subproviders/src/types"', '"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [ - docSections.coverageSubprovider, - docSections.abstractArtifactAdapter, - docSections.solCompilerArtifactAdapter, - docSections.truffleArtifactAdapter, - ], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'JSONRPCRequestPayload', - 'NextCallback', - 'ErrorCallback', - 'AbstractArtifactAdapter', - 'CoverageSubprovider', - 'TruffleArtifactAdapter', - 'SolCompilerArtifactAdapter', - 'ContractData', - ], typeNameToExternalLink: {}, typeNameToPrefix: {}, - typeNameToDocSection: { - AbstractArtifactAdapter: docSections.abstractArtifactAdapter, - CoverageSubprovider: docSections.coverageSubprovider, - TruffleArtifactAdapter: docSections.truffleArtifactAdapter, - SolCompilerArtifactAdapter: docSections.solCompilerArtifactAdapter, - }, }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 0e9150d7b..76c71902e 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -64,55 +64,8 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, }, }, - sectionNameToModulePath: { - [docSections.subprovider]: ['"subproviders/src/subproviders/subprovider"'], - [docSections.ledgerSubprovider]: ['"subproviders/src/subproviders/ledger"'], - [docSections.privateKeyWalletSubprovider]: ['"subproviders/src/subproviders/private_key_wallet"'], - [docSections.mnemonicWalletSubprovider]: ['"subproviders/src/subproviders/mnemonic_wallet"'], - [docSections.factoryMethods]: ['"subproviders/src/index"'], - [docSections.emptyWalletSubprovider]: ['"subproviders/src/subproviders/empty_wallet_subprovider"'], - [docSections.fakeGasEstimateSubprovider]: ['"subproviders/src/subproviders/fake_gas_estimate_subprovider"'], - [docSections.injectedWeb3Subprovider]: ['"subproviders/src/subproviders/injected_web3"'], - [docSections.signerSubprovider]: ['"subproviders/src/subproviders/signer"'], - [docSections.redundantRPCSubprovider]: ['"subproviders/src/subproviders/redundant_rpc"'], - [docSections.ganacheSubprovider]: ['"subproviders/src/subproviders/ganache"'], - [docSections.nonceTrackerSubprovider]: ['"subproviders/src/subproviders/nonce_tracker"'], - [docSections.types]: ['"sol-compiler/src/utils/types"', '"types/src/index"', '"subproviders/src/types"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [ - docSections.subprovider, - docSections.ledgerSubprovider, - docSections.privateKeyWalletSubprovider, - docSections.mnemonicWalletSubprovider, - docSections.emptyWalletSubprovider, - docSections.fakeGasEstimateSubprovider, - docSections.injectedWeb3Subprovider, - docSections.redundantRPCSubprovider, - docSections.ganacheSubprovider, - docSections.nonceTrackerSubprovider, - ], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'Callback', - 'NextCallback', - 'ErrorCallback', - 'ECSignature', - 'JSONRPCRequestPayloadWithMethod', - 'JSONRPCRequestPayload', - 'JSONRPCResponsePayload', - 'AccountFetchingConfigs', - 'LedgerEthereumClientFactoryAsync', - 'PartialTxParams', - 'LedgerEthereumClient', - 'LedgerSubproviderConfigs', - 'MnemonicWalletSubproviderConfigs', - 'OnNextCompleted', - 'Provider', - ], typeNameToExternalLink: { Web3: constants.URL_WEB3_DOCS, BigNumber: constants.URL_BIGNUMBERJS_GITHUB, diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 8d98d9476..1a4101f5d 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -38,60 +38,13 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.installation]: InstallationMarkdownV1, }, }, - sectionNameToModulePath: { - [docSections.web3Wrapper]: ['"web3-wrapper/src/web3_wrapper"'], - [docSections.types]: ['"types/src/index"'], - }, - menuSubsectionToVersionWhenIntroduced: {}, sections: docSections, - visibleConstructors: [docSections.web3Wrapper], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( - publicTypes: [ - 'TxData', - 'TransactionReceipt', - 'RawLogEntry', - 'ContractAbi', - 'BlockParam', - 'FilterObject', - 'LogEntry', - 'BlockWithoutTransactionData', - 'CallData', - 'LogEntryEvent', - 'Provider', - 'AbiDefinition', - 'LogTopic', - 'JSONRPCRequestPayload', - 'JSONRPCResponsePayload', - 'BlockParamLiteral', - 'FunctionAbi', - 'EventAbi', - 'JSONRPCErrorCallback', - 'MethodAbi', - 'ConstructorAbi', - 'FallbackAbi', - 'EventParameter', - 'DataItem', - 'StateMutability', - 'Function', - 'Fallback', - 'Constructor', - 'Event', - 'ConstructorStateMutability', - 'TransactionReceiptWithDecodedLogs', - 'DecodedLogArgs', - 'LogWithDecodedArgs', - 'ContractEventArg', - ], typeNameToExternalLink: { Web3: constants.URL_WEB3_DOCS, BigNumber: constants.URL_BIGNUMBERJS_GITHUB, }, typeNameToPrefix: {}, - typeNameToDocSection: { - Web3Wrapper: docSections.web3Wrapper, - }, }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 6be54595d..3b706f262 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -27,14 +27,6 @@ const zeroExJsDocSections = { async: 'async', errors: 'errors', versioning: 'versioning', - zeroEx: 'zeroEx', - exchange: 'exchange', - token: 'token', - tokenRegistry: 'tokenRegistry', - etherToken: 'etherToken', - proxy: 'proxy', - orderWatcher: 'orderWatcher', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -46,16 +38,6 @@ const docsInfoConfig: DocsInfoConfig = { introduction: [zeroExJsDocSections.introduction], install: [zeroExJsDocSections.installation], topics: [zeroExJsDocSections.async, zeroExJsDocSections.errors, zeroExJsDocSections.versioning], - zeroEx: [zeroExJsDocSections.zeroEx], - contracts: [ - zeroExJsDocSections.exchange, - zeroExJsDocSections.token, - zeroExJsDocSections.tokenRegistry, - zeroExJsDocSections.etherToken, - zeroExJsDocSections.proxy, - ], - orderWatcher: [zeroExJsDocSections.orderWatcher], - types: [zeroExJsDocSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { @@ -74,166 +56,12 @@ const docsInfoConfig: DocsInfoConfig = { [zeroExJsDocSections.errors]: ErrorsMarkdownV1, }, }, - sectionNameToModulePath: { - [zeroExJsDocSections.zeroEx]: ['"0x.js/src/0x"', '"src/0x"'], - [zeroExJsDocSections.exchange]: [ - '"0x.js/src/contract_wrappers/exchange_wrapper"', - '"src/contract_wrappers/exchange_wrapper"', - '"contract-wrappers/src/contract_wrappers/exchange_wrapper"', - ], - [zeroExJsDocSections.tokenRegistry]: [ - '"0x.js/src/contract_wrappers/token_registry_wrapper"', - '"src/contract_wrappers/token_registry_wrapper"', - '"contract-wrappers/src/contract_wrappers/token_registry_wrapper"', - ], - [zeroExJsDocSections.token]: [ - '"0x.js/src/contract_wrappers/token_wrapper"', - '"src/contract_wrappers/token_wrapper"', - '"contract-wrappers/src/contract_wrappers/token_wrapper"', - ], - [zeroExJsDocSections.etherToken]: [ - '"0x.js/src/contract_wrappers/ether_token_wrapper"', - '"src/contract_wrappers/ether_token_wrapper"', - '"contract-wrappers/src/contract_wrappers/ether_token_wrapper"', - ], - [zeroExJsDocSections.proxy]: [ - '"0x.js/src/contract_wrappers/proxy_wrapper"', - '"0x.js/src/contract_wrappers/token_transfer_proxy_wrapper"', - '"contract-wrappers/src/contract_wrappers/token_transfer_proxy_wrapper"', - ], - [zeroExJsDocSections.orderWatcher]: [ - '"0x.js/src/order_watcher/order_state_watcher"', - '"src/order_watcher/order_state_watcher"', - '"order-watcher/src/order_watcher/order_watcher"', - ], - [zeroExJsDocSections.types]: [ - '"0x.js/src/types"', - '"src/types"', - '"types/src/index"', - '"contract-wrappers/src/types"', - '"0x.js/src/contract_wrappers/generated/ether_token"', - '"0x.js/src/contract_wrappers/generated/token"', - '"0x.js/src/contract_wrappers/generated/exchange"', - '"0x.js/src/generated_contract_wrappers/ether_token"', - '"0x.js/src/generated_contract_wrappers/token"', - '"0x.js/src/generated_contract_wrappers/exchange"', - ], - }, - menuSubsectionToVersionWhenIntroduced: { - [zeroExJsDocSections.etherToken]: '0.7.1', - [zeroExJsDocSections.proxy]: '0.8.0', - [zeroExJsDocSections.orderWatcher]: '0.27.1', - }, sections: zeroExJsDocSections, - visibleConstructors: [zeroExJsDocSections.zeroEx], typeConfigs: { - // Note: This needs to be kept in sync with the types exported in index.ts. Unfortunately there is - // currently no way to extract the re-exported types from index.ts via TypeDoc :( Make sure to only - // ADD types here, DO NOT REMOVE types since they might still be needed for older supported versions - publicTypes: [ - 'Order', - 'SignedOrder', - 'ECSignature', - 'ContractWrappersError', - 'EventCallback', - 'EventCallbackAsync', - 'EventCallbackSync', - 'ExchangeContractErrs', - 'ContractEvent', - 'Token', - 'Provider', - 'ExchangeEvents', - 'IndexedFilterValues', - 'SubscriptionOpts', - 'BlockRange', - 'BlockParam', - 'OrderFillOrKillRequest', - 'OrderCancellationRequest', - 'OrderFillRequest', - 'ContractEventEmitter', - 'Web3Provider', - 'ContractEventArgs', - 'LogCancelArgs', - 'LogFillArgs', - 'LogErrorContractEventArgs', - 'LogFillContractEventArgs', - 'LogCancelContractEventArgs', - 'EtherTokenContractEventArgs', - 'WithdrawalContractEventArgs', - 'DepositContractEventArgs', - 'TokenEvents', - 'ExchangeContractEventArgs', - 'TransferContractEventArgs', - 'ApprovalContractEventArgs', - 'TokenContractEventArgs', - 'ZeroExConfig', - 'TransactionReceipt', - 'TransactionReceiptWithDecodedLogs', - 'LogWithDecodedArgs', - 'EtherTokenEvents', - 'BlockParamLiteral', - 'DecodedLogArgs', - 'MethodOpts', - 'ValidateOrderFillableOpts', - 'OrderTransactionOpts', - 'TransactionOpts', - 'ContractEventArg', - 'LogEvent', - 'DecodedLogEvent', - 'EventWatcherCallback', - 'OnOrderStateChangeCallback', - 'OrderStateValid', - 'OrderStateInvalid', - 'OrderState', - 'OrderStateWatcherConfig', - 'OrderWatcherConfig', - 'FilterObject', - 'OrderRelevantState', - 'JSONRPCRequestPayload', - 'JSONRPCResponsePayload', - 'JSONRPCErrorCallback', - 'LogEntryEvent', - 'LogEntry', - 'ERC20AssetData', - 'ERC721AssetData', - 'AssetProxyId', - 'WETH9Events', - 'WETH9WithdrawalEventArgs', - 'WETH9ApprovalEventArgs', - 'WETH9EventArgs', - 'WETH9DepositEventArgs', - 'WETH9TransferEventArgs', - 'ERC20TokenTransferEventArgs', - 'ERC20TokenApprovalEventArgs', - 'ERC20TokenEvents', - 'ERC20TokenEventArgs', - 'ERC721TokenApprovalEventArgs', - 'ERC721TokenApprovalForAllEventArgs', - 'ERC721TokenTransferEventArgs', - 'ERC721TokenEvents', - 'ExchangeCancelUpToEventArgs', - 'ExchangeAssetProxyRegisteredEventArgs', - 'ExchangeFillEventArgs', - 'ExchangeCancelEventArgs', - 'ExchangeEventArgs', - 'ContractWrappersConfig', - 'MessagePrefixType', - 'MessagePrefixOpts', - 'OrderInfo', - ], typeNameToPrefix: {}, typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, }, - typeNameToDocSection: { - ExchangeWrapper: 'exchange', - TokenWrapper: 'token', - TokenRegistryWrapper: 'tokenRegistry', - EtherTokenWrapper: 'etherToken', - ProxyWrapper: 'proxy', - TokenTransferProxyWrapper: 'proxy', - OrderStateWatcher: 'orderWatcher', - }, }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 8159bbd49..6e11dead9 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -84,7 +84,7 @@ export class DocPage extends React.Component<DocPageProps, DocPageState> { location={this.props.location} docsVersion={this.props.docsVersion} availableDocVersions={this.props.availableDocVersions} - menu={this.props.docsInfo.getMenu(this.props.docsVersion)} + menu={this.props.docsInfo.menu} menuSubsectionsBySection={menuSubsectionsBySection} docsInfo={this.props.docsInfo} translate={this.props.translate} diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts index b9084bba7..e313648bd 100644 --- a/packages/website/ts/utils/doc_utils.ts +++ b/packages/website/ts/utils/doc_utils.ts @@ -1,4 +1,4 @@ -import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs'; +import { DoxityDocObj, GeneratedDocJson } from '@0xproject/react-docs'; import { fetchAsync, logUtils } from '@0xproject/utils'; import * as _ from 'lodash'; import { S3FileObject, VersionToFilePath } from 'ts/types'; @@ -70,7 +70,7 @@ export const docUtils = { }); return versionFilePaths; }, - async getJSONDocFileAsync(filePath: string, s3DocJsonRoot: string): Promise<TypeDocNode | DoxityDocObj> { + async getJSONDocFileAsync(filePath: string, s3DocJsonRoot: string): Promise<GeneratedDocJson | DoxityDocObj> { const endpoint = `${s3DocJsonRoot}/${filePath}`; const response = await fetchAsync(endpoint); if (response.status !== 200) { diff --git a/yarn.lock b/yarn.lock index 4f8c1fe86..57acb36fe 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1149,6 +1149,12 @@ dependencies: "@types/react" "*" +"@types/react-scroll@1.5.3": + version "1.5.3" + resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-1.5.3.tgz#cc4e94db3d7d5b1cd244bfee24091c335d3e2598" + dependencies: + "@types/react" "*" + "@types/react-tap-event-plugin@0.0.30": version "0.0.30" resolved "https://registry.yarnpkg.com/@types/react-tap-event-plugin/-/react-tap-event-plugin-0.0.30.tgz#123f35080412f489b6770c5a65c159ff96654cb5" @@ -10655,9 +10661,9 @@ react-scroll@1.7.7: lodash.throttle "^4.1.1" prop-types "^15.5.8" -react-scroll@^1.5.2: - version "1.7.8" - resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.8.tgz#45d8bd0f3fb104a7a1c3adb358e3a742a7091409" +react-scroll@^1.7.10: + version "1.7.10" + resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.10.tgz#b59cfa11a899a362c6489607ed5865c9c5fd0b53" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" -- cgit v1.2.3 From 5e3bbbbb3c5be91be7c81f92f42e34edd02ea264 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 18:56:31 +0200 Subject: Use our fork of react-scroll that fixes scrolling within an absolutely positioned div to work correctly. See: https://github.com/fisshy/react-scroll/pull/330 --- packages/react-docs/package.json | 2 +- packages/react-shared/package.json | 2 +- packages/website/package.json | 2 +- yarn.lock | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index c95051bde..f6d829cdf 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -49,7 +49,7 @@ "react": "15.6.1", "react-dom": "15.6.1", "react-markdown": "^3.2.2", - "react-scroll": "^1.7.10", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330", "react-tooltip": "^3.2.7", "semver": "5.5.0" }, diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 9f4cfd624..ab0e2b7bd 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -48,7 +48,7 @@ "react-dom": "15.6.1", "react-highlight": "0xproject/react-highlight", "react-markdown": "^3.2.2", - "react-scroll": "^1.7.10", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330", "react-tap-event-plugin": "^2.0.1" }, "publishConfig": { diff --git a/packages/website/package.json b/packages/website/package.json index ef420ab07..fda724fc8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -49,7 +49,7 @@ "react-popper": "^1.0.0-beta.6", "react-redux": "^5.0.3", "react-router-dom": "^4.1.1", - "react-scroll": "^1.7.10", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330", "react-tap-event-plugin": "^2.0.1", "react-tooltip": "^3.2.7", "redux": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index 57acb36fe..9b8462257 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10654,16 +10654,16 @@ react-router@^4.2.0: prop-types "^15.5.4" warning "^3.0.0" -react-scroll@1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.7.tgz#948c40c9a189b62bf4a53ee0fd50e5d89d37260a" +react-scroll@0xproject/react-scroll#similar-to-pr-330: + version "1.7.10" + resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/f28a6c51800152fde11e7362383992aa60a15703" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" -react-scroll@^1.7.10: - version "1.7.10" - resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.10.tgz#b59cfa11a899a362c6489607ed5865c9c5fd0b53" +react-scroll@1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.7.tgz#948c40c9a189b62bf4a53ee0fd50e5d89d37260a" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" -- cgit v1.2.3 From 32e1c2ac970069f5251bd3cd7a31072f0547cf2c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 19:02:20 +0200 Subject: Add padding above anchor titles so they show up nice when scrolled to --- packages/react-docs/src/components/property_block.tsx | 2 +- packages/react-docs/src/components/type_definition.tsx | 2 +- packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index 6e7f90c6c..466082a91 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -34,7 +34,7 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB return ( <div id={`${this.props.sectionName}-${property.name}`} - className="pb4" + className="pb4 pt2" key={`property-${property.name}-${property.type.name}`} onMouseOver={this._setAnchorVisibility.bind(this, true)} onMouseOut={this._setAnchorVisibility.bind(this, false)} diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index a23f27181..26fbbf75c 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -100,7 +100,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef return ( <div id={this.props.shouldAddId ? typeDefinitionAnchorId : ''} - className="pb2" + className="pb2 pt2" style={{ overflow: 'hidden', width: '100%' }} onMouseOver={this._setAnchorVisibility.bind(this, true)} onMouseOut={this._setAnchorVisibility.bind(this, false)} diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 10bcb7d8c..4b1c2f365 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -93,7 +93,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N <ScrollLink key={`menuItem-${menuItemName}`} to={id} - offset={-10} + offset={0} hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} -- cgit v1.2.3 From e5b93d1f0292cb6cc38d3f92d623b27cba6ac233 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 20:48:19 +0200 Subject: Add callpath to properties --- .../react-docs/src/components/property_block.tsx | 2 +- packages/react-docs/src/types.ts | 1 + packages/react-docs/src/utils/typedoc_utils.ts | 39 +++++++++++++--------- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index 466082a91..074c59c5f 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -48,7 +48,7 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB /> </div> <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> - {property.name}:{' '} + {(property as any).callPath}{property.name}:{' '} <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} /> </code> {property.source && ( diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 83ad157d1..ca869df1c 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -202,6 +202,7 @@ export interface Property { type: Type; source?: Source; comment?: string; + callPath?: string; } export interface BaseMethod { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 1e7c29ce8..1c685f915 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -283,6 +283,9 @@ export const typeDocUtils = { _convertProperty(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): Property { const source = entity.sources[0]; const commentIfExists = !_.isUndefined(entity.comment) ? entity.comment.shortText : undefined; + const isConstructor = false; + const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; + const callPath = typeDocUtils._getCallPath(sectionName, sections, isStatic, isConstructor, docId, entity.name); const property = { name: entity.name, type: typeDocUtils._convertType(entity.type, sections, sectionName, docId), @@ -291,6 +294,7 @@ export const typeDocUtils = { line: source.line, }, comment: commentIfExists, + callPath, }; return property; }, @@ -306,22 +310,6 @@ export const typeDocUtils = { const hasComment = !_.isUndefined(signature.comment); const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; - // HACK: we use the fact that the sectionName is the same as the property name at the top-level - // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. - let callPath; - if (isConstructor || entity.name === '__type') { - callPath = ''; - // TODO: Get rid of this 0x-specific logic - } else if (docId === 'ZERO_EX_JS') { - const topLevelInterface = isStatic ? 'ZeroEx.' : 'zeroEx.'; - callPath = - !_.isUndefined(sections.zeroEx) && sectionName !== sections.zeroEx - ? `${topLevelInterface}${sectionName}.` - : topLevelInterface; - } else { - callPath = `${sectionName}.`; - } - const parameters = _.map(signature.parameters, param => { return typeDocUtils._convertParameter(param, sections, sectionName, docId); }); @@ -330,6 +318,7 @@ export const typeDocUtils = { ? undefined : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId); + const callPath = typeDocUtils._getCallPath(sectionName, sections, isStatic, isConstructor, docId, entity.name); const method = { isConstructor, isStatic, @@ -347,6 +336,24 @@ export const typeDocUtils = { }; return method; }, + _getCallPath(sectionName: string, sections: SectionsMap, isStatic: boolean, isConstructor: boolean, docId: string, entityName: string) { + // HACK: we use the fact that the sectionName is the same as the property name at the top-level + // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. + let callPath; + if (isConstructor || entityName === '__type') { + callPath = ''; + // TODO: Get rid of this 0x-specific logic + } else if (docId === 'ZERO_EX_JS') { + const topLevelInterface = isStatic ? 'ZeroEx.' : 'zeroEx.'; + callPath = + !_.isUndefined(sections.zeroEx) && sectionName !== sections.zeroEx + ? `${topLevelInterface}${sectionName}.` + : topLevelInterface; + } else { + callPath = `${sectionName}.`; + } + return callPath; + }, _convertFunction( entity: TypeDocNode, sections: SectionsMap, -- cgit v1.2.3 From 2494af99aad4dd58c0d4e647dedf72946cb3c20b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 1 Aug 2018 21:00:45 +0200 Subject: Prefix menu and sections with markdown as that is all the should now be defined --- packages/react-docs/src/docs_info.ts | 9 ++---- packages/react-docs/src/types.ts | 4 +-- .../website/ts/containers/connect_documentation.ts | 20 +++++++------- .../ts/containers/ethereum_types_documentation.ts | 16 +++++------ .../ts/containers/json_schemas_documentation.ts | 24 ++++++++-------- .../ts/containers/order_utils_documentation.ts | 18 ++++++------ .../ts/containers/smart_contracts_documentation.ts | 4 +-- .../ts/containers/sol_compiler_documentation.ts | 22 +++++++-------- .../website/ts/containers/sol_cov_documentation.ts | 28 ++++++------------- .../ts/containers/subproviders_documentation.ts | 30 ++------------------ .../ts/containers/web3_wrapper_documentation.ts | 8 ++---- .../ts/containers/zero_ex_js_documentation.ts | 32 +++++++++++----------- 12 files changed, 85 insertions(+), 130 deletions(-) diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index dd3cb9a96..0637f3e65 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -28,21 +28,16 @@ export class DocsInfo { public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId; public typeConfigs: DocsInfoTypeConfigs; - private readonly _docsInfo: DocsInfoConfig; constructor(config: DocsInfoConfig) { this.id = config.id; this.type = config.type; - this.menu = config.menu; + this.menu = config.markdownMenu; this.displayName = config.displayName; this.packageUrl = config.packageUrl; - this.sections = config.sections; + this.sections = config.markdownSections; this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId; this.typeConfigs = config.typeConfigs; - this._docsInfo = config; - } - public getMenu(selectedVersion?: string): { [section: string]: string[] } { - return this._docsInfo.menu; } public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection { const menuSubsectionsBySection = {} as MenuSubsectionsBySection; diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index ca869df1c..aebd823db 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -7,8 +7,8 @@ export interface DocsInfoConfig { type: SupportedDocJson; displayName: string; packageUrl: string; - menu: DocsMenu; - sections: SectionsMap; + markdownMenu: DocsMenu; + markdownSections: SectionsMap; sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; contractsByVersionByNetworkId?: ContractsByVersionByNetworkId; typeConfigs?: DocsInfoTypeConfigs; diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 74464e650..8e3b8d1c9 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -14,7 +14,7 @@ const IntroMarkdownV1 = require('md/docs/connect/1.0.0/introduction'); const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation'); /* tslint:enable:no-var-requires */ -const connectDocSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', httpClient: 'httpClient', @@ -27,20 +27,20 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: '0x Connect', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [connectDocSections.introduction], - install: [connectDocSections.installation], - httpClient: [connectDocSections.httpClient], - webSocketOrderbookChannel: [connectDocSections.webSocketOrderbookChannel], - types: [connectDocSections.types], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + httpClient: [markdownSections.httpClient], + webSocketOrderbookChannel: [markdownSections.webSocketOrderbookChannel], + types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [connectDocSections.introduction]: IntroMarkdownV1, - [connectDocSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, }, }, - sections: connectDocSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: { Provider: constants.URL_WEB3_PROVIDER_DOCS, diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 041a6bea3..5f08e0236 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -14,7 +14,7 @@ const IntroMarkdown = require('md/docs/ethereum_types/introduction'); const InstallationMarkdown = require('md/docs/ethereum_types/installation'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', types: docConstants.TYPES_SECTION_NAME, @@ -25,18 +25,18 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Ethereum Types', packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/ethereum-types', - menu: { - introduction: [docSections.introduction], - install: [docSections.installation], - types: [docSections.types], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdown, - [docSections.installation]: InstallationMarkdown, + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallationMarkdown, }, }, - sections: docSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 3ecc0f312..f88cec6ec 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -15,7 +15,7 @@ const UsageMarkdownV1 = require('md/docs/json_schemas/1.0.0/usage'); const SchemasMarkdownV1 = require('md/docs/json_schemas/1.0.0/schemas'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', @@ -28,22 +28,22 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'JSON Schemas', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [docSections.introduction], - install: [docSections.installation], - usage: [docSections.usage], - schemaValidator: [docSections.schemaValidator], - schemas: [docSections.schemas], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + usage: [markdownSections.usage], + schemaValidator: [markdownSections.schemaValidator], + schemas: [markdownSections.schemas], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, - [docSections.schemas]: SchemasMarkdownV1, - [docSections.usage]: UsageMarkdownV1, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.schemas]: SchemasMarkdownV1, + [markdownSections.usage]: UsageMarkdownV1, }, }, - sections: docSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: { Schema: diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 29cbf9501..9af863d8a 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -14,7 +14,7 @@ const IntroMarkdownV1 = require('md/docs/order_utils/1.0.0/introduction'); const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', @@ -26,19 +26,19 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Order utils', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [docSections.introduction], - install: [docSections.installation], - usage: [docSections.usage], - types: [docSections.types], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + usage: [markdownSections.usage], + types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, }, }, - sections: docSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index e3a1bd7a6..a2b3545ae 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -18,7 +18,7 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.Doxity, displayName: '0x Smart Contracts', packageUrl: 'https://github.com/0xProject/contracts', - menu: { + markdownMenu: { introduction: [Sections.Introduction], contracts: [Sections.Exchange, Sections.TokenRegistry, Sections.ZRXToken, Sections.TokenTransferProxy], }, @@ -27,7 +27,7 @@ const docsInfoConfig: DocsInfoConfig = { [Sections.Introduction]: IntroMarkdownV1, }, }, - sections: { + markdownSections: { Introduction: Sections.Introduction, Exchange: Sections.Exchange, TokenTransferProxy: Sections.TokenTransferProxy, diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index bd6a85c83..635c2112b 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -14,7 +14,7 @@ const InstallationMarkdownV1 = require('md/docs/sol-compiler/installation'); const UsageMarkdown = require('md/docs/sol-compiler/usage'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', @@ -27,21 +27,21 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Solidity Compiler', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [docSections.introduction], - install: [docSections.installation], - usage: [docSections.usage], - compiler: [docSections.compiler], - types: [docSections.types], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + usage: [markdownSections.usage], + compiler: [markdownSections.compiler], + types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, - [docSections.usage]: UsageMarkdown, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.usage]: UsageMarkdown, }, }, - sections: docSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: {}, typeNameToPrefix: {}, diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 5567eb97e..0ad7bbfd4 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -14,15 +14,10 @@ const InstallationMarkdownV1 = require('md/docs/sol_cov/installation'); const UsageMarkdown = require('md/docs/sol_cov/usage'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', - coverageSubprovider: 'coverageSubprovider', - abstractArtifactAdapter: 'abstractArtifactAdapter', - solCompilerArtifactAdapter: 'solCompilerArtifactAdapter', - truffleArtifactAdapter: 'truffleArtifactAdapter', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -30,24 +25,19 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Sol-cov', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [docSections.introduction], - install: [docSections.installation], - usage: [docSections.usage], - 'coverage-subprovider': [docSections.coverageSubprovider], - 'abstract-artifact-adapter': [docSections.abstractArtifactAdapter], - 'sol-compiler-artifact-adapter': [docSections.solCompilerArtifactAdapter], - 'truffle-artifact-adapter': [docSections.truffleArtifactAdapter], - types: [docSections.types], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + usage: [markdownSections.usage], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, - [docSections.usage]: UsageMarkdown, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.usage]: UsageMarkdown, }, }, - sections: docSections, + markdownSections: markdownSections, typeConfigs: { typeNameToExternalLink: {}, typeNameToPrefix: {}, diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 76c71902e..4aaffd908 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -18,20 +18,7 @@ const LedgerNodeHidMarkdown = require('md/docs/subproviders/ledger_node_hid'); const docSections = { introduction: 'introduction', installation: 'installation', - subprovider: 'subprovider', - ledgerSubprovider: 'ledgerSubprovider', ledgerNodeHid: 'ledger-node-hid-issue', - factoryMethods: 'factory-methods', - emptyWalletSubprovider: 'emptyWalletSubprovider', - fakeGasEstimateSubprovider: 'fakeGasEstimateSubprovider', - injectedWeb3Subprovider: 'injectedWeb3Subprovider', - signerSubprovider: 'signerSubprovider', - redundantRPCSubprovider: 'redundantRPCSubprovider', - ganacheSubprovider: 'ganacheSubprovider', - nonceTrackerSubprovider: 'nonceTrackerSubprovider', - privateKeyWalletSubprovider: 'privateKeyWalletSubprovider', - mnemonicWalletSubprovider: 'mnemonicWalletSubprovider', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -39,23 +26,10 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Subproviders', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { + markdownMenu: { introduction: [docSections.introduction], install: [docSections.installation], - subprovider: [docSections.subprovider], - ['ledger-subprovider']: [docSections.ledgerSubprovider], ['ledger-node-hid-issue']: [docSections.ledgerNodeHid], - ['private-key-wallet-subprovider']: [docSections.privateKeyWalletSubprovider], - ['mnemonic-wallet-subprovider']: [docSections.mnemonicWalletSubprovider], - ['factory-methods']: [docSections.factoryMethods], - ['emptyWallet-subprovider']: [docSections.emptyWalletSubprovider], - ['fakeGasEstimate-subprovider']: [docSections.fakeGasEstimateSubprovider], - ['injectedWeb3-subprovider']: [docSections.injectedWeb3Subprovider], - ['signer-subprovider']: [docSections.signerSubprovider], - ['redundantRPC-subprovider']: [docSections.redundantRPCSubprovider], - ['ganache-subprovider']: [docSections.ganacheSubprovider], - ['nonceTracker-subprovider']: [docSections.nonceTrackerSubprovider], - types: [docSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { @@ -64,7 +38,7 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, }, }, - sections: docSections, + markdownSections: docSections, typeConfigs: { typeNameToExternalLink: { Web3: constants.URL_WEB3_DOCS, diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 1a4101f5d..b015fd0d9 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -17,8 +17,6 @@ const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation'); const docSections = { introduction: 'introduction', installation: 'installation', - web3Wrapper: 'web3Wrapper', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -26,11 +24,9 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: 'Web3Wrapper', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { + markdownMenu: { introduction: [docSections.introduction], install: [docSections.installation], - web3Wrapper: [docSections.web3Wrapper], - types: [docSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { @@ -38,7 +34,7 @@ const docsInfoConfig: DocsInfoConfig = { [docSections.installation]: InstallationMarkdownV1, }, }, - sections: docSections, + markdownSections: docSections, typeConfigs: { typeNameToExternalLink: { Web3: constants.URL_WEB3_DOCS, diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 3b706f262..79e342e01 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -20,7 +20,7 @@ const IntroMarkdownV2 = require('md/docs/0xjs/2.0.0/introduction'); const versioningMarkdownV2 = require('md/docs/0xjs/2.0.0/versioning'); /* tslint:enable:no-var-requires */ -const zeroExJsDocSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', testrpc: 'testrpc', @@ -34,29 +34,29 @@ const docsInfoConfig: DocsInfoConfig = { type: SupportedDocJson.TypeDoc, displayName: '0x.js', packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [zeroExJsDocSections.introduction], - install: [zeroExJsDocSections.installation], - topics: [zeroExJsDocSections.async, zeroExJsDocSections.errors, zeroExJsDocSections.versioning], + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + topics: [markdownSections.async, markdownSections.errors, markdownSections.versioning], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [zeroExJsDocSections.introduction]: IntroMarkdownV1, - [zeroExJsDocSections.installation]: InstallationMarkdownV1, - [zeroExJsDocSections.async]: AsyncMarkdownV1, - [zeroExJsDocSections.errors]: ErrorsMarkdownV1, - [zeroExJsDocSections.versioning]: versioningMarkdownV1, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.async]: AsyncMarkdownV1, + [markdownSections.errors]: ErrorsMarkdownV1, + [markdownSections.versioning]: versioningMarkdownV1, }, '1.0.0-rc.1': { - [zeroExJsDocSections.introduction]: IntroMarkdownV2, - [zeroExJsDocSections.versioning]: versioningMarkdownV2, + [markdownSections.introduction]: IntroMarkdownV2, + [markdownSections.versioning]: versioningMarkdownV2, // These are the same as for V1 - [zeroExJsDocSections.installation]: InstallationMarkdownV1, - [zeroExJsDocSections.async]: AsyncMarkdownV1, - [zeroExJsDocSections.errors]: ErrorsMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.async]: AsyncMarkdownV1, + [markdownSections.errors]: ErrorsMarkdownV1, }, }, - sections: zeroExJsDocSections, + markdownSections: markdownSections, typeConfigs: { typeNameToPrefix: {}, typeNameToExternalLink: { -- cgit v1.2.3 From 0132286cab49ff6c705abd70cdd89e36b3550c27 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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 +- packages/website/translations/chinese.json | 2 + packages/website/translations/english.json | 2 + packages/website/translations/korean.json | 2 + packages/website/translations/russian.json | 2 + packages/website/translations/spanish.json | 2 + packages/website/ts/components/top_bar/top_bar.tsx | 155 +++++---------------- .../containers/contract_wrappers_documentation.ts | 56 ++++++++ packages/website/ts/index.tsx | 4 + .../website/ts/pages/documentation/doc_page.tsx | 1 + packages/website/ts/types.ts | 4 + 11 files changed, 121 insertions(+), 119 deletions(-) create mode 100644 packages/website/ts/containers/contract_wrappers_documentation.ts 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" }, diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 3e9f21370..8af9835ab 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -61,6 +61,8 @@ "SOL_COV": "Solidity Coverage", "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", + "CONTRACT_WRAPPERS": "Contract Wrappers", + "0x.js": "0x.js", "BLOG": "博客", "FORUM": "论坛", "CONNECT": "0x 连接", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index d94dbb29e..b6a8113d3 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -62,6 +62,8 @@ "SOL_COV": "Solidity Coverage", "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", + "CONTRACT_WRAPPERS": "Contract Wrappers", + "0X_JS": "0x.js", "BLOG": "blog", "FORUM": "forum", "CONNECT": "0x Connect", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index c38de6677..1c2b585bf 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -61,6 +61,8 @@ "SOL_COV": "Solidity Coverage", "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", + "CONTRACT_WRAPPERS": "Contract Wrappers", + "0X_JS": "0x.js", "BLOG": "블로그", "FORUM": "포럼", "CONNECT": "0x Connect", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index a7e06d646..c2df8ee2a 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -61,6 +61,8 @@ "SOL_COV": "Solidity Coverage", "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", + "CONTRACT_WRAPPERS": "Contract Wrappers", + "0X_JS": "0x.js", "BLOG": "Блог", "FORUM": "Форум", "CONNECT": "0x Connect", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 5a8920f61..a874673cf 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -62,6 +62,8 @@ "SOL_COV": "Solidity Coverage", "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", + "CONTRACT_WRAPPERS": "Contract Wrappers", + "0X_JS": "0x.js", "BLOG": "blog", "FORUM": "foro", "CONNECT": "0x Connect", diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 646d3fc94..d2f530fb5 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -74,6 +74,18 @@ const styles: Styles = { }, }; +const DOC_WEBSITE_PATHS_TO_KEY = { + [WebsitePaths.SolCov]: Key.SolCov, + [WebsitePaths.SmartContracts]: Key.SmartContracts, + [WebsitePaths.Web3Wrapper]: Key.Web3Wrapper, + [WebsitePaths.SolCompiler]: Key.SolCompiler, + [WebsitePaths.JSONSchemas]: Key.JsonSchemas, + [WebsitePaths.Subproviders]: Key.Subproviders, + [WebsitePaths.ContractWrappers]: Key.ContractWrappers, + [WebsitePaths.Connect]: Key.Connect, + [WebsitePaths.ZeroExJs]: Key.ZeroExJs, +} + const DEFAULT_HEIGHT = 68; const EXPANDED_HEIGHT = 75; @@ -154,6 +166,12 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)} /> </Link>, + <Link key="subMenuItem-contractWrappers" to={WebsitePaths.ContractWrappers} className="text-decoration-none"> + <MenuItem + style={{ fontSize: styles.menuItem.fontSize }} + primaryText={this.props.translate.get(Key.ContractWrappers, Deco.CapWords)} + /> + </Link>, <Link key="subMenuItem-sol-compiler" to={WebsitePaths.SolCompiler} className="text-decoration-none"> <MenuItem style={{ fontSize: styles.menuItem.fontSize }} @@ -334,75 +352,16 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { <Link to={`${WebsitePaths.Wiki}`} className="text-decoration-none"> <MenuItem className="py2">{this.props.translate.get(Key.Wiki, Deco.Cap)}</MenuItem> </Link> - {!this._isViewing0xjsDocs() && ( - <Link to={WebsitePaths.ZeroExJs} className="text-decoration-none"> - <MenuItem className="py2">0x.js {this.props.translate.get(Key.Docs, Deco.Cap)}</MenuItem> - </Link> - )} - {!this._isViewingConnectDocs() && ( - <Link to={WebsitePaths.Connect} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.Connect, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingSmartContractsDocs() && ( - <Link to={WebsitePaths.SmartContracts} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.SmartContract, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingWeb3WrapperDocs() && ( - <Link to={WebsitePaths.Web3Wrapper} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.Web3Wrapper, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingSolCompilerDocs() && ( - <Link to={WebsitePaths.SolCompiler} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.SolCompiler, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingJsonSchemasDocs() && ( - <Link to={WebsitePaths.JSONSchemas} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.JsonSchemas, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingSolCovDocs() && ( - <Link to={WebsitePaths.SolCov} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.SolCov, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingSubprovidersDocs() && ( - <Link to={WebsitePaths.Subproviders} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.Subproviders, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} - {!this._isViewingEthereumTypesDocs() && ( - <Link to={WebsitePaths.EthereumTypes} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(Key.EthereumTypes, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link> - )} + {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => { + if (!this._doesUrlInclude(websitePath)) { + <Link to={websitePath} className="text-decoration-none"> + <MenuItem className="py2"> + {this.props.translate.get(key, Deco.Cap)}{' '} + {this.props.translate.get(Key.Docs, Deco.Cap)} + </MenuItem> + </Link> + } + })} {!this._isViewingPortal() && ( <Link to={`${WebsitePaths.Portal}`} className="text-decoration-none"> <MenuItem className="py2"> @@ -429,15 +388,11 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { ); } private _renderDocsMenu(): React.ReactNode { + const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { + return this._doesUrlInclude(websitePath); + }); if ( - (!this._isViewing0xjsDocs() && - !this._isViewingSmartContractsDocs() && - !this._isViewingWeb3WrapperDocs() && - !this._isViewingSolCompilerDocs() && - !this._isViewingJsonSchemasDocs() && - !this._isViewingSolCovDocs() && - !this._isViewingSubprovidersDocs() && - !this._isViewingConnectDocs()) || + !isViewingDocsPage || _.isUndefined(this.props.menu) ) { return undefined; @@ -488,55 +443,21 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { private _isViewingFAQ(): boolean { return _.includes(this.props.location.pathname, WebsitePaths.FAQ); } - private _isViewing0xjsDocs(): boolean { - return ( - _.includes(this.props.location.pathname, WebsitePaths.ZeroExJs) || - _.includes(this.props.location.pathname, WebsiteLegacyPaths.ZeroExJs) - ); - } - private _isViewingConnectDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.Connect); - } - private _isViewingSmartContractsDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.SmartContracts); - } - private _isViewingWeb3WrapperDocs(): boolean { - return ( - _.includes(this.props.location.pathname, WebsitePaths.Web3Wrapper) || - _.includes(this.props.location.pathname, WebsiteLegacyPaths.Web3Wrapper) - ); - } - private _isViewingSolCompilerDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.SolCompiler); - } - private _isViewingJsonSchemasDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.JSONSchemas); - } - private _isViewingSolCovDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.SolCov); - } - private _isViewingSubprovidersDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.Subproviders); - } - private _isViewingEthereumTypesDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.EthereumTypes); + private _doesUrlInclude(aPath: string): boolean { + return _.includes(this.props.location.pathname, aPath); } private _isViewingWiki(): boolean { return _.includes(this.props.location.pathname, WebsitePaths.Wiki); } private _shouldDisplayBottomBar(): boolean { + const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { + return this._doesUrlInclude(websitePath); + }); return ( + isViewingDocsPage || this._isViewingWiki() || this._isViewingFAQ() || this._isViewingDocs() || - this._isViewing0xjsDocs() || - this._isViewingSmartContractsDocs() || - this._isViewingWeb3WrapperDocs() || - this._isViewingSolCompilerDocs() || - this._isViewingJsonSchemasDocs() || - this._isViewingSolCovDocs() || - this._isViewingSubprovidersDocs() || - this._isViewingConnectDocs() || this._isViewingPortal() ); } diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts new file mode 100644 index 000000000..f0547cecd --- /dev/null +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -0,0 +1,56 @@ +import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { DocPackages } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +// TODO: Add MD sections +const markdownSections = {}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.ContractWrappers, + type: SupportedDocJson.TypeDoc, + displayName: 'Contract Wrappers', + packageUrl: 'https://github.com/0xProject/0x-monorepo', + markdownMenu: {}, + sectionNameToMarkdownByVersion: {}, + markdownSections, + typeConfigs: { + typeNameToPrefix: {}, + typeNameToExternalLink: { + BigNumber: constants.URL_BIGNUMBERJS_GITHUB, + }, + }, +}; +const docsInfo = new DocsInfo(docsInfoConfig); + +interface ConnectedState { + docsVersion: string; + availableDocVersions: string[]; + docsInfo: DocsInfo; + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ + docsVersion: state.docsVersion, + availableDocVersions: state.availableDocVersions, + docsInfo, + translate: state.translate, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( + DocPageComponent, +); diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index ed52e28d2..36b2f6b87 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -37,6 +37,9 @@ const LazyPortal = createLazyComponent('Portal', async () => const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () => System.import<any>(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'), ); +const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () => + System.import<any>(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'), +); const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () => System.import<any>(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'), ); @@ -80,6 +83,7 @@ render( <Route path={WebsitePaths.About} component={About as any} /> <Route path={WebsitePaths.Wiki} component={Wiki as any} /> <Route path={`${WebsitePaths.ZeroExJs}/:version?`} component={LazyZeroExJSDocumentation} /> + <Route path={`${WebsitePaths.ContractWrappers}/:version?`} component={LazyContractWrappersDocumentation} /> <Route path={`${WebsitePaths.Connect}/:version?`} component={LazyConnectDocumentation} /> <Route path={`${WebsitePaths.SolCompiler}/:version?`} diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 6e11dead9..e7e5f8a8c 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -28,6 +28,7 @@ const docIdToSubpackageName: { [id: string]: string } = { [DocPackages.Connect]: 'connect', [DocPackages.SmartContracts]: 'contracts', [DocPackages.Web3Wrapper]: 'web3-wrapper', + [DocPackages.ContractWrappers]: 'contract-wrappers', [DocPackages.SolCompiler]: 'sol-compiler', [DocPackages.JSONSchemas]: 'json-schemas', [DocPackages.SolCov]: 'sol-cov', diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index e1b5be39a..fd82ef7cb 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -371,6 +371,7 @@ export enum WebsitePaths { SmartContracts = '/docs/contracts', Connect = '/docs/connect', Web3Wrapper = '/docs/web3-wrapper', + ContractWrappers = '/docs/contract-wrappers', SolCompiler = '/docs/sol-compiler', JSONSchemas = '/docs/json-schemas', SolCov = '/docs/sol-cov', @@ -391,6 +392,7 @@ export enum DocPackages { Subproviders = 'SUBPROVIDERS', OrderUtils = 'ORDER_UTILS', EthereumTypes = 'ETHEREUM_TYPES', + ContractWrappers = 'CONTRACT_WRAPPERS', } export enum Key { @@ -444,6 +446,8 @@ export enum Key { SolCov = 'SOL_COV', EthereumTypes = 'ETHEREUM_TYPES', Subproviders = 'SUBPROVIDERS', + ZeroExJs = '0X_JS', + ContractWrappers = 'CONTRACT_WRAPPERS', Blog = 'BLOG', Forum = 'FORUM', Connect = 'CONNECT', -- cgit v1.2.3 From b92b745ab7a65dae808bf4fc465a8bc160ed8349 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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(-) 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 238eef6bae53fbff9399e6490b1401a3412bd171 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 00:01:23 +0200 Subject: Fix connect docs --- packages/website/ts/containers/connect_documentation.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 8e3b8d1c9..cecfefdef 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -17,9 +17,6 @@ const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation'); const markdownSections = { introduction: 'introduction', installation: 'installation', - httpClient: 'httpClient', - webSocketOrderbookChannel: 'webSocketOrderbookChannel', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -30,9 +27,6 @@ const docsInfoConfig: DocsInfoConfig = { markdownMenu: { introduction: [markdownSections.introduction], install: [markdownSections.installation], - httpClient: [markdownSections.httpClient], - webSocketOrderbookChannel: [markdownSections.webSocketOrderbookChannel], - types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { -- cgit v1.2.3 From 71a2f2d72172e4138b3d4d40ab6bbee4b90e4cf7 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 17:25:18 +0200 Subject: We need to always include the globals.d.ts otherwise TS complains about .json imports --- packages/monorepo-scripts/src/utils/publish_utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 01d44a369..3cdd2c4fb 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -195,6 +195,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); // Generate Typedoc JSON file + typeDocExtraFileIncludes.push(path.join(pathToPackage, 'src', 'globals.d.ts')); const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); const projectFiles = typeDocExtraFileIncludes.join(' '); const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); -- cgit v1.2.3 From 987971bd59c282e885679576262732e9afa297bb Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 17:26:53 +0200 Subject: Fix bug where if there were multiple matches, it wouldn't always take the longest match --- packages/monorepo-scripts/src/utils/publish_utils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 3cdd2c4fb..974fb4d0d 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -274,7 +274,7 @@ function findExportPathGivenTypedocName( packageName: string, typedocName: string, ): string { - const typeDocNameWithoutQuotes = _.replace(typedocName, '"', ''); + const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; const exportPaths = _.keys(exportPathToExportedItems); const sanitizedExportPaths = _.map(exportPaths, exportPath => { @@ -292,7 +292,13 @@ function findExportPathGivenTypedocName( sanitizedExportPathToExportPath[exportPath] = exportPath; return exportPath; }); - const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPaths, p => { + // We need to sort the exportPaths by length (longest first), so that the match finding will pick + // longer matches before shorter matches, since it might match both, but the longer match is more + // precisely what we are looking for. + const sanitizedExportPathsSortedByLength = sanitizedExportPaths.sort((a: string, b: string) => { + return b.length - a.length; + }); + const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPathsSortedByLength, p => { return _.startsWith(typeDocNameWithoutQuotes, p); }); if (_.isUndefined(matchingSanitizedExportPathIfExists)) { -- cgit v1.2.3 From b3473ff89f4d276fe74dd8e62680ab975fe24639 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 17:27:10 +0200 Subject: Remove unused var --- packages/react-docs/src/utils/typedoc_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 1c685f915..e2b259b13 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -73,7 +73,7 @@ export const typeDocUtils = { const fileChildIndex = _.findIndex(typeDocJson.children, child => child.name === typeDocName); const fileChild = typeDocJson.children[fileChildIndex]; let sectionName: string; - _.each(fileChild.children, (child, j) => { + _.each(fileChild.children, child => { switch (child.kindString) { case KindString.Class: case KindString.ObjectLiteral: { -- cgit v1.2.3 From 9a3b630b1989abbe1d6784f121fd0a60169e3012 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 17:27:29 +0200 Subject: prettier --- packages/react-docs/src/utils/typedoc_utils.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index e2b259b13..35d28627f 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -336,7 +336,14 @@ export const typeDocUtils = { }; return method; }, - _getCallPath(sectionName: string, sections: SectionsMap, isStatic: boolean, isConstructor: boolean, docId: string, entityName: string) { + _getCallPath( + sectionName: string, + sections: SectionsMap, + isStatic: boolean, + isConstructor: boolean, + docId: string, + entityName: string, + ) { // HACK: we use the fact that the sectionName is the same as the property name at the top-level // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. let callPath; -- cgit v1.2.3 From faa980ffc3bde48e4aaca665c8be83ea4c44b106 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 21:08:21 +0200 Subject: Add ability to omit rendering specific exports and also support direct exports from index.ts --- packages/json-schemas/package.json | 3 +- .../monorepo-scripts/src/utils/publish_utils.ts | 52 ++++++++++++++++------ 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 72db8c649..c421290ec 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -23,7 +23,8 @@ "config": { "postpublish": { "assets": [], - "shouldPublishDocs": true + "shouldPublishDocs": true, + "omitExports": ["schemas"] } }, "repository": { diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 974fb4d0d..2cf67946b 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -119,10 +119,6 @@ function getReleaseNotesForPackage(packageName: string, version: string): string } export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { - const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; - const indexPath = `${pathToPackage}/src/index.ts`; - const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath); - const monorepoPackages = utils.getPackages(constants.monorepoRootPath); const pkg = _.find(monorepoPackages, monorepoPackage => { return _.includes(monorepoPackage.packageJson.name, packageName); @@ -132,6 +128,12 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: } const packageJson = pkg.packageJson; + const omitExports = _.get(packageJson, 'config.postpublish.omitExports', []); + + const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; + const indexPath = `${pathToPackage}/src/index.ts`; + const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath, omitExports); + const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); if (!shouldPublishDocs) { utils.log( @@ -308,35 +310,59 @@ function findExportPathGivenTypedocName( return matchingExportPath; } -function getExportPathToExportedItems(filePath: string): ExportInfo { +function getExportPathToExportedItems(filePath: string, omitExports?: string[]): ExportInfo { const sourceFile = ts.createSourceFile( 'indexFile', readFileSync(filePath).toString(), ts.ScriptTarget.ES2017, /*setParentNodes */ true, ); - const exportInfo = _getExportPathToExportedItems(sourceFile); + const exportInfo = _getExportPathToExportedItems(sourceFile, omitExports); return exportInfo; } -function _getExportPathToExportedItems(sf: ts.SourceFile): ExportInfo { +function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[]): ExportInfo { const exportPathToExportedItems: ExportPathToExportedItems = {}; const exportPathOrder: string[] = []; + const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; + console.log('exportsToOmit', exportsToOmit); processNode(sf); function processNode(node: ts.Node): void { switch (node.kind) { - case ts.SyntaxKind.ExportDeclaration: + case ts.SyntaxKind.ExportDeclaration: { const exportClause = (node as any).exportClause; - const pkgName = exportClause.parent.moduleSpecifier.text; - exportPathOrder.push(pkgName); + const exportPath = exportClause.parent.moduleSpecifier.text; _.each(exportClause.elements, element => { - exportPathToExportedItems[pkgName] = _.isUndefined(exportPathToExportedItems[pkgName]) - ? [element.name.escapedText] - : [...exportPathToExportedItems[pkgName], element.name.escapedText]; + const exportItem = element.name.escapedText; + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } }); + if (!_.isUndefined(exportPathToExportedItems[exportPath])) { + exportPathOrder.push(exportPath); + } break; + } + case ts.SyntaxKind.ExportKeyword: { + const foundNode: any = node; + const exportPath = './index'; + if (foundNode.parent && foundNode.parent.name) { + const exportItem = foundNode.parent.name.escapedText; + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } + } + if (!_.includes(exportPathOrder, exportPath) && !_.isUndefined(exportPathToExportedItems[exportPath])) { + exportPathOrder.push(exportPath); + } + break; + } default: // noop break; -- cgit v1.2.3 From 90ead59d34bf5218cf4e1e5317a4ffeb497da8e1 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 21:09:18 +0200 Subject: Add support for rendering nested IndexSignatures --- packages/react-docs/src/components/interface.tsx | 8 ++-- packages/react-docs/src/components/signature.tsx | 1 - packages/react-docs/src/components/type.tsx | 45 ++++++++++++++------ packages/react-docs/src/types.ts | 4 +- packages/react-docs/src/utils/typedoc_utils.ts | 53 ++++++++++++++---------- 5 files changed, 71 insertions(+), 40 deletions(-) diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index a881c7fec..915b4bbc6 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -2,7 +2,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; -import { CustomType, TypeDocTypes } from '../types'; +import { CustomType } from '../types'; import { Signature } from './signature'; import { Type } from './type'; @@ -19,9 +19,7 @@ export const Interface = (props: InterfaceProps) => { return ( <span key={`property-${property.name}-${property.type}-${type.name}`}> {property.name}:{' '} - {property.type && property.type.typeDocType !== TypeDocTypes.Reflection ? ( - <Type type={property.type} sectionName={props.sectionName} docsInfo={props.docsInfo} /> - ) : ( + {property.type && !_.isUndefined(property.type.method) ? ( <Signature name={property.type.method.name} returnType={property.type.method.returnType} @@ -32,6 +30,8 @@ export const Interface = (props: InterfaceProps) => { shouldUseArrowSyntax={true} docsInfo={props.docsInfo} /> + ) : ( + <Type type={property.type} sectionName={props.sectionName} docsInfo={props.docsInfo} /> )}, </span> ); diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx index 5f28050d2..d9567c9f6 100644 --- a/packages/react-docs/src/components/signature.tsx +++ b/packages/react-docs/src/components/signature.tsx @@ -3,7 +3,6 @@ import * as React from 'react'; import { DocsInfo } from '../docs_info'; import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '../types'; -import { constants } from '../utils/constants'; import { Type } from './type'; diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 3504be303..ea66c7b1e 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -93,19 +93,38 @@ export function Type(props: TypeProps): any { break; case TypeDocTypes.Reflection: - typeName = ( - <Signature - name={type.method.name} - returnType={type.method.returnType} - parameters={type.method.parameters} - typeParameter={type.method.typeParameter} - sectionName={props.sectionName} - shouldHideMethodName={true} - shouldUseArrowSyntax={true} - docsInfo={props.docsInfo} - typeDefinitionByName={props.typeDefinitionByName} - /> - ); + if (!_.isUndefined(type.method)) { + typeName = ( + <Signature + name={type.method.name} + returnType={type.method.returnType} + parameters={type.method.parameters} + typeParameter={type.method.typeParameter} + sectionName={props.sectionName} + shouldHideMethodName={true} + shouldUseArrowSyntax={true} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> + ); + } else if (!_.isUndefined(type.indexSignature)) { + const is = type.indexSignature; + const param = ( + <span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}> + {is.keyName}:{' '} + <Type type={is.keyType} sectionName={props.sectionName} docsInfo={props.docsInfo} /> + </span> + ); + typeName = ( + <span key={`indexSignature-${type.name}-${is.keyType.name}`}> + {'{'}[{param}]: {is.valueName} + {'}'} + </span> + ); + } else { + throw new Error(`Unrecognized Reflection type that isn't a Method nor an Index Signature`); + } + break; case TypeDocTypes.TypeParameter: diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index aebd823db..79dfe9f4f 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -35,6 +35,7 @@ export interface TypeDocType { typeArguments?: TypeDocType[]; declaration: TypeDocNode; elementType?: TypeDocType; + indexSignature?: TypeDocNode; } export interface TypeDocFlags { @@ -64,7 +65,7 @@ export interface TypeDocNode { returns?: string; declaration: TypeDocNode; flags?: TypeDocFlags; - indexSignature?: TypeDocNode | TypeDocNode[]; // TypeDocNode in TypeDoc <V0.9.0, TypeDocNode[] in >V0.9.0 + indexSignature?: TypeDocNode; signatures?: TypeDocNode[]; parameters?: TypeDocNode[]; typeParameter?: TypeDocNode[]; @@ -156,6 +157,7 @@ export interface Type { elementType?: ElementType; types?: Type[]; method?: TypescriptMethod; + indexSignature?: IndexSignature; } export interface ElementType { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 35d28627f..f1f42c36d 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -63,9 +63,12 @@ export const typeDocUtils = { const exportPathToTypedocName = generatedDocJson.metadata.exportPathToTypedocName; const typeDocJson = generatedDocJson.typedocJson; - const typeDocNameOrder = _.map(exportPathOrder, exportPath => { - return exportPathToTypedocName[exportPath]; - }); + // TODO: Extract the non typeDoc exports, and render them somehow + const typeDocNameOrder = _.compact( + _.map(exportPathOrder, exportPath => { + return exportPathToTypedocName[exportPath]; + }), + ); const docAgnosticFormat: DocAgnosticFormat = {}; const typeEntities: TypeDocNode[] = []; @@ -111,14 +114,16 @@ export const typeDocUtils = { } }); }); - docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; - docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; - const docSection = typeDocUtils._convertEntitiesToDocSection( - typeEntities, - docsInfo, - constants.TYPES_SECTION_NAME, - ); - docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; + if (!_.isEmpty(typeEntities)) { + docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; + docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; + const docSection = typeDocUtils._convertEntitiesToDocSection( + typeEntities, + docsInfo, + constants.TYPES_SECTION_NAME, + ); + docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; + } return docAgnosticFormat; }, @@ -218,13 +223,7 @@ export const typeDocUtils = { ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId) : undefined; const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature); - const isIndexSignatureArray = _.isArray(entity.indexSignature); - // HACK: TypeDoc Versions <0.9.0 indexSignature is of type TypeDocNode[] - // Versions >0.9.0 have it as type TypeDocNode - const indexSignature = - doesIndexSignatureExist && isIndexSignatureArray - ? (entity.indexSignature as TypeDocNode[])[0] - : (entity.indexSignature as TypeDocNode); + const indexSignature = entity.indexSignature as TypeDocNode; const indexSignatureIfExists = doesIndexSignatureExist ? typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId) : undefined; @@ -305,6 +304,9 @@ export const typeDocUtils = { sectionName: string, docId: string, ): TypescriptMethod { + if (_.isUndefined(entity.signatures)) { + console.log(entity); + } const signature = entity.signatures[0]; const source = entity.sources[0]; const hasComment = !_.isUndefined(signature.comment); @@ -436,9 +438,17 @@ export const typeDocUtils = { }); const isConstructor = false; - const methodIfExists = !_.isUndefined(entity.declaration) - ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId) - : undefined; + const doesIndexSignatureExist = + !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); + let indexSignatureIfExists; + if (doesIndexSignatureExist) { + const indexSignature = entity.declaration.indexSignature as TypeDocNode; + indexSignatureIfExists = typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId); + } + const methodIfExists = + !_.isUndefined(entity.declaration) && !doesIndexSignatureExist + ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId) + : undefined; const elementTypeIfExists = !_.isUndefined(entity.elementType) ? { @@ -455,6 +465,7 @@ export const typeDocUtils = { elementType: elementTypeIfExists, types, method: methodIfExists, + indexSignature: indexSignatureIfExists, }; return type; }, -- cgit v1.2.3 From c7a5b8c776afd343d2a3484cb249120a3d0a5085 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 21:09:38 +0200 Subject: Add MD sections to contract-wrappers docs --- .../md/docs/contract_wrappers/installation.md | 11 +++++++++++ .../md/docs/contract_wrappers/introduction.md | 3 +++ .../containers/contract_wrappers_documentation.ts | 23 ++++++++++++++++++---- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 packages/website/md/docs/contract_wrappers/installation.md create mode 100644 packages/website/md/docs/contract_wrappers/introduction.md diff --git a/packages/website/md/docs/contract_wrappers/installation.md b/packages/website/md/docs/contract_wrappers/installation.md new file mode 100644 index 000000000..d5c7fbdba --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/installation.md @@ -0,0 +1,11 @@ +**Install** + +```bash +npm install @0xproject/contract-wrappers --save +``` + +**Import** + +```javascript +import { ContractWrappers } from '@0xproject/contract-wrappers'; +``` diff --git a/packages/website/md/docs/contract_wrappers/introduction.md b/packages/website/md/docs/contract_wrappers/introduction.md new file mode 100644 index 000000000..74254bdad --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/introduction.md @@ -0,0 +1,3 @@ +<b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b> + +Welcome to the [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index f0547cecd..67d19bb2a 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -9,16 +9,31 @@ import { DocPackages } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -// TODO: Add MD sections -const markdownSections = {}; +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/contract_wrappers/introduction'); +const InstallMarkdown = require('md/docs/contract_wrappers/installation'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', +}; const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ContractWrappers, type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', - markdownMenu: {}, - sectionNameToMarkdownByVersion: {}, + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + }, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallMarkdown, + }, + }, markdownSections, typeConfigs: { typeNameToPrefix: {}, -- cgit v1.2.3 From b5d98a280352d8f697876b35741fcf7b60b3b569 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 2 Aug 2018 21:09:48 +0200 Subject: Fix link in 0x.js intro --- packages/website/md/docs/0xjs/2.0.0/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/md/docs/0xjs/2.0.0/introduction.md b/packages/website/md/docs/0xjs/2.0.0/introduction.md index b98aeef38..d228c6855 100644 --- a/packages/website/md/docs/0xjs/2.0.0/introduction.md +++ b/packages/website/md/docs/0xjs/2.0.0/introduction.md @@ -1,3 +1,3 @@ <b>**NOTE:** Release candidate versions are meant to work with V2 of 0x protocol. To interact with V1, select a 0.X version.</b> -Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more. +Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more. -- cgit v1.2.3 From 6dd656bdfc5e9878a8a6e332b4ea844556f75d56 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 11:14:01 +0200 Subject: Add OrderWatcher docs page --- packages/order-watcher/package.json | 9 ++- .../website/md/docs/order_watcher/installation.md | 17 ++++++ .../website/md/docs/order_watcher/introduction.md | 1 + packages/website/translations/chinese.json | 1 + packages/website/translations/english.json | 1 + packages/website/translations/korean.json | 1 + packages/website/translations/russian.json | 1 + packages/website/translations/spanish.json | 1 + packages/website/ts/components/top_bar/top_bar.tsx | 29 ++++++--- .../ts/containers/order_watcher_documentation.ts | 70 ++++++++++++++++++++++ packages/website/ts/index.tsx | 12 +++- .../website/ts/pages/documentation/doc_page.tsx | 1 + packages/website/ts/pages/landing/landing.tsx | 2 +- packages/website/ts/types.ts | 5 +- 14 files changed, 139 insertions(+), 12 deletions(-) create mode 100644 packages/website/md/docs/order_watcher/installation.md create mode 100644 packages/website/md/docs/order_watcher/introduction.md create mode 100644 packages/website/ts/containers/order_watcher_documentation.ts diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 2b7507f02..917998739 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -25,10 +25,15 @@ "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 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" + "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" }, "config": { - "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token" + "contracts_v2_beta": "Exchange WETH9 ERC20Token ERC721Token", + "postpublish": { + "assets": [], + "shouldPublishDocs": true + } }, "repository": { "type": "git", diff --git a/packages/website/md/docs/order_watcher/installation.md b/packages/website/md/docs/order_watcher/installation.md new file mode 100644 index 000000000..4b28f583d --- /dev/null +++ b/packages/website/md/docs/order_watcher/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/order-watcher +``` + +**Import** + +```javascript +import { OrderWatcher } from '@0xproject/order-watcher'; +``` + +or + +```javascript +var OrderWatcher = require('@0xproject/order-utils').OrderWatcher; +``` diff --git a/packages/website/md/docs/order_watcher/introduction.md b/packages/website/md/docs/order_watcher/introduction.md new file mode 100644 index 000000000..f922d922f --- /dev/null +++ b/packages/website/md/docs/order_watcher/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 8af9835ab..b590861b7 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -62,6 +62,7 @@ "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", "CONTRACT_WRAPPERS": "Contract Wrappers", + "ORDER_WATCHER": "OrderWatcher", "0x.js": "0x.js", "BLOG": "博客", "FORUM": "论坛", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index b6a8113d3..0ae48d926 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -63,6 +63,7 @@ "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", "CONTRACT_WRAPPERS": "Contract Wrappers", + "ORDER_WATCHER": "OrderWatcher", "0X_JS": "0x.js", "BLOG": "blog", "FORUM": "forum", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 1c2b585bf..f61e51e5c 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -62,6 +62,7 @@ "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", "CONTRACT_WRAPPERS": "Contract Wrappers", + "ORDER_WATCHER": "OrderWatcher", "0X_JS": "0x.js", "BLOG": "블로그", "FORUM": "포럼", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index c2df8ee2a..107798a8c 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -62,6 +62,7 @@ "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", "CONTRACT_WRAPPERS": "Contract Wrappers", + "ORDER_WATCHER": "OrderWatcher", "0X_JS": "0x.js", "BLOG": "Блог", "FORUM": "Форум", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index a874673cf..3c87b2878 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -63,6 +63,7 @@ "ETHEREUM_TYPES": "Ethereum Types", "SUBPROVIDERS": "Subproviders", "CONTRACT_WRAPPERS": "Contract Wrappers", + "ORDER_WATCHER": "OrderWatcher", "0X_JS": "0x.js", "BLOG": "blog", "FORUM": "foro", diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index d2f530fb5..c921867d7 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -84,7 +84,9 @@ const DOC_WEBSITE_PATHS_TO_KEY = { [WebsitePaths.ContractWrappers]: Key.ContractWrappers, [WebsitePaths.Connect]: Key.Connect, [WebsitePaths.ZeroExJs]: Key.ZeroExJs, -} + [WebsitePaths.OrderUtils]: Key.OrderUtils, + [WebsitePaths.OrderWatcher]: Key.OrderWatcher, +}; const DEFAULT_HEIGHT = 68; const EXPANDED_HEIGHT = 75; @@ -166,12 +168,28 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { primaryText={this.props.translate.get(Key.Web3Wrapper, Deco.CapWords)} /> </Link>, - <Link key="subMenuItem-contractWrappers" to={WebsitePaths.ContractWrappers} className="text-decoration-none"> + <Link + key="subMenuItem-contractWrappers" + to={WebsitePaths.ContractWrappers} + className="text-decoration-none" + > <MenuItem style={{ fontSize: styles.menuItem.fontSize }} primaryText={this.props.translate.get(Key.ContractWrappers, Deco.CapWords)} /> </Link>, + <Link key="subMenuItem-orderUtils" to={WebsitePaths.OrderUtils} className="text-decoration-none"> + <MenuItem + style={{ fontSize: styles.menuItem.fontSize }} + primaryText={this.props.translate.get(Key.OrderUtils, Deco.CapWords)} + /> + </Link>, + <Link key="subMenuItem-orderWatcher" to={WebsitePaths.OrderWatcher} className="text-decoration-none"> + <MenuItem + style={{ fontSize: styles.menuItem.fontSize }} + primaryText={this.props.translate.get(Key.OrderWatcher, Deco.CapWords)} + /> + </Link>, <Link key="subMenuItem-sol-compiler" to={WebsitePaths.SolCompiler} className="text-decoration-none"> <MenuItem style={{ fontSize: styles.menuItem.fontSize }} @@ -359,7 +377,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { {this.props.translate.get(key, Deco.Cap)}{' '} {this.props.translate.get(Key.Docs, Deco.Cap)} </MenuItem> - </Link> + </Link>; } })} {!this._isViewingPortal() && ( @@ -391,10 +409,7 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { return this._doesUrlInclude(websitePath); }); - if ( - !isViewingDocsPage || - _.isUndefined(this.props.menu) - ) { + if (!isViewingDocsPage || _.isUndefined(this.props.menu)) { return undefined; } return ( diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts new file mode 100644 index 000000000..29f1adf7c --- /dev/null +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -0,0 +1,70 @@ +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { DocPackages } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/order_watcher/introduction'); +const InstallationMarkdown = require('md/docs/order_watcher/installation'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.OrderWatcher, + type: SupportedDocJson.TypeDoc, + displayName: 'OrderWatcher', + packageUrl: 'https://github.com/0xProject/0x-monorepo', + markdownMenu: { + introduction: [markdownSections.introduction], + install: [markdownSections.installation], + }, + sectionNameToMarkdownByVersion: { + '0.0.1': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallationMarkdown, + }, + }, + markdownSections, + typeConfigs: { + typeNameToExternalLink: { + BigNumber: constants.URL_BIGNUMBERJS_GITHUB, + }, + }, +}; +const docsInfo = new DocsInfo(docsInfoConfig); + +interface ConnectedState { + docsVersion: string; + availableDocVersions: string[]; + docsInfo: DocsInfo; + translate: Translate; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ + docsVersion: state.docsVersion, + availableDocVersions: state.availableDocVersions, + translate: state.translate, + docsInfo, +}); + +const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( + DocPageComponent, +); diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 36b2f6b87..cfe8a1c9c 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -40,6 +40,9 @@ const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () => System.import<any>(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'), ); +const LazyOrderWatcherDocumentation = createLazyComponent('Documentation', async () => + System.import<any>(/* webpackChunkName: "orderWatcherDocs" */ 'ts/containers/order_watcher_documentation'), +); const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () => System.import<any>(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'), ); @@ -83,7 +86,14 @@ render( <Route path={WebsitePaths.About} component={About as any} /> <Route path={WebsitePaths.Wiki} component={Wiki as any} /> <Route path={`${WebsitePaths.ZeroExJs}/:version?`} component={LazyZeroExJSDocumentation} /> - <Route path={`${WebsitePaths.ContractWrappers}/:version?`} component={LazyContractWrappersDocumentation} /> + <Route + path={`${WebsitePaths.ContractWrappers}/:version?`} + component={LazyContractWrappersDocumentation} + /> + <Route + path={`${WebsitePaths.OrderWatcher}/:version?`} + component={LazyOrderWatcherDocumentation} + /> <Route path={`${WebsitePaths.Connect}/:version?`} component={LazyConnectDocumentation} /> <Route path={`${WebsitePaths.SolCompiler}/:version?`} diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index e7e5f8a8c..9c144b93f 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -34,6 +34,7 @@ const docIdToSubpackageName: { [id: string]: string } = { [DocPackages.SolCov]: 'sol-cov', [DocPackages.Subproviders]: 'subproviders', [DocPackages.OrderUtils]: 'order-utils', + [DocPackages.OrderWatcher]: 'order-watcher', [DocPackages.EthereumTypes]: 'ethereum-types', }; diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index 2a51ee3c0..78f5fc3c1 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -436,7 +436,7 @@ export class Landing extends React.Component<LandingProps, LandingState> { style={{ fontFamily: 'Roboto Mono' }} > <div>{this.props.translate.get(Key.OffChainOrderRelay, Deco.Cap)}</div> - <div> {this.props.translate.get(Key.OonChainSettlement, Deco.Cap)}</div> + <div> {this.props.translate.get(Key.OnChainSettlement, Deco.Cap)}</div> </div> <div className="pb2 pt2 h5 sm-center sm-px3 sm-mx-auto" diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index fd82ef7cb..c637171dd 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -372,6 +372,7 @@ export enum WebsitePaths { Connect = '/docs/connect', Web3Wrapper = '/docs/web3-wrapper', ContractWrappers = '/docs/contract-wrappers', + OrderWatcher = '/docs/order-watcher', SolCompiler = '/docs/sol-compiler', JSONSchemas = '/docs/json-schemas', SolCov = '/docs/sol-cov', @@ -393,6 +394,7 @@ export enum DocPackages { OrderUtils = 'ORDER_UTILS', EthereumTypes = 'ETHEREUM_TYPES', ContractWrappers = 'CONTRACT_WRAPPERS', + OrderWatcher = 'ORDER_WATCHER', } export enum Key { @@ -409,7 +411,7 @@ export enum Key { TraditionalAssets = 'TRADITIONAL_ASSETS', DigitalGoods = 'DIGITAL_GOODS', OffChainOrderRelay = 'OFFCHAIN_ORDER_RELAY', - OonChainSettlement = 'OONCHAIN_SETTLEMENT', + OnChainSettlement = 'ONCHAIN_SETTLEMENT', OffChainOnChainDescription = 'OFFCHAIN_ONCHAIN_DESCRIPTION', RelayersHeader = 'RELAYERS_HEADER', BenefitsHeader = 'BENEFITS_HEADER', @@ -448,6 +450,7 @@ export enum Key { Subproviders = 'SUBPROVIDERS', ZeroExJs = '0X_JS', ContractWrappers = 'CONTRACT_WRAPPERS', + OrderWatcher = 'ORDER_WATCHER', Blog = 'BLOG', Forum = 'FORUM', Connect = 'CONNECT', -- cgit v1.2.3 From 47584b18e975215ec01a5de3b4bf88d9cd15ee59 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 11:14:16 +0200 Subject: Fix-up Order-utils doc page --- packages/website/ts/containers/order_utils_documentation.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 9af863d8a..2b9465d92 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -17,8 +17,6 @@ const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation') const markdownSections = { introduction: 'introduction', installation: 'installation', - usage: 'usage', - types: 'types', }; const docsInfoConfig: DocsInfoConfig = { @@ -29,8 +27,6 @@ const docsInfoConfig: DocsInfoConfig = { markdownMenu: { introduction: [markdownSections.introduction], install: [markdownSections.installation], - usage: [markdownSections.usage], - types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { @@ -38,7 +34,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.installation]: InstallationMarkdownV1, }, }, - markdownSections: markdownSections, + markdownSections, typeConfigs: { typeNameToExternalLink: { BigNumber: constants.URL_BIGNUMBERJS_GITHUB, -- cgit v1.2.3 From 4a2a22a43b5d904834cddae5768d9adf3efedf30 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 11:44:50 +0200 Subject: Refactor logic for clarity --- packages/react-docs/src/utils/typedoc_utils.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index f1f42c36d..ad794c0fa 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -437,18 +437,23 @@ export const typeDocUtils = { return typeDocUtils._convertType(t, sections, sectionName, docId); }); - const isConstructor = false; + let indexSignatureIfExists; + let methodIfExists; const doesIndexSignatureExist = !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); - let indexSignatureIfExists; if (doesIndexSignatureExist) { const indexSignature = entity.declaration.indexSignature as TypeDocNode; indexSignatureIfExists = typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId); + } else if (!_.isUndefined(entity.declaration)) { + const isConstructor = false; + methodIfExists = typeDocUtils._convertMethod( + entity.declaration, + isConstructor, + sections, + sectionName, + docId, + ); } - const methodIfExists = - !_.isUndefined(entity.declaration) && !doesIndexSignatureExist - ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId) - : undefined; const elementTypeIfExists = !_.isUndefined(entity.elementType) ? { -- cgit v1.2.3 From e4aed98a3dbbe95c7cac877bcbe06f51f3de81ba Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 12:40:01 +0200 Subject: Add missing type exports --- packages/sol-compiler/src/index.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index de2de796e..89d529887 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,2 +1,9 @@ export { Compiler } from './compiler'; -export { CompilerOptions, ContractArtifact, ContractNetworks } from './utils/types'; + +export { + CompilerOptions, + ContractArtifact, + ContractNetworks, + GeneratedCompilerOptions, + ContractNetworkData, +} from './utils/types'; -- cgit v1.2.3 From d4bd4ec441317c916e515ba0c6f48d63ea8665f9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 12:40:35 +0200 Subject: Add comments for types and unnest type declarations --- packages/sol-compiler/src/utils/types.ts | 44 ++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/packages/sol-compiler/src/utils/types.ts b/packages/sol-compiler/src/utils/types.ts index 4321a2235..e2e7a4e53 100644 --- a/packages/sol-compiler/src/utils/types.ts +++ b/packages/sol-compiler/src/utils/types.ts @@ -7,22 +7,39 @@ export enum AbiType { Fallback = 'fallback', } +/** + * This type defines the schema of the artifact.json file generated by Sol-compiler + * schemaVersion: The version of the artifact schema + * contractName: The contract name it represents + * networks: Network specific information by network (address, id, constructor args, etc...) + * compilerOutput: The Solidity compiler output generated from the specified compiler input + * description (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) + * compiler: The compiler settings used + * sourceCodes: The source code of the contract and all it's dependencies + * sources: A mapping from source filePath to sourceMap id + * sourceTreeHashHex: A unique hash generated from the contract source and that of it's dependencies. + * If any of the sources change, the hash would change notifying us that a re-compilation is necessary + */ export interface ContractArtifact extends ContractVersionData { schemaVersion: string; contractName: string; networks: ContractNetworks; } +export interface GeneratedCompilerOptions { + name: 'solc'; + version: string; + settings: solc.CompilerSettings; +} + +export interface Source { + id: number; +} + export interface ContractVersionData { - compiler: { - name: 'solc'; - version: string; - settings: solc.CompilerSettings; - }; + compiler: GeneratedCompilerOptions; sources: { - [sourceName: string]: { - id: number; - }; + [sourceName: string]: Source; }; sourceCodes: { [sourceName: string]: string; @@ -47,6 +64,17 @@ export interface SolcErrors { [key: string]: boolean; } +/** + * Options you can specify (as flags or in a compiler.json file) when invoking sol-compiler + * contractsDir: Directory containing your project's Solidity contracts. Can contain nested directories. + * artifactsDir: Directory where you want the generated artifacts.json written to + * compilerSettings: Desired settings to pass to the Solidity compiler during compilation. + * (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) + * contracts: List of contract names you wish to compile, or alternatively ['*'] to compile all contracts in the + * specified directory. + * solcVersion: If you don't want to compile each contract with the Solidity version specified in-file, you can force all + * contracts to compile with the the version specified here. + */ export interface CompilerOptions { contractsDir?: string; artifactsDir?: string; -- cgit v1.2.3 From 8c96a31152064a94513c72daec1a66510a49fde4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 12:40:47 +0200 Subject: Fix sol-compiler doc configs --- packages/website/ts/containers/sol_compiler_documentation.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 635c2112b..dda3840c7 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -18,8 +18,6 @@ const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', - compiler: 'compiler', - types: docConstants.TYPES_SECTION_NAME, }; const docsInfoConfig: DocsInfoConfig = { @@ -31,8 +29,6 @@ const docsInfoConfig: DocsInfoConfig = { introduction: [markdownSections.introduction], install: [markdownSections.installation], usage: [markdownSections.usage], - compiler: [markdownSections.compiler], - types: [markdownSections.types], }, sectionNameToMarkdownByVersion: { '0.0.1': { -- cgit v1.2.3 From d136df7679b85eff054178ae8103ecd1f3b324f9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 13:02:14 +0200 Subject: Color-code basic type arrays orange aswell --- packages/react-docs/src/components/type.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index ea66c7b1e..40564c0d6 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -12,6 +12,8 @@ import { Signature } from './signature'; import { constants } from '../utils/constants'; import { TypeDefinition } from './type_definition'; +const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean']; + export interface TypeProps { type: TypeDef; docsInfo: DocsInfo; @@ -73,6 +75,9 @@ export function Type(props: TypeProps): any { case TypeDocTypes.Array: typeName = type.elementType.name; + if (_.includes(basicJsTypes, typeName)) { + typeNameColor = colors.orange; + } break; case TypeDocTypes.Union: -- cgit v1.2.3 From 13520dbd94831cd93e419d000e933bfb75c99e84 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 13:02:29 +0200 Subject: Add missing types to sol-cov index.ts --- packages/sol-cov/src/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index 0e70878ad..35135c295 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -5,4 +5,15 @@ export { RevertTraceSubprovider } from './revert_trace_subprovider'; export { SolCompilerArtifactAdapter } from './artifact_adapters/sol_compiler_artifact_adapter'; export { TruffleArtifactAdapter } from './artifact_adapters/truffle_artifact_adapter'; export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; -export { ContractData, TraceInfo, Subtrace, SourceRange, Coverage } from './types'; +export { + ContractData, + TraceInfo, + Subtrace, + SourceRange, + Coverage, + TraceInfoNewContract, + TraceInfoExistingContract, + SingleFileSourceRange, +} from './types'; +export { StructLog, JSONRPCRequestPayload, Provider } from 'ethereum-types'; +export { ErrorCallback, NextCallback } from '@0xproject/subproviders'; -- cgit v1.2.3 From 406b7c33f553ab40aee5e1fe068b9f3d190a4fdd Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 13:27:08 +0200 Subject: Re-order subproviders index.ts and add missing types --- packages/subproviders/src/index.ts | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 905590539..eb9347bdb 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -1,11 +1,21 @@ import Eth from '@ledgerhq/hw-app-eth'; import TransportU2F from '@ledgerhq/hw-transport-u2f'; +import { LedgerEthereumClient } from './types'; + export import Web3ProviderEngine = require('web3-provider-engine'); -export { ECSignature } from '@0xproject/types'; -import { LedgerEthereumClient } from './types'; +/** + * A factory method for creating a LedgerEthereumClient usable in a browser context. + * @return LedgerEthereumClient A browser client for the LedgerSubprovider + */ +export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> { + const ledgerConnection = await TransportU2F.create(); + const ledgerEthClient = new Eth(ledgerConnection); + return ledgerEthClient; +} export { prependSubprovider } from './utils/subprovider_utils'; + export { EmptyWalletSubprovider } from './subproviders/empty_wallet_subprovider'; export { FakeGasEstimateSubprovider } from './subproviders/fake_gas_estimate_subprovider'; export { SignerSubprovider } from './subproviders/signer'; @@ -18,6 +28,7 @@ export { NonceTrackerSubprovider } from './subproviders/nonce_tracker'; export { PrivateKeyWalletSubprovider } from './subproviders/private_key_wallet'; export { MnemonicWalletSubprovider } from './subproviders/mnemonic_wallet'; export { EthLightwalletSubprovider } from './subproviders/eth_lightwallet_subprovider'; + export { Callback, ErrorCallback, @@ -28,16 +39,13 @@ export { LedgerSubproviderConfigs, PartialTxParams, DerivedHDKeyInfo, + JSONRPCRequestPayloadWithMethod, + ECSignatureString, + AccountFetchingConfigs, + LedgerEthereumClientFactoryAsync, + OnNextCompleted, } from './types'; -/** - * A factory method for creating a LedgerEthereumClient usable in a browser context. - * @return LedgerEthereumClient A browser client for the LedgerSubprovider - */ -export async function ledgerEthereumBrowserClientFactoryAsync(): Promise<LedgerEthereumClient> { - const ledgerConnection = await TransportU2F.create(); - const ledgerEthClient = new Eth(ledgerConnection); - return ledgerEthClient; -} +export { ECSignature } from '@0xproject/types'; -export { JSONRPCRequestPayload, Provider } from 'ethereum-types'; +export { JSONRPCRequestPayload, Provider, JSONRPCResponsePayload, JSONRPCErrorCallback } from 'ethereum-types'; -- cgit v1.2.3 From 10f6647ab3ac17e25a755d9d1424c53f88e7151c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 13:27:20 +0200 Subject: Add missing types to web3-wrapper index.ts --- packages/web3-wrapper/src/index.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index b6d1bf1b2..89cf566db 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -13,4 +13,13 @@ export { FilterObject, CallData, TransactionReceiptWithDecodedLogs, + BlockWithTransactionData, + LogTopic, + JSONRPCRequestPayload, + TransactionReceiptStatus, + LogWithDecodedArgs, + DecodedLogArgs, + StructLog, + JSONRPCErrorCallback, + BlockParamLiteral, } from 'ethereum-types'; -- cgit v1.2.3 From 3ee3fc2fb35b5ecc8237363d6307b7135ed4f927 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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 +++++++++++++++-- packages/contracts/test/utils/erc20_wrapper.ts | 6 ++++++ packages/sol-cov/src/trace_collection_subprovider.ts | 1 + .../src/subproviders/eth_lightwallet_subprovider.ts | 5 +++++ packages/subproviders/src/subproviders/ganache.ts | 2 +- .../src/subproviders/redundant_subprovider.ts | 2 +- .../subproviders/src/subproviders/rpc_subprovider.ts | 6 +++++- packages/subproviders/src/subproviders/subprovider.ts | 6 ++++++ packages/web3-wrapper/src/web3_wrapper.ts | 1 + 14 files changed, 81 insertions(+), 5 deletions(-) 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 diff --git a/packages/contracts/test/utils/erc20_wrapper.ts b/packages/contracts/test/utils/erc20_wrapper.ts index 424aae579..95b31dfa6 100644 --- a/packages/contracts/test/utils/erc20_wrapper.ts +++ b/packages/contracts/test/utils/erc20_wrapper.ts @@ -20,6 +20,12 @@ export class ERC20Wrapper { private readonly _dummyTokenContracts: DummyERC20TokenContract[]; private _proxyContract?: ERC20ProxyContract; private _proxyIdIfExists?: string; + /** + * + * @param provider Web3 provider to use for all JSON RPC requests + * @param tokenOwnerAddresses + * @param contractOwnerAddress + */ constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) { this._dummyTokenContracts = []; this._web3Wrapper = new Web3Wrapper(provider); diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-cov/src/trace_collection_subprovider.ts index b530b59db..5a101dfeb 100644 --- a/packages/sol-cov/src/trace_collection_subprovider.ts +++ b/packages/sol-cov/src/trace_collection_subprovider.ts @@ -109,6 +109,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider { * Set's the subprovider's engine to the ProviderEngine it is added to. * This is only called within the ProviderEngine source code, do not call * directly. + * @param engine The ProviderEngine this subprovider is added to */ public setEngine(engine: Provider): void { super.setEngine(engine); diff --git a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts index 454dae58e..17fe59368 100644 --- a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts @@ -14,6 +14,11 @@ import { PrivateKeyWalletSubprovider } from './private_key_wallet'; export class EthLightwalletSubprovider extends BaseWalletSubprovider { private readonly _keystore: lightwallet.keystore; private readonly _pwDerivedKey: Uint8Array; + /** + * + * @param keystore The EthLightWallet keystore you wish to use + * @param pwDerivedKey The password derived key to use + */ constructor(keystore: lightwallet.keystore, pwDerivedKey: Uint8Array) { super(); this._keystore = keystore; diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts index 986094dba..2b8544f8b 100644 --- a/packages/subproviders/src/subproviders/ganache.ts +++ b/packages/subproviders/src/subproviders/ganache.ts @@ -24,7 +24,7 @@ export class GanacheSubprovider extends Subprovider { * It is called internally by the ProviderEngine when it is this subproviders * turn to handle a JSON RPC request. * @param payload JSON RPC payload - * @param next Callback to call if this subprovider decides not to handle the request + * @param _next Callback to call if this subprovider decides not to handle the request * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix diff --git a/packages/subproviders/src/subproviders/redundant_subprovider.ts b/packages/subproviders/src/subproviders/redundant_subprovider.ts index 7aa6226d5..59a2986f8 100644 --- a/packages/subproviders/src/subproviders/redundant_subprovider.ts +++ b/packages/subproviders/src/subproviders/redundant_subprovider.ts @@ -34,7 +34,7 @@ export class RedundantSubprovider extends Subprovider { } /** * Instantiates a new RedundantSubprovider - * @param endpoints JSON RPC endpoints to attempt. Attempts are made in the order of the endpoints. + * @param subproviders Subproviders to attempt the request with */ constructor(subproviders: Subprovider[]) { super(); diff --git a/packages/subproviders/src/subproviders/rpc_subprovider.ts b/packages/subproviders/src/subproviders/rpc_subprovider.ts index d874c6f05..18d6da307 100644 --- a/packages/subproviders/src/subproviders/rpc_subprovider.ts +++ b/packages/subproviders/src/subproviders/rpc_subprovider.ts @@ -15,6 +15,10 @@ import { Subprovider } from './subprovider'; export class RPCSubprovider extends Subprovider { private readonly _rpcUrl: string; private readonly _requestTimeoutMs: number; + /** + * @param rpcUrl URL to the backing Ethereum node to which JSON RPC requests should be sent + * @param requestTimeoutMs Amount of miliseconds to wait before timing out the JSON RPC request + */ constructor(rpcUrl: string, requestTimeoutMs: number = 20000) { super(); assert.isString('rpcUrl', rpcUrl); @@ -27,7 +31,7 @@ export class RPCSubprovider extends Subprovider { * It is called internally by the ProviderEngine when it is this subproviders * turn to handle a JSON RPC request. * @param payload JSON RPC payload - * @param next Callback to call if this subprovider decides not to handle the request + * @param _next Callback to call if this subprovider decides not to handle the request * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts index 5dc273569..53a3d07ea 100644 --- a/packages/subproviders/src/subproviders/subprovider.ts +++ b/packages/subproviders/src/subproviders/subprovider.ts @@ -32,6 +32,11 @@ export abstract class Subprovider { // 16 digits return datePart + extraPart; } + /** + * @param payload JSON RPC request payload + * @param next A callback to pass the request to the next subprovider in the stack + * @param end A callback called once the subprovider is done handling the request + */ // tslint:disable-next-line:async-suffix public abstract async handleRequest( payload: JSONRPCRequestPayload, @@ -55,6 +60,7 @@ export abstract class Subprovider { * Set's the subprovider's engine to the ProviderEngine it is added to. * This is only called within the ProviderEngine source code, do not call * directly. + * @param engine The ProviderEngine this subprovider is added to */ public setEngine(engine: Provider): void { this.engine = engine; diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index dd35e2094..ea78f8801 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -237,6 +237,7 @@ export class Web3Wrapper { /** * Retrieves an accounts Ether balance in wei * @param owner Account whose balance you wish to check + * @param defaultBlock The block depth at which to fetch the balance (default=latest) * @returns Balance in wei */ public async getBalanceInWeiAsync(owner: string, defaultBlock?: BlockParam): Promise<BigNumber> { -- cgit v1.2.3 From b8c8258404fa7959b71dd9e87fba16d32b57a868 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 17:13:38 +0200 Subject: Don't render object literal properties that start with underscore since are private --- packages/react-docs/src/components/property_block.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index 074c59c5f..ea80ba7b7 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -48,7 +48,8 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB /> </div> <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> - {(property as any).callPath}{property.name}:{' '} + {(property as any).callPath} + {property.name}:{' '} <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} /> </code> {property.source && ( -- cgit v1.2.3 From 0d3d9dad846d01e84be3b52d48bfabd9e1853b66 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 17:14:14 +0200 Subject: Don't process functions beginning with underscores --- packages/react-docs/src/utils/typedoc_utils.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index ad794c0fa..b74b9562b 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -154,8 +154,17 @@ export const typeDocUtils = { case KindString.Function: if (entity.flags.isExported) { - const func = typeDocUtils._convertFunction(entity, docsInfo.sections, sectionName, docsInfo.id); - docSection.functions.push(func); + const funcName = (entity as TypeDocNode).signatures[0].name; + const isPublicFunc = !_.startsWith(funcName, '_'); + if (isPublicFunc) { + const func = typeDocUtils._convertFunction( + entity, + docsInfo.sections, + sectionName, + docsInfo.id, + ); + docSection.functions.push(func); + } } break; -- cgit v1.2.3 From d85ce6ac758a9a726c298b972a7c557e01f2ab2f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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/0x.js/src/0x.ts | 9 +- packages/contract-wrappers/src/utils/assert.ts | 4 +- .../contracts/test/exchange/signature_validator.ts | 22 +- packages/fill-scenarios/src/fill_scenarios.ts | 3 +- packages/order-utils/src/index.ts | 12 +- packages/order-utils/src/order_factory.ts | 9 +- packages/order-utils/src/order_validation_utils.ts | 4 +- packages/order-utils/src/signature_utils.ts | 559 +++++++++++---------- packages/order-utils/test/signature_utils_test.ts | 68 ++- packages/order-watcher/src/utils/assert.ts | 4 +- 10 files changed, 378 insertions(+), 316 deletions(-) diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts index 2a2b82f63..9c01ebd9e 100644 --- a/packages/0x.js/src/0x.ts +++ b/packages/0x.js/src/0x.ts @@ -11,9 +11,8 @@ import { } from '@0xproject/contract-wrappers'; import { assetDataUtils, - ecSignOrderHashAsync, generatePseudoRandomSalt, - isValidSignatureAsync, + signatureUtils, MessagePrefixOpts, orderHashUtils, } from '@0xproject/order-utils'; @@ -198,7 +197,7 @@ export class ZeroEx { * @return Whether the signature is valid for the supplied signerAddress and data. */ public async isValidSignatureAsync(data: string, signature: string, signerAddress: string): Promise<boolean> { - const isValid = await isValidSignatureAsync( + const isValid = await signatureUtils.isValidSignatureAsync( this._contractWrappers.getProvider(), data, signature, @@ -238,7 +237,7 @@ export class ZeroEx { * @param orderHash Hex encoded orderHash to sign. * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address * must be available via the Provider supplied to 0x.js. - * @param MessagePrefixOpts Options regarding the desired prefix and whether to add it before calling `eth_sign` + * @param messagePrefixOpts Options regarding the desired prefix and whether to add it before calling `eth_sign` * @return An object containing the Elliptic curve signature parameters generated by signing the orderHash. */ public async ecSignOrderHashAsync( @@ -246,7 +245,7 @@ export class ZeroEx { signerAddress: string, messagePrefixOpts: MessagePrefixOpts, ): Promise<ECSignature> { - const signature = await ecSignOrderHashAsync( + const signature = await signatureUtils.ecSignOrderHashAsync( this._contractWrappers.getProvider(), orderHash, signerAddress, 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<void> { - 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 { diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index f2bb42c75..d5e522220 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -1,5 +1,5 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { addSignedMessagePrefix, assetDataUtils, MessagePrefixType, orderHashUtils } from '@0xproject/order-utils'; +import { signatureUtils, assetDataUtils, MessagePrefixType, orderHashUtils } from '@0xproject/order-utils'; import { RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; @@ -213,7 +213,10 @@ describe('MixinSignatureValidator', () => { it('should return true when SignatureType=EthSign and signature is valid', async () => { // Create EthSign signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, MessagePrefixType.EthSign); + const orderHashWithEthSignPrefixHex = signatureUtils.addSignedMessagePrefix( + orderHashHex, + MessagePrefixType.EthSign, + ); const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey); // Create 0x signature from EthSign signature @@ -236,7 +239,10 @@ describe('MixinSignatureValidator', () => { it('should return false when SignatureType=EthSign and signature is invalid', async () => { // Create EthSign signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithEthSignPrefixHex = addSignedMessagePrefix(orderHashHex, MessagePrefixType.EthSign); + const orderHashWithEthSignPrefixHex = signatureUtils.addSignedMessagePrefix( + orderHashHex, + MessagePrefixType.EthSign, + ); const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey); // Create 0x signature from EthSign signature @@ -385,7 +391,10 @@ describe('MixinSignatureValidator', () => { it('should return true when SignatureType=Trezor and signature is valid', async () => { // Create Trezor signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, MessagePrefixType.Trezor); + const orderHashWithTrezorPrefixHex = signatureUtils.addSignedMessagePrefix( + orderHashHex, + MessagePrefixType.Trezor, + ); const orderHashWithTrezorPrefixBuffer = ethUtil.toBuffer(orderHashWithTrezorPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithTrezorPrefixBuffer, signerPrivateKey); // Create 0x signature from Trezor signature @@ -408,7 +417,10 @@ describe('MixinSignatureValidator', () => { it('should return false when SignatureType=Trezor and signature is invalid', async () => { // Create Trezor signature const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder); - const orderHashWithTrezorPrefixHex = addSignedMessagePrefix(orderHashHex, MessagePrefixType.Trezor); + const orderHashWithTrezorPrefixHex = signatureUtils.addSignedMessagePrefix( + orderHashHex, + MessagePrefixType.Trezor, + ); const orderHashWithTrezorPrefixBuffer = ethUtil.toBuffer(orderHashWithTrezorPrefixHex); const ecSignature = ethUtil.ecsign(orderHashWithTrezorPrefixBuffer, signerPrivateKey); // Create 0x signature from Trezor signature diff --git a/packages/fill-scenarios/src/fill_scenarios.ts b/packages/fill-scenarios/src/fill_scenarios.ts index 8f2766e24..087fd37a5 100644 --- a/packages/fill-scenarios/src/fill_scenarios.ts +++ b/packages/fill-scenarios/src/fill_scenarios.ts @@ -1,4 +1,5 @@ -import { assetDataUtils, orderFactory } from '@0xproject/order-utils'; +import { assetDataUtils } from '@0xproject/order-utils'; +import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory'; import { AssetProxyId, ERC721AssetData, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index da53f620a..5852a01b9 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -1,15 +1,5 @@ export { orderHashUtils } from './order_hash'; -export { - isValidSignatureAsync, - isValidPresignedSignatureAsync, - isValidWalletSignatureAsync, - isValidValidatorSignatureAsync, - isValidECSignature, - ecSignOrderHashAsync, - addSignedMessagePrefix, - parseECSignature, -} from './signature_utils'; -export { orderFactory } from './order_factory'; +export { signatureUtils } from './signature_utils'; export { constants } from './constants'; export { crypto } from './crypto'; export { generatePseudoRandomSalt } from './salt'; diff --git a/packages/order-utils/src/order_factory.ts b/packages/order-utils/src/order_factory.ts index 803cb82b1..14122f353 100644 --- a/packages/order-utils/src/order_factory.ts +++ b/packages/order-utils/src/order_factory.ts @@ -6,7 +6,7 @@ import * as _ from 'lodash'; import { orderHashUtils } from './order_hash'; import { generatePseudoRandomSalt } from './salt'; -import { ecSignOrderHashAsync } from './signature_utils'; +import { signatureUtils } from './signature_utils'; import { MessagePrefixType } from './types'; export const orderFactory = { @@ -49,7 +49,12 @@ export const orderFactory = { prefixType: MessagePrefixType.EthSign, shouldAddPrefixBeforeCallingEthSign: false, }; - const ecSignature = await ecSignOrderHashAsync(provider, orderHash, makerAddress, messagePrefixOpts); + const ecSignature = await signatureUtils.ecSignOrderHashAsync( + provider, + orderHash, + makerAddress, + messagePrefixOpts, + ); const signature = getVRSHexString(ecSignature); const signedOrder: SignedOrder = _.assign(order, { signature }); return signedOrder; diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index 67d747081..ccc6e653f 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -9,7 +9,7 @@ import { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_f import { constants } from './constants'; import { ExchangeTransferSimulator } from './exchange_transfer_simulator'; import { orderHashUtils } from './order_hash'; -import { isValidSignatureAsync } from './signature_utils'; +import { signatureUtils } from './signature_utils'; import { utils } from './utils'; export class OrderValidationUtils { @@ -147,7 +147,7 @@ export class OrderValidationUtils { throw new Error(RevertReason.InvalidTakerAmount); } const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - const isValid = await isValidSignatureAsync( + const isValid = await signatureUtils.isValidSignatureAsync( provider, orderHash, signedOrder.signature, diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index 26fb24705..2dc465256 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -13,288 +13,307 @@ import { IWalletContract } from './generated_contract_wrappers/i_wallet'; import { MessagePrefixOpts, MessagePrefixType, OrderError } from './types'; import { utils } from './utils'; -/** - * Verifies that the provided signature is valid according to the 0x Protocol smart contracts - * @param data The hex encoded data signed by the supplied signature. - * @param signature A hex encoded 0x Protocol signature made up of: [TypeSpecificData][SignatureType]. - * E.g [vrs][SignatureType.EIP712] - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the signature is valid for the supplied signerAddress and data. - */ -export async function isValidSignatureAsync( - provider: Provider, - data: string, - signature: string, - signerAddress: string, -): Promise<boolean> { - assert.isWeb3Provider('provider', provider); - assert.isHexString('data', data); - assert.isHexString('signature', signature); - assert.isETHAddressHex('signerAddress', signerAddress); - const signatureTypeIndexIfExists = utils.getSignatureTypeIndexIfExists(signature); - if (_.isUndefined(signatureTypeIndexIfExists)) { - throw new Error(`Unrecognized signatureType in signature: ${signature}`); - } - - switch (signatureTypeIndexIfExists) { - case SignatureType.Illegal: - case SignatureType.Invalid: - return false; - - case SignatureType.EIP712: { - const ecSignature = parseECSignature(signature); - return isValidECSignature(data, ecSignature, signerAddress); - } - - case SignatureType.EthSign: { - const ecSignature = parseECSignature(signature); - const prefixedMessageHex = addSignedMessagePrefix(data, MessagePrefixType.EthSign); - return isValidECSignature(prefixedMessageHex, ecSignature, signerAddress); +export const signatureUtils = { + /** + * Verifies that the provided signature is valid according to the 0x Protocol smart contracts + * @param provider Web3 provider to use for all JSON RPC requests + * @param data The hex encoded data signed by the supplied signature. + * @param signature A hex encoded 0x Protocol signature made up of: [TypeSpecificData][SignatureType]. + * E.g [vrs][SignatureType.EIP712] + * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. + * @return Whether the signature is valid for the supplied signerAddress and data. + */ + async isValidSignatureAsync( + provider: Provider, + data: string, + signature: string, + signerAddress: string, + ): Promise<boolean> { + assert.isWeb3Provider('provider', provider); + assert.isHexString('data', data); + assert.isHexString('signature', signature); + assert.isETHAddressHex('signerAddress', signerAddress); + const signatureTypeIndexIfExists = utils.getSignatureTypeIndexIfExists(signature); + if (_.isUndefined(signatureTypeIndexIfExists)) { + throw new Error(`Unrecognized signatureType in signature: ${signature}`); } - case SignatureType.Caller: - // HACK: We currently do not "validate" the caller signature type. - // It can only be validated during Exchange contract execution. - throw new Error('Caller signature type cannot be validated off-chain'); - - case SignatureType.Wallet: { - const isValid = await isValidWalletSignatureAsync(provider, data, signature, signerAddress); - return isValid; - } - - case SignatureType.Validator: { - const isValid = await isValidValidatorSignatureAsync(provider, data, signature, signerAddress); - return isValid; + switch (signatureTypeIndexIfExists) { + case SignatureType.Illegal: + case SignatureType.Invalid: + return false; + + case SignatureType.EIP712: { + const ecSignature = signatureUtils.parseECSignature(signature); + return signatureUtils.isValidECSignature(data, ecSignature, signerAddress); + } + + case SignatureType.EthSign: { + const ecSignature = signatureUtils.parseECSignature(signature); + const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data, MessagePrefixType.EthSign); + return signatureUtils.isValidECSignature(prefixedMessageHex, ecSignature, signerAddress); + } + + case SignatureType.Caller: + // HACK: We currently do not "validate" the caller signature type. + // It can only be validated during Exchange contract execution. + throw new Error('Caller signature type cannot be validated off-chain'); + + case SignatureType.Wallet: { + const isValid = await signatureUtils.isValidWalletSignatureAsync( + provider, + data, + signature, + signerAddress, + ); + return isValid; + } + + case SignatureType.Validator: { + const isValid = await signatureUtils.isValidValidatorSignatureAsync( + provider, + data, + signature, + signerAddress, + ); + return isValid; + } + + case SignatureType.PreSigned: { + return signatureUtils.isValidPresignedSignatureAsync(provider, data, signerAddress); + } + + case SignatureType.Trezor: { + const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data, MessagePrefixType.Trezor); + const ecSignature = signatureUtils.parseECSignature(signature); + return signatureUtils.isValidECSignature(prefixedMessageHex, ecSignature, signerAddress); + } + + default: + throw new Error(`Unhandled SignatureType: ${signatureTypeIndexIfExists}`); } - - case SignatureType.PreSigned: { - return isValidPresignedSignatureAsync(provider, data, signerAddress); - } - - case SignatureType.Trezor: { - const prefixedMessageHex = addSignedMessagePrefix(data, MessagePrefixType.Trezor); - const ecSignature = parseECSignature(signature); - return isValidECSignature(prefixedMessageHex, ecSignature, signerAddress); + }, + /** + * Verifies that the provided presigned signature is valid according to the 0x Protocol smart contracts + * @param provider Web3 provider to use for all JSON RPC requests + * @param data The hex encoded data signed by the supplied signature + * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. + * @return Whether the data was preSigned by the supplied signerAddress + */ + async isValidPresignedSignatureAsync(provider: Provider, data: string, signerAddress: string): Promise<boolean> { + assert.isWeb3Provider('provider', provider); + assert.isHexString('data', data); + assert.isETHAddressHex('signerAddress', signerAddress); + const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider); + const isValid = await exchangeContract.preSigned.callAsync(data, signerAddress); + return isValid; + }, + /** + * Verifies that the provided wallet signature is valid according to the 0x Protocol smart contracts + * @param provider Web3 provider to use for all JSON RPC requests + * @param data The hex encoded data signed by the supplied signature. + * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned] + * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. + * @return Whether the data was preSigned by the supplied signerAddress. + */ + async isValidWalletSignatureAsync( + provider: Provider, + data: string, + signature: string, + signerAddress: string, + ): Promise<boolean> { + assert.isWeb3Provider('provider', provider); + assert.isHexString('data', data); + assert.isHexString('signature', signature); + assert.isETHAddressHex('signerAddress', signerAddress); + // tslint:disable-next-line:custom-no-magic-numbers + const signatureWithoutType = signature.slice(-2); + const walletContract = new IWalletContract(artifacts.IWallet.compilerOutput.abi, signerAddress, provider); + const isValid = await walletContract.isValidSignature.callAsync(data, signatureWithoutType); + return isValid; + }, + /** + * Verifies that the provided validator signature is valid according to the 0x Protocol smart contracts + * @param provider Web3 provider to use for all JSON RPC requests + * @param data The hex encoded data signed by the supplied signature. + * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned] + * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. + * @return Whether the data was preSigned by the supplied signerAddress. + */ + async isValidValidatorSignatureAsync( + provider: Provider, + data: string, + signature: string, + signerAddress: string, + ): Promise<boolean> { + assert.isWeb3Provider('provider', provider); + assert.isHexString('data', data); + assert.isHexString('signature', signature); + assert.isETHAddressHex('signerAddress', signerAddress); + const validatorSignature = parseValidatorSignature(signature); + const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider); + const isValidatorApproved = await exchangeContract.allowedValidators.callAsync( + signerAddress, + validatorSignature.validatorAddress, + ); + if (!isValidatorApproved) { + throw new Error( + `Validator ${validatorSignature.validatorAddress} was not pre-approved by ${signerAddress}.`, + ); } - default: - throw new Error(`Unhandled SignatureType: ${signatureTypeIndexIfExists}`); - } -} - -/** - * Verifies that the provided presigned signature is valid according to the 0x Protocol smart contracts - * @param data The hex encoded data signed by the supplied signature. - * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned] - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the data was preSigned by the supplied signerAddress. - */ -export async function isValidPresignedSignatureAsync( - provider: Provider, - data: string, - signerAddress: string, -): Promise<boolean> { - assert.isWeb3Provider('provider', provider); - assert.isHexString('data', data); - assert.isETHAddressHex('signerAddress', signerAddress); - const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider); - const isValid = await exchangeContract.preSigned.callAsync(data, signerAddress); - return isValid; -} - -/** - * Verifies that the provided wallet signature is valid according to the 0x Protocol smart contracts - * @param data The hex encoded data signed by the supplied signature. - * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned] - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the data was preSigned by the supplied signerAddress. - */ -export async function isValidWalletSignatureAsync( - provider: Provider, - data: string, - signature: string, - signerAddress: string, -): Promise<boolean> { - assert.isWeb3Provider('provider', provider); - assert.isHexString('data', data); - assert.isHexString('signature', signature); - assert.isETHAddressHex('signerAddress', signerAddress); - // tslint:disable-next-line:custom-no-magic-numbers - const signatureWithoutType = signature.slice(-2); - const walletContract = new IWalletContract(artifacts.IWallet.compilerOutput.abi, signerAddress, provider); - const isValid = await walletContract.isValidSignature.callAsync(data, signatureWithoutType); - return isValid; -} - -/** - * Verifies that the provided validator signature is valid according to the 0x Protocol smart contracts - * @param data The hex encoded data signed by the supplied signature. - * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned] - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the data was preSigned by the supplied signerAddress. - */ -export async function isValidValidatorSignatureAsync( - provider: Provider, - data: string, - signature: string, - signerAddress: string, -): Promise<boolean> { - assert.isWeb3Provider('provider', provider); - assert.isHexString('data', data); - assert.isHexString('signature', signature); - assert.isETHAddressHex('signerAddress', signerAddress); - const validatorSignature = parseValidatorSignature(signature); - const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider); - const isValidatorApproved = await exchangeContract.allowedValidators.callAsync( - signerAddress, - validatorSignature.validatorAddress, - ); - if (!isValidatorApproved) { - throw new Error(`Validator ${validatorSignature.validatorAddress} was not pre-approved by ${signerAddress}.`); - } - - const validatorContract = new IValidatorContract(artifacts.IValidator.compilerOutput.abi, signerAddress, provider); - const isValid = await validatorContract.isValidSignature.callAsync( - data, - signerAddress, - validatorSignature.signature, - ); - return isValid; -} - -/** - * Checks if the supplied elliptic curve signature corresponds to signing `data` with - * the private key corresponding to `signerAddress` - * @param data The hex encoded data signed by the supplied signature. - * @param signature An object containing the elliptic curve signature parameters. - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the ECSignature is valid. - */ -export function isValidECSignature(data: string, signature: ECSignature, signerAddress: string): boolean { - assert.isHexString('data', data); - assert.doesConformToSchema('signature', signature, schemas.ecSignatureSchema); - assert.isETHAddressHex('signerAddress', signerAddress); - - const msgHashBuff = ethUtil.toBuffer(data); - try { - const pubKey = ethUtil.ecrecover( - msgHashBuff, - signature.v, - ethUtil.toBuffer(signature.r), - ethUtil.toBuffer(signature.s), + const validatorContract = new IValidatorContract( + artifacts.IValidator.compilerOutput.abi, + signerAddress, + provider, ); - const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey)); - return retrievedAddress === signerAddress; - } catch (err) { - return false; - } -} - -/** - * Signs an orderHash and returns it's elliptic curve signature. - * This method currently supports TestRPC, Geth and Parity above and below V1.6.6 - * @param orderHash Hex encoded orderHash to sign. - * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address - * must be available via the Provider supplied to 0x.js. - * @param hashPrefixOpts Different signers add/require different prefixes be appended to the message being signed. - * Since we cannot know ahead of time which signer you are using, you must supply both a prefixType and - * whether it must be added before calling `eth_sign` (some signers add it themselves) - * @return An object containing the Elliptic curve signature parameters generated by signing the orderHash. - */ -export async function ecSignOrderHashAsync( - provider: Provider, - orderHash: string, - signerAddress: string, - messagePrefixOpts: MessagePrefixOpts, -): Promise<ECSignature> { - assert.isWeb3Provider('provider', provider); - assert.isHexString('orderHash', orderHash); - assert.isETHAddressHex('signerAddress', signerAddress); - const web3Wrapper = new Web3Wrapper(provider); - await assert.isSenderAddressAsync('signerAddress', signerAddress, web3Wrapper); - const normalizedSignerAddress = signerAddress.toLowerCase(); - - let msgHashHex = orderHash; - const prefixedMsgHashHex = addSignedMessagePrefix(orderHash, messagePrefixOpts.prefixType); - if (messagePrefixOpts.shouldAddPrefixBeforeCallingEthSign) { - msgHashHex = prefixedMsgHashHex; - } - const signature = await web3Wrapper.signMessageAsync(normalizedSignerAddress, msgHashHex); - - // HACK: There is no consensus on whether the signatureHex string should be formatted as - // v + r + s OR r + s + v, and different clients (even different versions of the same client) - // return the signature params in different orders. In order to support all client implementations, - // we parse the signature in both ways, and evaluate if either one is a valid signature. - // tslint:disable-next-line:custom-no-magic-numbers - const validVParamValues = [27, 28]; - const ecSignatureVRS = parseSignatureHexAsVRS(signature); - if (_.includes(validVParamValues, ecSignatureVRS.v)) { - const isValidVRSSignature = isValidECSignature(prefixedMsgHashHex, ecSignatureVRS, normalizedSignerAddress); - if (isValidVRSSignature) { - return ecSignatureVRS; + const isValid = await validatorContract.isValidSignature.callAsync( + data, + signerAddress, + validatorSignature.signature, + ); + return isValid; + }, + /** + * Checks if the supplied elliptic curve signature corresponds to signing `data` with + * the private key corresponding to `signerAddress` + * @param data The hex encoded data signed by the supplied signature. + * @param signature An object containing the elliptic curve signature parameters. + * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. + * @return Whether the ECSignature is valid. + */ + isValidECSignature(data: string, signature: ECSignature, signerAddress: string): boolean { + assert.isHexString('data', data); + assert.doesConformToSchema('signature', signature, schemas.ecSignatureSchema); + assert.isETHAddressHex('signerAddress', signerAddress); + + const msgHashBuff = ethUtil.toBuffer(data); + try { + const pubKey = ethUtil.ecrecover( + msgHashBuff, + signature.v, + ethUtil.toBuffer(signature.r), + ethUtil.toBuffer(signature.s), + ); + const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey)); + return retrievedAddress === signerAddress; + } catch (err) { + return false; } - } - - const ecSignatureRSV = parseSignatureHexAsRSV(signature); - if (_.includes(validVParamValues, ecSignatureRSV.v)) { - const isValidRSVSignature = isValidECSignature(prefixedMsgHashHex, ecSignatureRSV, normalizedSignerAddress); - if (isValidRSVSignature) { - return ecSignatureRSV; + }, + /** + * Signs an orderHash and returns it's elliptic curve signature. + * This method currently supports TestRPC, Geth and Parity above and below V1.6.6 + * @param provider The provider to use for JSON RPC calls + * @param orderHash Hex encoded orderHash to sign. + * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address + * must be available via the Provider supplied to 0x.js. + * @param messagePrefixOpts Different signers add/require different prefixes be appended to the message being signed. + * Since we cannot know ahead of time which signer you are using, you must supply both a prefixType and + * whether it must be added before calling `eth_sign` (some signers add it themselves) + * @return An object containing the Elliptic curve signature parameters generated by signing the orderHash. + */ + async ecSignOrderHashAsync( + provider: Provider, + orderHash: string, + signerAddress: string, + messagePrefixOpts: MessagePrefixOpts, + ): Promise<ECSignature> { + assert.isWeb3Provider('provider', provider); + assert.isHexString('orderHash', orderHash); + assert.isETHAddressHex('signerAddress', signerAddress); + const web3Wrapper = new Web3Wrapper(provider); + await assert.isSenderAddressAsync('signerAddress', signerAddress, web3Wrapper); + const normalizedSignerAddress = signerAddress.toLowerCase(); + + let msgHashHex = orderHash; + const prefixedMsgHashHex = signatureUtils.addSignedMessagePrefix(orderHash, messagePrefixOpts.prefixType); + if (messagePrefixOpts.shouldAddPrefixBeforeCallingEthSign) { + msgHashHex = prefixedMsgHashHex; } - } - - throw new Error(OrderError.InvalidSignature); -} - -/** - * Adds the relevant prefix to the message being signed. - * @param message Message to sign - * @param messagePrefixType The type of message prefix to add. Different signers expect - * specific message prefixes. - * @return Prefixed message - */ -export function addSignedMessagePrefix(message: string, messagePrefixType: MessagePrefixType): string { - assert.isString('message', message); - assert.doesBelongToStringEnum('messagePrefixType', messagePrefixType, MessagePrefixType); - switch (messagePrefixType) { - case MessagePrefixType.None: - return message; - - case MessagePrefixType.EthSign: { - const msgBuff = ethUtil.toBuffer(message); - const prefixedMsgBuff = ethUtil.hashPersonalMessage(msgBuff); - const prefixedMsgHex = ethUtil.bufferToHex(prefixedMsgBuff); - return prefixedMsgHex; + const signature = await web3Wrapper.signMessageAsync(normalizedSignerAddress, msgHashHex); + + // HACK: There is no consensus on whether the signatureHex string should be formatted as + // v + r + s OR r + s + v, and different clients (even different versions of the same client) + // return the signature params in different orders. In order to support all client implementations, + // we parse the signature in both ways, and evaluate if either one is a valid signature. + // tslint:disable-next-line:custom-no-magic-numbers + const validVParamValues = [27, 28]; + const ecSignatureVRS = parseSignatureHexAsVRS(signature); + if (_.includes(validVParamValues, ecSignatureVRS.v)) { + const isValidVRSSignature = signatureUtils.isValidECSignature( + prefixedMsgHashHex, + ecSignatureVRS, + normalizedSignerAddress, + ); + if (isValidVRSSignature) { + return ecSignatureVRS; + } } - case MessagePrefixType.Trezor: { - const msgBuff = ethUtil.toBuffer(message); - const prefixedMsgBuff = hashTrezorPersonalMessage(msgBuff); - const prefixedMsgHex = ethUtil.bufferToHex(prefixedMsgBuff); - return prefixedMsgHex; + const ecSignatureRSV = parseSignatureHexAsRSV(signature); + if (_.includes(validVParamValues, ecSignatureRSV.v)) { + const isValidRSVSignature = signatureUtils.isValidECSignature( + prefixedMsgHashHex, + ecSignatureRSV, + normalizedSignerAddress, + ); + if (isValidRSVSignature) { + return ecSignatureRSV; + } } - default: - throw new Error(`Unrecognized MessagePrefixType: ${messagePrefixType}`); - } -} - -/** - * Parse a 0x protocol hex-encoded signature string into it's ECSignature components - * @param signature A hex encoded ecSignature 0x Protocol signature - * @return An ECSignature object with r,s,v parameters - */ -export function parseECSignature(signature: string): ECSignature { - assert.isHexString('signature', signature); - const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712, SignatureType.Trezor]; - assert.isOneOfExpectedSignatureTypes(signature, ecSignatureTypes); - - // tslint:disable-next-line:custom-no-magic-numbers - const vrsHex = signature.slice(0, -2); - const ecSignature = parseSignatureHexAsVRS(vrsHex); - - return ecSignature; -} + throw new Error(OrderError.InvalidSignature); + }, + /** + * Adds the relevant prefix to the message being signed. + * @param message Message to sign + * @param messagePrefixType The type of message prefix to add. Different signers expect + * specific message prefixes. + * @return Prefixed message + */ + addSignedMessagePrefix(message: string, messagePrefixType: MessagePrefixType): string { + assert.isString('message', message); + assert.doesBelongToStringEnum('messagePrefixType', messagePrefixType, MessagePrefixType); + switch (messagePrefixType) { + case MessagePrefixType.None: + return message; + + case MessagePrefixType.EthSign: { + const msgBuff = ethUtil.toBuffer(message); + const prefixedMsgBuff = ethUtil.hashPersonalMessage(msgBuff); + const prefixedMsgHex = ethUtil.bufferToHex(prefixedMsgBuff); + return prefixedMsgHex; + } + + case MessagePrefixType.Trezor: { + const msgBuff = ethUtil.toBuffer(message); + const prefixedMsgBuff = hashTrezorPersonalMessage(msgBuff); + const prefixedMsgHex = ethUtil.bufferToHex(prefixedMsgBuff); + return prefixedMsgHex; + } + + default: + throw new Error(`Unrecognized MessagePrefixType: ${messagePrefixType}`); + } + }, + /** + * Parse a 0x protocol hex-encoded signature string into it's ECSignature components + * @param signature A hex encoded ecSignature 0x Protocol signature + * @return An ECSignature object with r,s,v parameters + */ + parseECSignature(signature: string): ECSignature { + assert.isHexString('signature', signature); + const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712, SignatureType.Trezor]; + assert.isOneOfExpectedSignatureTypes(signature, ecSignatureTypes); + + // tslint:disable-next-line:custom-no-magic-numbers + const vrsHex = signature.slice(0, -2); + const ecSignature = parseSignatureHexAsVRS(vrsHex); + + return ecSignature; + }, +}; function hashTrezorPersonalMessage(message: Buffer): Buffer { const prefix = ethUtil.toBuffer('\x19Ethereum Signed Message:\n' + String.fromCharCode(message.byteLength)); diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index 5714f9671..2f36386ad 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -5,8 +5,8 @@ import * as _ from 'lodash'; import 'mocha'; import * as Sinon from 'sinon'; -import { ecSignOrderHashAsync, generatePseudoRandomSalt, MessagePrefixType } from '../src'; -import { isValidECSignature, isValidSignatureAsync } from '../src/signature_utils'; +import { generatePseudoRandomSalt, MessagePrefixType } from '../src'; +import { signatureUtils } from '../src/signature_utils'; import { chaiSetup } from './utils/chai_setup'; import { provider, web3Wrapper } from './utils/web3_wrapper'; @@ -22,12 +22,14 @@ describe('Signature utils', () => { let address = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; it("should return false if the data doesn't pertain to the signature & address", async () => { - expect(await isValidSignatureAsync(provider, '0x0', ethSignSignature, address)).to.be.false(); + expect( + await signatureUtils.isValidSignatureAsync(provider, '0x0', ethSignSignature, address), + ).to.be.false(); }); it("should return false if the address doesn't pertain to the signature & data", async () => { const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42'; expect( - await isValidSignatureAsync(provider, dataHex, ethSignSignature, validUnrelatedAddress), + await signatureUtils.isValidSignatureAsync(provider, dataHex, ethSignSignature, validUnrelatedAddress), ).to.be.false(); }); it("should return false if the signature doesn't pertain to the dataHex & address", async () => { @@ -35,18 +37,27 @@ describe('Signature utils', () => { // tslint:disable-next-line:custom-no-magic-numbers signatureArray[5] = 'C'; // V = 28, instead of 27 const wrongSignature = signatureArray.join(''); - expect(await isValidSignatureAsync(provider, dataHex, wrongSignature, address)).to.be.false(); + expect( + await signatureUtils.isValidSignatureAsync(provider, dataHex, wrongSignature, address), + ).to.be.false(); }); it('should throw if signatureType is invalid', () => { const signatureArray = ethSignSignature.split(''); signatureArray[3] = '9'; // SignatureType w/ index 9 doesn't exist const signatureWithInvalidType = signatureArray.join(''); - expect(isValidSignatureAsync(provider, dataHex, signatureWithInvalidType, address)).to.be.rejected(); + expect( + signatureUtils.isValidSignatureAsync(provider, dataHex, signatureWithInvalidType, address), + ).to.be.rejected(); }); it('should return true for a valid Ecrecover (EthSign) signature', async () => { - const isValidSignatureLocal = await isValidSignatureAsync(provider, dataHex, ethSignSignature, address); + const isValidSignatureLocal = await signatureUtils.isValidSignatureAsync( + provider, + dataHex, + ethSignSignature, + address, + ); expect(isValidSignatureLocal).to.be.true(); }); @@ -55,7 +66,12 @@ describe('Signature utils', () => { address = '0x6ecbe1db9ef729cbe972c83fb886247691fb6beb'; const eip712Signature = '0x1bdde07aac4bf12c12ddbb155919c43eba4146a2cfcf904a862950dbebe332554c6674975603eb5a4eaf8fd7f2e06350267e5b36cda9851a89f8bb49fe2fc9afe202'; - const isValidSignatureLocal = await isValidSignatureAsync(provider, dataHex, eip712Signature, address); + const isValidSignatureLocal = await signatureUtils.isValidSignatureAsync( + provider, + dataHex, + eip712Signature, + address, + ); expect(isValidSignatureLocal).to.be.true(); }); @@ -64,7 +80,12 @@ describe('Signature utils', () => { address = '0x6ecbe1db9ef729cbe972c83fb886247691fb6beb'; const trezorSignature = '0x1ce4760660e6495b5ae6723087bea073b3a99ce98ea81fdf00c240279c010e63d05b87bc34c4d67d4776e8d5aeb023a67484f4eaf0fd353b40893e5101e845cd9908'; - const isValidSignatureLocal = await isValidSignatureAsync(provider, dataHex, trezorSignature, address); + const isValidSignatureLocal = await signatureUtils.isValidSignatureAsync( + provider, + dataHex, + trezorSignature, + address, + ); expect(isValidSignatureLocal).to.be.true(); }); }); @@ -78,18 +99,18 @@ describe('Signature utils', () => { const address = '0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a'; it("should return false if the data doesn't pertain to the signature & address", async () => { - expect(isValidECSignature('0x0', signature, address)).to.be.false(); + expect(signatureUtils.isValidECSignature('0x0', signature, address)).to.be.false(); }); it("should return false if the address doesn't pertain to the signature & data", async () => { const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42'; - expect(isValidECSignature(data, signature, validUnrelatedAddress)).to.be.false(); + expect(signatureUtils.isValidECSignature(data, signature, validUnrelatedAddress)).to.be.false(); }); it("should return false if the signature doesn't pertain to the data & address", async () => { const wrongSignature = _.assign({}, signature, { v: 28 }); - expect(isValidECSignature(data, wrongSignature, address)).to.be.false(); + expect(signatureUtils.isValidECSignature(data, wrongSignature, address)).to.be.false(); }); it('should return true if the signature does pertain to the data & address', async () => { - const isValidSignatureLocal = isValidECSignature(data, signature, address); + const isValidSignatureLocal = signatureUtils.isValidECSignature(data, signature, address); expect(isValidSignatureLocal).to.be.true(); }); }); @@ -129,7 +150,12 @@ describe('Signature utils', () => { prefixType: MessagePrefixType.EthSign, shouldAddPrefixBeforeCallingEthSign: false, }; - const ecSignature = await ecSignOrderHashAsync(provider, orderHash, makerAddress, messagePrefixOpts); + const ecSignature = await signatureUtils.ecSignOrderHashAsync( + provider, + orderHash, + makerAddress, + messagePrefixOpts, + ); expect(ecSignature).to.deep.equal(expectedECSignature); }); it('should return the correct ECSignature for signatureHex concatenated as R + S + V', async () => { @@ -162,7 +188,12 @@ describe('Signature utils', () => { prefixType: MessagePrefixType.EthSign, shouldAddPrefixBeforeCallingEthSign: false, }; - const ecSignature = await ecSignOrderHashAsync(fakeProvider, orderHash, makerAddress, messagePrefixOpts); + const ecSignature = await signatureUtils.ecSignOrderHashAsync( + fakeProvider, + orderHash, + makerAddress, + messagePrefixOpts, + ); expect(ecSignature).to.deep.equal(expectedECSignature); }); it('should return the correct ECSignature for signatureHex concatenated as V + R + S', async () => { @@ -192,7 +223,12 @@ describe('Signature utils', () => { prefixType: MessagePrefixType.EthSign, shouldAddPrefixBeforeCallingEthSign: false, }; - const ecSignature = await ecSignOrderHashAsync(fakeProvider, orderHash, makerAddress, messagePrefixOpts); + const ecSignature = await signatureUtils.ecSignOrderHashAsync( + fakeProvider, + orderHash, + makerAddress, + messagePrefixOpts, + ); expect(ecSignature).to.deep.equal(expectedECSignature); }); }); 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`); }, }; -- cgit v1.2.3 From 0e82be1bdad10fda083b360aecf548d9e948ed86 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 17:18:18 +0200 Subject: Remove react-docs-example package and links to it --- packages/react-docs-example/README.md | 81 - packages/react-docs-example/less/all.less | 41 - packages/react-docs-example/md/introduction.md | 1 - packages/react-docs-example/package.json | 61 - .../public/css/basscss_responsive_custom.css | 85 - .../public/css/basscss_responsive_margin.css | 453 --- .../public/css/basscss_responsive_padding.css | 370 --- .../public/css/basscss_responsive_type_scale.css | 84 - .../react-docs-example/public/css/github-gist.css | 71 - .../public/css/material-design-iconic-font.min.css | 1 - packages/react-docs-example/public/css/roboto.css | 89 - .../react-docs-example/public/css/roboto_mono.css | 69 - .../public/fonts/Material-Design-Iconic-Font.eot | Bin 42495 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.svg | 787 ----- .../public/fonts/Material-Design-Iconic-Font.ttf | Bin 99212 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.woff | Bin 50312 -> 0 bytes .../public/fonts/Material-Design-Iconic-Font.woff2 | Bin 38384 -> 0 bytes .../public/fonts/Roboto-Black.ttf | Bin 171480 -> 0 bytes .../public/fonts/Roboto-BlackItalic.ttf | Bin 177552 -> 0 bytes .../public/fonts/Roboto-Bold.ttf | Bin 170760 -> 0 bytes .../public/fonts/Roboto-BoldItalic.ttf | Bin 174952 -> 0 bytes .../public/fonts/Roboto-Italic.ttf | Bin 173932 -> 0 bytes .../public/fonts/Roboto-Light.ttf | Bin 170420 -> 0 bytes .../public/fonts/Roboto-LightItalic.ttf | Bin 176616 -> 0 bytes .../public/fonts/Roboto-Medium.ttf | Bin 172064 -> 0 bytes .../public/fonts/Roboto-MediumItalic.ttf | Bin 176864 -> 0 bytes .../public/fonts/Roboto-Regular.ttf | Bin 171676 -> 0 bytes .../public/fonts/Roboto-Thin.ttf | Bin 171904 -> 0 bytes .../public/fonts/Roboto-ThinItalic.ttf | Bin 176300 -> 0 bytes .../public/fonts/RobotoMono-Bold.ttf | Bin 114752 -> 0 bytes .../public/fonts/RobotoMono-BoldItalic.ttf | Bin 122808 -> 0 bytes .../public/fonts/RobotoMono-Italic.ttf | Bin 120832 -> 0 bytes .../public/fonts/RobotoMono-Light.ttf | Bin 118976 -> 0 bytes .../public/fonts/RobotoMono-LightItalic.ttf | Bin 127568 -> 0 bytes .../public/fonts/RobotoMono-Medium.ttf | Bin 114696 -> 0 bytes .../public/fonts/RobotoMono-MediumItalic.ttf | Bin 123640 -> 0 bytes .../public/fonts/RobotoMono-Regular.ttf | Bin 114624 -> 0 bytes .../public/fonts/RobotoMono-Thin.ttf | Bin 118132 -> 0 bytes .../public/fonts/RobotoMono-ThinItalic.ttf | Bin 121456 -> 0 bytes packages/react-docs-example/public/index.html | 24 - packages/react-docs-example/ts/docs.tsx | 98 - packages/react-docs-example/ts/globals.d.ts | 6 - packages/react-docs-example/ts/index.tsx | 17 - packages/react-docs-example/ts/json/0.1.12.json | 3318 ------------------- packages/react-docs-example/ts/json/0.2.0.json | 3401 -------------------- packages/react-docs-example/tsconfig.json | 13 - packages/react-docs-example/tslint.json | 8 - packages/react-docs-example/webpack.config.js | 83 - packages/react-docs/README.md | 6 +- 49 files changed, 3 insertions(+), 9164 deletions(-) delete mode 100644 packages/react-docs-example/README.md delete mode 100644 packages/react-docs-example/less/all.less delete mode 100644 packages/react-docs-example/md/introduction.md delete mode 100644 packages/react-docs-example/package.json delete mode 100644 packages/react-docs-example/public/css/basscss_responsive_custom.css delete mode 100644 packages/react-docs-example/public/css/basscss_responsive_margin.css delete mode 100644 packages/react-docs-example/public/css/basscss_responsive_padding.css delete mode 100644 packages/react-docs-example/public/css/basscss_responsive_type_scale.css delete mode 100644 packages/react-docs-example/public/css/github-gist.css delete mode 100755 packages/react-docs-example/public/css/material-design-iconic-font.min.css delete mode 100644 packages/react-docs-example/public/css/roboto.css delete mode 100644 packages/react-docs-example/public/css/roboto_mono.css delete mode 100755 packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.eot delete mode 100755 packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.svg delete mode 100755 packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.ttf delete mode 100755 packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff delete mode 100755 packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff2 delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Black.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-BlackItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Bold.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-BoldItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Italic.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Light.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-LightItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Medium.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-MediumItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Regular.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-Thin.ttf delete mode 100755 packages/react-docs-example/public/fonts/Roboto-ThinItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Bold.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-BoldItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Italic.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Light.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-LightItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Medium.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-MediumItalic.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Regular.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-Thin.ttf delete mode 100755 packages/react-docs-example/public/fonts/RobotoMono-ThinItalic.ttf delete mode 100644 packages/react-docs-example/public/index.html delete mode 100644 packages/react-docs-example/ts/docs.tsx delete mode 100644 packages/react-docs-example/ts/globals.d.ts delete mode 100644 packages/react-docs-example/ts/index.tsx delete mode 100644 packages/react-docs-example/ts/json/0.1.12.json delete mode 100644 packages/react-docs-example/ts/json/0.2.0.json delete mode 100644 packages/react-docs-example/tsconfig.json delete mode 100644 packages/react-docs-example/tslint.json delete mode 100644 packages/react-docs-example/webpack.config.js diff --git a/packages/react-docs-example/README.md b/packages/react-docs-example/README.md deleted file mode 100644 index c7dfcd3aa..000000000 --- a/packages/react-docs-example/README.md +++ /dev/null @@ -1,81 +0,0 @@ -## @0xproject/react-docs-example - -An [example documentation page](http://react-docs-example.s3-website-us-east-1.amazonaws.com/) built using [react-docs](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs) rendering the [@0xproject/web3-wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) Typescript package. This is a great starter project for hosting your own Solidity or Typescript documentation page. - -## Usage - -This package is intended as a boilerplate for creating and hosting your own documentation page. Easiest way to get started is to fork the `0x-monorepo` and start modifying `react-docs-example`. - -#### Install Dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Initial setup - -The **first** time you work with this package, you must build **all** packages within the monorepo. This is because packages that depend on other packages located inside this monorepo are symlinked when run from **within** the monorepo. This allows you to make changes across multiple packages without first publishing dependent packages to NPM. To build all packages, run the following from the monorepo root directory: - -```bash -PKG=0x.js yarn build -``` - -Note: If you move this package out of the monorepo, it will work without this step. Make sure you copy it out on the `master` branch since the `development` version might rely on not-yet published changes to other packages. - -### Run dev server - -The the `react-docs-example` root directory, run: - -```bash -PKG=0x.js yarn watch -``` - -### Deploy Example to S3 bucket - -You will need to adapt the `deploy_example` command in the `package.json` to point to an S3 bucket you've created. Make sure the bucket is publicly accessible to everyone. - -You will also need to install the [aws-cli](https://github.com/aws/aws-cli) and configure it with your AWS credentials. - -```bash -yarn deploy_example -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0xproject/react-docs-example yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0xproject/react-docs-example yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -## Contributing - -We strongly encourage the community to help us make improvements. To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. diff --git a/packages/react-docs-example/less/all.less b/packages/react-docs-example/less/all.less deleted file mode 100644 index 8e891946d..000000000 --- a/packages/react-docs-example/less/all.less +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Adds always visible scrollbars on OSX so that user knows the content is scrollable - * Source: https://davidwalsh.name/osx-overflow - */ -::-webkit-scrollbar { - -webkit-appearance: none; - width: 4px; - height: 2px; -} -::-webkit-scrollbar-thumb { - border-radius: 4px; - background-color: rgba(0, 0, 0, 0.5); - -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5); -} - -#documentation { - p { - line-height: 1.5; - } - - a { - color: #1d5cde; // linkBlue - } - - .comment { - p { - margin: 0px; - } - } - - .typeTooltip { - border: 1px solid lightgray; - opacity: 1; - } -} - -code { - border: 1px solid #e3eefe; - font-family: 'Roboto Mono'; - background-color: #f2f6ff !important; // lightBlue -} diff --git a/packages/react-docs-example/md/introduction.md b/packages/react-docs-example/md/introduction.md deleted file mode 100644 index b8569576e..000000000 --- a/packages/react-docs-example/md/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Web3Wrapper](https://github.com/0xProject/0x-monorepo/packages/web3-wrapper) documentation! Web3Wrapper is a convenience wrapper around Web3.js, adding support for promises and other niceties. diff --git a/packages/react-docs-example/package.json b/packages/react-docs-example/package.json deleted file mode 100644 index ca7a85b76..000000000 --- a/packages/react-docs-example/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "private": true, - "name": "@0xproject/react-docs-example", - "version": "0.0.19", - "engines": { - "node": ">=6.12" - }, - "description": "An example app using react-docs", - "scripts": { - "lint": "tslint --project .", - "build": "tsc", - "build:example": "NODE_ENV=production webpack", - "watch_without_deps": "tsc -w", - "clean": "shx rm -rf lib; shx rm -f public/bundle*", - "dev": "webpack-dev-server --open", - "deploy_example": "npm run build:example; aws s3 sync ./public/. s3://react-docs-example --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers" - }, - "author": "Fabio Berger", - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/react-docs-example/README.md", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "devDependencies": { - "@0xproject/tslint-config": "^1.0.4", - "@types/lodash": "4.14.104", - "@types/material-ui": "0.18.0", - "@types/node": "^8.0.53", - "@types/react": "16.3.13", - "@types/react-dom": "^16.0.3", - "@types/react-tap-event-plugin": "0.0.30", - "awesome-typescript-loader": "^3.1.3", - "copyfiles": "^1.2.0", - "css-loader": "^0.28.9", - "json-loader": "^0.5.4", - "less": "^2.7.2", - "less-loader": "^2.2.3", - "make-promises-safe": "^1.1.0", - "raw-loader": "^0.5.1", - "shx": "^0.2.2", - "source-map-loader": "^0.2.3", - "style-loader": "^0.20.2", - "tslint": "^5.9.1", - "typescript": "2.7.1", - "webpack": "^3.11.0", - "webpack-dev-server": "^2.11.1" - }, - "dependencies": { - "@0xproject/react-docs": "^1.0.4", - "basscss": "^8.0.3", - "lodash": "^4.17.4", - "material-ui": "^0.17.1", - "react": "15.6.1", - "react-dom": "15.6.1", - "react-tap-event-plugin": "^2.0.1" - } -} diff --git a/packages/react-docs-example/public/css/basscss_responsive_custom.css b/packages/react-docs-example/public/css/basscss_responsive_custom.css deleted file mode 100644 index 5f8bd9117..000000000 --- a/packages/react-docs-example/public/css/basscss_responsive_custom.css +++ /dev/null @@ -1,85 +0,0 @@ -/* Custom Basscss Responsive Utilities */ - -@media (max-width: 52em) { - .sm-center { - text-align: center; - } - .sm-align-middle { - vertical-align: middle; - } - .sm-align-top { - vertical-align: top; - } - .sm-left-align { - text-align: left; - } - .sm-right-align { - text-align: right; - } - .sm-table-cell { - display: table-cell; - } - .sm-mx-auto { - margin-left: auto; - margin-right: auto; - } - .sm-right { - float: right; - } -} - -@media (min-width: 52em) { - .md-center { - text-align: center; - } - .md-align-middle { - vertical-align: middle; - } - .md-align-top { - vertical-align: top; - } - .md-left-align { - text-align: left; - } - .md-right-align { - text-align: right; - } - .md-table-cell { - display: table-cell; - } - .md-mx-auto { - margin-left: auto; - margin-right: auto; - } - .md-right { - float: right; - } -} - -@media (min-width: 64em) { - .lg-center { - text-align: center; - } - .lg-align-middle { - vertical-align: middle; - } - .lg-align-top { - vertical-align: top; - } - .lg-left-align { - text-align: left; - } - .lg-right-align { - text-align: right; - } - .lg-table-cell { - display: table-cell; - } - .lg-mx-auto { - margin-left: auto; - margin-right: auto; - } - .lg-right { - float: right; - } -} diff --git a/packages/react-docs-example/public/css/basscss_responsive_margin.css b/packages/react-docs-example/public/css/basscss_responsive_margin.css deleted file mode 100644 index c9f3e855c..000000000 --- a/packages/react-docs-example/public/css/basscss_responsive_margin.css +++ /dev/null @@ -1,453 +0,0 @@ -/* Basscss Responsive Margin */ - -@media (max-width: 52em) { - /* Modified by Fabio Berger to max-width from min-width */ - - .sm-m0 { - margin: 0; - } - .sm-mt0 { - margin-top: 0; - } - .sm-mr0 { - margin-right: 0; - } - .sm-mb0 { - margin-bottom: 0; - } - .sm-ml0 { - margin-left: 0; - } - .sm-mx0 { - margin-left: 0; - margin-right: 0; - } - .sm-my0 { - margin-top: 0; - margin-bottom: 0; - } - - .sm-m1 { - margin: 0.5rem; - } - .sm-mt1 { - margin-top: 0.5rem; - } - .sm-mr1 { - margin-right: 0.5rem; - } - .sm-mb1 { - margin-bottom: 0.5rem; - } - .sm-ml1 { - margin-left: 0.5rem; - } - .sm-mx1 { - margin-left: 0.5rem; - margin-right: 0.5rem; - } - .sm-my1 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; - } - - .sm-m2 { - margin: 1rem; - } - .sm-mt2 { - margin-top: 1rem; - } - .sm-mr2 { - margin-right: 1rem; - } - .sm-mb2 { - margin-bottom: 1rem; - } - .sm-ml2 { - margin-left: 1rem; - } - .sm-mx2 { - margin-left: 1rem; - margin-right: 1rem; - } - .sm-my2 { - margin-top: 1rem; - margin-bottom: 1rem; - } - - .sm-m3 { - margin: 2rem; - } - .sm-mt3 { - margin-top: 2rem; - } - .sm-mr3 { - margin-right: 2rem; - } - .sm-mb3 { - margin-bottom: 2rem; - } - .sm-ml3 { - margin-left: 2rem; - } - .sm-mx3 { - margin-left: 2rem; - margin-right: 2rem; - } - .sm-my3 { - margin-top: 2rem; - margin-bottom: 2rem; - } - - .sm-m4 { - margin: 4rem; - } - .sm-mt4 { - margin-top: 4rem; - } - .sm-mr4 { - margin-right: 4rem; - } - .sm-mb4 { - margin-bottom: 4rem; - } - .sm-ml4 { - margin-left: 4rem; - } - .sm-mx4 { - margin-left: 4rem; - margin-right: 4rem; - } - .sm-my4 { - margin-top: 4rem; - margin-bottom: 4rem; - } - - .sm-mxn1 { - margin-left: -0.5rem; - margin-right: -0.5rem; - } - .sm-mxn2 { - margin-left: -1rem; - margin-right: -1rem; - } - .sm-mxn3 { - margin-left: -2rem; - margin-right: -2rem; - } - .sm-mxn4 { - margin-left: -4rem; - margin-right: -4rem; - } - - .sm-ml-auto { - margin-left: auto; - } - .sm-mr-auto { - margin-right: auto; - } - .sm-mx-auto { - margin-left: auto; - margin-right: auto; - } -} - -@media (min-width: 52em) { - .md-m0 { - margin: 0; - } - .md-mt0 { - margin-top: 0; - } - .md-mr0 { - margin-right: 0; - } - .md-mb0 { - margin-bottom: 0; - } - .md-ml0 { - margin-left: 0; - } - .md-mx0 { - margin-left: 0; - margin-right: 0; - } - .md-my0 { - margin-top: 0; - margin-bottom: 0; - } - - .md-m1 { - margin: 0.5rem; - } - .md-mt1 { - margin-top: 0.5rem; - } - .md-mr1 { - margin-right: 0.5rem; - } - .md-mb1 { - margin-bottom: 0.5rem; - } - .md-ml1 { - margin-left: 0.5rem; - } - .md-mx1 { - margin-left: 0.5rem; - margin-right: 0.5rem; - } - .md-my1 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; - } - - .md-m2 { - margin: 1rem; - } - .md-mt2 { - margin-top: 1rem; - } - .md-mr2 { - margin-right: 1rem; - } - .md-mb2 { - margin-bottom: 1rem; - } - .md-ml2 { - margin-left: 1rem; - } - .md-mx2 { - margin-left: 1rem; - margin-right: 1rem; - } - .md-my2 { - margin-top: 1rem; - margin-bottom: 1rem; - } - - .md-m3 { - margin: 2rem; - } - .md-mt3 { - margin-top: 2rem; - } - .md-mr3 { - margin-right: 2rem; - } - .md-mb3 { - margin-bottom: 2rem; - } - .md-ml3 { - margin-left: 2rem; - } - .md-mx3 { - margin-left: 2rem; - margin-right: 2rem; - } - .md-my3 { - margin-top: 2rem; - margin-bottom: 2rem; - } - - .md-m4 { - margin: 4rem; - } - .md-mt4 { - margin-top: 4rem; - } - .md-mr4 { - margin-right: 4rem; - } - .md-mb4 { - margin-bottom: 4rem; - } - .md-ml4 { - margin-left: 4rem; - } - .md-mx4 { - margin-left: 4rem; - margin-right: 4rem; - } - .md-my4 { - margin-top: 4rem; - margin-bottom: 4rem; - } - - .md-mxn1 { - margin-left: -0.5rem; - margin-right: -0.5rem; - } - .md-mxn2 { - margin-left: -1rem; - margin-right: -1rem; - } - .md-mxn3 { - margin-left: -2rem; - margin-right: -2rem; - } - .md-mxn4 { - margin-left: -4rem; - margin-right: -4rem; - } - - .md-ml-auto { - margin-left: auto; - } - .md-mr-auto { - margin-right: auto; - } - .md-mx-auto { - margin-left: auto; - margin-right: auto; - } -} - -@media (min-width: 64em) { - .lg-m0 { - margin: 0; - } - .lg-mt0 { - margin-top: 0; - } - .lg-mr0 { - margin-right: 0; - } - .lg-mb0 { - margin-bottom: 0; - } - .lg-ml0 { - margin-left: 0; - } - .lg-mx0 { - margin-left: 0; - margin-right: 0; - } - .lg-my0 { - margin-top: 0; - margin-bottom: 0; - } - - .lg-m1 { - margin: 0.5rem; - } - .lg-mt1 { - margin-top: 0.5rem; - } - .lg-mr1 { - margin-right: 0.5rem; - } - .lg-mb1 { - margin-bottom: 0.5rem; - } - .lg-ml1 { - margin-left: 0.5rem; - } - .lg-mx1 { - margin-left: 0.5rem; - margin-right: 0.5rem; - } - .lg-my1 { - margin-top: 0.5rem; - margin-bottom: 0.5rem; - } - - .lg-m2 { - margin: 1rem; - } - .lg-mt2 { - margin-top: 1rem; - } - .lg-mr2 { - margin-right: 1rem; - } - .lg-mb2 { - margin-bottom: 1rem; - } - .lg-ml2 { - margin-left: 1rem; - } - .lg-mx2 { - margin-left: 1rem; - margin-right: 1rem; - } - .lg-my2 { - margin-top: 1rem; - margin-bottom: 1rem; - } - - .lg-m3 { - margin: 2rem; - } - .lg-mt3 { - margin-top: 2rem; - } - .lg-mr3 { - margin-right: 2rem; - } - .lg-mb3 { - margin-bottom: 2rem; - } - .lg-ml3 { - margin-left: 2rem; - } - .lg-mx3 { - margin-left: 2rem; - margin-right: 2rem; - } - .lg-my3 { - margin-top: 2rem; - margin-bottom: 2rem; - } - - .lg-m4 { - margin: 4rem; - } - .lg-mt4 { - margin-top: 4rem; - } - .lg-mr4 { - margin-right: 4rem; - } - .lg-mb4 { - margin-bottom: 4rem; - } - .lg-ml4 { - margin-left: 4rem; - } - .lg-mx4 { - margin-left: 4rem; - margin-right: 4rem; - } - .lg-my4 { - margin-top: 4rem; - margin-bottom: 4rem; - } - - .lg-mxn1 { - margin-left: -0.5rem; - margin-right: -0.5rem; - } - .lg-mxn2 { - margin-left: -1rem; - margin-right: -1rem; - } - .lg-mxn3 { - margin-left: -2rem; - margin-right: -2rem; - } - .lg-mxn4 { - margin-left: -4rem; - margin-right: -4rem; - } - - .lg-ml-auto { - margin-left: auto; - } - .lg-mr-auto { - margin-right: auto; - } - .lg-mx-auto { - margin-left: auto; - margin-right: auto; - } -} diff --git a/packages/react-docs-example/public/css/basscss_responsive_padding.css b/packages/react-docs-example/public/css/basscss_responsive_padding.css deleted file mode 100644 index 773a91743..000000000 --- a/packages/react-docs-example/public/css/basscss_responsive_padding.css +++ /dev/null @@ -1,370 +0,0 @@ -/* Basscss Responsive Padding */ -/* Modified by Fabio Berger to include xs prefix */ - -@media (max-width: 52em) { - /* Modified by Fabio Berger to max-width from min-width */ - - .sm-p0 { - padding: 0; - } - .sm-pt0 { - padding-top: 0; - } - .sm-pr0 { - padding-right: 0; - } - .sm-pb0 { - padding-bottom: 0; - } - .sm-pl0 { - padding-left: 0; - } - .sm-px0 { - padding-left: 0; - padding-right: 0; - } - .sm-py0 { - padding-top: 0; - padding-bottom: 0; - } - - .sm-p1 { - padding: 0.5rem; - } - .sm-pt1 { - padding-top: 0.5rem; - } - .sm-pr1 { - padding-right: 0.5rem; - } - .sm-pb1 { - padding-bottom: 0.5rem; - } - .sm-pl1 { - padding-left: 0.5rem; - } - .sm-px1 { - padding-left: 0.5rem; - padding-right: 0.5rem; - } - .sm-py1 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - } - - .sm-p2 { - padding: 1rem; - } - .sm-pt2 { - padding-top: 1rem; - } - .sm-pr2 { - padding-right: 1rem; - } - .sm-pb2 { - padding-bottom: 1rem; - } - .sm-pl2 { - padding-left: 1rem; - } - .sm-px2 { - padding-left: 1rem; - padding-right: 1rem; - } - .sm-py2 { - padding-top: 1rem; - padding-bottom: 1rem; - } - - .sm-p3 { - padding: 2rem; - } - .sm-pt3 { - padding-top: 2rem; - } - .sm-pr3 { - padding-right: 2rem; - } - .sm-pb3 { - padding-bottom: 2rem; - } - .sm-pl3 { - padding-left: 2rem; - } - .sm-px3 { - padding-left: 2rem; - padding-right: 2rem; - } - .sm-py3 { - padding-top: 2rem; - padding-bottom: 2rem; - } - - .sm-p4 { - padding: 4rem; - } - .sm-pt4 { - padding-top: 4rem; - } - .sm-pr4 { - padding-right: 4rem; - } - .sm-pb4 { - padding-bottom: 4rem; - } - .sm-pl4 { - padding-left: 4rem; - } - .sm-px4 { - padding-left: 4rem; - padding-right: 4rem; - } - .sm-py4 { - padding-top: 4rem; - padding-bottom: 4rem; - } -} - -@media (min-width: 52em) { - .md-p0 { - padding: 0; - } - .md-pt0 { - padding-top: 0; - } - .md-pr0 { - padding-right: 0; - } - .md-pb0 { - padding-bottom: 0; - } - .md-pl0 { - padding-left: 0; - } - .md-px0 { - padding-left: 0; - padding-right: 0; - } - .md-py0 { - padding-top: 0; - padding-bottom: 0; - } - - .md-p1 { - padding: 0.5rem; - } - .md-pt1 { - padding-top: 0.5rem; - } - .md-pr1 { - padding-right: 0.5rem; - } - .md-pb1 { - padding-bottom: 0.5rem; - } - .md-pl1 { - padding-left: 0.5rem; - } - .md-px1 { - padding-left: 0.5rem; - padding-right: 0.5rem; - } - .md-py1 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - } - - .md-p2 { - padding: 1rem; - } - .md-pt2 { - padding-top: 1rem; - } - .md-pr2 { - padding-right: 1rem; - } - .md-pb2 { - padding-bottom: 1rem; - } - .md-pl2 { - padding-left: 1rem; - } - .md-px2 { - padding-left: 1rem; - padding-right: 1rem; - } - .md-py2 { - padding-top: 1rem; - padding-bottom: 1rem; - } - - .md-p3 { - padding: 2rem; - } - .md-pt3 { - padding-top: 2rem; - } - .md-pr3 { - padding-right: 2rem; - } - .md-pb3 { - padding-bottom: 2rem; - } - .md-pl3 { - padding-left: 2rem; - } - .md-px3 { - padding-left: 2rem; - padding-right: 2rem; - } - .md-py3 { - padding-top: 2rem; - padding-bottom: 2rem; - } - - .md-p4 { - padding: 4rem; - } - .md-pt4 { - padding-top: 4rem; - } - .md-pr4 { - padding-right: 4rem; - } - .md-pb4 { - padding-bottom: 4rem; - } - .md-pl4 { - padding-left: 4rem; - } - .md-px4 { - padding-left: 4rem; - padding-right: 4rem; - } - .md-py4 { - padding-top: 4rem; - padding-bottom: 4rem; - } -} - -@media (min-width: 64em) { - .lg-p0 { - padding: 0; - } - .lg-pt0 { - padding-top: 0; - } - .lg-pr0 { - padding-right: 0; - } - .lg-pb0 { - padding-bottom: 0; - } - .lg-pl0 { - padding-left: 0; - } - .lg-px0 { - padding-left: 0; - padding-right: 0; - } - .lg-py0 { - padding-top: 0; - padding-bottom: 0; - } - - .lg-p1 { - padding: 0.5rem; - } - .lg-pt1 { - padding-top: 0.5rem; - } - .lg-pr1 { - padding-right: 0.5rem; - } - .lg-pb1 { - padding-bottom: 0.5rem; - } - .lg-pl1 { - padding-left: 0.5rem; - } - .lg-px1 { - padding-left: 0.5rem; - padding-right: 0.5rem; - } - .lg-py1 { - padding-top: 0.5rem; - padding-bottom: 0.5rem; - } - - .lg-p2 { - padding: 1rem; - } - .lg-pt2 { - padding-top: 1rem; - } - .lg-pr2 { - padding-right: 1rem; - } - .lg-pb2 { - padding-bottom: 1rem; - } - .lg-pl2 { - padding-left: 1rem; - } - .lg-px2 { - padding-left: 1rem; - padding-right: 1rem; - } - .lg-py2 { - padding-top: 1rem; - padding-bottom: 1rem; - } - - .lg-p3 { - padding: 2rem; - } - .lg-pt3 { - padding-top: 2rem; - } - .lg-pr3 { - padding-right: 2rem; - } - .lg-pb3 { - padding-bottom: 2rem; - } - .lg-pl3 { - padding-left: 2rem; - } - .lg-px3 { - padding-left: 2rem; - padding-right: 2rem; - } - .lg-py3 { - padding-top: 2rem; - padding-bottom: 2rem; - } - - .lg-p4 { - padding: 4rem; - } - .lg-pt4 { - padding-top: 4rem; - } - .lg-pr4 { - padding-right: 4rem; - } - .lg-pb4 { - padding-bottom: 4rem; - } - .lg-pl4 { - padding-left: 4rem; - } - .lg-px4 { - padding-left: 4rem; - padding-right: 4rem; - } - .lg-py4 { - padding-top: 4rem; - padding-bottom: 4rem; - } -} diff --git a/packages/react-docs-example/public/css/basscss_responsive_type_scale.css b/packages/react-docs-example/public/css/basscss_responsive_type_scale.css deleted file mode 100644 index 27de3da94..000000000 --- a/packages/react-docs-example/public/css/basscss_responsive_type_scale.css +++ /dev/null @@ -1,84 +0,0 @@ -/* Basscss Responsive Type Scale */ -/* Modified by Fabio Berger to include xs prefix */ - -@media (max-width: 52em) { - /* Modified by Fabio Berger to max-width from min-width */ - .sm-h00 { - font-size: 4rem; - } - .sm-h0 { - font-size: 3rem; - } - .sm-h1 { - font-size: 2rem; - } - .sm-h2 { - font-size: 1.5rem; - } - .sm-h3 { - font-size: 1.25rem; - } - .sm-h4 { - font-size: 1rem; - } - .sm-h5 { - font-size: 0.875rem; - } - .sm-h6 { - font-size: 0.75rem; - } -} - -@media (min-width: 52em) { - .md-h00 { - font-size: 4rem; - } - .md-h0 { - font-size: 3rem; - } - .md-h1 { - font-size: 2rem; - } - .md-h2 { - font-size: 1.5rem; - } - .md-h3 { - font-size: 1.25rem; - } - .md-h4 { - font-size: 1rem; - } - .md-h5 { - font-size: 0.875rem; - } - .md-h6 { - font-size: 0.75rem; - } -} - -@media (min-width: 64em) { - .lg-h00 { - font-size: 4rem; - } - .lg-h0 { - font-size: 3rem; - } - .lg-h1 { - font-size: 2rem; - } - .lg-h2 { - font-size: 1.5rem; - } - .lg-h3 { - font-size: 1.25rem; - } - .lg-h4 { - font-size: 1rem; - } - .lg-h5 { - font-size: 0.875rem; - } - .lg-h6 { - font-size: 0.75rem; - } -} diff --git a/packages/react-docs-example/public/css/github-gist.css b/packages/react-docs-example/public/css/github-gist.css deleted file mode 100644 index d5c8751c5..000000000 --- a/packages/react-docs-example/public/css/github-gist.css +++ /dev/null @@ -1,71 +0,0 @@ -/** - * GitHub Gist Theme - * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro - */ - -.hljs { - display: block; - background: white; - padding: 0.5em; - color: #333333; - overflow-x: auto; -} - -.hljs-comment, -.hljs-meta { - color: #969896; -} - -.hljs-string, -.hljs-variable, -.hljs-template-variable, -.hljs-strong, -.hljs-emphasis, -.hljs-quote { - color: #df5000; -} - -.hljs-keyword, -.hljs-selector-tag, -.hljs-type { - color: #a71d5d; -} - -.hljs-literal, -.hljs-symbol, -.hljs-bullet, -.hljs-attribute { - color: #0086b3; -} - -.hljs-section, -.hljs-name { - color: #63a35c; -} - -.hljs-tag { - color: #333333; -} - -.hljs-title, -.hljs-attr, -.hljs-selector-id, -.hljs-selector-class, -.hljs-selector-attr, -.hljs-selector-pseudo { - color: #795da3; -} - -.hljs-addition { - color: #55a532; - background-color: #eaffea; -} - -.hljs-deletion { - color: #bd2c00; - background-color: #ffecec; -} - -.hljs-link { - text-decoration: underline; -} diff --git a/packages/react-docs-example/public/css/material-design-iconic-font.min.css b/packages/react-docs-example/public/css/material-design-iconic-font.min.css deleted file mode 100755 index e1a58fe2f..000000000 --- a/packages/react-docs-example/public/css/material-design-iconic-font.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Material-Design-Iconic-Font;src:url(../fonts/Material-Design-Iconic-Font.woff2?v=2.2.0) format('woff2'),url(../fonts/Material-Design-Iconic-Font.woff?v=2.2.0) format('woff'),url(../fonts/Material-Design-Iconic-Font.ttf?v=2.2.0) format('truetype')}.zmdi{display:inline-block;font:normal normal normal 14px/1 'Material-Design-Iconic-Font';font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.zmdi-hc-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.zmdi-hc-2x{font-size:2em}.zmdi-hc-3x{font-size:3em}.zmdi-hc-4x{font-size:4em}.zmdi-hc-5x{font-size:5em}.zmdi-hc-fw{width:1.28571429em;text-align:center}.zmdi-hc-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.zmdi-hc-ul>li{position:relative}.zmdi-hc-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.zmdi-hc-li.zmdi-hc-lg{left:-1.85714286em}.zmdi-hc-border{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:2px}.zmdi-hc-border-circle{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:50%}.zmdi.pull-left{float:left;margin-right:.15em}.zmdi.pull-right{float:right;margin-left:.15em}.zmdi-hc-spin{-webkit-animation:zmdi-spin 1.5s infinite linear;animation:zmdi-spin 1.5s infinite linear}.zmdi-hc-spin-reverse{-webkit-animation:zmdi-spin-reverse 1.5s infinite linear;animation:zmdi-spin-reverse 1.5s infinite linear}@-webkit-keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}@keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}.zmdi-hc-rotate-90{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.zmdi-hc-rotate-180{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.zmdi-hc-rotate-270{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.zmdi-hc-flip-horizontal{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.zmdi-hc-flip-vertical{-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}.zmdi-hc-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.zmdi-hc-stack-1x,.zmdi-hc-stack-2x{position:absolute;left:0;width:100%;text-align:center}.zmdi-hc-stack-1x{line-height:inherit}.zmdi-hc-stack-2x{font-size:2em}.zmdi-hc-inverse{color:#fff}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-import-export:before{content:'\f30c'}.zmdi-swap-vertical-:before{content:'\f30c'}.zmdi-airplanemode-inactive:before{content:'\f102'}.zmdi-airplanemode-active:before{content:'\f103'}.zmdi-rate-review:before{content:'\f103'}.zmdi-comment-sign:before{content:'\f25a'}.zmdi-network-warning:before{content:'\f2ad'}.zmdi-shopping-cart-add:before{content:'\f1ca'}.zmdi-file-add:before{content:'\f221'}.zmdi-network-wifi-scan:before{content:'\f2e4'}.zmdi-collection-add:before{content:'\f14e'}.zmdi-format-playlist-add:before{content:'\f3ac'}.zmdi-format-queue-music:before{content:'\f3ab'}.zmdi-plus-box:before{content:'\f277'}.zmdi-tag-backspace:before{content:'\f1d9'}.zmdi-alarm-add:before{content:'\f32b'}.zmdi-battery-charging:before{content:'\f114'}.zmdi-daydream-setting:before{content:'\f217'}.zmdi-more-horiz:before{content:'\f19c'}.zmdi-book-photo:before{content:'\f11b'}.zmdi-incandescent:before{content:'\f189'}.zmdi-wb-iridescent:before{content:'\f38c'}.zmdi-calendar-remove:before{content:'\f330'}.zmdi-refresh-sync-disabled:before{content:'\f1b7'}.zmdi-refresh-sync-problem:before{content:'\f1b6'}.zmdi-crop-original:before{content:'\f17e'}.zmdi-power-off:before{content:'\f1af'}.zmdi-power-off-setting:before{content:'\f1ae'}.zmdi-leak-remove:before{content:'\f38d'}.zmdi-star-border:before{content:'\f27c'}.zmdi-brightness-low:before{content:'\f36d'}.zmdi-brightness-medium:before{content:'\f36e'}.zmdi-brightness-high:before{content:'\f36f'}.zmdi-smartphone-portrait:before{content:'\f2d4'}.zmdi-live-tv:before{content:'\f2d9'}.zmdi-format-textdirection-l-to-r:before{content:'\f249'}.zmdi-format-textdirection-r-to-l:before{content:'\f24a'}.zmdi-arrow-back:before{content:'\f2ea'}.zmdi-arrow-forward:before{content:'\f2ee'}.zmdi-arrow-in:before{content:'\f2e9'}.zmdi-arrow-out:before{content:'\f2ed'}.zmdi-rotate-90-degrees-ccw:before{content:'\f304'}.zmdi-adb:before{content:'\f33a'}.zmdi-network-wifi:before{content:'\f2e8'}.zmdi-network-wifi-alt:before{content:'\f2e3'}.zmdi-network-wifi-lock:before{content:'\f2e5'}.zmdi-network-wifi-off:before{content:'\f2e6'}.zmdi-network-wifi-outline:before{content:'\f2e7'}.zmdi-network-wifi-info:before{content:'\f2e4'}.zmdi-layers-clear:before{content:'\f18b'}.zmdi-colorize:before{content:'\f15d'}.zmdi-format-paint:before{content:'\f1ba'}.zmdi-format-quote:before{content:'\f1b2'}.zmdi-camera-monochrome-photos:before{content:'\f285'}.zmdi-sort-by-alpha:before{content:'\f1cf'}.zmdi-folder-shared:before{content:'\f225'}.zmdi-folder-special:before{content:'\f226'}.zmdi-comment-dots:before{content:'\f260'}.zmdi-reorder:before{content:'\f31e'}.zmdi-dehaze:before{content:'\f197'}.zmdi-sort:before{content:'\f1ce'}.zmdi-pages:before{content:'\f34a'}.zmdi-stack-overflow:before{content:'\f35c'}.zmdi-calendar-account:before{content:'\f204'}.zmdi-paste:before{content:'\f109'}.zmdi-cut:before{content:'\f1bc'}.zmdi-save:before{content:'\f297'}.zmdi-smartphone-code:before{content:'\f139'}.zmdi-directions-bike:before{content:'\f117'}.zmdi-directions-boat:before{content:'\f11a'}.zmdi-directions-bus:before{content:'\f121'}.zmdi-directions-car:before{content:'\f125'}.zmdi-directions-railway:before{content:'\f1b3'}.zmdi-directions-run:before{content:'\f215'}.zmdi-directions-subway:before{content:'\f1d5'}.zmdi-directions-walk:before{content:'\f216'}.zmdi-local-hotel:before{content:'\f178'}.zmdi-local-activity:before{content:'\f1df'}.zmdi-local-play:before{content:'\f1df'}.zmdi-local-airport:before{content:'\f103'}.zmdi-local-atm:before{content:'\f198'}.zmdi-local-bar:before{content:'\f137'}.zmdi-local-cafe:before{content:'\f13b'}.zmdi-local-car-wash:before{content:'\f124'}.zmdi-local-convenience-store:before{content:'\f1d3'}.zmdi-local-dining:before{content:'\f153'}.zmdi-local-drink:before{content:'\f157'}.zmdi-local-florist:before{content:'\f168'}.zmdi-local-gas-station:before{content:'\f16f'}.zmdi-local-grocery-store:before{content:'\f1cb'}.zmdi-local-hospital:before{content:'\f177'}.zmdi-local-laundry-service:before{content:'\f1e9'}.zmdi-local-library:before{content:'\f18d'}.zmdi-local-mall:before{content:'\f195'}.zmdi-local-movies:before{content:'\f19d'}.zmdi-local-offer:before{content:'\f187'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-pharmacy:before{content:'\f176'}.zmdi-local-phone:before{content:'\f2be'}.zmdi-local-pizza:before{content:'\f1ac'}.zmdi-local-post-office:before{content:'\f15a'}.zmdi-local-printshop:before{content:'\f1b0'}.zmdi-local-see:before{content:'\f28c'}.zmdi-local-shipping:before{content:'\f1e6'}.zmdi-local-store:before{content:'\f1d4'}.zmdi-local-taxi:before{content:'\f123'}.zmdi-local-wc:before{content:'\f211'}.zmdi-my-location:before{content:'\f299'}.zmdi-directions:before{content:'\f1e7'} \ No newline at end of file diff --git a/packages/react-docs-example/public/css/roboto.css b/packages/react-docs-example/public/css/roboto.css deleted file mode 100644 index 4c4a126b0..000000000 --- a/packages/react-docs-example/public/css/roboto.css +++ /dev/null @@ -1,89 +0,0 @@ -/* -NOTE: This file includes several font faces that are commented out. They are -not currently used by this app but could be at a future point. For this reason, -we leave them commented out rather then removing them completely. -*/ - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Thin.ttf') format('truetype'); - font-weight: 100; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-ThinItalic.ttf') format('truetype'); - font-weight: 100; - font-style: italic; -}*/ - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Light.ttf') format('truetype'); - font-weight: 300; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-LightItalic.ttf') format('truetype'); - font-weight: 300; - font-style: italic; -}*/ - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Regular.ttf') format('truetype'); - font-weight: 400; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-RegularItalic.ttf') format('truetype'); - font-weight: 400; - font-style: italic; -}*/ - -/*@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Medium.ttf') format('truetype'); - font-weight: 500; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-MediumItalic.ttf') format('truetype'); - font-weight: 500; - font-style: italic; -} - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Bold.ttf') format('truetype'); - font-weight: 700; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-BoldItalic.ttf') format('truetype'); - font-weight: 700; - font-style: italic; -} - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-Black.ttf') format('truetype'); - font-weight: 900; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: url('../fonts/Roboto-BlackItalic.ttf') format('truetype'); - font-weight: 900; - font-style: italic; -}*/ diff --git a/packages/react-docs-example/public/css/roboto_mono.css b/packages/react-docs-example/public/css/roboto_mono.css deleted file mode 100644 index 392ea5224..000000000 --- a/packages/react-docs-example/public/css/roboto_mono.css +++ /dev/null @@ -1,69 +0,0 @@ -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-Thin.ttf') format('truetype'); - font-weight: 100; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-ThinItalic.ttf') format('truetype'); - font-weight: 100; - font-style: italic; -}*/ - -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-Light.ttf') format('truetype'); - font-weight: 300; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-LightItalic.ttf') format('truetype'); - font-weight: 300; - font-style: italic; -}*/ - -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-Regular.ttf') format('truetype'); - font-weight: 400; - font-style: normal; -} - -/*@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-RegularItalic.ttf') format('truetype'); - font-weight: 400; - font-style: italic; -}*/ - -/*@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-Medium.ttf') format('truetype'); - font-weight: 500; - font-style: normal; -} - -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-MediumItalic.ttf') format('truetype'); - font-weight: 500; - font-style: italic; -} - -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-Bold.ttf') format('truetype'); - font-weight: 700; - font-style: normal; -} - -@font-face { - font-family: 'Roboto Mono'; - src: url('../fonts/RobotoMono-BoldItalic.ttf') format('truetype'); - font-weight: 700; - font-style: italic; -}*/ diff --git a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.eot b/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.eot deleted file mode 100755 index 5e2519150..000000000 Binary files a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.eot and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.svg b/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.svg deleted file mode 100755 index 1d3d2eaa2..000000000 --- a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.svg +++ /dev/null @@ -1,787 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" > -<svg xmlns="http://www.w3.org/2000/svg"> -<metadata></metadata> -<defs> -<font id="material-desidesigniconicfont" horiz-adv-x="427" > -<font-face units-per-em="512" ascent="448" descent="-64" /> -<missing-glyph horiz-adv-x="500" /> -<glyph unicode="" horiz-adv-x="510" d="M159 -10l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32q6 -60 40 -108t87 -73zM178 129q14 0 21 7t7 20q0 7 -2 12t-6 8q-4 4 -9.5 5.5t-13.5 1.5h-16v22h16q8 0 13 2t8 5q4 3 6 8t2 10q0 12 -7 19q-6 6 -19 6q-5 0 -10 -2q-4 -1 -8 -4q-3 -3 -5 -8q-2 -4 -2 -9 h-28q0 10 4 18t11 14t17 10q9 3 21 3q11 0 22 -3q10 -3 16 -9q7 -6 11 -15t4 -20q0 -5 -2 -10q-1 -5 -4 -10q-4 -5 -8 -9q-5 -4 -11 -7q7 -3 13 -7q5 -4 8 -9q3 -4 5 -11q2 -5 2 -12q0 -11 -5 -20q-4 -9 -11.5 -15.5t-17.5 -9.5t-22 -3q-11 0 -21 3q-9 3 -17 9t-12 14.5 t-4 20.5h27q0 -6 2 -10.5t6 -7.5q3 -3 8 -5t11 -2zM360.5 255.5q10.5 -10.5 16.5 -25.5q5 -16 5 -34v-8q0 -19 -5 -34q-6 -15 -16 -25q-10 -11 -25 -17q-14 -5 -32 -5h-49v170h50q18 0 31.5 -5.5t24 -16zM352 188v8q0 28 -12 43q-12 14 -35 14h-20v-123h19q12 0 21 4t15 11 q6 8 9 19t3 24zM255 448q100 0 173.5 -68t81.5 -166h-32q-6 59 -40.5 107t-86.5 73l-29 -28l-81 81z" /> -<glyph unicode="" horiz-adv-x="405" d="M235 256l170 -107v-42l-67 21l-167 167v78q0 14 9 23t22.5 9t23 -9t9.5 -23v-117zM21 336l27 27l336 -336l-27 -27l-122 122v-79l42 -32v-32l-74 21l-75 -21v32l43 32v117l-171 -53v42l128 80z" /> -<glyph unicode="" horiz-adv-x="405" d="M175 256zM405 107l-170 53v-117l42 -32v-32l-74 21l-75 -21v32l43 32v117l-171 -53v42l171 107v117q0 14 9 23t22.5 9t23 -9t9.5 -23v-117l170 -107v-42z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 96q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM213.5 213q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6z " /> -<glyph unicode="" horiz-adv-x="384" d="M374 336q10 -11 10 -27v-266q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v266q0 16 10 27l29 36q10 12 25 12h256q15 0 25 -12zM192 75l117 117h-74v43h-86v-43h-74zM45 341h294l-20 22h-256z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M192 299q-27 0 -45.5 -19t-18.5 -45.5t18.5 -45t45.5 -18.5t45.5 18.5t18.5 45t-18.5 45.5t-45.5 19zM320 43v30q0 19 -23.5 35t-52.5 23.5t-52 7.5t-52 -7.5t-52.5 -23.5t-23.5 -35v-30h256z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM213 64v43h-42v-43h42zM213 149v128h-42v-128h42zM192 341q9 0 15 6.5t6 15 t-6 15t-15 6.5t-15 -6.5t-6 -15t6 -15t15 -6.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M149 85l171 171l-30 30l-141 -140l-55 55l-30 -30z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 405q-9 0 -15 -6t-6 -15t6 -15t15 -6t15 6t6 15t-6 15t-15 6zM341 21v342 h-42v-64h-214v64h-42v-342h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M277 128v85h-85v64l-107 -106l107 -107v64h85z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M192 64l107 107h-64v85h-86v-85h-64z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 30.5t36.5 11.5t36.5 -11.5t23.5 -30.5h89zM192 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15 t-15 6.5zM235 64v43h-150v-43h150zM299 149v43h-214v-43h214zM299 235v42h-214v-42h214z" /> -<glyph unicode="" horiz-adv-x="235" d="M203 320h32v-245q0 -49 -34.5 -83.5t-83 -34.5t-83 34.5t-34.5 83.5v266q0 36 25 61t60.5 25t60.5 -25t25 -61v-224q0 -22 -16 -37.5t-38 -15.5t-37.5 15.5t-15.5 37.5v203h32v-203q0 -8 6.5 -14.5t15 -6.5t15 6.5t6.5 14.5v224q0 22 -16 38t-38 16t-37.5 -16t-15.5 -38 v-266q0 -36 25 -61t60.5 -25t60.5 25t25 61v245z" /> -<glyph unicode="" d="M117 75q-48 0 -82.5 34t-34.5 83t34.5 83t82.5 34h224q36 0 61 -25t25 -60t-25 -60t-61 -25h-181q-22 0 -37.5 15.5t-15.5 37.5t15.5 37.5t37.5 15.5h160v-32h-160q-9 0 -15 -6t-6 -15t6 -15t15 -6h181q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5h-224q-35 0 -60 -25 t-25 -60t25 -60t60 -25h203v-32h-203z" /> -<glyph unicode="" horiz-adv-x="277" d="M128 384h149v-64h-85v-235h-1q-4 -36 -31 -60.5t-64 -24.5q-40 0 -68 28t-28 68t28 68t68 28q15 0 32 -6v198z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 427q18 0 30.5 -12.5t12.5 -30.5v-276q0 -23 -19 -35l-173 -116l-173 116q-19 12 -19 35v276q0 18 12.5 30.5t30.5 12.5h298zM149 107l192 192l-30 30l-162 -162l-76 76l-30 -30z" /> -<glyph unicode="" horiz-adv-x="405" d="M384 64v-21q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-21h-192q-18 0 -30.5 -12.5t-12.5 -30.5v-170q0 -18 12.5 -30.5t30.5 -12.5h192zM192 107v170h213v-170h-213zM277.5 160 q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M43 235h64v-150h-64v150zM171 235h64v-150h-64v150zM0 -21v64h405v-64h-405zM299 235h64v-150h-64v150zM203 427l202 -107v-43h-405v43z" /> -<glyph unicode="" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM128 64v43h-43v-43h43zM128 149v107h-43v-107h43z" /> -<glyph unicode="" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM85 21l86 160h-43v118l-85 -160h42v-118z" /> -<glyph unicode="" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM127 65v41h-41v-41h41zM156 177q15 15 15 36q0 27 -19 45.5t-45.5 18.5t-45 -18.5t-18.5 -45.5h32q0 14 9 23t22.5 9t23 -9t9.5 -22.5 t-10 -22.5l-20 -20q-19 -21 -19 -43h34q0 16 17 34z" /> -<glyph unicode="" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36z" /> -<glyph unicode="" horiz-adv-x="512" d="M330.5 331q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5zM106.5 192q44.5 0 75.5 -31t31 -75.5t-31 -75.5t-75.5 -31t-75.5 31t-31 75.5t31 75.5t75.5 31zM106.5 11q30.5 0 52.5 22t22 52.5t-22 52.5t-52.5 22t-52.5 -22t-22 -52.5 t22 -52.5t52.5 -22zM230 224l47 -49v-132h-42v106l-69 60q-12 10 -12 30q0 17 12 30l60 60q10 12 30 12q18 0 34 -12l41 -41q32 -32 76 -32v-43q-64 0 -108 45l-17 17zM405.5 192q44.5 0 75.5 -31t31 -75.5t-31 -75.5t-75.5 -31t-75.5 31t-31 75.5t31 75.5t75.5 31z M405.5 11q30.5 0 52.5 22t22 52.5t-22 52.5t-52.5 22t-52.5 -22t-22 -52.5t22 -52.5t52.5 -22z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 21q58 0 105 36l-239 240q-36 -47 -36 -105q0 -71 50 -121t120 -50zM348 87q36 47 36 105q0 71 -50 121t-121 50q-58 0 -104 -36z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM43 192q0 -59 36 -105l239 240q-46 36 -105 36q-70 0 -120 -50t-50 -121zM213 21q71 0 121 50t50 121q0 59 -36 105l-239 -240q46 -36 104 -36z" /> -<glyph unicode="" d="M384 0h43v-43h-43q-44 0 -85 21q-41 -20 -86 -20t-85 20q-42 -21 -85 -21h-43v43h43q45 0 85 28q39 -27 85.5 -27t85.5 27q40 -28 85 -28zM42 43l-41 142q-3 8 1 17q4 8 13 10l28 9v99q0 18 12.5 30.5t29.5 12.5h64v64h128v-64h64q18 0 30.5 -12.5t12.5 -30.5v-99l27 -9 q9 -2 13 -10t1 -17l-40 -142h-1q-48 0 -85 42q-38 -42 -86 -42t-85 42q-37 -42 -85 -42h-1zM85 320v-85l128 42l128 -42v85h-256z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM43 363v-171l53 32l53 -32v171h-106zM43 43h256l-83 109l-64 -82l-45 55z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM43 363v-171l53 32l53 -32v171h-106z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-341l-150 64l-149 -64v341q0 18 12.5 30.5t30.5 12.5h213zM256 64v277h-213v-277l106 47z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-341l-150 64l-149 -64v341q0 18 12.5 30.5t30.5 12.5h213z" /> -<glyph unicode="" horiz-adv-x="405" d="M106.5 149q26.5 0 45.5 -18.5t19 -45.5q0 -35 -25 -60t-61 -25q-24 0 -47 11.5t-38 31.5q15 0 29 11.5t14 30.5q0 27 18.5 45.5t45 18.5zM399 349q6 -6 6 -15t-6 -15l-191 -191l-59 59l191 191q7 6 15.5 6t15.5 -6z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 277v-42h-44q2 -13 2 -22v-21h42v-43h-42v-21q0 -9 -2 -21h44v-43h-60q-17 -29 -46 -46.5t-64 -17.5t-64.5 17.5t-46.5 46.5h-60v43h45q-2 12 -2 21v21h-43v43h43v21q0 9 2 22h-45v42h60q15 26 39 42l-35 35l30 30l47 -46q14 3 29.5 3t30.5 -3l46 46l30 -30l-34 -35 q24 -16 38 -42h60zM213 107v42h-85v-42h85zM213 192v43h-85v-43h85z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 107v213q0 27 12.5 44.5t38 26t53 11.5t67 3t67 -3t53 -11.5t38 -26t12.5 -44.5v-213q0 -28 -21 -48v-38q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-171v-22q0 -8 -6 -14.5t-15 -6.5h-21q-9 0 -15.5 6.5t-6.5 14.5v38q-21 20 -21 48zM74.5 85 q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM266.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM299 213v107h-256v-107h256z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 320q-18 0 -30.5 12.5t-12.5 30.5q0 12 7 22l36 63l36 -63q7 -10 7 -22q0 -18 -12.5 -30.5t-30.5 -12.5zM290 107q22 -22 52 -22q23 0 42 13v-98q0 -9 -6.5 -15t-14.5 -6h-342q-8 0 -14.5 6t-6.5 15v98q19 -13 42 -13q30 0 52 22l23 23l23 -23q21 -21 52 -21t52 21 l23 23zM320 256q27 0 45.5 -18.5t18.5 -45.5v-33q0 -17 -12.5 -29.5t-29.5 -12.5t-29 12l-46 46l-46 -46q-11 -11 -29 -11t-30 11l-45 46l-46 -46q-12 -12 -29 -12t-29.5 12.5t-12.5 29.5v33q0 27 18.5 45.5t45.5 18.5h107v43h42v-43h107z" /> -<glyph unicode="" horiz-adv-x="384" d="M340 320l44 -128v-171q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-256v-22q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v171l44 128q8 21 31 21h53v43h128v-43h53q23 0 31 -21zM74.5 107q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5 t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM309.5 107q13.5 0 22.5 9t9 22.5t-9 23t-22.5 9.5t-23 -9.5t-9.5 -23t9.5 -22.5t23 -9zM43 213h298l-32 96h-234z" /> -<glyph unicode="" horiz-adv-x="384" d="M298.5 341q-13.5 0 -22.5 9.5t-9 22.5q0 10 8 24.5t16 23.5l8 10q32 -36 32 -58q0 -13 -9.5 -22.5t-23 -9.5zM192 341q-13 0 -22.5 9.5t-9.5 22.5q0 10 8 24.5t16 23.5l8 10q32 -36 32 -58q0 -13 -9.5 -22.5t-22.5 -9.5zM85.5 341q-13.5 0 -23 9.5t-9.5 22.5q0 10 8 24.5 t16 23.5l8 10q32 -36 32 -58q0 -13 -9 -22.5t-22.5 -9.5zM340 277l44 -128v-170q0 -9 -6.5 -15.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 15.5v21h-256v-21q0 -9 -6.5 -15.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 15.5v170l44 128q8 22 31 22h234q23 0 31 -22zM74.5 64 q13.5 0 23 9.5t9.5 22.5t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5t22.5 -9.5zM309.5 64q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5zM43 171h298l-32 96h-234z" /> -<glyph unicode="" horiz-adv-x="384" d="M340 320l44 -128v-171q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-256v-22q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v171l44 128q8 21 31 21h234q23 0 31 -21zM74.5 107q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23 t9 -22.5t22.5 -9zM309.5 107q13.5 0 22.5 9t9 22.5t-9 23t-22.5 9.5t-23 -9.5t-9.5 -23t9.5 -22.5t23 -9zM43 213h298l-32 96h-234z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h46q-4 11 -4 21q0 27 19 45.5t45 18.5q34 0 54 -28l10 -15l11 15q19 28 53 28q27 0 45.5 -18.5t18.5 -45.5q0 -10 -4 -21h47z M277.5 363q-8.5 0 -15 -6.5t-6.5 -15t6.5 -15t15 -6.5t15 6.5t6.5 15t-6.5 15t-15 6.5zM149.5 363q-8.5 0 -15 -6.5t-6.5 -15t6.5 -15t15 -6.5t15 6.5t6.5 15t-6.5 15t-15 6.5zM384 43v42h-341v-42h341zM384 149v128h-108l44 -60l-35 -25l-50 69l-22 29l-21 -29l-51 -69 l-34 25l44 60h-108v-128h341z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-85v-106l-86 42l-85 -42v106h-85q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h341zM384 128v43h-341v-43h341zM384 235v128h-341v-128h341z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h64v43q0 17 12.5 29.5t29.5 12.5h128q18 0 30.5 -12.5t12.5 -29.5v-43h64zM149 363v-43h128v43h-128zM384 43v42h-341v-42h341z M384 149v128h-64v-42h-43v42h-128v-42h-42v42h-64v-128h341z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v128h-341v-128h341zM384 277v43h-341v-43h341z" /> -<glyph unicode="" d="M384 309q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h85v43l43 43h85l43 -43v-43h85zM171 352v-43h85v43h-85zM181 64l141 141l-30 30l-111 -111l-44 45l-30 -30z" /> -<glyph unicode="" d="M384 309q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h85v43l43 43h85l43 -43v-43h85zM171 352v-43h85v43h-85zM213 32l107 107h-64v85h-85v-85h-64z" /> -<glyph unicode="" d="M299 320h128v-277q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v277h128v43q0 17 12.5 29.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -29.5v-43zM171 363v-43h85v43h-85zM149 64l160 107l-160 85v-192z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h85v43q0 17 12.5 29.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -29.5v-43h85zM256 320v43h-85v-43h85z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 64q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 149q62 0 105.5 -43.5t43.5 -105.5h-42q0 44 -31.5 75.5t-75.5 31.5v42zM384 299v-214h-120q-21 64 -68 111t-111 68v35h299zM0 235q97 0 166 -69t69 -166h-43q0 80 -56 136t-136 56v43zM427 384q17 0 29.5 -12.5t12.5 -30.5 v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-150v43h150v298h-384v-64h-43v64q0 18 12.5 30.5t30.5 12.5h384z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-150v43h150v298h-384v-64h-43v64q0 18 12.5 30.5t30.5 12.5h384zM0 64q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 149q62 0 105.5 -43.5t43.5 -105.5h-42q0 44 -31.5 75.5t-75.5 31.5v42zM0 235 q97 0 166 -69t69 -166h-43q0 80 -56 136t-136 56v43z" /> -<glyph unicode="" d="M235 404q81 -8 136.5 -68.5t55.5 -143.5q0 -45 -19 -87l-56 33q11 27 11 54q0 56 -37 98t-91 50v64zM213 43q72 0 117 56l55 -33q-30 -41 -75 -64t-97 -23q-88 0 -150.5 62.5t-62.5 150.5q0 83 55.5 143.5t136.5 68.5v-64q-55 -8 -91.5 -50t-36.5 -98q0 -62 43.5 -105.5 t105.5 -43.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM128 85v150h-43v-150h43zM213 85v214h-42v-214h42zM299 85v86h-43v-86h43z" /> -<glyph unicode="" d="M213 299h214v-299h-427v384h213v-85zM85 43v42h-42v-42h42zM85 128v43h-42v-43h42zM85 213v43h-42v-43h42zM85 299v42h-42v-42h42zM171 43v42h-43v-42h43zM171 128v43h-43v-43h43zM171 213v43h-43v-43h43zM171 299v42h-43v-42h43zM384 43v213h-171v-43h43v-42h-43v-43h43 v-43h-43v-42h171zM341 213v-42h-42v42h42zM341 128v-43h-42v43h42z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 213h128v-213h-384v299h128v42l64 64l64 -64v-128zM85 43v42h-42v-42h42zM85 128v43h-42v-43h42zM85 213v43h-42v-43h42zM213 43v42h-42v-42h42zM213 128v43h-42v-43h42zM213 213v43h-42v-43h42zM213 299v42h-42v-42h42zM341 43v42h-42v-42h42zM341 128v43h-42v-43 h42z" /> -<glyph unicode="" d="M269 277l30 -30l-56 -55l56 -55l-30 -30l-56 55l-55 -55l-30 30l55 55l-55 55l30 30l55 -55zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 115l-77 77l77 77l-30 30l-77 -77l-76 77l-30 -30l76 -77l-76 -77l30 -30l76 77l77 -77z" /> -<glyph unicode="" horiz-adv-x="299" d="M299 311l-120 -119l120 -119l-30 -30l-120 119l-119 -119l-30 30l119 119l-119 119l30 30l119 -119l120 119z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 171l-171 170v43h384v-43l-171 -170v-128h107v-43h-256v43h107v128zM96 299h192l43 42h-278z" /> -<glyph unicode="" horiz-adv-x="477" d="M148 304l-93 -112l93 -112l-33 -27l-115 139l115 139zM132 171v42h43v-42h-43zM345 213v-42h-42v42h42zM217 171v42h43v-42h-43zM362 331l115 -139l-115 -139l-33 27l93 112l-93 112z" /> -<glyph unicode="" horiz-adv-x="341" d="M64 341v-42h-43v85q0 18 12.5 30.5t30.5 12.5l213 -1q18 0 30.5 -12t12.5 -30v-85h-43v42h-213zM243 94l-30 30l68 68l-68 68l30 30l98 -98zM128 124l-30 -30l-98 98l98 98l30 -30l-68 -68zM277 43v42h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5 t-12.5 30.5v85h43v-42h213z" /> -<glyph unicode="" d="M158 94l-30 -30l-128 128l128 128l30 -30l-98 -98zM269 94l98 98l-98 98l30 30l128 -128l-128 -128z" /> -<glyph unicode="" d="M384 384q18 0 30.5 -12.5t12.5 -30.5v-64q0 -17 -12.5 -29.5t-30.5 -12.5h-43v-64q0 -36 -25 -61t-60 -25h-128q-35 0 -60 25t-25 61v213h341zM384 277v64h-43v-64h43zM0 0v43h384v-43h-384z" /> -<glyph unicode="" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM384 192v171h-107v-171l54 32z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 256v-235h341q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v235h43zM363 341h106v-234q0 -18 -12.5 -30.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 30.5v234h107v43q0 18 12.5 30.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -30.5v-43zM235 384v-43 h85v43h-85zM235 128l117 85l-117 64v-149z" /> -<glyph unicode="" horiz-adv-x="512" d="M43 320v-299h384v-42h-384q-18 0 -30.5 12.5t-12.5 29.5v192v107h43zM469 363q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5l1 256q0 17 12 29.5t30 12.5h128l43 -42h170zM149 128h299l-75 96l-53 -64l-75 96z" /> -<glyph unicode="" horiz-adv-x="469" d="M319 228l76 -100h-235l59 75l41 -50zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299 v-299h299z" /> -<glyph unicode="" d="M427 107q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256q18 0 30.5 -12.5t12.5 -29.5v-256zM192 192l-64 -85h256l-85 106l-64 -79zM0 320h43v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM277 128v171h-42v42h85v-213h-43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299 h299z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM341 171v-43h-128v85 q0 18 12.5 30.5t30.5 12.5h43v43h-86v42h86q17 0 29.5 -12.5t12.5 -29.5v-43q0 -18 -12.5 -30.5t-29.5 -12.5h-43v-42h85z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM341 171q0 -18 -12.5 -30.5 t-29.5 -12.5h-86v43h86v42h-43v43h43v43h-86v42h86q17 0 29.5 -12.5t12.5 -29.5v-32q0 -14 -9 -23t-23 -9q14 0 23 -9.5t9 -22.5v-32z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM299 128v85h-86v128h43v-85h43v85h42v-213h-42zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85 v299h-299v-299h299z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM341 171q0 -18 -12.5 -30.5 t-29.5 -12.5h-86v43h86v42h-86v128h128v-42h-85v-43h43q17 0 29.5 -12.5t12.5 -30.5v-42z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128q-18 0 -30.5 12.5 t-12.5 30.5v128q0 17 12.5 29.5t30.5 12.5h85v-42h-85v-43h43q17 0 29.5 -12.5t12.5 -30.5v-42q0 -18 -12.5 -30.5t-29.5 -12.5h-43zM256 213v-42h43v42h-43z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128h-43l86 171h-86v42 h128v-42z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128q-18 0 -30.5 12.5 t-12.5 30.5v32q0 13 9.5 22.5t22.5 9.5q-13 0 -22.5 9t-9.5 23v32q0 17 12.5 29.5t30.5 12.5h43q17 0 29.5 -12.5t12.5 -29.5v-32q0 -14 -9 -23t-23 -9q14 0 23 -9.5t9 -22.5v-32q0 -18 -12.5 -30.5t-29.5 -12.5h-43zM256 299v-43h43v43h-43zM256 213v-42h43v42h-43z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM277 192q0 -18 -12.5 -30.5t-29.5 -12.5h-64v43h64v21h-22q-17 0 -29.5 12.5t-12.5 30.5v21q0 18 12.5 30.5t29.5 12.5h22q17 0 29.5 -12.5t12.5 -30.5v-85zM213 256h22v21h-22v-21zM427 427 q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 256v128h-299v-299h299v128h-43v-42h-43v42h-42v43h42v43h43v-43h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM299 341q17 0 29.5 -12.5 t12.5 -29.5v-128q0 -18 -12.5 -30.5t-29.5 -12.5h-86v43h86v42h-43q-18 0 -30.5 12.5t-12.5 30.5v43q0 17 12.5 29.5t30.5 12.5h43zM299 256v43h-43v-43h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM341 299v42h-85v-117q-14 11 -32 11q-22 0 -37.5 -16t-15.5 -38t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5v118h64z M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM203 245v22q0 13 -9.5 22.5t-22.5 9.5h-54v-128h32v42h22q13 0 22.5 9.5t9.5 22.5zM309 203v64q0 13 -9 22.5t-23 9.5h-53 v-128h53q14 0 23 9t9 23zM395 267v32h-64v-128h32v42h32v32h-32v22h32zM149 245v22h22v-22h-22zM43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM256 203v64h21v-64h-21z" /> -<glyph unicode="" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM363 213v43h-86v85h-42v-85h-86v-43h86v-85h42v85h86z " /> -<glyph unicode="" horiz-adv-x="341" d="M303 427q16 0 27 -11.5t11 -27.5v-307q0 -16 -11 -27t-27 -11h-179q-16 0 -27.5 11t-11.5 27v307q0 16 11.5 27.5t27.5 11.5h179zM213.5 384q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM213.5 96q35.5 0 60.5 25t25 60.5 t-25 60.5t-60.5 25t-60.5 -25t-25 -60.5t25 -60.5t60.5 -25zM160 181.5q0 53.5 53.5 53.5t53.5 -53.5t-53.5 -53.5t-53.5 53.5zM43 341v-341h213v-43h-213q-18 0 -30.5 12.5t-12.5 30.5v341h43z" /> -<glyph unicode="" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM363 213v43h-214v-43h214zM277 128v43h-128v-43h128z M363 299v42h-214v-42h214z" /> -<glyph unicode="" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM213 139l128 96l-128 96v-192z" /> -<glyph unicode="" d="M213.5 215q9.5 0 16.5 -6.5t7 -16.5t-7 -16.5t-16.5 -6.5t-16.5 6.5t-7 16.5t7 16.5t16.5 6.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM260 145l81 175l-174 -81l-82 -175z" /> -<glyph unicode="" horiz-adv-x="408" d="M114 163l-89 90q-25 25 -25 60t25 60l150 -149zM259 202l-31 -31l146 -147l-30 -30l-146 147l-147 -147l-31 30l209 208q-12 24 -4 56t33 57q31 30 69 35t61.5 -18.5t18.5 -61.5t-36 -69q-25 -25 -56.5 -33t-55.5 4z" /> -<glyph unicode="" horiz-adv-x="299" d="M21 43v256h256v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-171q-18 0 -30.5 12.5t-12.5 30.5zM299 363v-43h-299v43h75l21 21h107l21 -21h75z" /> -<glyph unicode="" horiz-adv-x="341" d="M170.5 43q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 427q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 341q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5z M170.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 427q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M363 171q8 0 14.5 -6.5t6.5 -15.5v-128q0 -8 -6.5 -14.5t-14.5 -6.5h-342q-8 0 -14.5 6.5t-6.5 14.5v128q0 9 6.5 15.5t14.5 6.5h342zM85.5 43q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5zM363 384q8 0 14.5 -6.5t6.5 -14.5v-128 q0 -9 -6.5 -15.5t-14.5 -6.5h-342q-8 0 -14.5 6.5t-6.5 15.5v128q0 8 6.5 14.5t14.5 6.5h342zM85.5 256q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 405h384l-43 -389q-2 -16 -14 -26.5t-28 -10.5h-214q-16 0 -28 10.5t-14 26.5zM192 43q27 0 45.5 18.5t18.5 45.5q0 19 -16 47.5t-32 48.5l-16 19q-7 -8 -17.5 -21.5t-28.5 -44t-18 -49.5q0 -27 18.5 -45.5t45.5 -18.5zM327 277l9 86h-288l9 -86h270z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 80l236 236l80 -80l-236 -236h-80v80zM378 298l-39 -39l-80 80l39 39q6 6 15 6t15 -6l50 -50q6 -6 6 -15t-6 -15z" /> -<glyph unicode="" d="M426 277l1 -213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v213q0 24 20 37l193 113l193 -113q20 -13 20 -37zM213 171l177 110l-177 103l-176 -103z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 277v43l-171 -107l-170 107v-43l170 -106z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 299q-20 0 -39 -8l-46 46q41 15 84 15q79 0 143 -44.5t92 -115.5q-23 -60 -73 -101l-62 62q7 19 7 39q0 44 -31 75.5t-75 31.5zM21 357l27 27l379 -378l-27 -27l-63 62l-9 9q-45 -18 -93 -18q-79 0 -143 44.5t-92 115.5q25 64 80 106l-10 10zM139 239 q-11 -23 -11 -47q0 -44 31.5 -75.5t75.5 -31.5q24 0 47 12l-33 33q-8 -2 -14 -2q-27 0 -45.5 18.5t-18.5 45.5q0 7 1 14zM231 256h4q26 0 45 -19t19 -45l-1 -4z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 352q79 0 142.5 -44.5t91.5 -115.5q-28 -71 -91.5 -115.5t-142.5 -44.5t-143 44.5t-92 115.5q28 71 92 115.5t143 44.5zM235 85q44 0 75 31.5t31 75.5t-31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5t31.5 -75.5t75.5 -31.5zM234.5 256q26.5 0 45.5 -18.5t19 -45.5 t-19 -45.5t-45.5 -18.5t-45 18.5t-18.5 45.5t18.5 45.5t45 18.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M378 328q6 -6 6 -15t-6 -15l-67 -67l41 -41l-30 -30l-30 30l-191 -190h-101v101l190 191l-30 30l30 30l41 -41l67 67q6 6 15 6t15 -6zM84 43l172 172l-41 41l-172 -172z" /> -<glyph unicode="" d="M309 384q50 0 84 -34t34 -83q0 -24 -10 -48.5t-22 -43.5t-40.5 -49t-48 -48.5t-62.5 -56.5l-31 -28l-31 27q-42 39 -62 57.5t-48.5 48.5t-40.5 49t-21.5 43.5t-9.5 48.5q0 49 34 83t83 34q58 0 96 -45q38 45 96 45zM215 52q49 44 71.5 65.5t49.5 51.5t37.5 52.5 t10.5 45.5q0 32 -21.5 53t-53.5 21q-24 0 -45.5 -14t-30.5 -36h-40q-8 22 -29.5 36t-46.5 14q-32 0 -53 -21t-21 -53q0 -23 10 -45.5t37.5 -52.5t50 -51.5t70.5 -65.5l2 -2z" /> -<glyph unicode="" d="M213 -7l-31 28q-42 38 -62 56.5t-48 48.5t-40.5 49t-22 43.5t-9.5 48.5q0 49 34 83t83 34q58 0 96 -45q38 45 96 45q50 0 84 -34t34 -83q0 -24 -10 -48.5t-22 -43.5t-40.5 -49t-48 -48.5t-62.5 -57.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 64v43h86v-43h-86zM0 320h384v-43h-384v43zM64 171v42h256v-42h-256z" /> -<glyph unicode="" horiz-adv-x="341" d="M203 434q64 -52 101 -126t37 -159q0 -70 -50 -120t-120.5 -50t-120.5 50t-50 120q0 108 69 190l-1 -8q0 -33 22.5 -56t55.5 -23q32 0 52 23t20 56q0 21 -3.5 46.5t-7.5 40.5zM164 43q43 0 73 30t30 72q0 45 -13 86q-30 -41 -98 -55q-29 -6 -44.5 -23.5t-15.5 -42.5 q0 -28 20 -47.5t48 -19.5z" /> -<glyph unicode="" horiz-adv-x="320" d="M201 320h119v-213h-149l-9 42h-119v-149h-43v363h192z" /> -<glyph unicode="" horiz-adv-x="469" d="M128 213v-42h-128v42h128zM174 282l-30 -30l-45 46l30 30zM256 427v-128h-43v128h43zM370 298l-45 -46l-30 30l45 46zM341 213h128v-42h-128v42zM234.5 256q26.5 0 45.5 -18.5t19 -45.5t-19 -45.5t-45.5 -18.5t-45 18.5t-18.5 45.5t18.5 45.5t45 18.5zM295 102l30 30 l45 -46l-30 -30zM99 86l45 46l30 -30l-45 -46zM213 -43v128h43v-128h-43z" /> -<glyph unicode="" horiz-adv-x="410" d="M0 405h213l-85 -192h85l-149 -256v192h-64v256zM341 405l69 -192h-41l-15 43h-68l-15 -43h-41l69 192h42zM295 285h50l-25 78z" /> -<glyph unicode="" horiz-adv-x="363" d="M27 384l336 -336l-27 -27l-89 89l-76 -131v192h-64v79l-107 107zM320 235l-33 -57l-180 181v46h213l-85 -170h85z" /> -<glyph unicode="" horiz-adv-x="213" d="M0 405h213l-85 -170h85l-149 -256v192h-64v234z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 0v43h43v-43h-43zM341 256v43h43v-43h-43zM0 341q0 18 12.5 30.5t30.5 12.5h85v-43h-85v-298h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v298zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM171 -43v470h42v-470h-42zM341 85v43h43v-43h-43zM256 341v43h43v-43h-43z M341 171v42h43v-42h-43zM341 0v43h43q0 -18 -12.5 -30.5t-30.5 -12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 -21q0 79 56 135.5t136 56.5q0 -80 -56 -136t-136 -56zM55 229q0 34 31 48q-31 15 -31 48q0 22 16 38t38 16q17 0 30 -10v4q0 22 15.5 38t37.5 16t37.5 -16t15.5 -38v-4q14 10 30 10q22 0 38 -16t16 -38q0 -33 -31 -48q31 -14 31 -48q0 -22 -16 -37.5t-38 -15.5 q-17 0 -30 9v-4q0 -22 -15.5 -37.5t-37.5 -15.5t-37.5 15.5t-15.5 37.5v4q-14 -9 -30 -9q-22 0 -38 15.5t-16 37.5zM192 331q-22 0 -37.5 -16t-15.5 -38t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5t-15.5 38t-37.5 16zM0 171q80 0 136 -56.5t56 -135.5q-80 0 -136 56 t-56 136z" /> -<glyph unicode="" horiz-adv-x="414" d="M350 183q30 -17 47 -47t17 -63q-29 -17 -63 -17.5t-65 17.5q-9 5 -17 11q2 -10 2 -20q0 -35 -17.5 -64.5t-46.5 -46.5q-29 17 -46.5 46.5t-17.5 64.5q0 10 2 20q-9 -7 -17 -11q-31 -17 -65 -17t-63 17q0 34 17 63.5t47 47.5q8 4 18 8q-10 4 -18 9q-30 17 -47 47t-17 63 q29 17 63 17.5t65 -17.5q8 -4 17 -11q-2 10 -2 20q0 35 17.5 64.5t46.5 46.5q29 -17 46.5 -46.5t17.5 -64.5q0 -10 -2 -20q9 7 17 11q31 18 65 17.5t63 -17.5q0 -33 -17 -63t-47 -47q-8 -5 -18 -9q10 -4 18 -9zM207 107q35 0 60 25t25 60t-25 60t-60 25t-60 -25t-25 -60 t25 -60t60 -25z" /> -<glyph unicode="" d="M169 160l44 118l44 -118h-88zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM298 53h44l-109 278h-40l-109 -278h45l24 64h120z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 331l42 -54h-85zM363 235l53 -43l-53 -43v86zM107 235v-86l-54 43zM277 107l-42 -54l-43 54h85zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384 v-300h384z" /> -<glyph unicode="" horiz-adv-x="299" d="M0 107v42h107v-106h-43v64h-64zM64 277v64h43v-106h-107v42h64zM192 43v106h107v-42h-64v-64h-43zM235 277h64v-42h-107v106h43v-64z" /> -<glyph unicode="" horiz-adv-x="299" d="M43 149v-64h64v-42h-107v106h43zM0 235v106h107v-42h-64v-64h-43zM256 85v64h43v-106h-107v42h64zM192 341h107v-106h-43v64h-64v42z" /> -<glyph unicode="" horiz-adv-x="256" d="M256 363v-64h-149l106 -107l-106 -107h149v-64h-256v43l139 128l-139 128v43h256z" /> -<glyph unicode="" horiz-adv-x="352" d="M336 294q16 -16 16 -38v-203q0 -22 -15.5 -37.5t-37.5 -15.5t-38 15.5t-16 37.5v107h-32v-160h-213v341q0 18 12.5 30.5t30.5 12.5h128q17 0 29.5 -12.5t12.5 -30.5v-149h22q17 0 29.5 -12.5t12.5 -30.5v-96q0 -8 6.5 -14.5t15 -6.5t15 6.5t6.5 14.5v154q-11 -4 -21 -4 q-22 0 -38 15.5t-16 37.5q0 17 9.5 30.5t25.5 19.5l-45 45l22 22l80 -79h-1zM171 235v106h-128v-106h128zM298.5 235q8.5 0 15 6t6.5 15t-6.5 15t-15 6t-15 -6t-6.5 -15t6.5 -15t15 -6z" /> -<glyph unicode="" horiz-adv-x="387" d="M37 301l-37 36q5 6 19 20q26 27 58 27q18 0 35.5 -15t17.5 -46q0 -20 -6 -34t-21 -36q-29 -43 -40 -75q-5 -18 -2.5 -29.5t10.5 -11.5q9 0 24 18q16 17 48 58q18 22 46 41t60 19q42 0 62.5 -27.5t23.5 -61.5h52v-53h-52q-6 -69 -36.5 -100t-63.5 -31q-28 0 -48.5 19.5 t-20.5 46.5q0 33 30 69.5t85 45.5v3q-1 8 -2.5 12.5t-5 10.5t-11 9t-18.5 3q-18 0 -39 -20t-48 -53q-16 -19 -23.5 -28t-19.5 -18.5t-23 -12.5q-30 -10 -56 9q-29 22 -29 64q0 14 6 32.5t15 35.5t16.5 30t15.5 24.5t8 12.5q18 28 7 32q-8 3 -37 -26zM236 52q14 0 27.5 18 t17.5 57q-30 -8 -45.5 -27t-15.5 -32q0 -7 5 -11.5t11 -4.5z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM361 277q-32 56 -92 76q19 -35 29 -76h63zM213 362q-27 -39 -40 -85h81q-14 46 -41 85zM48 149h72q-3 25 -3 43t3 43h-72q-5 -23 -5 -43t5 -43zM66 107 q32 -56 92 -76q-19 35 -29 76h-63zM129 277q10 41 29 76q-60 -20 -92 -76h63zM213 22q27 39 41 85h-81q13 -46 40 -85zM263 149q4 25 4 43t-4 43h-100q-3 -25 -3 -43t3 -43h100zM269 31q60 20 92 76h-63q-10 -41 -29 -76zM306 149h72q6 23 6 43t-6 43h-72q3 -25 3 -43 t-3 -43z" /> -<glyph unicode="" horiz-adv-x="469" d="M448 363q9 0 15 -6.5t6 -15.5v-85q0 -9 -6 -15t-15 -6h-107q-8 0 -14.5 6t-6.5 15v85q0 9 6.5 15.5t14.5 6.5v10q0 22 16 38t38 16t37.5 -16t15.5 -38v-10zM431 363v10q0 15 -10.5 26t-25.5 11t-26 -11t-11 -26v-10h73zM382 192h44q1 -12 1 -21q0 -89 -62.5 -151.5 t-151 -62.5t-151 62.5t-62.5 151t62.5 151t150.5 62.5q33 0 64 -10v-54q0 -18 -12.5 -30.5t-29.5 -12.5h-43v-42q0 -9 -6.5 -15.5t-14.5 -6.5h-43v-42h128q9 0 15 -6.5t6 -15.5v-64h22q14 0 25 -8t15 -21q45 49 45 115q0 7 -2 21zM192 1v42q-18 0 -30.5 12.5t-12.5 29.5v22 l-102 102q-4 -20 -4 -38q0 -65 42.5 -113.5t106.5 -56.5z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 23v41q-18 0 -30.5 12.5t-12.5 30.5v21l-102 102q-4 -20 -4 -38q0 -65 42.5 -113t106.5 -56zM339 77q45 49 45 115q0 53 -29.5 96t-77.5 62v-9 q0 -17 -12.5 -29.5t-29.5 -12.5h-43v-43q0 -9 -6.5 -15t-14.5 -6h-43v-43h128q9 0 15 -6.5t6 -14.5v-64h22q14 0 25 -8.5t15 -21.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M85 167l150 -82l149 82v-86l-149 -81l-150 81v86zM235 384l234 -128v-171h-42v148l-192 -105l-235 128z" /> -<glyph unicode="" d="M171 21h-107v171h-64l213 192l214 -192h-64v-171h-107v128h-85v-128z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 341v-42l-43 -128l43 -128v-43h-384v43l43 128l-43 128v42h271l31 86l50 -19l-24 -67h56zM277 149v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM320 149v86h-85v85h-86v-85h-85v-86h85v-85h86v85h85z" /> -<glyph unicode="" horiz-adv-x="469" d="M128 171q-27 0 -45.5 18.5t-18.5 45t18.5 45.5t45.5 19t45.5 -19t18.5 -45.5t-18.5 -45t-45.5 -18.5zM384 299q35 0 60 -25t25 -61v-192h-42v64h-384v-64h-43v320h43v-192h170v150h171z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128zM213 96l-85 85l-85 -85h170zM43 288h170v75h-170v-75z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128zM213 96l-85 85l-85 -85v-75h170v75zM128 203l85 85v75h-170v-75z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128z" /> -<glyph unicode="" horiz-adv-x="469" d="M75 213v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43zM128 224v32h96v-32h-32v-96h-32v96h-32zM245 224v32h96v-32h-32v-96h-32v96h-32zM437 256q13 0 22.5 -9.5t9.5 -22.5v-21q0 -13 -9.5 -22.5t-22.5 -9.5h-42v-43h-32v128h74zM437 203v21h-42v-21h42z" /> -<glyph unicode="" horiz-adv-x="469" d="M469 64q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h384q17 0 29.5 -12.5t12.5 -30.5v-256zM160 181l-75 -96h299l-96 128l-75 -96z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298zM234 186l75 -101h-234l58 76l42 -51z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 43q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-298zM117 160l-74 -96h298l-96 128l-74 -96z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-299q-17 0 -29.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t29.5 12.5h299zM341 128v213h-299v-213h86q0 -27 18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5h85zM277 235l-85 -86l-85 86h42v64h86v-64 h42z" /> -<glyph unicode="" horiz-adv-x="384" d="M377 3l7 -8l-27 -27l-58 58q-46 -38 -107 -38q-71 0 -121 50q-46 46 -49.5 112t37.5 116l-59 59l27 27l59 -59l30 -30l76 -76l134 -134zM192 30v103l-102 102q-26 -34 -26 -77q0 -53 38 -90q37 -38 90 -38zM192 339l-49 -48l-30 30l79 79l121 -121q38 -39 47 -92.5 t-13 -99.5l-155 154v98z" /> -<glyph unicode="" horiz-adv-x="341" d="M291 279q50 -50 50 -121t-50 -120.5t-120.5 -49.5t-120.5 49.5t-50 120.5t50 121l121 121zM171 30v309l-91 -90q-37 -38 -37 -91t37 -90q37 -38 91 -38z" /> -<glyph unicode="" horiz-adv-x="469" d="M249 235h220v-86h-42v-85h-86v85h-92q-14 -37 -47 -61t-74 -24q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q41 0 74 -24t47 -61zM128 149q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5t-30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M312 323l93 -131l-93 -131q-13 -18 -35 -18h-234q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h234q22 0 35 -18zM277 85l76 107l-76 107h-234v-214h234z" /> -<glyph unicode="" horiz-adv-x="405" d="M312 323l93 -131l-93 -131q-13 -18 -35 -18h-234q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h234q22 0 35 -18z" /> -<glyph unicode="" d="M414 201q13 -13 13 -30.5t-13 -29.5l-149 -150q-13 -12 -30.5 -12t-29.5 12l-192 192q-13 13 -13 30v150q0 17 12.5 29.5t30.5 12.5h149q18 0 30 -12zM74.5 299q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM326 122q15 16 15 38 t-15.5 37.5t-37.5 15.5t-38 -15l-15 -16l-16 16q-15 15 -38 15q-22 0 -37.5 -15.5t-15.5 -37.5t16 -38l91 -91z" /> -<glyph unicode="" d="M414 201q13 -13 13 -30.5t-13 -29.5l-149 -150q-13 -12 -30.5 -12t-29.5 12l-192 192q-13 13 -13 30v150q0 17 12.5 29.5t30.5 12.5h149q18 0 30 -12zM74.5 299q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9z" /> -<glyph unicode="" horiz-adv-x="446" d="M26 29q-16 7 -22.5 23t-0.5 32l52 125v-192zM442 108q7 -16 0 -32.5t-23 -23.5l-157 -65q-8 -3 -16 -3q-29 0 -39 26l-106 256q-4 8 -3 17q0 28 26 38l157 65q8 3 17 3q28 0 39 -26zM140.5 261q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5z M98 27v135l73 -178h-31q-17 0 -29.5 12.5t-12.5 30.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M54 52l39 39l30 -30l-39 -39zM213 -31v63h43v-63h-43zM64 224v-43h-64v43h64zM299 313q29 -17 46.5 -46t17.5 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 35 17 64t47 46v103h128v-103zM405 224h64v-43h-64v43zM346 61l30 29l39 -38l-30 -30z" /> -<glyph unicode="" horiz-adv-x="469" d="M277 320l192 -256h-469l128 171l96 -128l34 25l-61 81z" /> -<glyph unicode="" d="M380 128l-31 31l26 19l30 -30zM370 229l-51 -40l-168 168l62 48l192 -149zM27 427l400 -400l-27 -27l-81 81l-106 -82l-192 149l35 27l157 -123l76 59l-31 30l-45 -34l-157 122l-35 27l69 54l-90 90z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 52l157 123l35 -27l-192 -149l-192 149l35 27zM192 107l-157 122l-35 27l192 149l192 -149l-35 -27z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 202q81 75 192 75v-234q-110 0 -192 -76q-81 76 -192 76v234q111 0 192 -75zM192 277q-27 0 -45.5 19t-18.5 45.5t18.5 45t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19z" /> -<glyph unicode="" d="M41 192q0 -27 19 -46.5t47 -19.5h85v-41h-85q-44 0 -75.5 31.5t-31.5 75.5t31.5 75.5t75.5 31.5h85v-41h-85q-28 0 -47 -19.5t-19 -46.5zM128 171v42h171v-42h-171zM320 299q44 0 75.5 -31.5t31.5 -75.5t-31.5 -75.5t-75.5 -31.5h-85v41h85q27 0 46.5 19.5t19.5 46.5 t-19.5 46.5t-46.5 19.5h-85v41h85z" /> -<glyph unicode="" horiz-adv-x="341" d="M170.5 85q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h194v43 q0 27 -19.5 46.5t-47 19.5t-46.5 -19.5t-19 -46.5h-41q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM299 21v214h-256v-214h256z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h21v43q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM170.5 386q-27.5 0 -46.5 -19.5t-19 -46.5h2v-43h130v43 q0 27 -19.5 46.5t-47 19.5zM299 21v214h-256v-214h256zM170.5 85q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h21v43q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM170.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5 t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM237 277v43q0 27 -19.5 46.5t-47 19.5t-46.5 -19.5t-19 -46.5v-43h132z" /> -<glyph unicode="" horiz-adv-x="512" d="M149 277l-85 -85l85 -85v-64l-149 149l149 149v-64zM277 256q54 -8 96.5 -30.5t69.5 -55.5t43.5 -69.5t25.5 -79.5q-78 109 -235 109v-87l-149 149l149 149v-85z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 256q54 -8 96.5 -30.5t69.5 -55.5t43.5 -69.5t25.5 -79.5q-78 109 -235 109v-87l-149 149l149 149v-85z" /> -<glyph unicode="" horiz-adv-x="448" d="M0 0v149l320 43l-320 43v149l448 -192z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 320q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h42q0 44 31.5 75.5t75.5 31.5t75.5 -31.5t31.5 -75.5h42zM192 384q-27 0 -45.5 -18.5t-18.5 -45.5h128q0 27 -18.5 45.5 t-45.5 18.5zM192 171q44 0 75.5 31t31.5 75h-43q0 -26 -18.5 -45t-45.5 -19t-45.5 19t-18.5 45h-43q0 -44 31.5 -75t75.5 -31z" /> -<glyph unicode="" horiz-adv-x="384" d="M373 384q11 0 11 -11v-322q0 -8 -8 -10l-120 -41l-128 45l-114 -44l-3 -1q-11 0 -11 11v322q0 8 8 10l120 41l128 -45l114 44zM256 43v253l-128 45v-253z" /> -<glyph unicode="" horiz-adv-x="432" d="M0 48v48h432v-48h-432zM0 168v48h432v-48h-432zM0 336h432v-48h-432v48z" /> -<glyph unicode="" d="M192 85v22h-43v42h86v22h-64q-9 0 -15.5 6t-6.5 15v64q0 9 6.5 15t15.5 6h21v22h43v-22h42v-42h-85v-22h64q9 0 15 -6t6 -15v-64q0 -9 -6 -15t-15 -6h-21v-22h-43zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5 t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v256h-341v-256h341z" /> -<glyph unicode="" horiz-adv-x="339" d="M180 301q-18 0 -32 -6l-32 31q15 8 32 12v46h64v-47q32 -8 49.5 -30t19.5 -51h-48q-2 45 -53 45zM27 361l312 -312l-27 -27l-48 48q-19 -18 -52 -24v-46h-64v46q-33 7 -55 28t-23 54h46q5 -45 64 -45q38 0 52 20l-75 74q-84 25 -84 84l-73 73z" /> -<glyph unicode="" horiz-adv-x="217" d="M117 215q46 -11 73 -32t27 -61q0 -32 -20.5 -51t-53.5 -25v-46h-64v46q-34 7 -55.5 28t-23.5 54h47q4 -45 64 -45q31 0 44 12t13 26q0 17 -13.5 30t-50.5 22q-100 24 -100 88q0 29 21 49.5t54 27.5v46h64v-47q32 -8 49.5 -30t18.5 -51h-47q-2 45 -53 45q-27 0 -42.5 -11 t-15.5 -29q0 -15 14 -25.5t50 -20.5z" /> -<glyph unicode="" horiz-adv-x="85" d="M42.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM42.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M42.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 384h42v-384h-42v43h-43v-43h-171v43h-42v-43h-43v384h43v-43h42v43h171v-43h43v43zM85 85v43h-42v-43h42zM85 171v42h-42v-42h42zM85 256v43h-42v-43h42zM299 85v43h-43v-43h43zM299 171v42h-43v-42h43zM299 256v43h-43v-43h43z" /> -<glyph unicode="" d="M341 363h86v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h21l43 -86h64l-43 86h43l42 -86h64l-42 86h42l43 -86h64z" /> -<glyph unicode="" horiz-adv-x="430" d="M430 252q0 -57 -37.5 -99t-93.5 -49v-83h64v-42h-342v106h-21v86q0 8 6.5 14.5t14.5 6.5h64q9 0 15.5 -6.5t6.5 -14.5v-86h-22v-64h171v84q-53 9 -88.5 50.5t-35.5 96.5q0 62 43.5 106t105.5 44t105.5 -44t43.5 -106zM53.5 213q-13.5 0 -23 9.5t-9.5 23t9.5 22.5t23 9 t22.5 -9t9 -22.5t-9 -23t-22.5 -9.5z" /> -<glyph unicode="" horiz-adv-x="302" d="M171 104v-83h128v-42h-299v42h128v84q-53 9 -88.5 50.5t-35.5 96.5q0 62 43.5 106t105.5 44t105.5 -44t43.5 -106q0 -57 -37.5 -99t-93.5 -49z" /> -<glyph unicode="" horiz-adv-x="320" d="M160 405l160 -390l-15 -15l-145 64l-145 -64l-15 15z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85v213h-298v-213h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM192 235l85 -86h-64v-128h-42v128h-64z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 43v149h43v-149q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h149v-43h-149v-298h298zM235 384h149v-149h-43v76l-209 -209l-30 30l209 209h-76v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 384q80 0 136 -50t56 -121q0 -44 -31.5 -75t-75.5 -31h-37q-14 0 -23 -9.5t-9 -22.5q0 -12 8 -21q8 -10 8 -22q0 -13 -9.5 -22.5t-22.5 -9.5q-80 0 -136 56t-56 136t56 136t136 56zM74.5 192q13.5 0 23 9.5t9.5 22.5t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5 t22.5 -9.5zM138.5 277q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM245.5 277q13.5 0 22.5 9.5t9 23t-9 22.5t-22.5 9t-23 -9t-9.5 -22.5t9.5 -23t23 -9.5zM309.5 192q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5 t9.5 -22.5t23 -9.5z" /> -<glyph unicode="" horiz-adv-x="277" d="M149 384q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-64v-128h-85v384h149zM154 213q17 0 29.5 12.5t12.5 30.5t-12.5 30.5t-29.5 12.5h-69v-86h69z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM192 335q-24 0 -41 -17t-17 -41t17 -40.5t41 -16.5t41 16.5t17 40.5t-17 41t-41 17zM320 107v19 q0 20 -23.5 35.5t-52.5 23t-52 7.5t-52 -7.5t-52.5 -23t-23.5 -35.5v-19h256z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM232 173l88 40l-88 40l-40 88l-40 -88l-88 -40l88 -40l40 -88z" /> -<glyph unicode="" horiz-adv-x="299" d="M277 277q0 -27 -13 -61t-32 -63t-37.5 -55t-31.5 -40l-14 -15q-5 5 -13.5 15t-30.5 39t-39 56.5t-31 62t-14 61.5q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM107 277.5q0 -17.5 12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30zM0 21 h299v-42h-299v42z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM213 64v43h-42v-43h42zM257 229q20 20 20 48q0 36 -25 61t-60 25t-60 -25t-25 -61h42q0 18 12.5 30.5 t30.5 12.5t30.5 -12.5t12.5 -30.5q0 -17 -13 -30l-26 -27q-25 -25 -25 -60v-11h42q0 22 6 34.5t19 26.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M213 309q-23 0 -39 -18l-68 68q44 46 107 46q62 0 106 -43.5t44 -105.5q0 -48 -37 -117l-77 78q18 16 18 39q0 22 -16 37.5t-38 15.5zM307 105l77 -78l-27 -27l-72 71q-16 -23 -34 -46.5t-28 -34.5l-10 -11q-6 6 -16 18t-35.5 46.5t-45.5 67t-36 73.5t-16 72q0 16 4 33 l-68 68l27 27l178 -178l3 -3z" /> -<glyph unicode="" horiz-adv-x="299" d="M149 405q62 0 106 -43.5t44 -105.5q0 -31 -15.5 -71.5t-37.5 -75t-44 -65t-37 -48.5l-16 -17q-6 6 -16 18t-35.5 46.5t-45.5 67t-36 73.5t-16 72q0 62 43.5 105.5t105.5 43.5zM149 203q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5t-37.5 -15.5t-15.5 -37.5t15.5 -37.5 t37.5 -15.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 405q56 0 105.5 -22.5t86.5 -62.5l-192 -341l-192 341q36 40 86 62.5t106 22.5zM85 298.5q0 -17.5 12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30zM191.5 128q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30 t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="428" d="M336 192l86 -85q6 -7 6 -15.5t-6 -14.5l-93 -93q-6 -6 -15 -6t-15 6l-85 85l-85 -85q-6 -6 -15 -6t-15 6l-93 93q-6 6 -6 14.5t6 15.5l85 85l-85 84q-6 7 -6 15.5t6 15.5l93 92q6 6 14.5 6t15.5 -6l85 -85l85 85q6 6 15 6t15 -6l92 -92q7 -7 7 -15.5t-7 -15.5zM214 256 q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15.5 6.5t6.5 15t-6.5 15t-15.5 6.5zM114 214l77 78l-77 77l-78 -78zM171.5 171q8.5 0 15 6t6.5 15t-6.5 15t-15 6t-15 -6t-6.5 -15t6.5 -15t15 -6zM214 128q9 0 15.5 6.5t6.5 15t-6.5 15t-15.5 6.5t-15 -6.5t-6 -15t6 -15t15 -6.5z M257 213q-9 0 -15 -6t-6 -15t6 -15t15 -6t15 6t6 15t-6 15t-15 6zM314 14l77 78l-77 77l-78 -78z" /> -<glyph unicode="" horiz-adv-x="341" d="M64 -64v43h43v-43h-43zM149 -64v43h43v-43h-43zM192 405v-213h-43v213h43zM268 353q34 -23 53.5 -60t19.5 -80q0 -70 -50 -120t-120.5 -50t-120.5 50t-50 120q0 43 19.5 80t53.5 60l31 -30q-28 -18 -44.5 -47t-16.5 -63q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5 q0 34 -17 63t-45 46zM235 -64v43h42v-43h-42z" /> -<glyph unicode="" horiz-adv-x="384" d="M213 384v-213h-42v213h42zM316 338q68 -58 68 -146q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 88 68 146l30 -30q-55 -45 -55 -116q0 -62 43.5 -105.5t105.5 -43.5t105.5 43.5t43.5 105.5q0 71 -55 115z" /> -<glyph unicode="" d="M363 277q26 0 45 -18.5t19 -45.5v-128h-86v-85h-256v85h-85v128q0 27 18.5 45.5t45.5 18.5h299zM299 43v106h-171v-106h171zM362.5 192q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5zM341 384v-85h-256v85h256z" /> -<glyph unicode="" horiz-adv-x="448" d="M395 213q22 0 37.5 -15.5t15.5 -37.5t-15.5 -37.5t-37.5 -15.5h-32v-86q0 -17 -12.5 -29.5t-30.5 -12.5h-81v32q0 24 -17 40.5t-41 16.5t-40.5 -16.5t-16.5 -40.5v-32h-81q-18 0 -30.5 12.5t-12.5 29.5v81h32q24 0 41 17t17 41t-17 41t-41 17h-32v81q0 17 12.5 29.5 t30.5 12.5h85v32q0 22 15.5 38t37.5 16t38 -16t16 -38v-32h85q18 0 30.5 -12.5t12.5 -29.5v-86h32z" /> -<glyph unicode="" horiz-adv-x="299" d="M21 85l43 86h-64v128h128v-128l-43 -86h-64zM192 85l43 86h-64v128h128v-128l-43 -86h-64z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 117v224q0 27 12.5 45t38 26.5t53 11.5t67 3t67 -3t53 -11.5t38 -26.5t12.5 -45v-224q0 -31 -21.5 -52.5t-52.5 -21.5l32 -32v-11h-256v11l32 32q-31 0 -53 21.5t-22 52.5zM170.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5 t30 -12.5zM299 235v106h-256v-106h256z" /> -<glyph unicode="" horiz-adv-x="384" d="M320 85v43h-256v-43h256zM320 171v42h-256v-42h256zM320 256v43h-256v-43h256zM0 -21v426l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32v-426l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32z " /> -<glyph unicode="" horiz-adv-x="469" d="M384 277l85 -85h-64q0 -71 -50 -121t-120 -50q-49 0 -91 27l31 31q27 -15 60 -15q53 0 90.5 37.5t37.5 90.5h-64zM107 192h64l-86 -85l-85 85h64q0 71 50 121t121 50q49 0 91 -27l-32 -31q-27 15 -59 15q-53 0 -90.5 -37.5t-37.5 -90.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 192q0 59 36 105t92 60v-44q-38 -14 -61.5 -47t-23.5 -74q0 -53 37 -90l48 47v-128h-128l50 51q-50 50 -50 120zM171 85v43h42v-43h-42zM384 363l-50 -51q50 -50 50 -120q0 -59 -36 -105t-92 -60v44q38 14 61.5 47t23.5 74q0 53 -37 90l-48 -47v128h128zM171 171v128 h42v-128h-42z" /> -<glyph unicode="" horiz-adv-x="366" d="M152 313q-5 -2 -16 -8l-31 32q22 14 47 20v-44zM0 333l27 27l335 -336l-27 -27l-50 50q-22 -14 -48 -20v44q7 3 17 8l-173 172q-14 -28 -14 -59q0 -53 38 -90l47 47v-128h-128l51 51q-51 50 -51 120q0 49 26 90zM366 363l-51 -51q51 -50 51 -120q0 -49 -26 -90l-32 31 q15 28 15 59q0 53 -38 90l-47 -47v128h128z" /> -<glyph unicode="" horiz-adv-x="341" d="M171 363q70 0 120 -50t50 -121q0 -49 -26 -91l-31 31q15 28 15 60q0 53 -37.5 90.5t-90.5 37.5v-64l-86 85l86 86v-64zM171 64v64l85 -85l-85 -86v64q-71 0 -121 50t-50 121q0 49 26 91l32 -31q-15 -28 -15 -60q0 -53 37.5 -90.5t90.5 -37.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M171 320q-53 0 -90.5 -37.5t-37.5 -90.5q0 -32 15 -60l-32 -31q-26 42 -26 91q0 71 50 121t121 50v64l85 -86l-85 -85v64zM315 283q26 -42 26 -91q0 -71 -50 -121t-120 -50v-64l-86 86l86 85v-64q53 0 90.5 37.5t37.5 90.5q0 31 -15 60z" /> -<glyph unicode="" horiz-adv-x="363" d="M299 363h64v-171h-171v-192q0 -9 -6.5 -15t-14.5 -6h-43q-9 0 -15 6t-6 15v235h213v85h-21v-21q0 -9 -6.5 -15.5t-15.5 -6.5h-256q-8 0 -14.5 6.5t-6.5 15.5v85q0 9 6.5 15t14.5 6h256q9 0 15.5 -6t6.5 -15v-21z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 320q17 0 29.5 -12.5t12.5 -30.5v-170q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v170q0 18 12.5 30.5t30.5 12.5h384zM427 107v170h-43v-85h-43v85h-42v-85h-43v85h-43v-85h-42v85h-43v-85h-43v85h-42v-170h384z" /> -<glyph unicode="" d="M163 285l264 -264v-21h-64l-150 149l-50 -50q8 -17 8 -35q0 -35 -25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60 25q19 0 35 -7l51 50l-51 50q-16 -7 -35 -7q-35 0 -60 25t-25 60t25 60t60.5 25t60.5 -25t25 -60q0 -18 -8 -35zM85.5 277q17.5 0 30 12.5t12.5 30.5 t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM85.5 21q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM213.5 181q10.5 0 10.5 11t-10.5 11t-10.5 -11t10.5 -11zM363 384h64v-21l-150 -150l-42 43z" /> -<glyph unicode="" horiz-adv-x="484" d="M475 176q9 -10 9 -23t-9 -23l-136 -135q-9 -10 -22.5 -10t-22.5 10l-257 256q-9 9 -9 22.5t9 22.5l136 136q9 9 22.5 9t22.5 -9l53 -52l-31 -30l-44 44l-121 -120l241 -242l121 121l-47 47l30 30zM159 11l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32 q6 -60 40 -108t87 -73zM320 256q-9 0 -15 6.5t-6 14.5v86q0 8 6 14.5t15 6.5v11q0 22 15.5 37.5t37.5 15.5t38 -15.5t16 -37.5v-11q8 0 14.5 -6.5t6.5 -14.5v-86q0 -8 -6.5 -14.5t-14.5 -6.5h-107zM337 395v-11h73v11q0 15 -11 25.5t-26 10.5t-25.5 -10.5t-10.5 -25.5z" /> -<glyph unicode="" horiz-adv-x="510" d="M351 394l-29 -28l-81 81l14 1q100 0 173.5 -68t81.5 -167h-32q-6 60 -40.5 108t-86.5 73zM217 411l257 -257q9 -9 9 -22.5t-9 -22.5l-136 -136q-9 -9 -22.5 -9t-22.5 9l-257 257q-9 9 -9 22.5t9 22.5l136 136q9 9 22.5 9t22.5 -9zM315 -4l136 136l-256 256l-136 -136z M159 -10l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32q6 -60 40 -108t87 -73z" /> -<glyph unicode="" d="M320 149l107 -106l-32 -32l-107 107v16l-6 6q-39 -33 -90 -33q-38 0 -70 19l31 31q19 -8 39 -8q40 0 68 28.5t28 68t-28 67.5t-68 28t-68 -28t-28 -68h75l-89 -85l-82 85h54q0 57 40.5 98t97.5 41q58 0 98.5 -40.5t40.5 -98.5q0 -51 -34 -90l6 -6h17z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 30l-81 82q17 27 17 59q0 44 -31 75t-75 31t-75.5 -31t-31.5 -75t31.5 -75.5t75.5 -31.5q31 0 59 18l94 -95q-12 -8 -25 -8h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170l128 -128v-247zM107 170.5q0 26.5 18.5 45.5t45 19t45.5 -19t19 -45.5 t-19 -45t-45.5 -18.5t-45 18.5t-18.5 45z" /> -<glyph unicode="" d="M203 256q22 0 37.5 -15.5t15.5 -37.5t-15.5 -38t-37.5 -16t-38 16t-16 38t16 37.5t38 15.5zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM316 60l30 30l-62 62 q15 23 15 51q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t67 -28q28 0 51 15z" /> -<glyph unicode="" horiz-adv-x="373" d="M149 320q-38 0 -67.5 -24.5t-36.5 -60.5h-43q8 54 49.5 91t97.5 37q62 0 106 -44l44 44v-128h-128l54 54q-32 31 -76 31zM270 125l103 -104l-32 -31l-103 103q-40 -29 -89 -29q-62 0 -105 44l-44 -44v128h128l-54 -54q31 -31 75 -31q39 0 68 24t37 61h43q-5 -37 -27 -67z " /> -<glyph unicode="" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28z" /> -<glyph unicode="" d="M43 64v64h341v-128h-64v64h-213v-64h-64v64zM363 235h64v-64h-64v64zM0 235h64v-64h-64v64zM320 171h-213v170q0 18 12.5 30.5t29.5 12.5h128q18 0 30.5 -12.5t12.5 -30.5v-170z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 235q18 0 30.5 -12.5t12.5 -30.5t-12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5t30.5 12.5zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM304 192 q0 7 -1 15l32 24q4 5 1 10l-30 52q-3 5 -9 3l-37 -15q-12 9 -25 15l-6 39q-1 6 -7 6h-60q-6 0 -7 -6l-6 -40q-14 -5 -25 -14l-37 15q-6 2 -9 -4l-30 -51q-3 -6 1 -10l32 -24q-1 -8 -1 -15t1 -15l-32 -24q-4 -5 -1 -10l30 -52q3 -5 9 -3l37 15q12 -9 25 -15l6 -39q1 -6 7 -6 h60q6 0 7 6l6 40q14 5 25 14l37 -15q6 -2 9 4l30 51q3 6 -1 10l-32 24q1 8 1 15z" /> -<glyph unicode="" horiz-adv-x="415" d="M366 171l45 -35q7 -6 3 -14l-43 -74q-4 -8 -13 -4l-53 21q-18 -13 -36 -21l-8 -56q-1 -9 -11 -9h-85q-9 0 -11 9l-8 56q-19 8 -36 21l-53 -21q-9 -3 -13 4l-43 74q-4 8 3 14l45 35q-1 12 -1 21t1 21l-45 35q-7 6 -3 14l43 74q5 8 13 4l53 -21q18 13 36 21l8 56q2 9 11 9 h85q10 0 11 -9l8 -56q19 -8 36 -21l53 21q9 3 13 -4l43 -74q4 -8 -3 -14l-45 -35q2 -12 2 -21t-2 -21zM207.5 117q30.5 0 52.5 22t22 53t-22 53t-52.5 22t-52.5 -22t-22 -53t22 -53t52.5 -22z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 427l192 -86v-128q0 -89 -55 -162.5t-137 -93.5q-82 20 -137 93.5t-55 162.5v128zM149 85l171 171l-30 30l-141 -140l-55 55l-30 -30z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 427l192 -86v-128q0 -89 -55 -162.5t-137 -93.5q-82 20 -137 93.5t-55 162.5v128zM192 192v188l-149 -66v-122h149v-191q59 19 100 72t49 119h-149z" /> -<glyph unicode="" horiz-adv-x="469" d="M346 256h102q9 0 15 -6.5t6 -14.5v-6l-54 -198q-4 -13 -15.5 -22t-26.5 -9h-277q-15 0 -26 9t-15 22l-54 198q-1 2 -1 6q0 8 6.5 14.5t14.5 6.5h103l93 140q6 9 17.5 9t17.5 -9zM171 256h128l-64 94zM234.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5 t-12.5 -30.5t12.5 -30.5t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="430" d="M213 256v64h-64v43h64v64h43v-64h64v-43h-64v-64h-43zM128 64q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30 12.5t-12 30t12 30t30 12.5zM341.5 64q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM132 133q0 -5 5 -5h247v-43 h-256q-18 0 -30.5 12.5t-12.5 30.5q0 11 6 20l28 53l-76 162h-43v42h70l20 -42l20 -43l48 -101l3 -6h149l59 107l24 43l37 -21l-82 -149q-12 -22 -38 -22h-159l-19 -35v-3z" /> -<glyph unicode="" d="M128 64q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30 12.5t-12 30t12 30t30 12.5zM0 405h70l20 -42h315q9 0 15.5 -6.5t6.5 -15.5q0 -5 -3 -10l-76 -138q-12 -22 -38 -22h-159l-19 -35v-3q0 -5 5 -5h247v-43h-256q-18 0 -30.5 12.5t-12.5 30.5q0 11 6 20l28 53 l-76 162h-43v42zM341.5 64q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M151 115l55 56h-206v42h206l-55 56l30 30l107 -107l-107 -107zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85h43v-85h298v298h-298v-85h-43v85q0 18 12.5 30.5t30.5 12.5h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 320h128v-43h-128v43zM0 64v43h384v-43h-384zM0 213h256v-42h-256v42z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 64v43h128v-43h-128zM0 320h384v-43h-384v43zM0 171v42h256v-42h-256z" /> -<glyph unicode="" horiz-adv-x="417" d="M282 364h-147l74 73zM135 20h147l-73 -73zM70 157h81l-41 111zM93 315h35l93 -246h-38l-20 53h-106l-19 -53h-38zM285 103h132v-34h-184v28l128 183h-127v35h179v-27z" /> -<glyph unicode="" horiz-adv-x="417" d="M282 364h-147l74 73zM135 20h147l-73 -73zM266 157h81l-40 111zM290 315h34l93 -246h-38l-19 53h-106l-20 -53h-38zM52 103h132v-34h-184v28l128 183h-127v35h179v-27z" /> -<glyph unicode="" horiz-adv-x="438" d="M213 107l-24 64h-121l-23 -64h-45l109 277h40l109 -277h-45zM85 213h88l-44 118zM408 201l30 -30l-202 -203l-109 109l30 30l79 -79z" /> -<glyph unicode="" d="M0 21v86h427v-86h-427zM43 85v-42h42v42h-42zM0 363h427v-86h-427v86zM85 299v42h-42v-42h42zM0 149v86h427v-86h-427zM43 213v-42h42v42h-42z" /> -<glyph unicode="" d="M363 299h64v-278h-171v86h-85v-86h-171v278h64v64h299v-64zM192 235v64h-64v-22h43v-21h-43v-64h64v21h-43v22h43zM299 192v107h-22v-43h-21v43h-21v-64h42v-43h22z" /> -<glyph unicode="" horiz-adv-x="384" d="M363 363v-43h-342v43h342zM384 149h-21v-128h-43v128h-85v-128h-214v128h-21v43l21 107h342l21 -107v-43zM192 64v85h-128v-85h128z" /> -<glyph unicode="" horiz-adv-x="341" d="M170.5 405q39.5 0 67 -3t53 -11.5t38 -26t12.5 -44.5v-203q0 -31 -21.5 -52.5t-52.5 -21.5l32 -32v-11h-256v11l32 32q-31 0 -53 21.5t-22 52.5v203q0 27 12.5 44.5t38 26t53 11.5t67 3zM74.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23 t22.5 -9.5zM149 213v107h-106v-107h106zM266.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM299 213v107h-107v-107h107z" /> -<glyph unicode="" horiz-adv-x="469" d="M123 345l-30 -30l-39 38l30 30zM64 224v-43h-64v43h64zM256 436v-63h-43v63h43zM415 353l-38 -38l-30 30l38 38zM346 61l30 29l39 -38l-30 -30zM405 224h64v-43h-64v43zM235 331q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5 t90.5 37.5zM213 -31v63h43v-63h-43zM54 52l39 39l30 -30l-39 -39z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 256v43h43v-43h-43zM0 171v42h43v-42h-43zM0 341q0 18 12.5 30.5t30.5 12.5v-43h-43zM171 0v43h42v-43h-42zM0 85v43h43v-43h-43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM427 384q17 0 29.5 -12.5t12.5 -30.5v-85h-213v128h171zM427 85v43h42v-43h-42zM171 341v43 h42v-43h-42zM85 0v43h43v-43h-43zM85 341v43h43v-43h-43zM427 0v43h42q0 -18 -12.5 -30.5t-29.5 -12.5zM427 171v42h42v-42h-42zM256 0v43h43v-43h-43zM341 0v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 43v213h-171v85h-213v-298h384z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-320q-21 0 -34 19l-115 173l115 173q13 19 34 19h320zM405 115l-76 77l76 77l-30 30l-76 -77l-77 77l-30 -30l77 -77l-77 -77l30 -30l77 77l76 -77z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-318q-23 0 -36 19l-115 173l115 173q13 19 34 19h320zM192 160q13 0 22.5 9.5t9.5 22.5t-9.5 22.5t-22.5 9.5t-22.5 -9.5t-9.5 -22.5t9.5 -22.5t22.5 -9.5zM298.5 160q13.5 0 23 9.5t9.5 22.5 t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5t22.5 -9.5zM405.5 160q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-320q-21 0 -34 19l-115 173l115 173q13 19 34 19h320z" /> -<glyph unicode="" horiz-adv-x="469" d="M299 384q17 0 29.5 -12.5t12.5 -30.5v-213q0 -18 -12 -30l-141 -141l-22 23q-10 9 -10 22l1 7l20 98h-134q-18 0 -30.5 12.5t-12.5 29.5v2v41q0 8 3 16l64 150q11 26 40 26h192zM384 384h85v-256h-85v256z" /> -<glyph unicode="" horiz-adv-x="512" d="M256 320v-27q0 -6 -2 -11l-49 -113q-8 -20 -29 -20h-144q-13 0 -22.5 9.5t-9.5 22.5v139q0 13 9 23l106 105l17 -17q7 -7 7 -17l-1 -5l-14 -68h111q8 0 14.5 -6t6.5 -15zM480 235q13 0 22.5 -9.5t9.5 -22.5v-139q0 -13 -9 -23l-106 -105l-17 17q-7 7 -7 17l1 5l14 68 h-111q-8 0 -14.5 6t-6.5 15v27q0 6 2 11l49 113q8 20 29 20h144z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 0v256h85v-256h-85zM469 235v-2v-41q0 -8 -3 -16l-64 -150q-11 -26 -39 -26h-192q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 13 30l140 141l23 -23q9 -9 9 -22l-1 -7l-20 -98h135q17 0 29.5 -12.5t12.5 -29.5z" /> -<glyph unicode="" d="M384 192q0 -18 12.5 -30.5t30.5 -12.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v85q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5v85q0 18 12.5 30.5t30.5 12.5h341q18 0 30.5 -12.5t12.5 -30.5v-85q-18 0 -30.5 -12.5t-12.5 -30.5z M290 90l-24 87l71 58l-91 5l-33 84l-33 -84l-90 -5l70 -58l-23 -87l76 49z" /> -<glyph unicode="" horiz-adv-x="469" d="M298.5 363q70.5 0 120.5 -50t50 -121t-50 -121t-120.5 -50t-120.5 50t-50 121t50 121t120.5 50zM299 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5zM43 192q0 -41 23.5 -74t61.5 -47v-44q-56 14 -92 60t-36 105 t36 105t92 60v-44q-38 -14 -61.5 -47t-23.5 -74z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 192q0 48 34.5 82.5t82.5 34.5t82.5 -34.5t34.5 -82.5h-234zM235 192q0 -48 -35 -82.5t-83 -34.5t-82.5 34.5t-34.5 82.5h235zM235 192q-48 0 -83 34.5t-35 82.5t35 83t83 35v-235zM235 192q48 0 82.5 -34.5t34.5 -82.5t-34.5 -83t-82.5 -35v235z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 235q0 -30 -18 -52.5t-46 -30.5v-24h64q0 -29 -18 -52t-46 -30v-25q0 -8 -6 -14.5t-15 -6.5h-171q-8 0 -14.5 6.5t-6.5 14.5v25q-28 7 -46 30t-18 52h64v24q-28 8 -46 30.5t-18 52.5h64v24q-28 7 -46 30t-18 52h64v22q0 8 6.5 14.5t14.5 6.5h171q9 0 15 -6.5t6 -14.5 v-22h64q0 -29 -18 -52t-46 -30v-24h64zM170.5 43q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5zM170.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM170.5 256q17.5 0 30 12.5 t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M253 127l-16 -44l-66 66l-107 -106l-30 30l108 107q-40 44 -63 97h42q20 -39 50 -71q45 50 67 114h-238v43h149v42h43v-42h149v-43h-62q-24 -78 -79 -139l-1 -1zM373 235l96 -256h-42l-24 64h-102l-24 -64h-42l96 256h42zM317 85h70l-35 93z" /> -<glyph unicode="" d="M213 78l137 219h-273zM213 -2l-213 341h427z" /> -<glyph unicode="" d="M213 282l-136 -218h273zM213 363l214 -342h-427z" /> -<glyph unicode="" horiz-adv-x="469" d="M405 277l64 -85v-107h-42q0 -26 -19 -45t-45.5 -19t-45 19t-18.5 45h-128q0 -26 -19 -45t-45.5 -19t-45 19t-18.5 45h-43v235q0 18 12.5 30.5t30.5 12.5h298v-86h64zM106.5 53q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM395 245h-54v-53 h95zM362.5 53q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5z" /> -<glyph unicode="" d="M420 207q7 -6 7 -15t-7 -15l-192 -192q-6 -6 -15 -6t-15 6l-192 192q-6 6 -6 15t6 15l192 192q6 6 15 6t15 -6zM256 139l75 74l-75 75v-53h-107q-9 0 -15 -6.5t-6 -15.5v-85h43v64h85v-53z" /> -<glyph unicode="" d="M43 363v-150h-43v150q0 17 12.5 29.5t30.5 12.5h149v-42h-149zM171 171l63 -79l43 57l64 -85h-256zM320 266.5q0 -13.5 -9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5t22.5 -9.5t9.5 -23zM384 405q18 0 30.5 -12.5t12.5 -29.5v-150h-43v150h-149v42h149z M384 21v150h43v-150q0 -17 -12.5 -29.5t-30.5 -12.5h-149v42h149zM43 171v-150h149v-42h-149q-18 0 -30.5 12.5t-12.5 29.5v150h43z" /> -<glyph unicode="" horiz-adv-x="341" d="M110 89l121 121q25 -25 25 -60.5t-25 -60.5t-60.5 -25t-60.5 25zM299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM128 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5 t6 15t-6 15t-15 6.5zM64 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5zM171 21q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 363h341v-342h-341v342zM43 277v-213h256v213h-256z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 21h-341v86h341v-86z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 277h85v86h256v-256h-85v-86h-256v256zM256 277v-128h43v171h-171v-43h128zM43 192v-128h170v128h-170z" /> -<glyph unicode="" horiz-adv-x="470" d="M464 43q6 -5 6 -14.5t-8 -15.5l-49 -49q-7 -7 -15.5 -7t-14.5 7l-194 194q-37 -15 -77.5 -6.5t-70.5 38.5q-31 32 -39 75.5t12 82.5l94 -92l64 64l-92 92q38 18 82 10.5t76 -38.5q30 -30 38.5 -70.5t-6.5 -76.5z" /> -<glyph unicode="" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM192 235h-43v-43h-21v43h-43v21h43v43 h21v-43h43v-21z" /> -<glyph unicode="" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM85 256h107v-21h-107v21z" /> -<glyph unicode="" d="M192 128h43v-43h-43v43zM192 299h43v-128h-43v128zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 85v43h-43v-43h43zM235 171v128h-43v-128h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M272 384l112 -112v-160l-112 -112h-160l-112 112v160l112 112h160zM192 79q12 0 20 8t8 19.5t-8 19.5t-20 8t-20 -8t-8 -19.5t8 -19.5t20 -8zM213 171v128h-42v-128h42z" /> -<glyph unicode="" horiz-adv-x="469" d="M469 192l-52 -59l8 -79l-77 -17l-41 -68l-72 31l-73 -31l-40 67l-77 18l7 79l-52 59l52 60l-7 78l77 17l40 68l73 -31l72 31l41 -68l77 -17l-8 -79zM256 85v43h-43v-43h43zM256 171v128h-43v-128h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 0l235 405l234 -405h-469zM256 64v43h-43v-43h43zM256 149v86h-43v-86h43z" /> -<glyph unicode="" d="M192 64v43h43v-43h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM213.5 320q35.5 0 60.5 -25t25 -60 q0 -18 -10 -32.5t-22 -23t-22 -22t-10 -29.5h-43q0 23 10 39.5t22 24t22 18.5t10 25q0 17 -12.5 29.5t-30 12.5t-30 -12.5t-12.5 -29.5h-43q0 35 25 60t60.5 25z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 43v42h-43v-42h43zM279 208q20 20 20 48q0 35 -25 60t-60.5 25t-60.5 -25t-25 -60h43q0 18 12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-13 -30l-26 -27 q-25 -25 -25 -60v-11h43q0 22 5.5 34.5t19.5 25.5z" /> -<glyph unicode="" d="M192 85v128h43v-128h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM192 256v43h43v-43h-43z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 85v128h-43v-128h43zM235 256v43h-43v-43h43z" /> -<glyph unicode="" horiz-adv-x="447" d="M118 372q-33 -24 -53 -60t-22 -77h-43q2 50 25.5 94t62.5 73zM404 235q-2 41 -22.5 77t-53.5 60l31 30q39 -29 62 -73t26 -94h-43zM362 224v-117l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5z M223 -21q-17 0 -29.5 12.5t-12.5 29.5h85q0 -8 -3 -16q-9 -21 -31 -25q-4 -1 -9 -1z" /> -<glyph unicode="" horiz-adv-x="384" d="M150 0h84q0 -18 -12 -30.5t-30 -12.5t-30 12.5t-12 30.5zM339 89l45 -45v-23h-384v23l45 45v124q0 52 32 91.5t81 51.5v15q0 14 10 24t24 10t24 -10t10 -24v-15q49 -12 81 -51.5t32 -91.5v-124zM277 170v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64z" /> -<glyph unicode="" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117zM277 85v139q0 40 -28 68t-68 28t-68 -28t-28 -68v-139 h192z" /> -<glyph unicode="" horiz-adv-x="384" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 224v-79l-202 202q17 8 31 12v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5zM314 43h-314v21l43 43v117q0 38 19 71l-62 62l27 27l357 -357l-27 -27z" /> -<glyph unicode="" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117zM235 239v38h-107v-38h60l-60 -73v-38h107v38h-60z" /> -<glyph unicode="" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117z" /> -<glyph unicode="" horiz-adv-x="469" d="M298.5 192q-35.5 0 -60.5 25t-25 60.5t25 60.5t60.5 25t60.5 -25t25 -60.5t-25 -60.5t-60.5 -25zM107 235h64v-43h-64v-64h-43v64h-64v43h64v64h43v-64zM298.5 149q31.5 0 69.5 -9t69.5 -29.5t31.5 -46.5v-43h-341v43q0 26 31.5 46.5t69.5 29.5t69.5 9z" /> -<glyph unicode="" horiz-adv-x="512" d="M448 277l-64 -42l-64 42v22l64 -43l64 43v-22zM469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h426zM170.5 320q-26.5 0 -45 -18.5t-18.5 -45.5t18.5 -45.5t45 -18.5t45.5 18.5 t19 45.5t-19 45.5t-45.5 18.5zM299 64v21q0 20 -24 36t-52.5 23t-52 7t-52 -7t-52 -23t-23.5 -36v-21h256zM469 192v128h-170v-128h170z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 187q-20 0 -34 14t-14 34t14 34t34 14t34 -14t14 -34t-14 -34t-34 -14zM288 101v-16h-192v16q0 22 33 35t63 13t63 -13t33 -35zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5 t30.5 12.5h298zM341 43v298h-298v-298h298z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h426zM170.5 320q-26.5 0 -45 -18.5t-18.5 -45.5t18.5 -45.5t45 -18.5t45.5 18.5t19 45.5t-19 45.5t-45.5 18.5zM299 64v21 q0 20 -24 36t-52.5 23t-52 7t-52 -7t-52 -23t-23.5 -36v-21h256zM381 149q-8 22 -8 43t8 43h35l32 42l-42 43q-44 -33 -59 -85q-6 -22 -6 -43t6 -43q15 -52 59 -85l42 43l-32 42h-35z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298zM256 256q0 27 -18.5 45.5t-45.5 18.5t-45.5 -18.5t-18.5 -45.5t18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5zM64 85v-21h256 v21q0 20 -23.5 36t-52.5 23t-52 7t-52 -7t-52.5 -23t-23.5 -36z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM192 320q-27 0 -45.5 -18.5t-18.5 -45.5t18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5 t-18.5 45.5t-45.5 18.5zM320 64v21q0 20 -23.5 36t-52.5 23t-52 7t-52 -7t-52.5 -23t-23.5 -36v-21h256z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 341q-26.5 0 -45.5 -18.5t-19 -45t19 -45.5t45.5 -19t45 19t18.5 45.5t-18.5 45t-45 18.5zM213.5 38q39.5 0 73 18.5t54.5 50.5q0 20 -23.5 35.5 t-52 23t-52 7.5t-52 -7.5t-52 -23t-24.5 -35.5q21 -32 55 -50.5t73.5 -18.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M170.5 322q-18.5 0 -31.5 -13t-13 -31.5t13 -31.5t31.5 -13t31.5 13t13 31.5t-13 31.5t-31.5 13zM171 130q-44 0 -87 -16.5t-43 -28.5v-23h260v23q0 12 -43 28.5t-87 16.5zM170.5 363q35.5 0 60.5 -25t25 -60.5t-25 -60.5t-60.5 -25t-60.5 25t-25 60.5t25 60.5t60.5 25z M170.5 171q31.5 0 69.5 -9t69.5 -29.5t31.5 -47.5v-64h-341v64q0 27 31.5 47.5t69.5 29.5t69.5 9z" /> -<glyph unicode="" horiz-adv-x="341" d="M170.5 192q-35.5 0 -60.5 25t-25 60.5t25 60.5t60.5 25t60.5 -25t25 -60.5t-25 -60.5t-60.5 -25zM170.5 149q31.5 0 69.5 -9t69.5 -29.5t31.5 -46.5v-43h-341v43q0 26 31.5 46.5t69.5 29.5t69.5 9z" /> -<glyph unicode="" horiz-adv-x="512" d="M171 235v-43h-64v-64h-43v64h-64v43h64v64h43v-64h64zM384 213q-10 0 -19 3q19 28 19 61q0 34 -19 61q9 3 19 3q27 0 45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19zM277.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM419 167 q37 -6 65 -22t28 -38v-43h-64v43q0 34 -29 60zM277 171q40 0 84 -18t44 -46v-43h-256v43q0 28 44 46t84 18z" /> -<glyph unicode="" d="M309 192q-22 0 -37.5 15.5t-15.5 37.5t15.5 38t37.5 16t37.5 -16t15.5 -38t-15.5 -37.5t-37.5 -15.5zM149.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM309.5 149q36.5 0 77 -16t40.5 -42v-48h-235v48q0 26 40.5 42t77 16z M149 171q22 0 51 -6q-51 -28 -51 -74v-48h-149v53q0 23 27.5 41t61 26t60.5 8z" /> -<glyph unicode="" d="M384 448v-43h-341v43h341zM43 -64v43h341v-43h-341zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM213 304q-20 0 -34 -14t-14 -34t14 -34t34 -14t34 14t14 34t-14 34 t-34 14zM320 85v32q0 24 -36.5 39t-70 15t-70 -15t-36.5 -39v-32h213z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 341h42v-298h-42v298zM341 43v298h43v-298h-43zM277 341q9 0 15.5 -6t6.5 -15v-256q0 -9 -6.5 -15t-15.5 -6h-256q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h256zM149 283q-20 0 -34 -14t-14 -34t14 -34t34 -14t34 14t14 34t-14 34t-34 14zM245 85v16q0 22 -33 35 t-63 13t-63 -13t-33 -35v-16h192z" /> -<glyph unicode="" horiz-adv-x="469" d="M331 171q25 0 56 -7.5t56.5 -24t25.5 -38.5v-58h-469v58q0 22 25.5 38.5t56.5 24t57 7.5q50 0 96 -22q46 22 96 22zM245 75v26q0 10 -35 24t-71.5 14t-71.5 -14t-35 -24v-26h213zM437 75v26q0 10 -35 24t-71 14q-32 0 -65 -12q11 -12 11 -26v-26h160zM139 192 q-31 0 -53 22t-22 53t22 52.5t53 21.5t52.5 -21.5t21.5 -52.5t-21.5 -53t-52.5 -22zM138.5 309q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM331 192q-31 0 -53 22t-22 53t22 52.5t53 21.5t52.5 -21.5t21.5 -52.5t-21.5 -53 t-52.5 -22zM330.5 309q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M320 213q-27 0 -45.5 19t-18.5 45.5t18.5 45t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19zM149.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM149.5 171q27.5 0 60.5 -8t61 -26t28 -41v-53h-299v53q0 23 27.5 41 t61 26t61 8zM320 171q28 0 61 -8t60.5 -26t27.5 -41v-53h-128v53q0 43 -42 74q13 1 21 1z" /> -<glyph unicode="" d="M149 197q11 0 19 -7.5t8 -18.5t-8 -19t-19 -8t-18.5 8t-7.5 19t7.5 18.5t18.5 7.5zM277 197q11 0 19 -7.5t8 -18.5t-8 -19t-19 -8t-18.5 8t-7.5 19t7.5 18.5t18.5 7.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5 t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121q0 24 -7 48q-24 -5 -48 -5q-53 0 -99 24t-75 66q-33 -80 -111 -115q-1 -10 -1 -18q0 -71 50 -121t120.5 -50z" /> -<glyph unicode="" horiz-adv-x="192" d="M128 -21h-64v128h-64l54 162q4 14 15.5 22t25.5 8h2q14 0 25 -8t16 -22l54 -162h-64v-128zM96 320q-18 0 -30.5 12.5t-12.5 30t12.5 30t30.5 12.5t30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5z" /> -<glyph unicode="" horiz-adv-x="149" d="M32 -21v160h-32v117q0 18 12.5 30.5t30.5 12.5h64q17 0 29.5 -12.5t12.5 -30.5v-117h-32v-160h-85zM74.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5z" /> -<glyph unicode="" horiz-adv-x="363" d="M32 -21v160h-32v117q0 18 12.5 30.5t30.5 12.5h64q17 0 29.5 -12.5t12.5 -30.5v-117h-32v-160h-85zM299 -21h-64v128h-64l54 162q4 14 15.5 22t24.5 8h3q14 0 25 -8t15 -22l55 -162h-64v-128zM74.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30 t-12.5 -30t-30 -12.5zM266.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 405q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30.5 12.5t-12.5 30t12.5 30t30.5 12.5zM384 256h-128v-277h-43v128h-42v-128h-43v277h-128v43h384v-43z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM288 213q-13 0 -22.5 9.5t-9.5 23t9.5 22.5t22.5 9t22.5 -9 t9.5 -22.5t-9.5 -23t-22.5 -9.5zM138.5 213q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM213.5 149q36.5 0 66 -20.5t42.5 -53.5h-218q13 33 43 53.5t66.5 20.5z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM288 213q-13 0 -22.5 9.5t-9.5 23t9.5 22.5t22.5 9t22.5 -9 t9.5 -22.5t-9.5 -23t-22.5 -9.5zM138.5 213q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM213.5 75q-36.5 0 -66.5 20.5t-43 53.5h218q-13 -33 -42.5 -53.5t-66 -20.5z" /> -<glyph unicode="" horiz-adv-x="343" d="M226.5 331q-17.5 0 -30.5 12.5t-13 30t13 30t30.5 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5zM149 35l-149 29l9 43l104 -21l34 173l-38 -15v-73h-43v100l111 47q3 0 8.5 1t8.5 1q22 0 36 -21l22 -34q13 -23 37.5 -37t53.5 -14v-43q-71 0 -117 53l-13 -64l45 -42v-160 h-43v128l-44 42z" /> -<glyph unicode="" horiz-adv-x="277" d="M160 331q-18 0 -30.5 12.5t-12.5 30t12.5 30t30.5 12.5t30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5zM81 258l-60 -301h45l39 171l44 -43v-128h43v160l-45 43l13 64q46 -53 117 -53v42q-29 0 -53.5 14.5t-37.5 37.5l-22 34q-14 21 -36 21q-3 0 -8.5 -1t-8.5 -1l-111 -47 v-100h43v72l38 15v0z" /> -<glyph unicode="" horiz-adv-x="469" d="M171 107q-27 0 -45.5 18.5t-18.5 45.5q0 24 16.5 42.5t40.5 20.5h3q9 20 27.5 31.5t40.5 11.5q28 0 48.5 -18t24.5 -46h1q22 0 38 -15.5t16 -37.5t-16 -37.5t-38 -15.5h-138zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384 q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM309 107q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5h-10q0 36 -25 61t-61 25q-29 0 -52 -18.5t-30 -46.5l-3 1q-27 0 -45.5 -19t-18.5 -45.5t18.5 -45 t45.5 -18.5h181z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM213 85l141 141l-30 30l-111 -110l-44 44l-30 -30z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM363 171h-64v85h-86v-85h-64l107 -107z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -55 -45 -87l-31 31q33 19 33 56q0 27 -18.5 45.5t-45.5 18.5h-32v11q0 48 -34 82.5t-83 34.5q-29 0 -54 -13l-32 31q40 25 86 25q58 0 102 -37t55 -92zM64 336l27 27l357 -357l-27 -27l-43 42h-250q-53 0 -90.5 37.5t-37.5 90.5 q0 52 35.5 89t87.5 39zM165 235h-37q-35 0 -60 -25t-25 -60.5t25 -60.5t60 -25h208z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q21 40 59 63.5t83 23.5q58 0 102 -37t55 -92zM405 64q27 0 45.5 19t18.5 45t-18.5 45t-45.5 19h-32v11q0 48 -34.5 82.5t-82.5 34.5 q-58 0 -94 -47q41 -12 67.5 -46t26.5 -78h-43q0 36 -25 61t-60 25t-60 -25t-25 -60.5t25 -60.5t60 -25h277z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM405 64q27 0 45.5 18.5t18.5 45.5t-18.5 45.5t-45.5 18.5h-32v11q0 48 -34 82.5t-83 34.5 q-40 0 -71 -24t-42 -61h-15q-35 0 -60 -25t-25 -60.5t25 -60.5t60 -25h277z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM299 171h64l-107 106l-107 -106h64v-86h86v86z" /> -<glyph unicode="" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92z" /> -<glyph unicode="" horiz-adv-x="299" d="M299 256l-150 -149l-149 149h85v128h128v-128h86zM0 64h299v-43h-299v43z" /> -<glyph unicode="" horiz-adv-x="341" d="M213 405l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170zM256 107v42h-64v64h-43v-64h-64v-42h64v-64h43v64h64zM192 256h117l-117 117v-117z" /> -<glyph unicode="" horiz-adv-x="341" d="M213 405l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170zM256 64v43h-171v-43h171zM256 149v43h-171v-43h171zM192 256h117l-117 117v-117z" /> -<glyph unicode="" horiz-adv-x="341" d="M43 405h170l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5zM192 256h117l-117 117v-117z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM384 64v213h-341v-213h341z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM277.5 256q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM363 85v22 q0 19 -29.5 30.5t-56 11.5t-56 -11.5t-29.5 -30.5v-22h171z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM247 64l-20 87l67 58l-89 8l-34 82l-35 -82l-89 -8l68 -58l-21 -87l77 45z" /> -<glyph unicode="" d="M43 363h128l42 -43h171q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5zM276 256l-25 -60l-65 -5l49 -43l-15 -63l56 33l56 -33l-14 63l49 43l-65 5z" /> -<glyph unicode="" d="M171 363l42 -43h171q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128z" /> -<glyph unicode="" horiz-adv-x="299" d="M139 256h32v-128h-32v128zM85 256q10 0 16 -6.5t6 -14.5v-11h-75v-64h43v32h32v-43q0 -8 -6 -14.5t-16 -6.5h-64q-9 0 -15 6.5t-6 14.5v86q0 8 6 14.5t15 6.5h64zM299 224h-64v-21h42v-32h-42v-43h-32v128h96v-32z" /> -<glyph unicode="" horiz-adv-x="299" d="M0 363h299v-43h-299v43zM0 149l149 150l150 -150h-86v-128h-128v128h-85z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 384h384v-384h-384v384zM171 43v128h-128v-128h128zM171 213v128h-128v-128h128zM341 43v128h-128v-128h128zM341 213v128h-128v-128h128z" /> -<glyph unicode="" horiz-adv-x="384" d="M128 213v-42h-43v42h43zM213 128v-43h-42v43h42zM128 384v-43h-43v43h43zM213 213v-42h-42v42h42zM43 384v-43h-43v43h43zM213 299v-43h-42v43h42zM299 213v-42h-43v42h43zM213 384v-43h-42v43h42zM299 384v-43h-43v43h43zM341 171v42h43v-42h-43zM341 85v43h43v-43h-43z M43 299v-43h-43v43h43zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM43 213v-42h-43v42h43zM0 0v43h384v-43h-384zM43 128v-43h-43v43h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM85 0v43h43v-43h-43zM171 85v43h42v-43h-42zM171 0v43h42v-43h-42zM0 0v43h43v-43h-43zM0 85v43h43v-43h-43zM0 171v42h43v-42h-43zM0 256v43h43v-43h-43zM0 341v43h43v-43h-43zM171 171v42h42v-42h-42zM341 85v43h43v-43 h-43zM341 171v42h43v-42h-43zM341 0v43h43v-43h-43zM341 256v43h43v-43h-43zM171 256v43h42v-43h-42zM341 384h43v-43h-43v43zM171 341v43h42v-43h-42zM256 0v43h43v-43h-43zM256 171v42h43v-42h-43zM256 341v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="512" d="M379 299l-214 -214h-80v80l214 214zM442 362l-42 -42l-80 80l42 42q6 6 15 6t15 -6l50 -50q6 -6 6 -15t-6 -15zM0 21h512v-85h-512v85z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 0v43h43v-43h-43zM43 299v-43h-43v43h43zM0 85v43h43v-43h-43zM85 0v43h43v-43h-43zM43 384v-43h-43v43h43zM128 384v-43h-43v43h43zM299 384v-43h-43v43h43zM213 299v-43h-42v43h42zM213 384v-43h-42v43h42zM341 85v43h43v-43h-43zM171 0v43h42v-43h-42zM0 171v42h384 v-42h-384zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM171 85v43h42v-43h-42zM256 0v43h43v-43h-43zM341 0v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 0v43h43v-43h-43zM85 0v43h43v-43h-43zM43 299v-43h-43v43h43zM0 85v43h43v-43h-43zM128 384v-43h-43v43h43zM43 384v-43h-43v43h43zM299 384v-43h-43v43h43zM341 256v43h43v-43h-43zM341 384h43v-43h-43v43zM256 0v43h43v-43h-43zM213 384v-171h171v-42h-171v-171h-42 v171h-171v42h171v171h42zM341 0v43h43v-43h-43zM341 85v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 0v43h42v-43h-42zM171 85v43h42v-43h-42zM171 341v43h42v-43h-42zM171 256v43h42v-43h-42zM171 171v42h42v-42h-42zM85 0v43h43v-43h-43zM85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM0 0v384h43v-384h-43zM341 256v43h43v-43h-43zM256 0v43h43v-43h-43zM341 85v43 h43v-43h-43zM341 384h43v-43h-43v43zM341 171v42h43v-42h-43zM341 0v43h43v-43h-43zM256 171v42h43v-42h-43zM256 341v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M213 299v-43h-42v43h42zM213 213v-42h-42v42h42zM299 213v-42h-43v42h43zM0 384h384v-384h-384v384zM341 43v298h-298v-298h298zM213 128v-43h-42v43h42zM128 213v-42h-43v42h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 0v43h43v-43h-43zM0 341v43h43v-43h-43zM85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM0 0v43h43v-43h-43zM171 0v43h42v-43h-42zM0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM0 256v43h43v-43h-43zM171 85v43h42v-43h-42zM256 171v42h43v-42h-43zM341 384h43v-384 h-43v384zM256 0v43h43v-43h-43zM256 341v43h43v-43h-43zM171 171v42h42v-42h-42zM171 341v43h42v-43h-42zM171 256v43h42v-43h-42z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 0v43h43v-43h-43zM341 0v43h43v-43h-43zM85 0v43h43v-43h-43zM171 0v43h42v-43h-42zM341 85v43h43v-43h-43zM341 171v42h43v-42h-43zM0 384h384v-43h-341v-341h-43v384zM341 256v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 0v43h43v-43h-43zM85 171v42h43v-42h-43zM171 171v42h42v-42h-42zM171 0v43h42v-43h-42zM0 85v43h43v-43h-43zM0 0v43h43v-43h-43zM0 171v42h43v-42h-43zM0 256v43h43v-43h-43zM171 85v43h42v-43h-42zM341 256v43h43v-43h-43zM341 171v42h43v-42h-43zM0 384h384v-43 h-384v43zM341 85v43h43v-43h-43zM256 0v43h43v-43h-43zM171 256v43h42v-43h-42zM341 0v43h43v-43h-43zM256 171v42h43v-42h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 256v43h43v-43h-43zM0 341v43h43v-43h-43zM85 0v43h43v-43h-43zM85 171v42h43v-42h-43zM0 171v42h43v-42h-43zM0 0v43h43v-43h-43zM0 85v43h43v-43h-43zM85 341v43h43v-43h-43zM341 85v43h43v-43h-43zM171 0v384h42v-384h-42zM341 0v43h43v-43h-43zM341 171v42h43v-42 h-43zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM256 341v43h43v-43h-43zM256 0v43h43v-43h-43zM256 171v42h43v-42h-43z" /> -<glyph unicode="" horiz-adv-x="405" d="M299 427v-43h-256v-299h-43v299q0 18 12.5 30.5t30.5 12.5h256zM363 341q17 0 29.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-29.5 -12.5h-235q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h235zM363 0v299h-235v-299h235z" /> -<glyph unicode="" horiz-adv-x="469" d="M341 128v171h-170v42h170q18 0 30.5 -12.5t12.5 -29.5v-171h-43zM128 85h341v-42h-85v-86h-43v86h-213q-18 0 -30.5 12.5t-12.5 29.5v214h-85v42h85v86h43v-342z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 128h214v-43h-214v43zM0 0v43h384v-43h-384zM0 171v42h384v-42h-384zM85 299h214v-43h-214v43zM0 384h384v-43h-384v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM0 85v43h384v-43h-384zM0 171v42h384v-42h-384zM0 256v43h384v-43h-384zM0 384h384v-43h-384v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 128v-43h-256v43h256zM256 299v-43h-256v43h256zM0 171v42h384v-42h-384zM0 0v43h384v-43h-384zM0 384h384v-43h-384v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM128 85v43h256v-43h-256zM0 171v42h384v-42h-384zM128 256v43h256v-43h-256zM0 384h384v-43h-384v43z" /> -<glyph unicode="" horiz-adv-x="229" d="M183 218q21 -10 33.5 -29.5t12.5 -43.5q0 -34 -23 -57.5t-56 -23.5h-150v299h133q36 0 61 -25t25 -61q0 -35 -36 -59zM64 309v-64h64q13 0 22.5 9.5t9.5 23t-9.5 22.5t-22.5 9h-64zM139 117q13 0 22.5 9.5t9.5 23t-9.5 22.5t-22.5 9h-75v-64h75z" /> -<glyph unicode="" horiz-adv-x="384" d="M43 171v42h298v-42h-298zM0 85v43h299v-43h-299zM85 299h299v-43h-299v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M27 341l6 -5l308 -309l-27 -27l-121 121l-33 -78h-64l53 123l-149 148zM85 341h299v-64h-124l-34 -80l-45 44l16 36h-52l-60 60v4z" /> -<glyph unicode="" horiz-adv-x="512" d="M353 257q10 -9 10 -22.5t-10 -22.5l-117 -117q-9 -10 -22.5 -10t-22.5 10l-118 117q-9 9 -9 22.5t9 22.5l110 110l-51 51l31 30zM111 235h205l-103 102zM405 203q43 -47 43 -75q0 -18 -12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5q0 13 10.5 31.5t21.5 30.5zM0 21h512v-85 h-512v85z" /> -<glyph unicode="" horiz-adv-x="338" d="M299 149q0 -14 -3 -28l-184 184q14 19 28.5 37.5t22.5 27.5l8 10q5 -6 13.5 -16.5t30.5 -40t39 -56.5t31 -60.5t14 -57.5zM280 83l58 -59l-27 -27l-56 56q-36 -32 -84 -32q-53 0 -90.5 37.5t-37.5 90.5q0 35 28 88l-71 71l27 28l154 -155z" /> -<glyph unicode="" horiz-adv-x="512" d="M0 21h512v-85h-512v85zM235 384h42l117 -299h-48l-23 64h-134l-24 -64h-48zM205 192h102l-51 135z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 85v43h213v-43h-213zM0 192l85 85v-170zM0 0v43h384v-43h-384zM0 384h384v-43h-384v43zM171 256v43h213v-43h-213zM171 171v42h213v-42h-213z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM0 277l85 -85l-85 -85v170zM171 85v43h213v-43h-213zM0 384h384v-43h-384v43zM171 256v43h213v-43h-213zM171 171v42h213v-42h-213z" /> -<glyph unicode="" horiz-adv-x="256" d="M85 363h171v-64h-60l-72 -171h47v-64h-171v64h60l72 171h-47v64z" /> -<glyph unicode="" horiz-adv-x="437" d="M96 299v-214h53l-74 -74l-75 74h53v214h-53l75 74l74 -74h-53zM181 341h256v-42h-256v42zM181 43v42h256v-42h-256zM181 171v42h256v-42h-256z" /> -<glyph unicode="" horiz-adv-x="395" d="M32 224q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5zM32 352q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5zM32 92q12 0 20 -8t8 -20t-8 -20t-20 -8t-20 8t-8 20t8 20t20 8z M96 43v42h299v-42h-299zM96 171v42h299v-42h-299zM96 341h299v-42h-299v42z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 85v22h64v-86h-64v22h43v10h-22v22h22v10h-43zM21 277v64h-21v22h43v-86h-22zM0 213v22h64v-20l-38 -44h38v-22h-64v20l38 44h-38zM107 341h298v-42h-298v42zM107 43v42h298v-42h-298zM107 171v42h298v-42h-298z" /> -<glyph unicode="" horiz-adv-x="341" d="M85 235q-35 0 -60 25t-25 60t25 60t60 25h171v-42h-43v-235h-42v235h-43v-235h-43v107zM341 64l-85 -85v64h-256v42h256v64z" /> -<glyph unicode="" horiz-adv-x="341" d="M128 235q-35 0 -60 25t-25 60t25 60t60 25h171v-42h-43v-235h-43v235h-42v-235h-43v107zM85 85h256v-42h-256v-64l-85 85l85 85v-64z" /> -<glyph unicode="" horiz-adv-x="405" d="M128 363h277v-64h-106v-256h-64v256h-107v64zM0 192v64h192v-64h-64v-149h-64v149h-64z" /> -<glyph unicode="" horiz-adv-x="469" d="M105 235q-5 4 -7 8q-11 22 -11 47t13 47q8 18 30 36q19 14 49 24q26 8 62 8q40 0 66 -10q25 -6 49 -26q20 -16 30 -40q11 -25 11 -52h-86q0 11 -4 24q-3 13 -13 19q-10 10 -21 13q-17 4 -30 4t-30 -4q-8 -2 -21 -11q-10 -7 -13 -15q-4 -13 -4 -19q0 -22 21 -34 q14 -9 43 -19h-134zM469 192v-43h-91q1 -1 1.5 -2t1 -3t1.5 -3q8 -20 8 -47q0 -24 -10 -49q-8 -18 -30 -36q-21 -18 -47 -24q-26 -8 -62 -8q-15 0 -40 4q-13 2 -39 10q-13 7 -34 20q-14 8 -28 25q-13 17 -19 34q-6 20 -6 45h85q0 -21 6 -34q5 -8 17 -21q10 -10 26 -13 q21 -4 34 -4t30 4q3 2 10 5t9 6q10 6 13 15q4 12 4 19q0 13 -2 19q-3 11 -13 17q-17 12 -25 15q-2 1 -7.5 3t-7.5 3h-254v43h469z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 43v64h86v-64h-86zM43 363h298v-64h-106v-64h-86v64h-106v64zM0 149v43h384v-43h-384z" /> -<glyph unicode="" horiz-adv-x="341" d="M213 85v-42h-213v42h213zM341 256v-43h-341v43h341zM0 128v43h341v-43h-341zM0 341h341v-42h-341v42z" /> -<glyph unicode="" horiz-adv-x="299" d="M149 85q-53 0 -90.5 37.5t-37.5 90.5v171h54v-171q0 -31 21.5 -52.5t52.5 -21.5t53 21.5t22 52.5v171h53v-171q0 -53 -37.5 -90.5t-90.5 -37.5zM0 43h299v-43h-299v43z" /> -<glyph unicode="" horiz-adv-x="341" d="M256 171l-85 -86l-86 86h64v213h43v-213h64zM0 43h341v-43h-341v43z" /> -<glyph unicode="" horiz-adv-x="341" d="M85 43l86 85l85 -85h-64v-86h-43v86h-64zM256 341l-85 -85l-86 85h64v86h43v-86h64zM0 213h341v-42h-341v42z" /> -<glyph unicode="" horiz-adv-x="341" d="M85 213l86 86l85 -86h-64v-213h-43v213h-64zM0 384h341v-43h-341v43z" /> -<glyph unicode="" horiz-adv-x="436" d="M360 222l76 77v-192h-192l78 77q-48 40 -110 40q-56 0 -100.5 -33t-61.5 -84l-50 16q22 68 80.5 111t131.5 43q84 0 148 -55z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5v-43h-43zM0 171v42h43v-42h-43zM85 0v43h43v-43h-43zM0 256v43h43v-43h-43zM213 384v-43h-42v43h42zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM0 85v43h43v-43h-43zM128 384v-43h-43v43h43 zM171 0v43h42v-43h-42zM341 171v42h43v-42h-43zM341 0v43h43q0 -18 -12.5 -30.5t-30.5 -12.5zM341 256v43h43v-43h-43zM341 85v43h43v-43h-43zM256 0v43h43v-43h-43zM256 341v43h43v-43h-43zM85 85v214h214v-214h-214zM128 256v-128h128v128h-128z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 256h42v-128h-341v128h43v-85h256v85z" /> -<glyph unicode="" horiz-adv-x="299" d="M0 85h299v-42h-299v42zM96 175l-19 -47h-45l101 235h32l102 -235h-45l-19 47h-107zM149 320l-40 -107h80z" /> -<glyph unicode="" d="M427 64h-86v-43h43l-64 -64l-64 64h43v43h-171q-18 0 -30.5 12.5t-12.5 30.5v170h-85v43h85v43h-42l64 64l64 -64h-43v-256h299v-43zM171 277v43h128q17 0 29.5 -12.5t12.5 -30.5v-128h-42v128h-128z" /> -<glyph unicode="" horiz-adv-x="437" d="M224 277q73 0 131.5 -43t81.5 -111l-51 -16q-17 51 -61.5 84t-100.5 33q-61 0 -109 -40l77 -77h-192v192l77 -77q64 55 147 55z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 43v42h128v-42h-128zM341 341v-42h-341v42h341zM277 213q36 0 61 -25t25 -60t-25 -60t-61 -25h-42v-43l-64 64l64 64v-43h48q17 0 29.5 12.5t12.5 30.5t-12.5 30.5t-29.5 12.5h-283v42h277z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM235 149v43h-43v-43h43zM235 235v85h-43v-85h43z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-384l-86 85h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h341zM341 149v43h-256v-43h256zM341 213v43h-256v-43h256zM341 277v43h-256v-43h256z" /> -<glyph unicode="" d="M426 363l1 -384l-86 85h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h341q18 0 30 -12.5t12 -29.5z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM85 149h53l147 147q8 7 0 15l-38 38q-7 7 -15 0l-147 -147v-53zM341 149v43h-117l-43 -43h160z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM64 149h299l-96 128l-75 -96l-53 64z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM128 149v43h-43v-43h43zM128 213v43h-43v-43h43zM128 277v43h-43v-43h43zM277 149v43h-106v-43h106zM341 213v43h-170v-43h170zM341 277v43 h-170v-43h170z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM149 213v43h-42v-43h42zM235 213v43h-43v-43h43zM320 213v43h-43v-43h43z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM384 107v256h-341v-299l42 43h299z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM85 256v-43h256v43h-256zM256 149v43h-171v-43h171zM341 277v43h-256v-43h256z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM341 149v43h-256v-43h256zM341 213v43h-256v-43h256zM341 277v43h-256v-43h256z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM341 149v171l-85 -68v68h-171v-171h171v69z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341z" /> -<glyph unicode="" d="M405 320q9 0 15.5 -6.5t6.5 -14.5v-320l-86 85h-234q-9 0 -15.5 6.5t-6.5 14.5v43h278v192h42zM320 192q0 -9 -6.5 -15t-14.5 -6h-214l-85 -86v299q0 9 6.5 15t14.5 6h278q8 0 14.5 -6t6.5 -15v-192z" /> -<glyph unicode="" horiz-adv-x="496" d="M375 299l-135 -136l-30 30l135 136zM466 329l30 -30l-256 -256l-119 119l30 30l89 -89zM0 162l30 30l119 -119l-30 -30z" /> -<glyph unicode="" d="M213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM320 64v43h-213v-43h213zM177 149l143 143l-30 30l-113 -113l-40 41l-30 -30z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 85l192 192l-30 31l-162 -162l-77 76l-30 -30z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM149 85l192 192l-30 31l-162 -162l-76 76l-30 -30z" /> -<glyph unicode="" horiz-adv-x="375" d="M119 102l227 227l29 -30l-256 -256l-119 119l30 30z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5z" /> -<glyph unicode="" d="M213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM277 192q0 -27 -18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5 t19 45.5t45.5 18.5t45 -18.5t18.5 -45.5z" /> -<glyph unicode="" d="M213 299q44 0 75.5 -31.5t31.5 -75.5t-31.5 -75.5t-75.5 -31.5t-75 31.5t-31 75.5t31 75.5t75 31.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M107 213h213v-42h-213v42zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 171v42h-213v-42h213z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM299 171v42h-214v-42h214z" /> -<glyph unicode="" horiz-adv-x="299" d="M299 171h-299v42h299v-42z" /> -<glyph unicode="" horiz-adv-x="512" d="M341 277v-64h64v-42h-64v-64h-42v64h-64v42h64v64h42zM43 192q0 -44 23.5 -80.5t61.5 -54.5v-46q-56 20 -92 69.5t-36 111.5t36 111.5t92 69.5v-46q-38 -18 -61.5 -54.5t-23.5 -80.5zM320 384q79 0 135.5 -56.5t56.5 -135.5t-56.5 -135.5t-135.5 -56.5t-135.5 56.5 t-56.5 135.5t56.5 135.5t135.5 56.5zM320 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -105.5t105.5 -43.5z" /> -<glyph unicode="" d="M235 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 171v42h-85v86h-43v-86h-85v-42h85v-86h43v86h85z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM299 171v42h-86v86h-42v-86h-86v-42h86v-86h42v86h86z" /> -<glyph unicode="" horiz-adv-x="299" d="M299 171h-128v-128h-43v128h-128v42h128v128h43v-128h128v-42z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 341h-298v-298h298v298zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM304 64l-24 103l79 69l-105 9l-41 96l-41 -97l-105 -8l80 -69l-24 -103l90 54z" /> -<glyph unicode="" d="M427 240l-117 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 142l60 -142zM213 109l81 -49l-22 91l71 62l-93 8l-37 86v-198z" /> -<glyph unicode="" d="M427 251l-117 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141zM213 119l81 -48l-22 91l71 62l-93 8l-37 86l-36 -86l-93 -8l70 -62l-21 -91z" /> -<glyph unicode="" d="M213 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141l154 -13l-117 -101l35 -150z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 192l-42 -43l-43 43l43 43zM314 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM213 324v-81l40 41zM253 100l-40 41v-81zM341 235l43 -43l-43 -43l-42 43z" /> -<glyph unicode="" horiz-adv-x="341" d="M192 324v-69l-43 43v107h22l121 -121l-64 -65l-30 30l34 35zM30 363l311 -312l-30 -30l-49 49l-91 -91h-22v162l-98 -98l-30 30l120 119l-141 141zM192 60l40 40l-40 41v-81z" /> -<glyph unicode="" horiz-adv-x="384" d="M240 192l49 49q10 -24 10 -49q0 -26 -10 -50zM353 305q31 -51 31 -111q0 -61 -33 -113l-25 25q21 41 21 86q0 46 -21 86zM271 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM171 324v-81l40 41zM211 100l-40 41v-81z" /> -<glyph unicode="" horiz-adv-x="271" d="M128 -64v43h43v-43h-43zM43 -64v43h42v-43h-42zM213 -64v43h43v-43h-43zM271 326l-92 -91l92 -92l-122 -122h-21v162l-98 -98l-30 30l119 120l-119 119l30 30l98 -98v162h21zM171 366v-80l40 40zM211 143l-40 40v-80z" /> -<glyph unicode="" horiz-adv-x="271" d="M271 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM171 324v-81l40 41zM211 100l-40 41v-81z" /> -<glyph unicode="" d="M149 384h128l39 -43h68q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h67zM213 64q44 0 75.5 31.5t31.5 75.5t-31.5 75t-75.5 31t-75 -31t-31 -75t31 -75.5t75 -31.5zM213 85l-26 59 l-59 27l59 26l26 59l27 -59l59 -26l-59 -27z" /> -<glyph unicode="" d="M158 224l-1 -2l-78 135q58 48 134 48q23 0 47 -5zM417 256h-206l78 135q46 -17 79.5 -52.5t48.5 -82.5zM422 235q5 -22 5 -43q0 -83 -57 -144l-101 176l-6 11h159zM140 192l24 -43h-160q-4 22 -4 43q0 82 56 144zM10 128h206l-78 -135q-46 17 -79.5 52.5t-48.5 82.5z M250 128l20 34l78 -135q-59 -48 -135 -48q-22 0 -46 5z" /> -<glyph unicode="" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h68l38 43h128l39 -43h68zM384 43v256h-171v-22q-44 0 -75 -31t-31 -75.5t31 -75.5t75 -31v-21h171zM320 170.5 q0 -44.5 -31 -75.5t-76 -31v38q29 0 49 20t20 48.5t-20 48.5t-49 20v38q45 0 76 -31t31 -75.5zM145 170.5q0 28.5 20 48.5t48 20v-137q-28 0 -48 20t-20 48.5z" /> -<glyph unicode="" horiz-adv-x="299" d="M107 21v43l64 -64l-64 -64v43h-107v42h107zM192 21h107v-42h-107v42zM149.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM256 448q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213 q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM43 405v-224q0 24 36.5 39t70 15t70 -15t36.5 -39v224h-213z" /> -<glyph unicode="" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-149v45q45 7 75.5 43t30.5 83h-42q0 -36 -25 -61t-60.5 -25t-60.5 25t-25 61h-43q0 -47 30.5 -83t76.5 -43v-45h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h67l39 43h128 l39 -43h68zM256 171v85q0 18 -12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5v-85q0 -18 12.5 -30.5t30 -12.5t30 12.5t12.5 30.5z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67l39 42h128l39 -42h68zM213 299q-44 0 -75 -31.5t-31 -75.5q0 -10 2 -21h44q-4 10 -4 21q0 27 19 45.5t45 18.5h85 q-32 43 -85 43zM213 85q44 0 75.5 31.5t31.5 75.5q0 12 -2 21h-45q4 -10 4 -21q0 -27 -18.5 -45.5t-45.5 -18.5h-85q33 -43 85 -43z" /> -<glyph unicode="" horiz-adv-x="299" d="M107 21v43l64 -64l-64 -64v43h-107v42h107zM192 21h107v-42h-107v42zM256 448q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM149.5 320q17.5 0 30 12.5t12.5 30t-12.5 30 t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" /> -<glyph unicode="" d="M256 341h171v-320h-171q0 -17 -12.5 -29.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 29.5v320q0 18 12.5 30.5t30.5 12.5h21v21q0 9 6.5 15.5t14.5 6.5h86q8 0 14.5 -6.5t6.5 -15.5v-21h21q18 0 30.5 -12.5t12.5 -30.5zM213 64v43h-42v-43h42zM213 256v43h-42v-43h42z M299 64v43h-43v-43h43zM299 256v43h-43v-43h43zM384 64v43h-43v-43h43zM384 256v43h-43v-43h43z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67l39 42h128l39 -42h68zM277 117l75 75l-75 75v-54h-128v54l-74 -75l74 -75v54h128v-54z" /> -<glyph unicode="" d="M145 192q0 68 68.5 68t68.5 -68t-68.5 -68t-68.5 68zM149 405h128l39 -42h68q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67zM213 85q44 0 75.5 31.5t31.5 75.5t-31.5 75.5 t-75.5 31.5t-75 -31.5t-31 -75.5t31 -75.5t75 -31.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171zM192 85v43h-43v-43h43zM192 171v106h-43v-106h43z" /> -<glyph unicode="" horiz-adv-x="400" d="M354 341l1 -249l-242 242l50 50h149q17 0 29.5 -12.5t12.5 -30.5zM27 365l373 -372l-27 -28l-40 41q-10 -6 -21 -6h-213q-18 0 -30.5 12.5t-12.5 30.5v239l-56 56z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171zM171 277v86h-43v-86h43zM235 277v86h-43v-86h43zM299 277v86h-43v-86h43z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 363v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171q17 0 29.5 -12.5t12.5 -29.5zM107 43v42h-43v-42h43zM277 43v42h-42v-42h42zM107 128v85h-43v-85h43zM192 43v85h-43v-85h43zM192 171v42h-43v-42h43zM277 128v85h-42v-85 h42z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 405q17 0 29.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-150l43 -64v-21h-171v21l43 64h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h384zM427 149v214h-384v-214h384z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 405q17 0 29.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-150v-43h43v-42h-171v42h43v43h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h384zM427 107v256h-384v-256h384z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 107h85v-107h-107v65l-85 90l-85 -90v-65h-107v107h85l86 85v68q-19 7 -31 23.5t-12 36.5q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5q0 -20 -12 -36.5t-31 -23.5v-68z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 320h-281l-43 43h324v-43zM41 413l42 -42l372 -373l-27 -27l-50 50h-378v64h43v235q0 15 10 27l-39 39zM85 314v-229h229zM491 277q8 0 14.5 -6t6.5 -15v-213q0 -9 -6.5 -15.5t-14.5 -6.5h-4l-64 64h46v150h-85v-111l-43 43v89q0 9 6.5 15t15.5 6h128z" /> -<glyph unicode="" horiz-adv-x="512" d="M85 320v-235h214v-64h-299v64h43v235q0 18 12.5 30.5t29.5 12.5h384v-43h-384zM491 277q8 0 14.5 -6t6.5 -15v-213q0 -9 -6.5 -15.5t-14.5 -6.5h-128q-9 0 -15.5 6.5t-6.5 15.5v213q0 9 6.5 15t15.5 6h128zM469 85v150h-85v-150h85z" /> -<glyph unicode="" horiz-adv-x="256" d="M43 -43v43h170v-43h-170zM213 426q18 0 30.5 -12t12.5 -30v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5zM213 128v213h-170v-213h170z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 384l85 -85v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h256zM192 43q27 0 45.5 18.5t18.5 45t-18.5 45.5t-45.5 19t-45.5 -19t-18.5 -45.5t18.5 -45t45.5 -18.5zM256 256v85h-213v-85h213z" /> -<glyph unicode="" d="M277 288l-64 -64l-64 64v117h128v-117zM117 256l64 -64l-64 -64h-117v128h117zM149 96l64 64l64 -64v-117h-128v117zM309 256h118v-128h-118l-64 64z" /> -<glyph unicode="" horiz-adv-x="469" d="M234.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM425 213h44v-42h-44q-7 -67 -54.5 -114.5t-114.5 -55.5v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44v42h44q7 67 55 114.5t114 55.5v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5z M235 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-106 -43.5t-44 -105.5t44 -105.5t106 -43.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M425 213h44v-42h-43q-4 -36 -21 -68l-32 32q11 28 11 57q0 62 -43.5 105.5t-105.5 43.5q-30 0 -57 -11l-32 32q32 17 67 21v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5zM43 357l27 27l357 -357l-27 -27l-44 44q-44 -36 -100 -43v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44 v42h44q6 56 42 100zM326 74l-210 209q-31 -40 -31 -91q0 -62 44 -105.5t106 -43.5q50 0 91 31z" /> -<glyph unicode="" horiz-adv-x="469" d="M425 213h44v-42h-44q-7 -67 -54.5 -114.5t-114.5 -55.5v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44v42h44q7 67 55 114.5t114 55.5v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5zM235 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-106 -43.5t-44 -105.5 t44 -105.5t106 -43.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 427q80 0 136 -56.5t56 -135.5v-214q0 -26 -18.5 -45t-45.5 -19h-128v43h149v21h-85v171h85v43q0 62 -43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5v-43h85v-171h-64q-27 0 -45.5 19t-18.5 45v150q0 79 56 135.5t136 56.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 427q80 0 136 -56.5t56 -135.5v-150q0 -26 -18.5 -45t-45.5 -19h-64v171h85v43q0 62 -43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5v-43h85v-171h-64q-27 0 -45.5 19t-18.5 45v150q0 79 56 135.5t136 56.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 341q62 0 105.5 -43.5t43.5 -105.5h-43q0 44 -31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5h-43q0 62 44 105.5t106 43.5zM256 143v-70l73 -73l-30 -30l-64 64l-64 -64l-30 30l72 73v70q-14 6 -23 19.5t-9 29.5q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5 q0 -35 -32 -49zM235 427q97 0 165.5 -69t68.5 -166h-42q0 80 -56.5 136t-136 56t-135.5 -56t-56 -136h-43q0 97 69 166t166 69z" /> -<glyph unicode="" horiz-adv-x="469" d="M85 405v-85h43v-128h-128v128h43v85q0 9 6 15.5t15 6.5t15 -6.5t6 -15.5zM171 107v42h128v-42q0 -21 -12 -37.5t-31 -22.5v-90h-43v90q-19 6 -30.5 22.5t-11.5 37.5zM0 107v42h128v-42q0 -21 -12 -37.5t-31 -22.5v-90h-42v90q-19 6 -31 22.5t-12 37.5zM427 320h42v-128 h-128v128h43v85q0 9 6.5 15.5t15 6.5t15 -6.5t6.5 -15.5v-85zM256 405v-85h43v-128h-128v128h42v85q0 9 6.5 15.5t15 6.5t15 -6.5t6.5 -15.5zM341 107v42h128v-42q0 -21 -11.5 -37.5t-30.5 -22.5v-90h-43v90q-19 6 -31 22.5t-12 37.5z" /> -<glyph unicode="" horiz-adv-x="299" d="M277 299h22v-128l-64 -128v-64h-171v64l-64 128v128h21v64q0 17 12.5 29.5t30.5 12.5h171q17 0 29.5 -12.5t12.5 -29.5v-64zM64 363v-64h43v42h21v-42h43v42h21v-42h43v64h-171z" /> -<glyph unicode="" horiz-adv-x="256" d="M214 299q15 0 28.5 -13.5t13.5 -29.5v-117l-75 -75v-64h-106v64l-75 75v117q0 16 13.5 29.5t28.5 13.5h1v85h42v-85h86v85h42z" /> -<glyph unicode="" horiz-adv-x="469" d="M149 202.5q0 -13.5 -9 -22.5t-22.5 -9t-23 9t-9.5 22.5t9.5 23t23 9.5t22.5 -9.5t9 -23zM299 309.5q0 -13.5 -9.5 -23t-22.5 -9.5h-64q-14 0 -23 9.5t-9 23t9 22.5t23 9h64q13 0 22.5 -9t9.5 -22.5zM160 128q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5 t-9.5 22.5t9.5 22.5t22.5 9.5zM235 427q97 0 165.5 -69t68.5 -166t-68.5 -166t-165.5 -69t-166 69t-69 166t69 166t166 69zM234.5 0q79.5 0 136 56.5t56.5 135.5t-56.5 135.5t-136 56.5t-135.5 -56.5t-56 -135.5t56 -135.5t135.5 -56.5zM352 235q13 0 22.5 -9.5t9.5 -23 t-9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5zM309.5 128q13.5 0 22.5 -9.5t9 -22.5t-9 -22.5t-22.5 -9.5t-23 9.5t-9.5 22.5t9.5 22.5t23 9.5z" /> -<glyph unicode="" d="M384 384q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 12.5 30.5t30.5 12.5h341zM192 320v-43h43v43h-43zM192 256v-43h43v43h-43zM128 320v-43h43v43h-43zM128 256v-43h43v43h-43zM107 213v43h-43v-43h43 zM107 277v43h-43v-43h43zM299 128v43h-171v-43h171zM299 213v43h-43v-43h43zM299 277v43h-43v-43h43zM363 213v43h-43v-43h43zM363 277v43h-43v-43h43zM213 -43l-85 86h171z" /> -<glyph unicode="" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h341zM192 277v-42h43v42h-43zM192 213v-42h43v42h-43zM128 277v-42h43v42h-43zM128 213v-42h43v42h-43zM107 171v42h-43v-42h43 zM107 235v42h-43v-42h43zM299 85v43h-171v-43h171zM299 171v42h-43v-42h43zM299 235v42h-43v-42h43zM363 171v42h-43v-42h43zM363 235v42h-43v-42h43z" /> -<glyph unicode="" horiz-adv-x="512" d="M469 64h43v-43h-512v43h43v320h426v-320zM299 64v21h-86v-21h86zM427 128v213h-342v-213h342z" /> -<glyph unicode="" horiz-adv-x="512" d="M427 64h85q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5h85q-17 0 -29.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t29.5 12.5h342q17 0 29.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-29.5 -12.5zM85 341v-234h342v234h-342zM256 43q9 0 15 6t6 15 t-6 15t-15 6t-15 -6t-6 -15t6 -15t15 -6z" /> -<glyph unicode="" horiz-adv-x="512" d="M427 64h85v-43h-512v43h85q-17 0 -29.5 12.5t-12.5 30.5v213q0 18 12.5 30.5t29.5 12.5h342q17 0 29.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-29.5 -12.5zM85 320v-213h342v213h-342z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 213q0 -36 -19 -70l-26 27q9 21 9 43h36zM256 210l-128 127v4q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5v-128v-1.5v-1.5zM27 384l357 -357l-27 -27l-89 89q-26 -15 -55 -19v-70h-42v70q-54 8 -91 49t-37 94h36q0 -46 33.5 -77t79.5 -31q25 0 49 11l-35 35 q-7 -2 -14 -2q-27 0 -45.5 19t-18.5 45v16l-128 128z" /> -<glyph unicode="" horiz-adv-x="299" d="M149.5 139q-26.5 0 -45.5 18.5t-19 45.5v128q0 26 19 45t45.5 19t45 -19t18.5 -45v-128q0 -27 -18.5 -45.5t-45 -18.5zM124 333v-132q0 -11 7.5 -18.5t18 -7.5t18 7.5t7.5 18.5v132q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5zM262 203h37q0 -54 -37.5 -95t-90.5 -49 v-70h-43v70q-53 8 -90.5 49t-37.5 95h36q0 -47 34 -78t79.5 -31t79 31t33.5 78z" /> -<glyph unicode="" horiz-adv-x="299" d="M43 -64v43h42v-43h-42zM149.5 171q-26.5 0 -45.5 18.5t-19 45.5v128q0 26 19 45t45.5 19t45 -19t18.5 -45v-128q0 -27 -18.5 -45.5t-45 -18.5zM128 -64v43h43v-43h-43zM213 -64v43h43v-43h-43zM299 235q0 -54 -37.5 -95t-90.5 -49v-70h-43v70q-53 8 -90.5 49t-37.5 95h36 q0 -47 34 -78t79.5 -31t79 31t33.5 78h37z" /> -<glyph unicode="" horiz-adv-x="299" d="M149.5 149q-26.5 0 -45.5 19t-19 45v128q0 27 19 45.5t45.5 18.5t45 -18.5t18.5 -45.5v-128q0 -26 -18.5 -45t-45 -19zM262 213h37q0 -54 -37.5 -94.5t-90.5 -48.5v-70h-43v70q-53 8 -90.5 49t-37.5 94h36q0 -46 34 -77t79.5 -31t79 31t33.5 77z" /> -<glyph unicode="" horiz-adv-x="341" d="M192 425q64 -8 106.5 -56t42.5 -113h-149v169zM0 128v85h341v-85q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 121zM149 425v-169h-149q0 65 43 113t106 56z" /> -<glyph unicode="" d="M384 64v171h43v-171h-43zM384 -21v42h43v-42h-43zM0 -21l427 426v-128h-86v-298h-341z" /> -<glyph unicode="" horiz-adv-x="469" d="M395 235q-40 0 -68 -28.5t-28 -67.5v-6q-22 -19 -22 -48v-64h-277l405 406v-193q-9 1 -10 1zM448 107q9 0 15 -6.5t6 -15.5v-85q0 -9 -6 -15t-15 -6h-107q-8 0 -14.5 6t-6.5 15v85q0 9 6.5 15.5t14.5 6.5v32q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5v-32zM427 107v32 q0 13 -9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5v-32h64z" /> -<glyph unicode="" horiz-adv-x="448" d="M427 427v-367l-184 183zM80 352l368 -368l-27 -27l-43 43h-378l189 189l-136 136z" /> -<glyph unicode="" d="M384 302l-281 -281h281v281zM427 405v-426h-427z" /> -<glyph unicode="" horiz-adv-x="509" d="M405 203q-66 0 -113 -47t-47 -113q0 -9 2 -22h-247l427 427l-1 -247q-12 2 -21 2zM484 32l23 -17q3 -3 1 -7l-21 -37q-2 -4 -7 -3l-26 11q-8 -6 -18 -10l-4 -29q-1 -4 -6 -4h-42q-5 0 -6 4l-4 29q-9 3 -18 10l-26 -11q-5 -1 -7 3l-21 37q-2 4 1 7l23 17q-1 5 -1 10.5 t1 10.5l-23 18q-3 3 -1 7l21 37q3 3 7 2l26 -11q8 6 18 11l4 28q1 4 6 4h42q5 0 6 -4l4 -28q9 -4 18 -11l26 11q5 1 7 -2l21 -37q2 -4 -1 -7l-23 -18q1 -4 1 -10q0 -4 -1 -11zM405 11q13 0 22.5 9t9.5 22.5t-9.5 23t-22.5 9.5t-22.5 -9.5t-9.5 -23t9.5 -22.5t22.5 -9z" /> -<glyph unicode="" d="M0 -21l427 426v-426h-427z" /> -<glyph unicode="" horiz-adv-x="384" d="M250 245l-15 15l59 60l-59 60l15 15l49 -49v81h10l61 -61l-46 -46l46 -46l-61 -61h-10v81zM320 386v-40l20 20zM320 294v-40l20 20zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75 q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z" /> -<glyph unicode="" horiz-adv-x="512" d="M256 256q-51 0 -98 -15v-66q0 -14 -12 -20q-31 -15 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15q105 100 250 100t250 -100q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-25 23 -57 39q-12 6 -12 19v66q-47 16 -98 16z" /> -<glyph unicode="" d="M320 213v64h-85v86h85v64l107 -107zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5 q36 -12 76 -12z" /> -<glyph unicode="" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM341 192q0 62 -43.5 105.5 t-105.5 43.5v43q80 0 136 -56t56 -136h-43zM256 192q0 27 -18.5 45.5t-45.5 18.5v43q44 0 75.5 -31.5t31.5 -75.5h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM363 363q8 0 14.5 -6.5 t6.5 -15.5v-85q0 -9 -6.5 -15t-14.5 -6h-107q-9 0 -15 6t-6 15v85q0 9 6 15.5t15 6.5v10q0 22 15.5 38t37.5 16t38 -16t16 -38v-10zM346 363v10q0 15 -11 26t-26 11t-25.5 -11t-10.5 -26v-10h73z" /> -<glyph unicode="" horiz-adv-x="512" d="M139 331v-75h-32v128h128v-32h-75l96 -96l128 128l21 -21l-149 -150zM506 92q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-27 24 -57 40q-12 5 -12 19v66q-47 15 -98 15t-98 -15v-66q0 -14 -12 -20q-32 -16 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15 q105 100 250 100t250 -100z" /> -<glyph unicode="" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM192 384h192v-149h-128 l-64 -64v213z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 384v-149h-43v149h43zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z M341 384h43v-149h-43v149z" /> -<glyph unicode="" horiz-adv-x="512" d="M506 92q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-26 24 -57 40q-12 5 -12 19v66q-47 15 -98 15t-98 -15v-66q0 -14 -12 -20q-32 -16 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15q105 100 250 100t250 -100zM451 314l-76 -75l-30 30l76 76zM277 405v-106 h-42v106h42zM137 239q-74 75 -76 75l30 31l76 -76z" /> -<glyph unicode="" horiz-adv-x="384" d="M213 256v-43h-42v43h42zM299 256v-43h-43v43h43zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47 q9 9 22 5q36 -12 76 -12zM341 256h43v-43h-43v43z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 384v-107h-22v107h22zM256 341v-64h-64v22h43v21h-43v64h64v-21h-43v-22h43zM320 384h64v-64h-43v-43h-21v107zM363 341v22h-22v-22h22zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5 h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q48 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z" /> -<glyph unicode="" horiz-adv-x="384" d="M77 218q47 -93 141 -141l47 47q9 10 22 5q36 -12 76 -12q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22z" /> -<glyph unicode="" d="M364 343q63 -63 63 -151t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t150.5 62.5h22v-176q21 -12 21 -37q0 -18 -12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5q0 24 21 37v45q-28 -7 -46 -30t-18 -52q0 -35 25 -60t60.5 -25t60.5 25t25 60t-25 60l30 30 q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 47 30.5 82.5t76.5 43.5v43q-64 -8 -106.5 -56t-42.5 -113q0 -71 50 -121t120.5 -50t120.5 50t50 121q0 70 -50 121z" /> -<glyph unicode="" d="M332 144l-34 35q1 7 1 13q0 35 -25 60t-61 25q-4 0 -13 -1l-34 35q23 9 47 9q53 0 90.5 -37.5t37.5 -90.5q0 -25 -9 -48zM213 363q-42 0 -80 -20l-31 31q52 31 111 31q89 0 151.5 -62.5t62.5 -150.5q0 -60 -32 -111l-31 31q20 38 20 80q0 71 -50 121t-121 50zM27 395 l21 -22l357 -357l-27 -27l-160 161l-5 -1q-17 0 -29.5 12.5t-12.5 30.5v4l-34 34q-9 -19 -9 -38q0 -49 43 -74l-22 -37q-29 17 -46.5 46.5t-17.5 64.5q0 38 21 69l-31 31q-32 -44 -32 -100q0 -47 23 -86t62 -62l-22 -37q-48 29 -77 78t-29 107q0 73 45 131l-45 45z" /> -<glyph unicode="" d="M213.5 213q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM341 171q0 -35 -17 -64.5t-47 -46.5l-21 37q43 25 43 74q0 35 -25 60t-60.5 25t-60.5 -25t-25 -60q0 -49 43 -74l-22 -37q-29 17 -46.5 46.5t-17.5 64.5q0 53 37.5 90.5 t90.5 37.5t90.5 -37.5t37.5 -90.5zM213.5 384q88.5 0 151 -62.5t62.5 -150.5q0 -59 -29 -108t-78 -77l-21 37q39 23 62 62t23 86q0 70 -50 120t-120.5 50t-120.5 -50t-50 -120q0 -47 23 -86t62 -62l-22 -37q-48 28 -77 77t-29 108q0 88 62.5 150.5t151 62.5z" /> -<glyph unicode="" d="M26 317l270 110l15 -36l-177 -71h250q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v256q0 14 7.5 24.5t18.5 15.5zM106.5 21q26.5 0 45.5 19t19 45.5t-19 45t-45.5 18.5t-45 -18.5t-18.5 -45t18.5 -45.5t45 -19z M384 192v85h-341v-85h256v43h42v-43h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M256 192h149v-32h-149v32zM256 213h149h-149zM256 107h149h-149zM427 363q17 0 29.5 -12.5t12.5 -30.5v-277q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v277q0 18 12.5 30.5t30.5 12.5h384zM427 43v277h-192v-277h192z" /> -<glyph unicode="" horiz-adv-x="331" d="M59 297q44 44 106.5 44t106.5 -44l-31 -30q-31 31 -75.5 31t-76.5 -31zM165.5 427q96.5 0 165.5 -69l-30 -30q-56 56 -135.5 56t-135.5 -56l-30 30q69 69 165.5 69zM226 234q10 0 17.5 -7t6.5 -17v-207q0 -10 -7 -17t-17 -7h-122q-10 0 -17 7t-7 17v207q0 10 7 17.5 t17 7.5zM229 21v171h-128v-171h128z" /> -<glyph unicode="" horiz-adv-x="332" d="M230 256q9 0 15 -6.5t6 -14.5v-256q0 -9 -6 -15.5t-15 -6.5h-128q-9 0 -15 6.5t-6 15.5v256q0 8 6 14.5t15 6.5h128zM166 128q18 0 30.5 12.5t12.5 30t-12.5 30t-30.5 12.5t-30.5 -12.5t-12.5 -30t12.5 -30t30.5 -12.5zM60 319q44 44 106 44t106 -44l-31 -30 q-31 31 -75 31t-76 -31zM166 448q98 0 166 -69l-30 -30q-56 56 -136 56q-79 0 -136 -56l-30 30q69 69 166 69z" /> -<glyph unicode="" horiz-adv-x="384" d="M367 322q-40 36 -90 36t-89 -36l-17 17q44 45 106 45t107 -45zM348 305l-17 -17q-22 21 -54 21t-53 -21l-17 17q30 30 70.5 30t70.5 -30zM341 171q18 0 30.5 -12.5t12.5 -30.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85q0 18 12.5 30.5 t30.5 12.5h213v85h43v-85h42zM107 64v43h-43v-43h43zM181 64v43h-42v-43h42zM256 64v43h-43v-43h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M358 220q11 -3 18.5 -14.5t7.5 -24.5v-117q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85q0 18 12.5 30.5t30.5 12.5h268l-300 109l15 40zM85 85v43h-42v-43h42zM341 85v43h-213v-43h213z" /> -<glyph unicode="" horiz-adv-x="299" d="M235 427q26 0 45 -19t19 -45v-342q0 -26 -19 -45t-45 -19h-171q-27 0 -45.5 19t-18.5 45v342q0 26 18.5 45t45.5 19h171zM192 0v21h-85v-21h85zM261 64v299h-224v-299h224z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213zM235 171l-86 -86l-85 86h64v106h43v-106h64z" /> -<glyph unicode="" horiz-adv-x="384" d="M213 273l-85 -85l85 -86l-21 -21l-85 85l-86 -85l-21 21l85 86l-85 85l21 21l86 -85l85 85zM341 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5 h213z" /> -<glyph unicode="" horiz-adv-x="299" d="M171 299v-43h-43v43h43zM171 213v-128h-43v128h43zM256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213z" /> -<glyph unicode="" horiz-adv-x="277" d="M224 427q22 0 37.5 -16t15.5 -38v-362q0 -22 -15.5 -38t-37.5 -16h-171q-22 0 -37.5 16t-15.5 38v362q0 22 15.5 38t37.5 16h171zM138.5 -21q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM235 64v299h-192v-299h192z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 341q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h384zM384 85v214h-299v-214h299zM192 107q-9 0 -15 6t-6 15v64q0 9 6 15t15 6v22q0 17 12.5 29.5t30 12.5t30 -12.5t12.5 -29.5 v-22q9 0 15.5 -6t6.5 -15v-64q0 -9 -6.5 -15t-15.5 -6h-85zM209 235v-22h51v22q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 299q0 17 12.5 29.5t30.5 12.5h384q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v214zM384 299h-299v-214h299v214z" /> -<glyph unicode="" horiz-adv-x="363" d="M320 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5h213zM145 213q10 0 18 -8t8 -19v-75q0 -10 -8.5 -18t-19.5 -8h-117q-10 0 -18 8.5t-8 19.5v75 q0 9 8 17t18 8v32q0 22 18 38t41 16t41.5 -16t18.5 -38v-32zM117 213v32q0 13 -9 20.5t-22.5 7.5t-23 -7.5t-9.5 -20.5v-32h64z" /> -<glyph unicode="" horiz-adv-x="299" d="M107 107q-9 0 -15.5 6t-6.5 15v64q0 9 6.5 15t15.5 6v22q0 17 12.5 29.5t30 12.5t30 -12.5t12.5 -29.5v-22q9 0 15 -6t6 -15v-64q0 -9 -6 -15t-15 -6h-85zM124 235v-22h51v22q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5zM256 427q18 0 30.5 -12.5t12.5 -30.5v-384 q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5h213zM256 43v298h-213v-298h213z" /> -<glyph unicode="" horiz-adv-x="426" d="M386 284q40 -39 40 -92t-40 -90l-21 22q29 30 29 70t-29 68zM341 239q20 -21 20 -47t-20 -45l-21 22q18 24 0 49zM256 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5h213zM256 21 v342h-213v-342h213z" /> -<glyph unicode="" horiz-adv-x="256" d="M21 -64v43h43v-43h-43zM107 -64v43h42v-43h-42zM192 -64v43h43v-43h-43zM213 448q18 0 30.5 -12.5t12.5 -30.5v-341q0 -18 -12.5 -30.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 30.5v341q0 18 12.5 30.5t30.5 12.5h170zM213 107v256h-170v-256h170z" /> -<glyph unicode="" horiz-adv-x="385" d="M189 181l23 -19q4 -4 2 -6l-21 -37q-2 -2 -7 -2l-27 11q-13 -9 -19 -11l-5 -27q-4 -5 -6 -5h-43q-2 0 -3.5 1.5t-0.5 3.5l-4 27q-7 2 -20 11l-29 -9q-3 -2 -7 3l-21 36q0 4 2 8l23 17v22l-23 17q-4 4 -2 6l21 37q2 2 7 2l27 -11q13 9 20 11l4 27q4 5 6 5h43q6 0 6 -5 l5 -27q6 -2 19 -11l27 9q3 2 7 -3l21 -36q0 -4 -2 -6l-23 -17v-22zM107.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM342 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5 t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5h213z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h213zM149.5 363q-17.5 0 -30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5t30 12.5t12.5 30.5t-12.5 30.5t-30 12.5zM149 21 q44 0 75.5 31.5t31.5 75.5t-31.5 75.5t-75.5 31.5t-75 -31.5t-31 -75.5t31 -75.5t75 -31.5zM149.5 192q26.5 0 45 -18.5t18.5 -45.5t-18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5t19 45.5t45.5 18.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M320 448q27 0 45.5 -18.5t18.5 -45.5v-384q0 -27 -18.5 -45.5t-45.5 -18.5h-256q-27 0 -45.5 18.5t-18.5 45.5v384q0 27 18.5 45.5t45.5 18.5h256zM235 -21v21h-86v-21h86zM347 43v341h-310v-341h310z" /> -<glyph unicode="" horiz-adv-x="405" d="M352 448q22 0 37.5 -15.5t15.5 -37.5v-406q0 -22 -15.5 -37.5t-37.5 -15.5h-299q-22 0 -37.5 15.5t-15.5 37.5v406q0 22 15.5 37.5t37.5 15.5h299zM202.5 -43q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM363 43v341h-320v-341h320z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 363q17 0 29.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h384zM384 64v256h-299v-256h299z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 320q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h162l-71 70l15 15l86 -85l85 85l15 -15l-70 -70h162zM427 21v256h-384v-256h384zM171 235l149 -86l-149 -85v171z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384zM384 277v-42h-235v42h235zM384 192v-43h-235v43h235zM128 277v-42h-43v42 h43zM128 192v-43h-43v43h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384zM320 213l-149 -85v171z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384z" /> -<glyph unicode="" horiz-adv-x="303" d="M218 299h85v-86h-21v-42q0 -18 -12.5 -30.5t-30.5 -12.5h-64v-65q26 -13 26 -42q0 -19 -14 -33t-33.5 -14t-33 14t-13.5 33q0 29 25 42v65h-64q-17 0 -29.5 12.5t-12.5 30.5v44q-26 13 -26 41q0 19 14 33t33 14t33 -14t14 -33q0 -28 -26 -41v-44h64v170h-42l64 86l64 -86 h-43v-170h64v42h-21v86z" /> -<glyph unicode="" horiz-adv-x="405" d="M405 309v-228l-238 239h132q8 0 14.5 -6.5t6.5 -14.5v-75zM27 405l378 -378l-27 -27l-68 68q-6 -4 -11 -4h-256q-9 0 -15.5 6.5t-6.5 14.5v214q0 8 6.5 14.5t15.5 6.5h15l-58 58z" /> -<glyph unicode="" d="M341 245l86 86v-278l-86 86v-75q0 -9 -6 -15t-15 -6h-299q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h299q9 0 15 -6t6 -15v-75zM235 117l74 75l-74 75v-54h-128v54l-75 -75l75 -75v54h128v-54z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 224l85 85v-234l-85 85v-75q0 -8 -6.5 -14.5t-15.5 -6.5h-256q-8 0 -14.5 6.5t-6.5 14.5v214q0 8 6.5 14.5t14.5 6.5h256q9 0 15.5 -6.5t6.5 -14.5v-75z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 192q0 -40 -17 -75t-48 -59l-20 -122h-171l-20 122q-65 51 -65 134t65 134l20 122h171l20 -122q31 -24 48 -59t17 -75zM43 192q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" /> -<glyph unicode="" horiz-adv-x="497" d="M249 350q-107 1 -190 -55l43 -53q49 29 107 38q108 15 187 -38l42 53q-83 56 -189 55zM248.5 389q138.5 0 248.5 -85l-248 -309l-249 309q110 85 248.5 85z" /> -<glyph unicode="" horiz-adv-x="469" d="M0 256q64 64 149.5 86.5t171 0t148.5 -86.5l-42 -43q-80 80 -192.5 80t-191.5 -80zM171 85q26 27 63.5 27t64.5 -27l-64 -64zM85 171q62 61 149.5 61t149.5 -61l-43 -43q-44 44 -106.5 44t-106.5 -44z" /> -<glyph unicode="" horiz-adv-x="512" d="M256 384q136 0 256 -91l-256 -314l-256 315q119 90 256 90zM277 107v128h-42v-128h42zM235 277h42v43h-42v-43z" /> -<glyph unicode="" horiz-adv-x="503" d="M482 107q8 0 14.5 -7t6.5 -15v-85q0 -8 -6.5 -14.5t-14.5 -6.5h-107q-8 0 -14.5 6.5t-6.5 14.5v85q0 8 6.5 15t14.5 7v32q0 22 15.5 37.5t38 15.5t38 -15.5t15.5 -37.5v-32zM461 107v32q0 12 -9.5 22t-22.5 10t-22.5 -10t-9.5 -22v-32h64zM322 139v-56l-75 -94l-247 310 q114 85 247.5 85t247.5 -85l-45 -56q-6 2 -21 2q-45 0 -76 -31t-31 -75z" /> -<glyph unicode="" horiz-adv-x="497" d="M497 299l-117 -145l-220 220q44 10 88 10q136 0 249 -85zM356 123l74 -74l-27 -27l-71 71l-83 -103l-1 -1v1l-248 309q35 27 79 47l-44 44l27 27z" /> -<glyph unicode="" horiz-adv-x="497" d="M249 350q-105 0 -190 -55l190 -237l189 237q-84 55 -189 55zM248.5 389q49.5 0 96 -11t80.5 -29.5t47 -27t25 -17.5l-248 -309v0l-249 309q12 9 25 17.5t47.5 27t80.5 29.5t95.5 11z" /> -<glyph unicode="" horiz-adv-x="497" d="M249 -10l-1 -1v1l-248 309q113 85 248.5 85t248.5 -85zM68 214q82 63 180.5 63t180.5 -63l-180 -224l-1 -1v1z" /> -<glyph unicode="" horiz-adv-x="320" d="M320 333l-247 -248h140v-42h-213v213h43v-141l247 248z" /> -<glyph unicode="" horiz-adv-x="341" d="M341 213v-42h-259l119 -120l-30 -30l-171 171l171 171l30 -30l-119 -120h259z" /> -<glyph unicode="" horiz-adv-x="273" d="M243 13l-72 72l30 30l72 -72zM41 277l96 96l96 -96h-75v-136l-128 -128l-30 30l115 115v119h-74z" /> -<glyph unicode="" horiz-adv-x="384" d="M354 299l30 -30l-192 -192l-149 149v-98h-43v171h171v-43h-98l119 -119z" /> -<glyph unicode="" horiz-adv-x="320" d="M107 341h213v-213h-43v141l-247 -248l-30 30l247 248h-140v42z" /> -<glyph unicode="" horiz-adv-x="341" d="M171 363l170 -171l-170 -171l-30 30l119 120h-260v42h260l-119 120z" /> -<glyph unicode="" horiz-adv-x="341" d="M213 363h128v-128l-49 49l-61 -62l-30 30l61 62zM128 363l-49 -49l113 -113v-180h-43v162l-100 101l-49 -49v128h128z" /> -<glyph unicode="" horiz-adv-x="469" d="M192 256v64h-64l107 107l106 -107h-64v-64h-85zM171 235v-86h-64v-64l-107 107l107 107v-64h64zM469 192l-106 -107v64h-64v86h64v64zM277 128v-64h64l-106 -107l-107 107h64v64h85z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM107 235l106 -107l107 107h-213z" /> -<glyph unicode="" horiz-adv-x="213" d="M0 245h213l-106 -106z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM256 299l-107 -107l107 -107v214z" /> -<glyph unicode="" horiz-adv-x="107" d="M107 299v-214l-107 107z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 299v-214l106 107z" /> -<glyph unicode="" horiz-adv-x="107" d="M0 85v214l107 -107z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 260l-106 -106h213z" /> -<glyph unicode="" horiz-adv-x="213" d="M213 139h-213l107 106z" /> -<glyph unicode="" horiz-adv-x="256" d="M226 265l30 -30l-128 -128l-128 128l30 30l98 -98z" /> -<glyph unicode="" horiz-adv-x="158" d="M158 290l-98 -98l98 -98l-30 -30l-128 128l128 128z" /> -<glyph unicode="" horiz-adv-x="158" d="M30 320l128 -128l-128 -128l-30 30l98 98l-98 98z" /> -<glyph unicode="" horiz-adv-x="256" d="M128 277l128 -128l-30 -30l-98 98l-98 -98l-30 30z" /> -<glyph unicode="" horiz-adv-x="341" d="M171 277v86l170 -171l-170 -171v86h-171v170h171z" /> -<glyph unicode="" horiz-adv-x="256" d="M149 384v-302l77 76l30 -30l-128 -128l-128 128l30 30l77 -76v302h42z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 213v-42h-302l76 -77l-30 -30l-128 128l128 128l30 -30l-76 -77h302z" /> -<glyph unicode="" horiz-adv-x="405" d="M363 299h42v-128h-323l76 -77l-30 -30l-128 128l128 128l30 -30l-76 -77h281v86z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 213h302l-76 77l30 30l128 -128l-128 -128l-30 30l76 77h-302v42z" /> -<glyph unicode="" horiz-adv-x="448" d="M226 290l30 30l128 -128l-128 -128l-30 30l76 77h-302v42h302zM405 320h43v-256h-43v256z" /> -<glyph unicode="" horiz-adv-x="256" d="M107 0v302l-77 -76l-30 30l128 128l128 -128l-30 -30l-77 76v-302h-42z" /> -<glyph unicode="" horiz-adv-x="451" d="M138 298l139 -138l-139 -139l-138 139zM60 160l78 -78l78 78l-78 78zM394 293q57 -56 57 -135.5t-57 -135.5q-56 -56 -135 -56q-49 0 -93 24l32 31q29 -13 61 -13q62 0 105.5 44t43.5 105.5t-43.5 105.5t-105.5 44v-69l-91 90l91 90v-69q79 0 135 -56z" /> -<glyph unicode="" horiz-adv-x="451" d="M312 298l139 -138l-139 -139l-138 139zM390 160l-78 78l-78 -78l78 -78zM56 293q56 56 136 56v69l90 -90l-90 -90v69q-62 0 -105.5 -44t-43.5 -105.5t43.5 -105.5t105.5 -44q31 0 60 13l32 -31q-43 -24 -92 -24q-80 0 -136 56t-56 135.5t56 135.5z" /> -<glyph unicode="" horiz-adv-x="340" d="M65 266q-17 -24 -22 -53h-43q6 46 35 83zM43 171q5 -28 22 -53l-30 -30q-29 37 -35 83h43zM65 57l30 31q24 -17 53 -22v-43q-46 5 -83 34zM191 361q63 -8 106 -56t43 -113t-43 -113t-106 -56v43q45 8 75.5 43.5t30.5 82.5t-30.5 82.5t-75.5 43.5v-83l-98 95l98 97v-66z " /> -<glyph unicode="" horiz-adv-x="340" d="M246 330l-97 -95v83q-45 -8 -75.5 -43.5t-30.5 -82.5t30.5 -82.5t75.5 -43.5v-43q-63 8 -106 56t-43 113t43 113t106 56v66zM340 213h-43q-5 29 -22 53l30 30q29 -37 35 -83zM192 66q28 5 52 22l31 -31q-37 -28 -83 -34v43zM275 118q17 24 22 53h43q-6 -46 -35 -83z" /> -<glyph unicode="" horiz-adv-x="469" d="M235 96l-86 85h64v192h43v-192h64zM427 373q17 0 29.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h128v-42h-128v-299h384v299h-128v42h128z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v86h43v-86h384v300h-384v-86h-43v85q0 18 12.5 30.5t30.5 12.5h384zM213 107v64h-213v42h213v64l86 -85z" /> -<glyph unicode="" d="M341 363l86 -86h-64v-149q0 -35 -25 -60t-60.5 -25t-60.5 25t-25 60v149q0 18 -12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5v-149h64l-86 -85l-85 85h64v149q0 36 25 61t60.5 25t60.5 -25t25 -61v-149q0 -18 12.5 -30.5t30 -12.5t30 12.5t12.5 30.5v149h-64z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM96 256h53v-85h43v85h53l-74 75zM331 128h-54v85h-42v-85h-54l75 -75z" /> -<glyph unicode="" horiz-adv-x="299" d="M235 85h64l-86 -85l-85 85h64v150h43v-150zM85 384l86 -85h-64v-150h-43v150h-64z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 213v-64h150v-42h-150v-64l-85 85zM384 256l-85 -85v64h-150v42h150v64z" /> -<glyph unicode="" d="M299 64l49 49l-105 104l-85 -85l-158 158l30 30l128 -128l85 85l135 -134l49 49v-128h-128z" /> -<glyph unicode="" horiz-adv-x="405" d="M405 192l-85 -85v64h-320v42h320v64z" /> -<glyph unicode="" d="M299 320h128v-128l-49 49l-135 -134l-85 85l-128 -128l-30 30l158 158l85 -85l105 104z" /> -<glyph unicode="" horiz-adv-x="196" d="M0 51l98 98l98 -98l-30 -30l-68 68l-68 -68zM196 333l-98 -98l-98 98l30 30l68 -68l68 68z" /> -<glyph unicode="" horiz-adv-x="196" d="M98 324l-68 -68l-30 30l98 98l98 -98l-30 -30zM98 60l68 68l30 -30l-98 -98l-98 98l30 30z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 277v86h85v-86h-85zM128 21v86h85v-86h-85zM0 21v86h85v-86h-85zM0 149v86h85v-86h-85zM128 149v86h85v-86h-85zM256 363h85v-86h-85v86zM128 277v86h85v-86h-85zM256 149v86h85v-86h-85zM256 21v86h85v-86h-85z" /> -<glyph unicode="" horiz-adv-x="485" d="M171 363h-31l-43 42h330q17 0 29.5 -12.5t12.5 -29.5v-330l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31zM341 363v-86h86v86h-86zM27 421l458 -458l-27 -27l-43 43h-330q-17 0 -29.5 12.5t-12.5 29.5v330l-43 43zM213 180v-31h31z M85 308v-31h31zM171 21v86h-86v-86h86zM171 149v74l-12 12h-74v-86h86zM299 21v74l-12 12h-74v-86h86zM341 21h31l-31 31v-31z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM128 21v86h-85v-86h85zM128 149v86h-85v-86h85zM128 277v86h-85v-86h85zM256 21v86h-85v-86h85zM256 149v86h-85v-86h85z M256 277v86h-85v-86h85zM384 21v86h-85v-86h85zM384 149v86h-85v-86h85zM384 277v86h-85v-86h85z" /> -<glyph unicode="" horiz-adv-x="405" d="M384 171q9 0 15 -6.5t6 -15.5v-128q0 -8 -6 -14.5t-15 -6.5h-363q-8 0 -14.5 6.5t-6.5 14.5v128q0 9 6.5 15.5t14.5 6.5h363zM384 384q9 0 15 -6.5t6 -14.5v-128q0 -9 -6 -15.5t-15 -6.5h-363q-8 0 -14.5 6.5t-6.5 15.5v128q0 8 6.5 14.5t14.5 6.5h363z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 64v277h64v-277h-64zM299 341h64v-277h-64v277zM85 64v277h192v-277h-192z" /> -<glyph unicode="" d="M107 43v320h213v-320h-213zM0 85v235h85v-235h-85zM341 320h86v-235h-86v235z" /> -<glyph unicode="" horiz-adv-x="363" d="M128 64v277h107v-277h-107zM0 64v277h107v-277h-107zM256 341h107v-277h-107v277z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 256v85h85v-85h-85zM0 149v86h85v-86h-85zM107 149v86h85v-86h-85zM213 149v86h86v-86h-86zM107 256v85h85v-85h-85zM213 341h86v-85h-86v85zM320 149v86h85v-86h-85zM0 43v85h85v-85h-85zM107 43v85h85v-85h-85zM213 43v85h86v-85h-86zM320 43v85h85v-85h-85zM320 341 h85v-85h-85v85z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 43v149h128v-149h-128zM149 43v149h256v-149h-256zM0 341h405v-128h-405v128z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 171v213h171v-213h-171zM0 0v128h171v-128h-171zM213 0v213h171v-213h-171zM213 384h171v-128h-171v128z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 0v64h405v-64h-405zM384 277q9 0 15 -6t6 -15v-128q0 -9 -6 -15t-15 -6h-363q-8 0 -14.5 6t-6.5 15v128q0 9 6.5 15t14.5 6h363zM0 384h405v-64h-405v64z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 128v43h341v-43h-341zM0 43v42h341v-42h-341zM0 213v43h341v-43h-341zM0 341h341v-42h-341v42z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM0 256v43h43v-43h-43zM85 171v42h299v-42h-299zM85 85v43h299v-43h-299zM85 299h299v-43h-299v43z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 149v86h85v-86h-85zM0 43v85h85v-85h-85zM0 256v85h85v-85h-85zM107 149v86h256v-86h-256zM107 43v85h256v-85h-256zM107 341h256v-85h-256v85z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 213v128h107v-128h-107zM0 64v128h107v-128h-107zM128 64v128h107v-128h-107zM256 64v128h107v-128h-107zM128 213v128h107v-128h-107zM256 341h107v-128h-107v128z" /> -<glyph unicode="" horiz-adv-x="363" d="M128 64v128h107v-128h-107zM0 64v277h107v-277h-107zM256 64v128h107v-128h-107zM128 341h235v-128h-235v128z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 64v128h363v-128h-363zM0 341h363v-128h-363v128z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM43 192v-43h85v43h-85zM256 64v43h-213v-43h213zM384 64v43h-85v-43h85zM384 149v43h-213v-43h213z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 256v43h299v-43h-299zM0 171v42h299v-42h-299zM0 85v43h299v-43h-299zM341 85v43h43v-43h-43zM341 299h43v-43h-43v43zM341 171v42h43v-42h-43z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM277 64v85h-234v-85h234zM277 171v85h-234v-85h234zM384 64v192h-85v-192h85z" /> -<glyph unicode="" horiz-adv-x="405" d="M85 341q9 0 15.5 -6t6.5 -15v-256q0 -9 -6.5 -15t-15.5 -6h-64q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h64zM384 341q9 0 15 -6t6 -15v-256q0 -9 -6 -15t-15 -6h-64q-9 0 -15 6t-6 15v256q0 9 6 15t15 6h64zM235 341q8 0 14.5 -6t6.5 -15v-256q0 -9 -6.5 -15 t-14.5 -6h-64q-9 0 -15.5 6t-6.5 15v256q0 9 6.5 15t15.5 6h64z" /> -<glyph unicode="" horiz-adv-x="412" d="M213 171h171v-171h-171v171zM0 0v171h171v-171h-171zM0 384h171v-171h-171v171zM291 412l121 -121l-121 -120l-120 120z" /> -<glyph unicode="" d="M427 326l-28 -33l-98 83l28 32zM125 376l-97 -82l-28 32l98 82zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M182 138l105 106l23 -23l-128 -128l-68 68l23 22z" /> -<glyph unicode="" horiz-adv-x="434" d="M221 320q-26 0 -51 -9l-33 32q40 20 84 20q79 0 135.5 -56.5t56.5 -135.5q0 -44 -20 -84l-32 32q9 26 9 52q0 62 -43.5 105.5t-105.5 43.5zM434 326l-27 -33l-99 83l28 32zM27 399l21 -21l372 -372l-27 -27l-47 47q-54 -47 -125 -47q-80 0 -136 56t-56 136q0 71 47 125 l-17 17l-24 -20l-30 31l23 19l-28 29zM316 56l-210 210q-35 -42 -35 -95q0 -62 44 -106t106 -44q54 0 95 35zM136 378l-18 -15l-31 30l19 15z" /> -<glyph unicode="" d="M125 376l-97 -82l-28 32l98 82zM427 326l-28 -33l-98 83l28 32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M235 256v-64h64v-43h-64v-64h-43v64h-64v43h64v64h43z" /> -<glyph unicode="" d="M125 376l-97 -82l-28 32l98 82zM427 326l-28 -33l-98 83l28 32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M149 213v43h128v-38l-77 -90h77v-43h-128v39l78 89h-78z" /> -<glyph unicode="" d="M427 326l-28 -33l-98 83l28 32zM125 376l-97 -82l-28 32l98 82zM224 277v-112l85 -50l-16 -26l-101 60v128h32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5 t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298zM85 235h107v-107h-107v107z" /> -<glyph unicode="" horiz-adv-x="384" d="M289 212l-127 -127l-68 68l23 23l45 -45l104 104zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M135 85l-23 23l52 52l-52 52l23 23l52 -52l52 52l22 -23l-52 -52l52 -52l-22 -23l-52 52zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21z M341 43v234h-298v-234h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 235v-43h-214v43h214zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298zM235 149v-42h-150v42h150z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 192v-107h-107v107h107zM277 427h43v-43h21q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43zM341 43v234h-298v-234h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 85.5q0 8.5 6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15zM171 384h21q80 0 136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136q0 46 20.5 86.5t56.5 66.5v1l145 -145l-30 -30l-116 115q-33 -41 -33 -94q0 -62 43.5 -105.5t105.5 -43.5t105.5 43.5 t43.5 105.5q0 56 -36.5 98t-91.5 50v-41h-42v85zM320 192q0 -9 -6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15zM64 192q0 9 6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15z" /> -<glyph unicode="" d="M303.5 282.5q37.5 -37.5 37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90 38l90 90v128q53 0 90.5 -37.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" horiz-adv-x="448" d="M299 192q0 -18 -12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5t30.5 12.5t30.5 -12.5t12.5 -30.5zM256 384q80 0 136 -56t56 -136t-56 -136t-136 -56q-65 0 -117 40l30 30q40 -27 87 -27q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5 t-43.5 -105.5h64l-86 -85l-85 85h64q0 80 56 136t136 56z" /> -<glyph unicode="" horiz-adv-x="448" d="M256 384q80 0 136 -56t56 -136t-56 -136t-136 -56q-79 0 -136 56l31 31q43 -44 105 -44t105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5h64l-87 -86l-1 3l-83 83h64q0 80 56 136t136 56zM235 277h32v-90l74 -45l-15 -26l-91 55v106z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM224 299v-112l96 -57l-16 -27l-112 68v128h32z" /> -<glyph unicode="" horiz-adv-x="411" d="M369 351l30 -30l-30 -31q42 -52 42 -119q0 -58 -32 -106l-31 31q20 35 20 75q0 62 -43.5 105.5t-105.5 43.5q-40 0 -75 -20l-31 31q48 32 106 32q67 0 120 -42zM283 427v-43h-128v43h128zM197 247v30h43v-73zM27 363l214 -214l164 -165l-27 -27l-53 54q-48 -32 -106 -32 q-80 0 -136 56t-56 136q0 58 32 106l-59 59zM219 21q40 0 75 21l-204 204q-21 -35 -21 -75q0 -62 44 -106t106 -44z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 427v-43h-128v43h128zM171 149v128h42v-128h-42zM342 290q42 -52 42 -119q0 -80 -56 -136t-136 -56t-136 56t-56 135.5t56 136t136 56.5q67 0 120 -43l30 31q16 -13 30 -30zM192 21q62 0 105.5 44t43.5 106t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5 t43.5 -106t105.5 -44z" /> -<glyph unicode="" horiz-adv-x="299" d="M0 107v85h299v-85q0 -62 -44 -106t-106 -44t-105.5 44t-43.5 106zM237 355q29 -21 45.5 -52.5t16.5 -67.5v-22h-299v22q0 36 16.5 67.5t44.5 52.5l-44 45l17 17l49 -49q32 16 66 16t66 -16l50 49l17 -17zM85.5 256q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5 t-6.5 -15t6.5 -15t15 -6.5zM213.5 256q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5z" /> -<glyph unicode="" d="M85 64v213h256v-213q0 -9 -6 -15t-15 -6h-21v-75q0 -13 -9.5 -22.5t-23 -9.5t-22.5 9.5t-9 22.5v75h-43v-75q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5v75h-21q-9 0 -15.5 6t-6.5 15zM32 277q13 0 22.5 -9t9.5 -23v-149q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5 t-9.5 22.5v149q0 14 9.5 23t22.5 9zM394.5 277q13.5 0 23 -9t9.5 -23v-149q0 -13 -9.5 -22.5t-23 -9.5t-22.5 9.5t-9 22.5v149q0 14 9 23t22.5 9zM289 402q52 -38 52 -103h-256q0 64 53 103l-28 28q-8 7 -0.5 14.5t15.5 0.5l32 -32q26 14 56 14t57 -14l31 32q8 7 15.5 -0.5 t-0.5 -14.5zM171 341v22h-22v-22h22zM277 341v22h-21v-22h21z" /> -<glyph unicode="" horiz-adv-x="363" d="M353 262q-21 -7 -35 -32.5t-14 -50.5q0 -31 16 -57.5t43 -33.5q-8 -27 -26.5 -55.5t-37.5 -42.5q-16 -11 -40 -11q-16 0 -37 8q-18 9 -31 9q-10 0 -40 -12q-18 -5 -26 -5q-24 0 -49 20q-36 34 -56 81t-20 98q0 53 30.5 93.5t77.5 40.5q26 0 48 -11q17 -11 34 -11 q16 0 31 6q39 16 52 16q35 0 61 -23q12 -12 19 -27zM179 309q0 32 25 63q25 27 61 33q0 -38 -24 -67q-27 -29 -62 -29z" /> -<glyph unicode="" d="M384 281h-107v26h107v-26zM208 180.5q12 -17.5 12 -42.5q0 -20 -8 -35q-7 -14 -21 -23q-12 -9 -30 -14q-14 -4 -34 -4h-127v266h124q12 0 34 -5q13 -3 26 -12q11 -7 18 -20q6 -13 6 -31q0 -20 -9.5 -33.5t-26.5 -21.5q24 -7 36 -24.5zM55 221h61q17 0 26 6q10 7 10 23 q0 9 -3.5 15t-9.5 9q-6 4 -12 5q-9 2 -15 2h-57v-60zM162 141q0 20 -11 29q-11 8 -30 8h-66v-73h64q7 0 17 2q8 2 13.5 5.5t9.5 11.5q3 6 3 17zM426 144h-137q0 -24 13 -37q12 -11 34 -11q15 0 27 8q12 9 14 18h46q-10 -35 -34 -50q-24 -16 -55 -16q-22 0 -40 7t-31 21 q-13 13 -19 32q-7 18 -7 40t7 40.5t20 32.5q13 13 30 21q18 8 40 8q24 0 42 -9.5t30 -25.5q11 -15 17 -37q5 -21 3 -42zM374 178q-2 18 -12 30q-9 10 -29 10q-13 0 -21 -4.5t-13.5 -10.5t-6.5 -13q-3 -7 -3 -12h85z" /> -<glyph unicode="" d="M390 161v62l-46 -31zM232 31l143 96l-64 43l-79 -53v-86zM213 149l65 43l-65 43l-65 -43zM195 31v86l-80 53l-64 -43zM37 223v-62l46 31zM195 353l-144 -96l64 -43l80 53v86zM232 353v-86l79 -53l64 43zM427 259v-2v-130v-2v-1q0 -1 -1 -2v-1q-1 0 -1 -1v-1l-1 -1v-1 l-0.5 -0.5l-0.5 -0.5q0 -1 -1 -1l-1 -1v0l-1 -1l-1 -1l-195 -130q-5 -3 -10.5 -3t-10.5 3l-195 130h-1v1l-1 0.5l-1 0.5v1h-1v1l-1 1v1h-1v1l-1 1v1v1q-1 1 -1 2v1v2v130v2v1q0 1 1 2v1v1l1 1v1l1 1l0.5 0.5l0.5 0.5v1q1 0 1 0.5v0.5h0.5t0.5 1h1l1 1l195 130q10 7 21 0 l195 -130v0l1 -1h1v-1q1 0 1 -1q1 0 1 -0.5v-0.5l1 -1v-1q1 0 1 -1v-1l1 -1v-1q1 -1 1 -2v-1z" /> -<glyph unicode="" d="M308 42q56 40 69 107q-35 8 -66 8v0q-17 0 -34 -3q19 -57 31 -112zM213 13q31 0 59 11q-12 63 -32 121q-49 -16 -87 -52q-23 -22 -39 -47q44 -33 99 -33zM47 179q0 -60 39 -106q19 28 46 53q42 38 94 55q-4 10 -10 22q-67 -21 -151 -22q-13 0 -18 1v-3zM140 329 q-33 -16 -56 -45t-32 -64q3 -1 13 -1h3q70 0 131 19q-29 54 -59 91zM213 346q-16 0 -35 -4q32 -42 57 -91q53 23 82 58q-45 37 -104 37zM344 282q-36 -41 -92 -66q4 -8 11 -25q24 4 48 4v0q33 0 69 -8q-3 53 -36 95zM213.5 393q88.5 0 151 -62.5t62.5 -151t-62.5 -151 t-151 -62.5t-151 62.5t-62.5 151t62.5 151t151 62.5z" /> -<glyph unicode="" d="M126 389l87 -72l88 72l126 -81l-87 -69l87 -69l-126 -82l-88 73l-87 -73l-126 82l87 69l-87 69zM213 317l-126 -78l126 -78l127 78zM213 145l89 -73l37 25v-27l-126 -75l-125 75v27l38 -25z" /> -<glyph unicode="" horiz-adv-x="366" d="M249 200h50q3 10 -8 21q-12 12 -27 3.5t-15 -24.5zM332 348q11 -14 17.5 -34.5t8 -32t4.5 -38.5q4 -39 3.5 -88.5t-10.5 -87.5q-9 -61 -49 -80.5t-95 -4.5q-22 6 -32 27t-7 44q4 21 24 31.5t43 10.5v-21q2 -7 -1 -9.5t-8.5 -2t-11.5 -0.5q-8 -5 -9 -16.5t8.5 -21 t27.5 -9.5q33 1 40 12t5 48q2 19 -14 32t-36 14q-37 -3 -65 43q-1 -2 -1 -10.5v-16.5v-15q-1 -15 -15 -23.5t-31 -11.5q-60 -5 -84 19q-34 36 -43 120q-7 48 22 69h81q4 2 10.5 9.5t7.5 8.5v43q1 4 0.5 14.5t1 17t6.5 11.5q22 11 47 4t38 -28h27h28q43 -6 62 -27zM87 313 h-69l86 88v-70z" /> -<glyph unicode="" d="M363 320h-54q-31 0 -52.5 -22t-21.5 -53v-53h-43v-64h43v-149h64v149h64v64h-64v43q0 8 6 14.5t15 6.5h43v64zM0 405h427v-426h-427v426z" /> -<glyph unicode="" horiz-adv-x="224" d="M145 -21h-79v194h-66v76h66v56q0 48 27 74t72 26q36 0 59 -3v-67l-41 -1q-22 0 -30 -9t-8 -27v-49h76l-10 -76h-66v-194z" /> -<glyph unicode="" d="M43 405h341q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-110q-7 1 -7 21v58q0 27 -15 40q44 5 70.5 27t26.5 78q0 33 -22 57q11 26 -2 57q-18 6 -58 -22q-26 7 -54 7t-53 -7q-18 12 -32.5 17.5t-20.5 4.5h-6q-12 -31 -2 -57q-22 -24 -22 -57 q0 -55 27 -77.5t70 -27.5q-11 -10 -13 -29q-42 -18 -62 18q-12 20 -33 22q-2 0 -4.5 -0.5t-5.5 -3.5t8 -9q15 -7 24 -31q1 -2 2 -4.5t6.5 -9.5t13 -10.5t20.5 -6.5t30 2v-36q0 -20 -8 -21h-109q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5z" /> -<glyph unicode="" d="M213.5 400q88.5 0 151 -62.5t62.5 -150.5q0 -70 -41 -125.5t-105 -77.5q-14 -2 -14 11v58q0 27 -15 40q44 5 70.5 27t26.5 77q0 34 -22 58q11 26 -2 57q-18 5 -58 -22q-26 7 -54 7t-53 -7q-18 12 -32.5 17.5t-20.5 4.5h-6q-12 -31 -2 -57q-22 -24 -22 -58q0 -55 27 -77 t70 -27q-11 -10 -13 -29q-42 -18 -62 18q-12 20 -33 22q-2 0 -4.5 -0.5t-5 -3.5t8.5 -9q14 -7 23 -31q1 -2 2 -4.5t6.5 -9.5t13 -10.5t20.5 -6.5t30 2v-36q0 -13 -14 -11q-64 22 -105 77.5t-41 125.5q0 88 62.5 150.5t151 62.5z" /> -<glyph unicode="" horiz-adv-x="463" d="M140 373l73 -128l-140 -245l-73 128zM183 128h280l-73 -128h-280zM451 149h-146l-147 256h1h145z" /> -<glyph unicode="" d="M222 287q114 -108 165 -114q1 11 1 19q0 25 -7 50q-4 -9 -11 -10t-15.5 5.5t-15.5 14.5t-14.5 18.5t-10 15t-3.5 6.5q-47 66 -163 62q-32 -13 -56 -36q65 30 130 -31zM365 105q11 20 16 39q-33 3 -85.5 29.5t-87.5 51.5l-35 25q-74 58 -127 -9q-8 -24 -8 -49 q0 -38 16 -73q9 26 25 26q15 0 40.5 -13.5t41.5 -18.5q10 -3 31 -10l31.5 -10.5t26.5 -6.5t30 -3q12 0 22 1.5t20 4.5t15.5 4.5t15.5 6t12 5.5zM213 17q76 0 128 56q-45 -13 -83.5 -13t-62.5 7l-25 8q-26 8 -31 -6t7 -38q32 -14 67 -14zM213 405q88 0 151 -62.5t63 -150.5 t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t150.5 62.5z" /> -<glyph unicode="" horiz-adv-x="416" d="M235 213h181v-21q0 -89 -58 -151t-145 -62q-88 0 -150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5q89 0 148 -65l-38 -38q-43 50 -110 50q-66 0 -113 -47t-47 -113t47 -113t113 -47q56 0 96.5 36t50.5 92h-125v53z" /> -<glyph unicode="" horiz-adv-x="448" d="M341 427q44 0 75.5 -31.5t31.5 -75.5q0 -22 -26.5 -67.5t-52 -92.5t-22.5 -75q0 -5 -5.5 -5t-5.5 5q2 28 -23 75t-51.5 92.5t-26.5 67.5q0 44 31 75.5t75 31.5zM341.5 363q-17.5 0 -30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5t30 12.5t12.5 30.5t-12.5 30.5t-30 12.5z M43 384h185q-20 -32 -20 -69q0 -26 32 -83l-239 -239l-1 7v341q0 18 12.5 30.5t30.5 12.5zM310 109l-51 51l14 15q24 -39 37 -66zM371 -43h-315l157 158zM427 205v-205l-1 -7l-72 72q3 9 7 18.5t9 20t9.5 19t12 21.5t11 19.5t12.5 21.5zM100 181q-17 0 -27 7t-10 19 q0 14 18 21q10 3 22 3h5q13 -10 18 -15t5 -12q0 -9 -9 -16t-22 -7zM75 303q0 10 5.5 15.5t12.5 5.5q13 0 20.5 -12t7.5 -25q0 -11 -6.5 -15.5t-13.5 -4.5q-11 0 -18.5 11.5t-7.5 24.5zM127 241l-7 6q-6 5 -6 9q0 7 7 12q17 13 17 29q0 14 -14 26h12l9 9h-43 q-21 0 -32.5 -11.5t-11.5 -27.5q0 -13 9 -23t25 -10h5l-2 -8q0 -7 6 -14q-24 -1 -40 -11q-16 -9 -16 -25q0 -13 11.5 -21.5t33.5 -8.5q25 0 39.5 12t14.5 27q0 16 -17 30z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h128v-107l-86 22l22 -86h-107v128zM107 171l-22 -86l86 22v-107h-128q-18 0 -30.5 12.5t-12.5 30.5v128h107zM299 85l-22 86h107v-128q0 -18 -12.5 -30.5t-30.5 -12.5h-128v107zM341 384q18 0 30.5 -12.5t12.5 -30.5v-128h-107l22 86 l-86 -22v107h128z" /> -<glyph unicode="" horiz-adv-x="379" d="M0 11v362q0 21 18 29l210 -210l-210 -210q-18 9 -18 29zM295 125l-230 -132l181 181zM366 217q13 -10 13 -25t-12 -25l-49 -28l-54 53l54 53zM65 391l230 -132l-49 -49z" /> -<glyph unicode="" d="M43 405h340q17 0 30.5 -17t13.5 -36v-330q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v341q0 18 12.5 30.5t30.5 12.5zM151 301q-45 0 -76.5 -32t-31.5 -77t31.5 -77t76.5 -32q47 0 75.5 29.5t28.5 76.5q0 13 -2 19h-102v-38h62q-3 -17 -18 -31.5 t-44 -14.5q-28 0 -47.5 20t-19.5 48t19.5 48t47.5 20q27 0 43 -16l30 28q-29 29 -73 29zM322 239v-31h-31v-31h31v-31h31v31h30l1 31h-31v31h-31z" /> -<glyph unicode="" d="M137 217h128q7 -37 -3 -72q-10 -34 -35 -57q-23 -21 -56 -29q-36 -8 -70 1q-27 7 -49 25q-24 19 -37 45q-22 42 -12 89q3 18 12 34q24 50 77 68q46 16 92 -1q24 -9 44 -27q-2 -3 -7 -7.5t-6 -6.5q-4 -3 -12.5 -11.5t-12.5 -13.5q-13 13 -30 18q-20 6 -40 1 q-24 -5 -41 -22q-13 -14 -20 -33q-9 -26 0 -53q9 -26 32 -42q14 -10 30 -13q15 -3 33 0q17 3 30 12q23 15 27 42h-74v26.5v26.5zM427 214v-34h-47v-46h-34v46h-47v34h47v47h34v-47h47z" /> -<glyph unicode="" horiz-adv-x="418" d="M214 222v1h201q3 -12 3 -36q0 -93 -56.5 -150.5t-148.5 -57.5q-88 0 -150.5 62t-62.5 151t62 151t151 62q87 0 144 -57l-57 -56q-33 33 -86 33q-54 0 -92.5 -39.5t-38.5 -95t38.5 -94.5t92.5 -39q31 0 55 9.5t37.5 24.5t20.5 29.5t10 27.5h-123v74z" /> -<glyph unicode="" d="M384 309v43q0 11 -11 11h-42q-11 0 -11 -11v-43q0 -10 11 -10h42q11 0 11 10zM53 21h320q11 0 11 11v181h-45q2 -12 2 -21q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 11 2 21h-44v-181q0 -11 10 -11zM213.5 277q-35.5 0 -60.5 -25t-25 -60t25 -60t60.5 -25 t60.5 25t25 60t-25 60t-60.5 25zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" /> -<glyph unicode="" horiz-adv-x="401" d="M59 354h342l-31 -156l-5 -25l-24 -121l-183 -61l-158 61l16 80h67l-6 -33l95 -36l111 36l15 77h-274l13 67h274l9 44h-274z" /> -<glyph unicode="" horiz-adv-x="357" d="M179 50l91 25l13 138h-163l-4 45h171l4 45h-225l13 -135h155l-5 -58l-50 -14l-50 14l-4 37h-45l7 -72zM0 378h357l-32 -365l-146 -51l-147 51z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 384h384v-384h-384v384zM101 63q15 -33 54 -33q25 0 39.5 13.5t14.5 40.5v124h-36v-123q0 -23 -19 -23q-13 0 -24 19zM228 67q19 -37 66 -37q27 0 43.5 13.5t16.5 36.5q0 22 -11.5 34t-36.5 23l-9 4q-12 5 -17 9.5t-5 12.5q0 6 4.5 10.5t12.5 4.5q15 0 24 -15l27 18 q-16 29 -51 29q-24 0 -38.5 -13.5t-14.5 -34.5t11 -33t33 -21l9 -4q10 -5 14.5 -7t8 -6.5t3.5 -10.5q0 -8 -6.5 -13t-17.5 -5q-23 0 -36 22z" /> -<glyph unicode="" horiz-adv-x="458" d="M0 294q45 29 82 35.5t60 -5.5t39 -35.5t23 -48t8 -49.5q3 -37 -18.5 -72.5t-57.5 -47.5t-83 16v-120l-53 34v293zM51 256v-121q41 -25 65.5 -21t35 24.5t10.5 56.5q0 47 -17 68t-41.5 17.5t-52.5 -24.5zM299 328q-4 -78 0 -155q3 -21 14.5 -30.5t26.5 -8t30 6t25 10.5 l10 5v155l53 -6v-207q0 -28 -8 -50.5t-20 -36t-27 -23t-30.5 -13.5t-27.5 -6t-20 -2h-8l-18 51q35 0 59 8.5t33 20t13.5 23.5t3.5 20l-1 8q-42 -16 -73.5 -17.5t-47.5 7.5t-25.5 20.5t-11.5 20.5l-2 10v155z" /> -<glyph unicode="" d="M366 288q25 0 43 -18t18 -43v-81q0 -25 -18 -43t-43 -18h-153q0 -6 5 -13t10 -7h92v-36q0 -25 -18 -43t-43 -18h-91q-26 0 -43.5 18t-17.5 43v80q0 25 17.5 43t43.5 18h112q25 0 42.5 18t17.5 43v57h26zM274 36q-15 0 -15 -19q0 -15 15 -15q7 0 11 4.5t4 10.5 q0 19 -15 19zM61 75q-25 0 -43 17.5t-18 43.5v80q0 26 18 43.5t43 17.5h152q0 7 -4.5 14t-10.5 7h-91v36q0 25 17.5 43t43.5 18h91q25 0 43 -18t18 -43v-80q0 -26 -18 -43.5t-43 -17.5h-112q-25 0 -43 -18t-18 -43v-57h-25zM152 326q16 0 16 19q0 15 -16 15q-15 0 -15 -15 q0 -19 15 -19z" /> -<glyph unicode="" d="M325 72q-58 0 -87 22.5t-42 64.5l-16 49q-11 32 -25 48t-44 16q-25 0 -42.5 -20t-17.5 -62q0 -35 16 -56t42 -21q17 0 33 7t23 14l8 7l15 -43q-3 -3 -9 -7t-27 -11.5t-45 -7.5q-52 0 -79.5 30t-27.5 86q0 59 28.5 91.5t81.5 32.5q49 0 76 -20t42 -68l16 -50 q10 -30 28.5 -46t53.5 -16q51 0 51 26q0 23 -33 30l-34 8q-56 14 -56 65q0 38 24.5 54.5t62.5 16.5q78 0 84 -63l-49 -6q-3 30 -38 30t-35 -26q0 -23 28 -29l31 -7q65 -15 65 -71q0 -68 -102 -68z" /> -<glyph unicode="" d="M363 43v121q0 31 -22 53t-53 22q-15 0 -30 -8.5t-23 -21.5v26h-64v-192h64v113q0 13 9 22.5t22.5 9.5t23 -9.5t9.5 -22.5v-113h64zM96 271q16 0 27.5 11t11.5 27t-11.5 27.5t-27.5 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27t27.5 -11zM128 43v192h-64v-192h64zM384 405 q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" /> -<glyph unicode="" horiz-adv-x="371" d="M237 405q79 0 112 -39q30 -35 20 -99q-23 -146 -175 -146h-49q-8 0 -14 -5t-7 -13l-17 -106q-1 -8 -7 -13t-14 -5h-73q-6 0 -10 4.5t-3 9.5l62 394q2 8 7.5 13t13.5 5h154zM255 261q4 29 -8 43q-6 8 -18 11.5t-21.5 4t-27.5 0.5h-11q-11 0 -12 -11l-17 -103h23 q17 0 25.5 0.5t22 3.5t21 8.5t14 16.5t9.5 26z" /> -<glyph unicode="" d="M235 102q53 0 82 35t29 82q0 52 -39 89.5t-93.5 37.5t-93.5 -37.5t-39 -89.5q0 -34 18 -63q6 -11 18 -11q9 0 15.5 6.5t6.5 14.5q0 5 -4 11q-11 20 -11 42q0 35 26 59.5t63 24.5t63.5 -24.5t26.5 -59.5q0 -30 -16.5 -51.5t-51.5 -21.5q-12 0 -20 8.5t-8 20.5 q0 9 9.5 28.5t9.5 35.5q0 28 -31 28q-14 0 -24.5 -11.5t-10.5 -36.5q0 -8 1 -16t2 -12l1 -3l-39 -119l-1 -4v-1.5v-1.5q0 -10 6.5 -17t16.5 -7q14 0 20 12l1 -1l1 4l20 69q19 -20 46 -20zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341 q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" /> -<glyph unicode="" d="M427 332v-37v-75q0 -39 -10 -69q-18 -60 -68 -102q-53 -44 -121 -48q-70 -5 -129 32q-54 35 -80 93q-15 33 -18 66q-1 18 -1 75v36.5v38.5q0 14 7.5 25t20.5 15q8 2 16 2h20h38h74h21h16q25 0 75.5 -0.5t75.5 -0.5q27 0 35 -2q14 -4 22 -17q6 -9 6 -32zM342 235 q5 15 -6 27q-10 13 -27 10q-5 0 -9.5 -3t-7 -5t-8 -7.5l-6.5 -6.5q-56 -55 -64 -62q-2 1 -56 53q-7 7 -15 14q-11 11 -14 13q-13 9 -27 2q-15 -6 -17.5 -21.5t8.5 -26.5q1 0 58 -56l28 -26q1 -2 5.5 -6.5t7 -6.5t7 -5t8.5 -4q15 -3 27 8q4 4 9 8.5t11 10.5l9 9q52 50 58 55 l5.5 5.5l6.5 6.5t5 6t4 8z" /> -<glyph unicode="" horiz-adv-x="491" d="M395 363l96 -171l-96 -171h-86l96 171l-55 99l-169 -270h-85l-96 171l96 171h85l-96 -171l56 -99l168 270h86z" /> -<glyph unicode="" horiz-adv-x="384" d="M320 105q26 0 44 -18.5t18 -44t-18 -44t-44 -18.5t-44 18.5t-18 44.5q0 6 1 14l-151 88q-19 -17 -44 -17q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5q25 0 44 -17l150 87q-2 9 -2 15q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19 q-25 0 -44 18l-150 -88q2 -9 2 -15t-2 -15l152 -88q18 16 42 16z" /> -<glyph unicode="" horiz-adv-x="336" d="M245 13v145h34v-179h-279v178l32 -1l-1 -143h214zM52 73h167v-35h-167v35zM57 136l168 -16l-4 -36l-168 16zM72 209l163 -46l-10 -35l-163 46zM112 291l144 -87l-19 -32l-144 87zM262 210l-98 137l30 21l98 -137zM272 399l36 6l28 -166l-36 -6z" /> -<glyph unicode="" horiz-adv-x="439" d="M355 263q0 23 -16.5 39t-39 16t-39 -16t-16.5 -39t16.5 -39t39 -16t39 16t16.5 39zM181 95q0 -24 -17 -40t-40 -16q-16 0 -29.5 8t-20.5 22q15 -6 28 -12q17 -6 34 1t25 25q6 17 -1 34t-25 24l-23 9q6 2 12 2q23 0 40 -16.5t17 -40.5zM439 329v-274q0 -34 -24 -58 t-58 -24h-275q-34 0 -58 24t-24 58v44l49 -20q6 -26 27 -43.5t48 -17.5q30 0 52 20t25 50l98 72q43 0 73 30t30 73q0 42 -30 72.5t-73 30.5q-42 0 -72 -30t-31 -72l-64 -92h-8q-21 0 -39 -11l-85 34v134q0 34 24 58t58 24h275q34 0 58 -24t24 -58zM368 263q0 -29 -20 -49 t-48.5 -20t-49 20t-20.5 48.5t20.5 49t48.5 20.5q29 0 49 -20.5t20 -48.5z" /> -<glyph unicode="" d="M372 273q0 -26 -18 -44.5t-44 -18.5t-44.5 18.5t-18.5 44.5t18.5 44.5t44.5 18.5t44 -18.5t18 -44.5zM0 73v110l65 -26q20 12 45 12h9l73 105q0 48 34.5 82t82.5 34q49 0 83.5 -34.5t34.5 -83t-34.5 -83t-83.5 -34.5l-112 -82q-3 -34 -28 -56.5t-59 -22.5q-32 0 -56 19.5 t-30 49.5zM309.5 352q-32.5 0 -55.5 -23.5t-23 -56t23 -55.5t55.5 -23t55.5 23t23 55.5t-23 56t-55.5 23.5zM110 146q-7 0 -14 -2l27 -10q19 -8 27.5 -27.5t0.5 -39.5t-27.5 -28t-39.5 -1q-6 3 -16.5 7.5t-14.5 5.5q18 -34 57 -34q26 0 45 19t19 45.5t-19 45.5t-45 19z" /> -<glyph unicode="" d="M335 249q22 18 28 30q-13 -6 -31 -9q18 13 24 32q-20 -11 -37 -14q-12 14 -31 16.5t-35.5 -5t-26.5 -25t-5 -38.5q-67 4 -118 59q-11 -20 -4.5 -43.5t21.5 -32.5q-11 1 -24 7q1 -43 44 -57q-12 -3 -24 -1q12 -36 53 -40q-15 -13 -39 -19.5t-45 -3.5q45 -28 92 -26 q70 3 113.5 49.5t44.5 120.5zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" /> -<glyph unicode="" d="M383 279v-11q0 -45 -16.5 -88.5t-47 -79.5t-79 -58.5t-106.5 -22.5q-73 0 -134 39q10 -1 21 -1q61 0 109 37q-29 1 -51.5 18t-30.5 43q8 -2 16 -2q12 0 23 4q-30 6 -50 30t-20 55v1q19 -10 40 -11q-39 27 -39 73q0 24 12 44q33 -40 79.5 -64t100.5 -27q-2 10 -2 20 q0 36 25.5 61.5t61.5 25.5q38 0 64 -27q30 6 56 21q-10 -31 -39 -48q27 3 51 13q-18 -26 -44 -45z" /> -<glyph unicode="" horiz-adv-x="549" d="M548 299q7 -18 -43 -84q-7 -9 -18 -24q-23 -28 -26 -37q-5 -12 4 -23q5 -6 23 -24h1v-1q41 -37 55 -63l2 -4t2 -7.5t0 -9.5t-7 -7.5t-17 -3.5l-73 -2q-7 -1 -16.5 2t-14.5 6l-6 4q-9 6 -20 18t-19.5 22t-17.5 16.5t-16 4.5q-1 0 -2.5 -1t-5 -4.5t-6 -8.5t-4.5 -14.5 t-2 -22.5q0 -4 -1 -7.5t-2 -5.5l-1 -1q-6 -6 -16 -6h-32q-21 -2 -42.5 4t-37.5 15.5t-29 19t-20 16.5l-7 7q-3 2 -8 8t-20.5 26t-30.5 43t-35 60.5t-37 77.5q-2 5 -2 8t1 5l1 1q4 6 16 6h79q3 0 6 -1.5l5 -2.5l1 -1q5 -3 7 -9q6 -14 13.5 -29.5t11.5 -23.5l4 -8 q9 -17 16.5 -29.5t13.5 -19.5t12 -11t10 -4t8 1l1 1.5t3.5 6.5t4 13t2.5 23t0 36q-1 11 -3 20.5t-4 13.5l-1 3q-7 10 -25 13q-3 0 2 7q5 5 11 8q15 8 68 7q23 0 39 -4q5 -1 9 -3.5t6 -7t3 -9t1 -13v-15.5q-1 -8 -1 -20v-24q0 -3 -0.5 -12t-0.5 -14t1 -11.5t3.5 -11t6.5 -6.5 q2 -1 4.5 -1.5t7.5 3t11 10t15 19.5t19 30q17 30 31 65q1 2 2.5 4.5t3.5 3.5h1l1 1l4 1h6l82 1q11 1 18.5 -1t8.5 -5z" /> -<glyph unicode="" d="M40 280q-17 29 -38 37l-2 1v15h1h109v-15q-13 -1 -21.5 -7t-5.5 -17q14 -33 40.5 -94t38.5 -89l46 87q-7 14 -23 51.5t-27 58.5q-7 10 -36 11v14h102l1 -14q-6 -1 -10 -2t-7 -4.5t-2 -8.5l29 -64q28 60 28 61q3 11 -5 14.5t-21 3.5l-1 14h92v-14q-24 -2 -33 -15 q-14 -20 -46 -89q23 -53 43 -95l78 180q-6 13 -29 19l-1 14l87 -1v-14q-6 -1 -11 -3q-11 -5 -18 -17l-107 -247h-18l-52 120l-62 -120h-18q-16 33 -48 111t-53 118z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 192v112l128 28v-138zM363 384v-187l-214 -3v143zM0 171l128 -2v-146l-128 25v123zM363 165v-186l-214 40v150z" /> -<glyph unicode="" horiz-adv-x="469" d="M384 192v-107h-107v43h64v64h43zM128 256v-64h-43v107h107v-43h-64zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" /> -<glyph unicode="" d="M299 235v-43h-43v43h43zM299 149v-42h-43v42h43zM128 235v-43h-43v43h43zM213 235v-43h-42v43h42zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v256h-341v-256 h341z" /> -<glyph unicode="" d="M170.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM170.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM106.5 245q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM170.5 96q10.5 0 10.5 -10.5 t-10.5 -10.5t-10.5 10.5t10.5 10.5zM106.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM170.5 288q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM256 256q9 0 15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15t6 15t15 6.5zM256 288q-11 0 -11 10.5 t11 10.5t11 -10.5t-11 -10.5zM320 160q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM320 245q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21 q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM256 96q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM256 171q9 0 15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15t6 15t15 6.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M42.5 75q-13.5 0 -22.5 9t-9 22.5t9 23t22.5 9.5t23 -9.5t9.5 -23t-9.5 -22.5t-23 -9zM128 171q-9 0 -15 6t-6 15t6 15t15 6t15 -6t6 -15t-6 -15t-15 -6zM128 256q-9 0 -15 6.5t-6 15t6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5zM0 0v43h384v-43h-384zM42.5 245 q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM42.5 160q-13.5 0 -22.5 9.5t-9 22.5t9 22.5t22.5 9.5t23 -9.5t9.5 -22.5t-9.5 -22.5t-23 -9.5zM128 85q-9 0 -15 6.5t-6 15t6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5zM298.5 96 q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM0 384h384v-43h-384v43zM298.5 267q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM298.5 181q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM213.5 256q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5 t6.5 -15t-6.5 -15t-15 -6.5zM213.5 171q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM213.5 85q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M245.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM241 203q-11 2 -18.5 9.5t-8.5 17.5l-1 5q0 13 9.5 22.5t23 9.5t22.5 -9.5t9 -23t-9 -22.5t-23 -9h-4zM245.5 373q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM160 373q-11 0 -11 11 t11 11t11 -11t-11 -11zM394.5 224q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM160 299q-9 0 -15 6t-6 15t6 15t15 6t15 -6t6 -15t-6 -15t-15 -6zM330.5 128q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5zM330.5 213q-8.5 0 -15 6.5 t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5zM330.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM245.5 11q10.5 0 10.5 -11t-10.5 -11t-10.5 11t10.5 11zM0 336l27 27l346 -347l-27 -27l-81 81q2 -4 2 -6q0 -9 -6.5 -15t-15 -6 t-15 6t-6.5 15t6.5 15t14.5 6q2 0 6 -1l-60 60q-1 -11 -10 -19t-21 -8q-13 0 -22.5 9.5t-9.5 22.5q0 12 7.5 21t19.5 11l-60 60q1 -4 1 -6q0 -9 -6.5 -15.5t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15.5 6.5l6 -1zM160 85q9 0 15 -6t6 -15t-6 -15t-15 -6t-15 6t-6 15t6 15t15 6z M394.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM74.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM10.5 245q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM160 11q11 0 11 -11t-11 -11t-11 11t11 11zM74.5 85 q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM10.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M74.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM74.5 85q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM74.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM10.5 245 q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM74.5 341q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM394.5 224q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM245.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15 t-15 -6zM245.5 373q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM10.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM160 11q11 0 11 -11t-11 -11t-11 11t11 11zM160 373q-11 0 -11 11t11 11t11 -11t-11 -11zM160 299q-9 0 -15 6t-6 15t6 15t15 6t15 -6 t6 -15t-6 -15t-15 -6zM160 181q13 0 22.5 -9t9.5 -22.5t-9.5 -23t-22.5 -9.5t-22.5 9.5t-9.5 23t9.5 22.5t22.5 9zM330.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM330.5 85q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15 t15 6zM330.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM330.5 341q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM394.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM245.5 85q8.5 0 15 -6t6.5 -15 t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM245.5 11q10.5 0 10.5 -11t-10.5 -11t-10.5 11t10.5 11zM160 267q13 0 22.5 -9.5t9.5 -23t-9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5zM160 85q9 0 15 -6t6 -15t-6 -15t-15 -6t-15 6t-6 15t6 15t15 6zM245.5 181 q13.5 0 22.5 -9t9 -22.5t-9 -23t-22.5 -9.5t-23 9.5t-9.5 23t9.5 22.5t23 9zM245.5 267q13.5 0 22.5 -9.5t9 -23t-9 -22.5t-22.5 -9t-23 9t-9.5 22.5t9.5 23t23 9.5z" /> -<glyph unicode="" horiz-adv-x="320" d="M107 405q88 0 150.5 -62.5t62.5 -150.5t-62.5 -150.5t-150.5 -62.5q-57 0 -107 28q49 29 78 78t29 107t-29 107t-78 78q50 28 107 28z" /> -<glyph unicode="" horiz-adv-x="277" d="M64 405q88 0 150.5 -62.5t62.5 -150.5t-62.5 -150.5t-150.5 -62.5q-33 0 -64 9q66 21 107.5 77t41.5 127t-41.5 127t-107.5 77q31 9 64 9z" /> -<glyph unicode="" horiz-adv-x="483" d="M412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5q-28 0 -53 -12q33 -15 54 -46.5t21 -69.5t-21 -69.5t-54 -46.5q25 -12 53 -12z" /> -<glyph unicode="" horiz-adv-x="483" d="M412 121v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100l71 -71zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" /> -<glyph unicode="" horiz-adv-x="483" d="M412 121v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100l71 -71zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5v-256z" /> -<glyph unicode="" horiz-adv-x="483" d="M412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5zM241.5 277q35.5 0 60.5 -25t25 -60t-25 -60 t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25z" /> -<glyph unicode="" horiz-adv-x="483" d="M217 178l24 78l25 -78h-49zM412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM290 107h41l-68 192h-43l-68 -192h40l15 42h68z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384zM149 107v53l-32 32l32 32v53h54l32 32l32 -32h53v-53l32 -32l-32 -32v-53h-53l-32 -32l-32 32 h-54zM235 256v-128q26 0 45 18.5t19 45.5t-19 45.5t-45 18.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 341v-140l-64 64l-85 -86l-86 86l-85 -86l-64 65v97q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5zM320 204l64 -64v-97q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v140l64 -64l85 86l86 -86z" /> -<glyph unicode="" horiz-adv-x="384" d="M192 277q35 0 60 -25t25 -60t-25 -60t-60 -25t-60 25t-25 60t25 60t60 25zM43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85 h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85z" /> -<glyph unicode="" horiz-adv-x="384" d="M43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM192 277q35 0 60 -25 t25 -60t-25 -60t-60 -25t-60 25t-25 60t25 60t60 25zM192 149q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5t-30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 384v43h43v-470h-43v43h-106q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h106zM149 64v128l-106 -128h106zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-106v192l106 -128v277h-106v43h106z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 320q18 0 30.5 -12.5t12.5 -30.5v-170q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v170q0 18 12.5 30.5t30.5 12.5h298zM341 107v170h-298v-170h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM341 64v256h-298v-256h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h298zM341 85v214h-298v-214h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 299q18 0 30.5 -12.5t12.5 -30.5v-128q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v128q0 18 12.5 30.5t30.5 12.5h298zM341 128v128h-298v-128h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h85v-43h-85v-85h-43v85zM43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h298zM341 85v214h-298v-214h298z" /> -<glyph unicode="" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM256 43v298h-213v-298h213z" /> -<glyph unicode="" horiz-adv-x="341" d="M299 363q17 0 29.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h256zM299 64v256h-256v-256h256z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM53 288v-32h43v-43h32v43h43v32h-43v43h-32v-43h-43zM341 43v298l-298 -298h298zM299 85h-107v32h107v-32z" /> -<glyph unicode="" d="M277 85h-42v43h42v43h43v-43h43v-43h-43v-42h-43v42zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM64 341v-42h128v42h-128zM384 21v342l-341 -342h341z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-149v-128l-149 -170h149v170z" /> -<glyph unicode="" horiz-adv-x="384" d="M43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM192 256q27 0 45.5 -18.5 t18.5 -45.5t-18.5 -45.5t-45.5 -18.5t-45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h85l85 85l86 -85h85zM384 21v299h-96l-74 75l-75 -75h-96v-299h341zM341 277h-256v-213h256v213z" /> -<glyph unicode="" horiz-adv-x="425" d="M191 361q-46 -5 -83 -34l-31 30q50 41 114 47v-43zM347 357l-30 -30q-38 29 -83 34v43q63 -6 113 -47zM381 213q-5 46 -34 84l30 30q41 -50 48 -114h-44zM78 297q-29 -38 -35 -84h-43q6 64 47 114zM43 171q6 -46 35 -83l-31 -31q-41 50 -47 114h43zM276 192 q0 -27 -18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5t19 45.5t45.5 18.5t45 -18.5t18.5 -45.5zM347 87q29 38 34 83h44q-7 -63 -48 -113zM234 23q46 6 83 34l30 -30q-50 -41 -113 -47v43zM77 27l31 30q37 -29 83 -34v-43q-64 6 -114 47z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 256h42v-43h-42v43zM128 213h43v-42h-43v42zM213 213h43v-42h-43v42zM256 256h43v-43h-43v43zM85 256h43v-43h-43v43zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298z M128 64v43h-43v-43h43zM213 64v43h-42v-43h42zM299 64v43h-43v-43h43zM341 213v128h-298v-128h42v-42h-42v-43h42v43h43v-43h43v43h42v-43h43v43h43v-43h42v43h-42v42h42z" /> -<glyph unicode="" horiz-adv-x="341" d="M128 192q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30.5 12.5t-12.5 30t12.5 30t30.5 12.5zM42.5 277q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM42.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5 t-12.5 30.5t12.5 30.5t30 12.5zM298.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM213.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 192q17.5 0 30 -12.5 t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM213.5 277q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM128 363q18 0 30.5 -12.5t12.5 -30.5t-12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5 t30.5 12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 64v256h43v-256h-43zM171 -21v426h42v-426h-42zM0 149v86h43v-86h-43zM256 64v256h43v-256h-43zM341 235h43v-86h-43v86z" /> -<glyph unicode="" horiz-adv-x="431" d="M343 128h-8l-24 23v105h75q13 0 22.5 -9.5t9.5 -22.5v-21q0 -10 -5.5 -18.5t-13.5 -11.5l19 -45h-32l-19 43h-24v-43zM343 224v-21h43v21h-43zM247 224h-8l-32 32h40q13 0 22.5 -9.5t9.5 -22.5v-41l-32 32v9zM173 245l258 -256l-24 -23l-162 162h-72v73l-32 32v-105h-32 v53h-43v-53h-32v128h32v-43h43v43h8l-117 117l23 22z" /> -<glyph unicode="" horiz-adv-x="469" d="M341 320q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5zM85.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM85.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5 t-12.5 -30.5t12.5 -30.5t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M85.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM341 320q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5zM341.5 107q35.5 0 60.5 25t25 60t-25 60t-60.5 25t-60.5 -25t-25 -60 t25 -60t60.5 -25z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 203q0 -19 -19 -30l19 -45h-32l-19 43h-24v-43h-32v128h75q13 0 22.5 -9.5t9.5 -22.5v-21zM352 203v21h-43v-21h43zM75 213v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43zM213 256q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-74v128h74zM213 160 v64h-42v-64h42z" /> -<glyph unicode="" horiz-adv-x="361" d="M31 139v128h299v-128h-299zM159 436h43v-63h-43v63zM330 383l31 -30l-39 -38l-30 30zM202 -31h-43v63h43v-63zM361 52l-31 -30l-38 39l30 30zM0 353l30 30l38 -38l-30 -30zM30 22l-30 31l38 38l30 -30z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 384q0 -30 -11 -57l-34 34q3 11 3 23h42zM0 357l27 27l357 -357l-27 -27l-61 61q-19 -28 -19 -61h-42q0 51 31 91l-31 30q-43 -52 -43 -121h-43q0 86 56 152l-53 53q-66 -56 -152 -56v43q68 0 122 43l-31 31q-40 -31 -91 -31v42q33 0 61 19zM235 384q0 -64 -34 -120 l-31 31q22 42 22 89h43zM361 104l-34 34q28 11 57 11v-42q-12 0 -23 -3zM264 201q56 34 120 34v-43q-47 0 -89 -22z" /> -<glyph unicode="" horiz-adv-x="384" d="M64 384q0 -27 -18.5 -45.5t-45.5 -18.5v64h64zM235 384q0 -97 -69 -166t-166 -69v43q80 0 136 56t56 136h43zM149 384q0 -62 -43.5 -105.5t-105.5 -43.5v42q44 0 75.5 31.5t31.5 75.5h42zM149 0q0 97 69 166t166 69v-43q-80 0 -136 -56t-56 -136h-43zM320 0 q0 27 18.5 45.5t45.5 18.5v-64h-64zM235 0q0 62 43.5 105.5t105.5 43.5v-42q-44 0 -75.5 -31.5t-31.5 -75.5h-42z" /> -<glyph unicode="" horiz-adv-x="469" d="M234.5 235q61.5 0 105.5 -44t44 -106h-43q0 44 -31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5h-43q0 62 44 106t105.5 44zM235 320q97 0 165.5 -69t68.5 -166h-42q0 80 -56.5 136t-136 56t-135.5 -56t-56 -136h-43q0 97 69 166t166 69z" /> -<glyph unicode="" d="M235 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM213 405q88 0 151 -62.5t63 -150.5v-171q0 -17 -12.5 -29.5t-30.5 -12.5h-171q-88 0 -150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121 t50 -121t120.5 -50z" /> -<glyph unicode="" d="M384 308q-84 -25 -171 -24q-87 0 -170 24v-232q83 24 170 24t171 -24v232zM415 363q12 0 12 -14v-314q0 -14 -12 -14q-4 0 -7 2q-94 35 -195 35t-194 -35q-4 -2 -7 -2q-12 0 -12 14v314q0 14 12 14q3 0 7 -2q94 -35 194 -35q101 0 195 35q3 2 7 2z" /> -<glyph unicode="" horiz-adv-x="342" d="M340 -3l2 -6q0 -12 -14 -12h-315q-13 0 -13 12q0 3 1 6q35 95 35 195t-35 195q-1 3 -1 6q0 12 13 12h315q13 0 13 -12q0 -3 -1 -6q-35 -95 -35 -195q0 -101 35 -195zM54 21h233q-25 84 -25 171t25 171h-233q25 -84 25 -171t-25 -171z" /> -<glyph unicode="" d="M213.5 320q-75.5 0 -155.5 -14q-15 -57 -15 -114t15 -114q80 -14 155.5 -14t155.5 14q15 57 15 114t-15 114q-80 14 -155.5 14zM213 363q83 0 170 -16l20 -3l5 -19q19 -67 19 -133t-19 -133l-5 -19l-20 -3q-87 -16 -170 -16t-169 16l-20 3l-5 19q-19 67 -19 133t19 133 l5 19l20 3q87 16 169 16z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 128h42v-43h-42v43zM427 213h42v-42h-42v42zM469 43q0 -16 -13 -29.5t-29 -13.5v43h42zM256 384h43v-43h-43v43zM427 299h42v-43h-42v43zM427 384q16 0 29 -13.5t13 -29.5h-42v43zM0 299h43v-43h-43v43zM341 384h43v-43h-43v43zM341 43h43v-43h-43v43zM43 384v-43 h-43q0 16 13.5 29.5t29.5 13.5zM171 384h42v-43h-42v43zM85 384h43v-43h-43v43zM0 213h299v-213h-256q-18 0 -30.5 12.5t-12.5 30.5v170zM43 43h213l-68 91l-54 -69l-38 46z" /> -<glyph unicode="" horiz-adv-x="469" d="M469 128v-43h-42v43h42zM469 213v-42h-42v42h42zM469 43q0 -16 -13 -29.5t-29 -13.5v43h42zM299 384v-43h-43v43h43zM469 299v-43h-42v43h42zM427 384q16 0 29 -13.5t13 -29.5h-42v43zM43 0q-18 0 -30.5 12.5t-12.5 30.5v85h213v-128h-170zM43 299v-43h-43v43h43zM299 43 v-43h-43v43h43zM384 384v-43h-43v43h43zM384 43v-43h-43v43h43zM43 384v-43h-43q0 16 13.5 29.5t29.5 13.5zM43 213v-42h-43v42h43zM213 384v-43h-42v43h42zM128 384v-43h-43v43h43z" /> -<glyph unicode="" horiz-adv-x="469" d="M384 299v-128h-171v128h171zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" /> -<glyph unicode="" horiz-adv-x="384" d="M149 277l107 -85l-107 -85v170zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298z" /> -<glyph unicode="" horiz-adv-x="384" d="M352 382q24 -6 31 -30l-351 -350q-11 3 -19 11t-11 19zM189 384h61l-250 -250v61zM43 384h42l-85 -85v42q0 18 12.5 30.5t30.5 12.5zM341 0h-42l85 85v-42q0 -18 -13 -30q-12 -13 -30 -13zM134 0l250 250v-61l-189 -189h-61z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 23v338q-64 -8 -106.5 -56t-42.5 -113t43 -113t106 -56zM235 361v-20h61q-29 16 -61 20zM235 299v-22h126q-7 12 -15 22h-111zM235 235v-22h148 q-2 9 -5 22h-143zM235 23q32 4 61 20h-61v-20zM346 85q8 10 15 22h-126v-22h111zM378 149q3 13 5 22h-148v-22h143z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM234.5 64q70.5 0 120.5 37.5t50 90.5t-50 90.5t-120.5 37.5t-120.5 -37.5t-50 -90.5t50 -90.5t120.5 -37.5z" /> -<glyph unicode="" horiz-adv-x="508" d="M146 178l25 78l24 -78h-49zM469 299h39l-44 -192h-37l-32 130l-32 -130h-38l-2 9q-21 -43 -62 -69t-90 -26q-71 0 -121 50t-50 121t50 121t121 50q81 0 133 -64h16l26 -135l32 135h34l32 -135zM220 107h40l-68 192h-43l-68 -192h41l15 42h68z" /> -<glyph unicode="" horiz-adv-x="256" d="M128 269l-98 -98l-30 30l128 128l128 -128l-30 -30zM0 64v43h256v-43h-256z" /> -<glyph unicode="" horiz-adv-x="299" d="M0 85h299v-42h-299v42zM149 299l143 -171h-285z" /> -<glyph unicode="" horiz-adv-x="341" d="M128 21v342h85v-342h-85zM0 21v171h85v-171h-85zM256 256h85v-235h-85v235z" /> -<glyph unicode="" horiz-adv-x="373" d="M0 64v256l181 -128zM192 320l181 -128l-181 -128v256z" /> -<glyph unicode="" horiz-adv-x="373" d="M181 64l-181 128l181 128v-256zM192 192l181 128v-256z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 170.5q0 70.5 50 120.5t121 50v86l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5zM145 107h-17v70l-21 -6v15l38 12h2v-91h-2zM239 145q0 -13 -2 -17l-7 -13 q-6 -6 -10 -6q-2 0 -6.5 -1t-6.5 -1q-9 0 -13 2q-2 1 -5 3t-6 3q-2 1 -6 13q-2 6 -2 17v15q0 13 2 17l6 13q7 6 11 6q2 0 6.5 1t6.5 1q8 0 13 -2q2 -1 5 -3t5 -3q3 -1 7 -13q2 -6 2 -17v-15zM222 162v11q-2 4 -2 6l-5 4q-2 3 -6 3t-6 -3l-5 -4q-2 -4 -2 -6v-43q2 -4 2 -6 t2 -3t3 -2q2 -2 6 -2t6 2l5 5q2 4 2 6v32z" /> -<glyph unicode="" horiz-adv-x="341" d="M119 160h9q6 0 10.5 4.5t4.5 8.5v4q-2 2 -2 4t-4 2h-11q-2 -2 -4.5 -2t-2.5 -4v-4h-21q0 6 2 10.5t6.5 8.5t8.5 4q1 0 5.5 1t5.5 1q8 0 13 -2q2 -1 5 -2t5 -2q3 -1 7 -9q2 -4 2 -10v-7q-2 -4 -2 -6q0 -4 -5 -4q-2 0 -6 -5q9 -4 11 -8q4 -9 4 -13q0 -8 -2 -11q-1 -1 -3 -4 t-4 -4q-4 -4 -10 -4q-2 0 -6.5 -1t-6.5 -1q-9 0 -11 2q-1 1 -5 2t-5 2q-3 1 -7 8q-2 5 -2 13h17v-4q2 -2 2 -4t5 -2h10q2 2 4.5 2t2.5 4v11q-2 2 -2 4t-5 2h-13v15zM241 145q0 -13 -2 -17l-6 -13q-7 -6 -11 -6q-2 0 -6.5 -1t-6.5 -1q-8 0 -13 2q-2 1 -5 3t-5 3q-3 1 -7 13 q-2 6 -2 17v15q0 13 2 17l7 13q6 6 10 6q2 0 6.5 1t6.5 1q9 0 13 -2q2 -1 5 -3t6 -3q2 -1 6 -13q2 -6 2 -17v-15zM222 162v11q-2 4 -2 6l-5 4q-2 3 -6 3t-6 -3l-5 -4q-2 -4 -2 -6v-43q2 -4 2 -6l5 -5q2 -2 6 -2t6 2l5 5q2 4 2 6v32zM0 170.5q0 70.5 50 120.5t121 50v86 l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M0 170.5q0 70.5 50 120.5t121 50v86l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5zM143 151l4 47h51v-15h-36l-2 -19q2 0 2 2q0 1 1 1t1 2h5h4q8 0 10 -3q2 -1 5 -3t4 -3 q2 -2 6 -11q3 -4 3 -12.5t-3 -10.5q0 -1 -2 -4.5t-4 -6.5q-2 -2 -11 -6q-4 -2 -12.5 -2t-10.5 2q-1 1 -5 2t-6 2q-3 1 -6 9q-2 4 -2 10h17q0 -4 4 -8q2 -2 9 -2q4 0 6 2l4 4q2 4 2 6v13l-2 4l-4 5q-4 2 -6 2h-5q-2 0 -4 -2q-1 -1 -1.5 -1t-0.5 -1l-2 -3h-13z" /> -<glyph unicode="" horiz-adv-x="384" d="M299 21q17 0 29.5 12.5t12.5 30.5h43q0 -35 -25 -60t-60 -25q-19 0 -35 7q-41 21 -59 76q-4 14 -12 22.5t-24 21.5q-41 31 -61 67q-23 41 -23 83q0 63 43.5 106t106.5 43t106 -43t43 -106h-43q0 45 -31 76t-75.5 31t-75.5 -31t-31 -76q0 -31 17 -63q16 -27 50 -54 q13 -10 20 -16t16.5 -19t14.5 -29q13 -38 36 -50q8 -4 17 -4zM99 392q-56 -56 -56 -136q0 -79 56 -136l-30 -30q-69 69 -69 166t69 166zM181 256q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5t-15.5 -37.5t-37.5 -15.5t-38 15.5t-16 37.5z" /> -<glyph unicode="" d="M149 107v170h43v-170h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM235 107v170h42v-170h-42z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 107v170h-43v-170h43zM277 107v170h-42v-170h42z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 43v298h85v-298h-85zM171 341h85v-298h-85v298z" /> -<glyph unicode="" d="M171 96v192l128 -96zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 96l128 96l-128 96v-192z" /> -<glyph unicode="" horiz-adv-x="235" d="M0 341l235 -149l-235 -149v298z" /> -<glyph unicode="" horiz-adv-x="405" d="M256 320v-43h-256v43h256zM256 235v-43h-256v43h256zM0 107v42h171v-42h-171zM299 320h106v-43h-64v-192q0 -26 -18.5 -45t-45 -19t-45.5 19t-19 45.5t19 45t45 18.5q11 0 22 -4v175z" /> -<glyph unicode="" d="M256 235v-43h-256v43h256zM256 320v-43h-256v43h256zM341 149h86v-42h-86v-86h-42v86h-86v42h86v86h42v-86zM0 107v42h171v-42h-171z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 299v-86h-42v128h256v64l85 -85l-85 -85v64h-214zM299 85v86h42v-128h-256v-64l-85 85l85 85v-64h214zM213 128h-32v85h-32v22l43 21h21v-128z" /> -<glyph unicode="" horiz-adv-x="384" d="M85 299v-86h-42v128h256v64l85 -85l-85 -85v64h-214zM299 85v86h42v-128h-256v-64l-85 85l85 85v-64h214z" /> -<glyph unicode="" horiz-adv-x="341" d="M239 124q0 -20 -8 -30t-23 -10t-23 10t-8 29v17q0 19 8 29t23 10t23 -10t8 -28v-17zM221 142q0 12 -3 17t-10 5t-10 -5t-3 -15v-23q0 -11 3 -16.5t10 -5.5t10 5t3 16v22zM147 85h-19v71l-22 -7v15l39 14h2v-93zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50 t-120.5 50t-50 120h43q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" /> -<glyph unicode="" horiz-adv-x="341" d="M239 123q0 -20 -8 -30t-23.5 -10t-23.5 10t-8 29v17q0 20 8 30t23.5 10t23.5 -10t8 -29v-17zM221 142q0 11 -3.5 16.5t-10 5.5t-9.5 -5t-3 -16v-23q0 -11 3 -16.5t10 -5.5t10 5t3 16v23zM120 139h10q7 0 10 3.5t3 9.5t-3 9t-9 3t-9.5 -3t-3.5 -8h-18q0 8 4 13.5t11 9 t15 3.5q15 0 23.5 -7t8.5 -20q0 -6 -4 -11.5t-10 -8.5q8 -3 11.5 -8.5t3.5 -13.5q0 -12 -9 -19.5t-24 -7.5q-14 0 -23 7t-9 20h19q0 -6 4 -9t10 -3t10 3.5t4 8.5q0 14 -16 14h-9v15zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50t-120.5 50t-50 120h43 q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" /> -<glyph unicode="" horiz-adv-x="341" d="M142 131l5 46h51v-15h-36l-2 -20q6 4 13 4q13 0 20.5 -8t7.5 -23q0 -8 -4 -15t-10.5 -11t-16.5 -4q-8 0 -15 3.5t-11 9.5t-4 13h18q0 -5 3.5 -8t8.5 -3q6 0 9.5 4t3.5 12t-4 12t-11 4q-6 0 -10 -3l-2 -2zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50 t-120.5 50t-50 120h43q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" /> -<glyph unicode="" horiz-adv-x="341" d="M171 341q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50t-120.5 50t-50 121h43q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5v-86l-107 107l107 107v-86z" /> -<glyph unicode="" horiz-adv-x="341" d="M141 252l-31 -30l-110 111l30 30zM224 363h117v-118l-43 44l-268 -268l-30 30l268 268zM231 162l67 -67l43 44v-118h-117l44 44l-67 67z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 64v256l181 -128zM213 320h43v-256h-43v256z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 320h43v-256h-43v256zM75 192l181 128v-256z" /> -<glyph unicode="" horiz-adv-x="256" d="M0 320h256v-256h-256v256z" /> -<glyph unicode="" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM123 102q-38 37 -38 90t38 91l-30 30q-50 -50 -50 -121t50 -121zM213.5 107q35.5 0 60.5 25t25 60t-25 60t-60.5 25 t-60.5 -25t-25 -60t25 -60t60.5 -25zM334 71q50 50 50 121t-50 121l-30 -31q37 -37 37 -90t-37 -91zM213.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 85h128v-42h-128v42zM0 341h213v-42h-213v42zM213 0h-42v128h42v-43h171v-42h-171v-43zM85 256h43v-128h-43v43h-85v42h85v43zM384 171h-213v42h213v-42zM256 256v128h43v-43h85v-42h-85v-43h-43z" /> -<glyph unicode="" horiz-adv-x="288" d="M288 192q0 -28 -14.5 -51t-38.5 -35v172q24 -12 38.5 -35t14.5 -51zM0 256h85l107 107v-342l-107 107h-85v128z" /> -<glyph unicode="" horiz-adv-x="192" d="M0 256h85l107 107v-342l-107 107h-85v128z" /> -<glyph unicode="" horiz-adv-x="384" d="M288 192q0 -6 -1 -13l-52 52v47q24 -12 38.5 -35t14.5 -51zM341 192q0 50 -30 89.5t-76 53.5v44q64 -15 106.5 -67t42.5 -120q0 -47 -22 -89l-32 33q11 27 11 56zM27 384l165 -165l192 -192l-27 -27l-44 44q-35 -29 -78 -39v44q25 8 48 25l-91 91v-144l-107 107h-85v128 h101l-101 101zM192 363v-90l-45 45z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 256h85l107 107v-342l-107 107h-85v128zM288 192q0 -28 -14.5 -51t-38.5 -35v172q24 -12 38.5 -35t14.5 -51zM235 379q64 -15 106.5 -67t42.5 -120t-42.5 -120t-106.5 -67v44q46 14 76 53.5t30 89.5t-30 89.5t-76 53.5v44z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM235 85v214h-86v-43h43v-171h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 213v43q0 18 -12.5 30.5t-30.5 12.5h-85v-43h85v-43h-42q-18 0 -30.5 -12.5t-12.5 -29.5v-86h128v43h-85v43h42 q18 0 30.5 12.5t12.5 29.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 224v32q0 18 -12.5 30.5t-30.5 12.5h-85v-43h85v-43h-42v-42h42v-43h-85v-43h85q18 0 30.5 12.5t12.5 30.5v32 q0 13 -9.5 22.5t-22.5 9.5q13 0 22.5 9.5t9.5 22.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 85v214h-43v-86h-42v86h-43v-128h85v-86h43z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-128v-128h85v-43h-85v-43h85q18 0 30.5 12.5t12.5 30.5v43q0 17 -12.5 29.5t-30.5 12.5h-42v43h85z" /> -<glyph unicode="" horiz-adv-x="384" d="M171 128v43h42v-43h-42zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-85q-18 0 -30.5 -12.5t-12.5 -30.5v-128q0 -18 12.5 -30.5t30.5 -12.5h42 q18 0 30.5 12.5t12.5 30.5v43q0 17 -12.5 29.5t-30.5 12.5h-42v43h85z" /> -<glyph unicode="" horiz-adv-x="320" d="M0 213h171v-42h-171v42zM320 64h-43v227l-64 -22v36l101 36h6v-277z" /> -<glyph unicode="" horiz-adv-x="405" d="M278 100h127v-36h-184v32l89 97q10 11 19 22q7 8 12 18q4 7 6 14q2 8 2 14q0 9 -3 18q-3 8 -8 13q-5 7 -12.5 10t-17.5 3q-12 0 -20 -4q-9 -4 -15 -10q-6 -8 -8 -16q-3 -9 -3 -19h-46q1 17 6 32q6 16 18 28t29 19q18 6 40 6q20 0 36 -5q17 -6 27 -15q11 -10 17 -24t6 -31 q0 -13 -4 -25q-5 -12 -12 -25q-8 -13 -17 -25q-13 -15 -23 -25zM0 213h171v-42h-171v42z" /> -<glyph unicode="" horiz-adv-x="341" d="M128 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM341 64h-42v227l-64 -22v36l100 36h6v-277z" /> -<glyph unicode="" d="M300 100h127v-36h-184v32l89 97q10 11 18 22q7 8 12 18q4 7 6 14q2 8 2 14q0 9 -3 18q-3 8 -8 13q-5 7 -12 10t-17 3q-12 0 -21 -4t-14 -10q-6 -8 -9 -16q-2 -9 -3 -19h-45q0 17 6 32q6 16 17.5 28t29.5 19q17 6 39 6q20 0 37 -5q16 -6 27 -15q10 -10 16 -24t6 -31 q0 -13 -4 -25t-12 -25q-7 -13 -17 -25q-13 -15 -22 -25zM128 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43z" /> -<glyph unicode="" horiz-adv-x="512" d="M0 283l101 37h6v-256h-43v205l-64 -22v36zM507 141q5 -8 5 -21t-5 -23q-6 -11 -15 -18q-10 -7 -24 -11q-13 -4 -30 -4q-20 0 -34.5 5t-24.5 14q-9 9 -14.5 20t-5.5 22h41q0 -8 3 -14q4 -6 9 -9q5 -4 12 -5q6 -2 14 -2q16 0 24.5 6t8.5 17q0 4 -1 8q-2 4 -6 7q-5 4 -12 6 q-8 3 -20 6q-16 3 -28 8t-20 11q-9 6 -14 15t-5 21t5 21q5 11 14 18.5t23 12.5q13 4 29 4q18 0 32 -5t23 -12q10 -8 15 -19t5 -23h-42q0 4 -2 10t-6 9q-5 4 -10 6q-7 3 -14.5 3t-13.5 -2t-10 -5q-3 -3 -6 -8q-1 -4 -1 -8.5t1.5 -8t5.5 -6.5t12 -5q8 -3 19 -5q15 -4 28 -8 q12 -5 22 -12q9 -6 13 -16zM295 298q11 -13 16 -34q6 -21 6 -51v-41q0 -30 -6 -51q-5 -21 -16 -34q-11 -14 -26 -19q-15 -6 -34 -6q-18 0 -34 6q-15 5 -26 19q-11 12 -17 34q-6 20 -6 51v41q0 29 6 51q6 21 16.5 34t26 18.5t34.5 5.5t34 -5.5t26 -18.5zM275 166v54 q0 18 -2 32q-3 13 -8 21t-13 11.5t-17 3.5q-10 0 -18 -3q-7 -4 -12.5 -12t-8.5 -21q-2 -13 -2 -33v-53q0 -20 2 -33q3 -13 9 -21q5 -9 12.5 -12.5t17.5 -3.5t17.5 3.5t12.5 12t7.5 22t2.5 32.5z" /> -<glyph unicode="" horiz-adv-x="361" d="M158 171q5 -7 8 -16q2 -9 2 -18q0 -18 -6.5 -32t-17.5 -23q-12 -10 -27 -15q-16 -5 -34 -5q-16 0 -31 4.5t-27 13.5t-18 23q-7 13 -7 31h42q0 -9 3 -16t8.5 -12t13.5 -7q7 -3 17 -3q20 0 31 10q11 11 11 31q0 10 -3 18t-10 13q-5 5 -14 8q-9 2 -20 2h-25v33h25q11 0 19 3 t13 8q6 5 8.5 12t2.5 16q0 18 -9 28q-10 10 -29 10q-9 0 -16 -2.5t-12 -6.5q-5 -5 -8 -11.5t-3 -14.5h-43q0 15 7 27q5 12 16 22t26 15q14 5 32 5t32.5 -4t25.5 -13.5t17 -22.5q6 -14 6 -32q0 -8 -2 -15t-8 -15q-4 -7 -12 -14q-6 -6 -17 -11q12 -4 20 -10t13 -14zM356 141 q4 -8 5 -21q0 -13 -5 -23q-6 -11 -16 -18q-9 -7 -23 -11t-31 -4q-19 0 -33.5 5t-24.5 14t-15 20t-5 22h40q0 -8 4 -14t9 -9q5 -4 12 -5q6 -2 13 -2q17 0 25.5 6t8.5 17q0 4 -2 8q-1 4 -5 7q-5 4 -13 6q-8 3 -20 6q-15 3 -27 8q-13 5 -21 11q-9 7 -14 15q-4 10 -4 21 q0 12 4 21q6 11 15 18.5t22 12.5q13 4 30 4q18 0 31 -5q14 -5 23 -12q10 -8 15 -19t5 -23h-41q0 4 -2 10q-3 6 -7 9q-4 4 -10 6q-6 3 -14 3t-13.5 -2t-9.5 -5t-6 -8q-2 -4 -2 -8.5t1.5 -8t6 -6.5t11.5 -5q9 -3 19 -5q15 -4 29 -8q12 -5 21 -12q9 -6 14 -16z" /> -<glyph unicode="" horiz-adv-x="177" d="M177 181q0 -32 -6.5 -54t-18 -36t-28 -20.5t-35.5 -6.5q-20 0 -37 6q-16 7 -27 21q-12 14 -19 36q-6 22 -6 54v44q0 32 6.5 54t18 36t28 20t36 6t36 -6t28 -20t18 -36t6.5 -54v-44zM132 232q0 19 -3 34q-3 14 -8 23q-6 8 -14 12t-18 4q-11 0 -19 -4t-13 -12 q-6 -9 -9 -22.5t-3 -34.5v-57q0 -20 3 -35q3 -13 9 -23q5 -9 13 -13t19 -4t19 4t13 13t8 23t3 35v57z" /> -<glyph unicode="" horiz-adv-x="448" d="M443 143l-15 -40l-264 95l45 121l182 -66q34 -12 49 -44t3 -66zM0 189l15 40l405 -146l-14 -40l-97 34v-34h-170v96zM124 230.5q-24 -11.5 -49 -3t-36.5 32.5t-3 49t32.5 36.5t49 3t36.5 -32.5t3 -49t-32.5 -36.5z" /> -<glyph unicode="" d="M427 213v-42h-278v128h192q36 0 61 -25t25 -61zM0 149h427v-42h-128v-43h-171v43h-128v42zM109.5 190q-18.5 -19 -45 -19.5t-45.5 18.5t-19 45t18.5 45t45 19.5t45.5 -18t19 -45t-18.5 -45.5z" /> -<glyph unicode="" horiz-adv-x="469" d="M128 171q-26 0 -45 18.5t-19 45t19 45.5t45 19t45 -19t19 -45.5t-19 -45t-45 -18.5zM384 299q35 0 60 -25t25 -61v-128h-469v214h43v-150h170v150h171z" /> -<glyph unicode="" horiz-adv-x="448" d="M43 192q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM444 80q7 -12 2.5 -25t-17.5 -19l-79 -36l-73 149h-149q-27 0 -45.5 19t-18.5 45v171h128v-128h75q26 0 38 -24l73 -149l23 11q12 5 24.5 1.5t18.5 -15.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M43 192q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM373 64q14 0 23 -9.5t9 -22.5t-9 -22.5t-23 -9.5h-96v149h-149q-26 0 -45 19t-19 45v171h128v-128h107q17 0 29.5 -12.5t12.5 -30.5v-149h32z" /> -<glyph unicode="" horiz-adv-x="363" d="M362 38q3 -15 -6.5 -26.5t-24.5 -11.5h-96v64l21 85h-128q-26 0 -45 19t-19 45v171h128v-128h107q17 0 29.5 -12.5t12.5 -30.5l-42 -149h30q12 0 21.5 -7t11.5 -19zM43 192q0 -27 18.5 -45.5t45.5 -18.5h85v-43h-85q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192z" /> -<glyph unicode="" d="M71.5 328q-14.5 10 -17.5 27.5t7 32t27.5 17.5t32 -7.5t17.5 -27.5t-7 -31.5t-27.5 -17.5t-32 7zM299 43v-43h-151q-39 0 -69 25.5t-37 64.5l-42 209h43l42 -202q3 -24 21 -39t42 -15h151zM304 128l123 -96l-32 -32l-82 64h-146q-23 0 -40.5 14.5t-22.5 37.5l-29 126 q-3 20 8.5 36.5t31.5 19.5q10 2 21 -1q10 -3 16 -8l35 -27q47 -37 100 -27v-46q-48 -8 -110 26l22 -87h105z" /> -<glyph unicode="" horiz-adv-x="341" d="M76.5 332.5q-12.5 12.5 -12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5zM43 107q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM341 20l-30 -31l-75 75h-108q-27 0 -45.5 18.5t-18.5 45.5v123 q0 20 14 34t34 14h1q10 0 20 -5q9 -4 15 -11l30 -33q17 -19 45 -31.5t54 -11.5v-47q-29 0 -61 13.5t-56 33.5v-79h73z" /> -<glyph unicode="" horiz-adv-x="469" d="M107 -21l128 128l128 -128h-256zM427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-86v42h86v256h-384v-256h85v-42h-85q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM171 213v22q0 8 -6.5 14.5t-15.5 6.5h-64q-8 0 -14.5 -6.5t-6.5 -14.5v-86q0 -8 6.5 -14.5t14.5 -6.5h64q9 0 15.5 6.5 t6.5 14.5v22h-32v-11h-43v64h43v-11h32zM320 213v22q0 8 -6.5 14.5t-14.5 6.5h-64q-9 0 -15.5 -6.5t-6.5 -14.5v-86q0 -8 6.5 -14.5t15.5 -6.5h64q8 0 14.5 6.5t6.5 14.5v22h-32v-11h-43v64h43v-11h32z" /> -<glyph unicode="" d="M427 235q-18 0 -30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v85q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5v85q0 18 12.5 30.5t30.5 12.5h341q18 0 30.5 -12.5t12.5 -30.5v-85zM235 75v42 h-43v-42h43zM235 171v42h-43v-42h43zM235 267v42h-43v-42h43z" /> -<glyph unicode="" d="M427 256h-43v-43h43v-42h-43v-43h43v-43h-43v-42q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-42h43v-43zM341 43v298h-298v-298h298zM85 171h107v-86h-107v86zM213 213h86v-64h-86 v64zM85 299h107v-107h-107v107zM213 107h86v-128h-86v128z" /> -<glyph unicode="" d="M384 107v42h43v-42h-43zM384 299h43v-107h-43v107zM170.5 363q70.5 0 120.5 -50t50 -121t-50 -121t-120.5 -50t-120.5 50t-50 121t50 121t120.5 50zM170.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-128v-214h128v43h-85v43h85v42h-85v43h85z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 32h405v-43h-405v43zM153 154l-113 31l-34 9v110l31 -8l20 -50l106 -28v177l41 -11l59 -193l113 -30q13 -3 19.5 -14.5t3 -24.5t-15 -19.5t-24.5 -3.5l-113 30z" /> -<glyph unicode="" horiz-adv-x="433" d="M14 49h405v-43h-405v43zM431.5 248.5q3.5 -12.5 -3 -24t-19.5 -15.5l-114 -30l-92 -25l-114 -30l-34 -10l-16 29l-39 67l31 9l42 -33l106 28l-88 153l41 11l147 -137l113 30q13 4 24.5 -3t15 -19.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M128 299v-43h-43v43h43zM128 213v-42h-43v42h43zM128 384v-43h-43q0 18 12.5 30.5t30.5 12.5zM213 128v-43h-42v43h42zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM213 384v-43h-42v43h42zM128 85q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM341 171v42h43v-42h-43zM341 256 v43h43v-43h-43zM341 85v43h43q0 -18 -12.5 -30.5t-30.5 -12.5zM43 299v-256h256v-43h-256q-18 0 -30.5 12.5t-12.5 30.5v256h43zM256 341v43h43v-43h-43zM256 85v43h43v-43h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM0 256v43h43v-43h-43zM256 0v43h43v-43h-43zM341 384q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 12.5 30.5 t30.5 12.5h213zM341 128v213h-213v-213h213zM171 0v43h42v-43h-42zM85 0v43h43v-43h-43z" /> -<glyph unicode="" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM128 75q22 0 37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5t-37.5 -15.5t-15.5 -37.5t15.5 -37.5t37.5 -15.5zM160 277q0 -22 15.5 -37.5t37.5 -15.5t38 15.5 t16 37.5t-16 38t-38 16t-37.5 -16t-15.5 -38zM299 75q22 0 37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5t-38 -15.5t-16 -37.5t16 -37.5t38 -15.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM171 128v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM213 256v-128h86q8 0 14.5 6.5t6.5 14.5v86q0 8 -6.5 14.5 t-14.5 6.5h-86zM245 160v64h43v-64h-43z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM171 128v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM320 149v86q0 8 -6.5 14.5t-14.5 6.5h-64q-9 0 -15.5 -6.5 t-6.5 -14.5v-86q0 -8 6.5 -14.5t15.5 -6.5h16v-32h32v32h16q8 0 14.5 6.5t6.5 14.5zM245 160v64h43v-64h-43z" /> -<glyph unicode="" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h42v128h171v-85h-128v-171h43v128h213z" /> -<glyph unicode="" horiz-adv-x="384" d="M256 256v-128h-128v128h128zM213 171v42h-42v-42h42zM384 213h-43v-42h43v-43h-43v-43q0 -17 -12.5 -29.5t-29.5 -12.5h-43v-43h-43v43h-42v-43h-43v43h-43q-17 0 -29.5 12.5t-12.5 29.5v43h-43v43h43v42h-43v43h43v43q0 17 12.5 29.5t29.5 12.5h43v43h43v-43h42v43h43 v-43h43q17 0 29.5 -12.5t12.5 -29.5v-43h43v-43zM299 85v214h-214v-214h214z" /> -<glyph unicode="" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM384 21v342h-341v-342h341zM341 320v-256h-256v256h86v-43h-43v-170h171v170h-64v-48q21 -12 21 -37q0 -18 -12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5q0 24 21 37v48q0 18 12.5 30.5t30.5 12.5h106z" /> -<glyph unicode="" horiz-adv-x="256" d="M107 341h42v-119h75l-96 -96l-96 96h75v119zM0 149h43q0 -35 25 -60t60 -25t60 25t25 60h43q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" /> -<glyph unicode="" horiz-adv-x="405" d="M0 256h405v-43h-405v43zM0 128v43h107v-43h-107zM149 128v43h107v-43h-107zM299 128v43h106v-43h-106z" /> -<glyph unicode="" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384zM192 192h-43l86 85l85 -85h-43v-85h-85v85z" /> -<glyph unicode="" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM43 342v-65q26 0 45 19t19 46h-64zM43 192q62 0 105.5 44t43.5 106h-43q0 -45 -31 -76t-75 -31v-43zM43 64h298l-96 128 l-74 -96l-54 64z" /> -<glyph unicode="" horiz-adv-x="363" d="M0 107q62 0 105.5 -44t43.5 -106h-42q0 44 -31.5 75.5t-75.5 31.5v43zM0 21q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 192q97 0 166 -68.5t69 -166.5h-43q0 80 -56 136t-136 56v43zM320 426q18 0 30.5 -12t12.5 -30v-363q0 -17 -12.5 -29.5t-30.5 -12.5h-44q-4 45 -21 85 h65v277h-213v-128q-20 8 -43 14v157q0 18 12.5 30.5t30.5 12.5z" /> -<glyph unicode="" horiz-adv-x="512" d="M0 128v128h43v-128h-43zM64 85v214h43v-214h-43zM469 256h43v-128h-43v128zM405 85v214h43v-214h-43zM352 384q13 0 22.5 -9.5t9.5 -22.5v-320q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192zM341 43v298h-170v-298h170z " /> -<glyph unicode="" horiz-adv-x="512" d="M394.5 320q48.5 0 83 -34.5t34.5 -83t-34.5 -83t-82.5 -34.5h-278q-48 0 -82.5 34.5t-34.5 83t34.5 83t83 34.5t83 -34.5t34.5 -82.5q0 -43 -27 -75h96q-27 32 -27 75q0 48 34.5 82.5t83 34.5zM117 128q31 0 53 22t22 53t-22 52.5t-53 21.5t-52.5 -21.5t-21.5 -52.5 t21.5 -53t52.5 -22zM395 128q31 0 52.5 22t21.5 53t-21.5 52.5t-52.5 21.5t-53 -21.5t-22 -52.5t22 -53t53 -22z" /> -<glyph unicode="" horiz-adv-x="469" d="M149 277v-85h107v85h-107zM0 427h85v-22h299v22h85v-86h-21v-298h21v-86h-85v22h-299v-22h-85v86h21v298h-21v86zM85 43v-22h299v22h21v298h-21v22h-299v-22h-21v-298h21zM107 320h192v-85h64v-171h-214v85h-42v171zM299 149h-107v-42h128v85h-21v-43z" /> -<glyph unicode="" horiz-adv-x="341" d="M47 115q19 0 33 -13.5t14 -33t-14 -33.5t-33 -14t-33 14t-14 33.5t14 33t33 13.5zM0 238q90 0 153.5 -63.5t63.5 -153.5h-62q0 64 -45.5 109.5t-109.5 45.5v62zM0 363q93 0 171.5 -46t124 -124.5t45.5 -171.5h-62q0 116 -81.5 198t-197.5 82v62z" /> -<glyph unicode="" horiz-adv-x="474" d="M79 384h164q16 2 29.5 -9t14.5 -28v-55.5v-55.5l36 59q30 -47 84 -135.5t67 -110.5h-241q-29 -30 -52 -39q-42 -18 -88 -4t-71 53q-27 39 -21 89t41 82v106q-2 18 8.5 33t28.5 15zM91 331v-72q40 13 82 -1t65 -49v122h-147zM131 217q-30 -1 -51 -18.5t-31 -47.5 q-8 -34 13 -65.5t56 -36.5q34 -6 64 17t32 58q5 36 -21 65t-62 28zM323 201l-62 -102h125z" /> -<glyph unicode="" horiz-adv-x="423" d="M212.5 409q18.5 0 31.5 -13.5t13 -31.5t-13 -31.5t-31.5 -13.5t-31.5 13.5t-13 31.5t13 31.5t31.5 13.5zM337 362q22 0 37.5 -16t15.5 -37.5t-15.5 -37.5t-37.5 -16t-38 16t-16 37.5t16 37.5t38 16zM91.5 352q16.5 0 28 -12t11.5 -28.5t-11.5 -28.5t-28 -12t-28.5 12 t-12 28.5t12 28.5t28.5 12zM34 218q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM389 218q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM85 91q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM340 91q14 0 24 -10 t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM212 44q14 0 24.5 -10.5t10.5 -24.5t-10.5 -24t-24.5 -10t-24 10t-10 24t10 24.5t24 10.5z" /> -<glyph unicode="" d="M0 405h85v-21h150v21h85v-85h-21v-64h42v21h86v-85h-22v-128h22v-85h-86v21h-128v-21h-85v85h21v43h-64v-22h-85v86h21v149h-21v85zM341 192v21h-42v-42h21v-86h-85v22h-43v-43h21v-21h128v21h22v128h-22zM235 320v21h-150v-21h-21v-149h21v-22h64v43h-21v85h85v-21h43 v64h-21zM213 192h-21v-43h43v22h21v42h-43v-21z" /> -<glyph unicode="" d="M281 137q-12 -13 -12 -14q-14 -13 -21 -17q-26 -19 -59 -12q-30 6 -45 36q-1 2 -2 3q-8 -12 -8 -13q-21 -28 -57 -29q-23 -1 -40 6q-36 16 -37 56h40l1 -4q5 -20 21 -24q21 -5 35 9q9 10 10.5 25t-6.5 26q-8 12 -23 14.5t-26 -6.5q-4 -3 -6 -5q-3 -5 -11 -5h-29 q9 53 20 110h111v-33h-4h-75q-3 0 -4 -3q-1 -4 -7 -39v-3q21 19 52 14q27 -5 42 -34q1 1 1 3q2 2 2 3q21 43 69 36q26 -3 46 -22q1 -1 23 -24l2 2q22 23 24 25q17 16 38 19q23 3 43 -5.5t30 -30.5q16 -38 -2 -74q-16 -33 -55 -35q-29 -1 -51 17q-3 2 -25 22q0 1 -5 6z M205 132q12 0 24 7q8 4 28 23q1 2 0 4q-2 1 -9.5 8t-11.5 11q-9 8 -21 12q-14 4 -25 -2t-15 -20q-1 -4 -1 -8q-1 -16 8 -25.5t23 -9.5zM304 164q22 -20 24 -21q13 -12 30 -11q25 0 30 24q1 7 0 15q-2 13 -11.5 21t-22.5 6q-15 -1 -28 -13q-1 -1 -22 -21z" /> -<glyph unicode="" d="M117 213h193q31 0 53 22t22 53t-22 53.5t-53.5 22.5t-53.5 -22.5t-22 -53.5v-33h-42v33q0 49 34.5 83.5t83 34.5t83 -34.5t34.5 -83t-34.5 -83t-82.5 -34.5h-193q-31 0 -53 -22t-22 -53t22 -53t53 -22t53 22t22 53v34h42v-34q0 -48 -34 -82.5t-82.5 -34.5t-83 34.5 t-34.5 83t34.5 82.5t82.5 34z" /> -<glyph unicode="" d="M379 87q6 2 9 -2.5t-2 -8.5q-34 -25 -81 -39t-92 -14q-122 0 -211 81q-3 3 -1 5.5t6 0.5q96 -56 211 -56q83 0 161 33zM425 113q5 -6 -2.5 -31.5t-23.5 -39.5q-3 -3 -5 -2t-1 5q18 45 12 53t-54 2q-4 0 -4.5 2t2.5 4q18 13 46 13.5t30 -6.5zM237 271v6q0 22 -6 30 q-7 11 -23 11q-28 0 -33 -25q-2 -8 -8 -8l-40 4q-8 2 -6 9q6 34 32.5 49t60.5 15q41 0 63 -21q3 -3 5.5 -6t4.5 -7.5t3.5 -7t2 -8t1.5 -8t1 -9v-8v-9v-9.5v-65q0 -17 16 -38q5 -7 0 -12q-16 -12 -32 -27q-5 -4 -10 -1q-11 9 -24 28q-17 -18 -32 -24.5t-37 -6.5 q-27 0 -44.5 17t-17.5 48q0 49 44 69q17 7 79 14zM229 184q8 14 8 45v9q-62 0 -62 -42q0 -14 6.5 -22.5t18.5 -8.5q18 0 29 19z" /> -<glyph unicode="" d="M397 243q30 0 30 -31v-103q0 -53 -39.5 -91.5t-92.5 -38.5h-171q-48 0 -86 38.5t-38 90.5v162q0 57 39 96t96 39h90q44 0 84.5 -39.5t40.5 -85.5v-11q0 -11 7.5 -18.5t20.5 -7.5h19zM135 294q-10 0 -17.5 -7.5t-7.5 -18t7.5 -18t17.5 -7.5h78q10 0 17 8t7 18t-7 17.5 t-17 7.5h-78zM289 90q10 0 17.5 6.5t7.5 16.5t-7.5 17t-17.5 7h-154q-10 0 -17.5 -7t-7.5 -17t7.5 -16.5t17.5 -6.5h154z" /> -<glyph unicode="" d="M427 192h-214v-213h-213v213h213v213h214v-213z" /> -<glyph unicode="" d="M219 243q26 0 42 -13t16 -38t-16 -38t-42 -13h-23v102h23zM221 400q85 0 145.5 -61t60.5 -147t-60.5 -147t-145.5 -61q-75 0 -133 49l-88 -12l34 85q-18 41 -18 86q0 86 60 147t145 61zM333 193v0q0 46 -30.5 74t-83.5 28h-78v-206h76q54 0 85 29t31 75z" /> -<glyph unicode="" d="M426 145q0 -46 -13 -81q-25 -66 -96 -81q-20 -4 -43 -4h-240h-3v1l45 45l124 124l0.5 0.5t1.5 0.5q4 4 7 3q4 -2 4 -8v-63v-4q0 -1 2 -1q47 1 55 1q8 1 19 5q28 9 35 42q3 16 3 33v114q0 3 3 6l93 93q0 1 2 4l1 -1h1v-4q0 -24 -1 -225zM100 112q0 -3 -3 -6l-94 -94l-3 -3 v5v111.5v112.5q0 45 12 79q25 69 99 84q19 4 42 4h75h89h75h4q-1 0 -2 -2q0 -1 -1 -1q-27 -28 -82.5 -83.5l-83.5 -83.5q-3 -2 -3 -3q-4 -3 -7 -1q-1 2 -4 6v3v32v31v3q0 1 -1 1q-50 -1 -59 -2q-4 0 -13 -3q-31 -9 -37 -44q-3 -15 -3 -34q-1 -25 0 -112z" /> -<glyph unicode="" d="M97 95q-40 0 -68.5 28.5t-28.5 68t28.5 67.5t68.5 28t68 -28t28 -67.5t-28 -68t-68 -28.5zM330 95q-40 0 -68.5 28.5t-28.5 68t28.5 67.5t68.5 28t68.5 -28t28.5 -67.5t-28.5 -68t-68.5 -28.5z" /> -<glyph unicode="" horiz-adv-x="384" d="M384 257q0 -38 -10.5 -65t-30.5 -41.5t-40 -21t-47 -9.5q19 -16 19 -51v-55.5v-34.5h-139v14v26.5v24.5q-16 -3 -29.5 -3t-23 2.5t-17 6.5t-12 8.5t-7.5 8.5t-4 7l-1 3q-6 14 -13.5 24t-12.5 13l-5 3q-11 9 -11 12.5t7 4.5h6q12 -1 23 -8t15 -14l5 -6q27 -47 81 -23 q3 24 18 37q-27 3 -47 9.5t-39.5 21t-30.5 41.5t-11 65q0 43 29 74q-13 33 3 74q3 -1 8 0.5t25 -6t44 -23.5q33 9 70 10q36 -1 70 -10q23 16 42.5 23t26.5 7l7 -1q17 -41 3 -74q29 -31 29 -74zM32 121.5q1 2.5 -2.5 4t-4.5 -1t2.5 -4t4.5 1zM43.5 109q2.5 2 -1 5.5t-6 1.5 t1 -5.5t6 -1.5zM54 93q3 2 0 6.5t-6 2.5t0 -6.5t6 -2.5zM69.5 77q2.5 3 -1.5 7.5t-7 1.5t1.5 -7.5t7 -1.5zM90 68.5q1 3.5 -4.5 5.5t-6.5 -2t4.5 -5.5t6.5 2zM107 63q6 0 6 4t-6 4t-6 -4t6 -4zM129 65q3 1 4.5 2.5t0.5 2.5q0 5 -6 4q-3 -1 -4.5 -2.5t-0.5 -3.5q0 -4 6 -3z " /> -<glyph unicode="" horiz-adv-x="267" d="M147 5q36 0 59 17.5t23 41.5q0 20 -12 33.5t-48 39.5h-14q-33 0 -59 -9q-48 -17 -48 -57q0 -30 27 -48t72 -18zM81 329q0 -36 19 -66.5t50 -30.5q17 0 34.5 12.5t17.5 42.5q0 33 -20 66t-52 33q-21 0 -35 -14.5t-14 -42.5zM220 164q22 -19 33.5 -36t11.5 -43 q0 -43 -38.5 -74.5t-107.5 -31.5q-58 0 -88.5 23.5t-30.5 57.5q0 43 42 67q39 24 107 29q-17 19 -17 36q0 6 7 23h-15q-41 0 -65.5 26.5t-24.5 60.5q0 44 31.5 73.5t88.5 29.5h113l-23 -22h-32q37 -32 37 -71q0 -19 -7.5 -34.5t-15.5 -23.5t-23 -20q-18 -14 -18 -29 q0 -13 15 -26z" /> -<glyph unicode="" d="M319 186.5q-8 10.5 -30 10.5q-27 0 -38 -16t-11 -45v-146q0 -5 -3 -8t-8 -3h-76q-4 0 -7.5 3t-3.5 8v270q0 4 3.5 7.5t7.5 3.5h74q4 0 6.5 -2t3.5 -6v-5q1 -2 1 -7q28 27 76 27q53 0 83 -27t30 -79v-182q0 -5 -3.5 -8t-7.5 -3h-78q-4 0 -7.5 3t-3.5 8v164q0 22 -8 32.5z M88 316.5q-15 -15.5 -36.5 -15.5t-36.5 15.5t-15 37t15 36.5t36.5 15t36.5 -15t15 -36.5t-15 -37zM101 260v-270q0 -5 -3.5 -8t-7.5 -3h-76q-5 0 -8 3t-3 8v270q0 4 3 7.5t8 3.5h76q4 0 7.5 -3.5t3.5 -7.5z" /> -<glyph unicode="" horiz-adv-x="256" d="M128 189q-45 0 -76.5 32t-31.5 76.5t31.5 76t76.5 31.5t76.5 -31.5t31.5 -76t-31.5 -76.5t-76.5 -32zM128 350q-22 0 -37.5 -15.5t-15.5 -37.5t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5zM252 176q8 -15 1 -24.5t-29 -24.5q-27 -17 -75 -22 l81 -81q7 -7 7 -17.5t-7 -17.5l-3 -3q-8 -7 -18 -7t-17 7q-12 11 -64 64l-63 -64q-7 -7 -17.5 -7t-17.5 7l-3 3q-7 7 -7 17.5t7 17.5l63 63l18 18q-48 4 -76 22q-22 15 -29 24.5t1 24.5q5 11 16 13.5t29 -8.5q14 -11 33.5 -17t32.5 -6l13 -1q49 0 79 24q18 11 29 8.5 t16 -13.5z" /> -<glyph unicode="" d="M267 315h145q4 0 9.5 -5t5.5 -12l-127 -85h-4l-29 18v84zM267 200l27 -18q2 -1 4 -1h3l1 1q-2 -1 29 19.5t64 41.5l32 21v-153q0 -12 -6.5 -18t-16.5 -6h-137v113v0zM128 239q13 0 20.5 -12.5t7.5 -34.5t-7.5 -34t-21.5 -12q-13 0 -21 12.5t-8 33.5t8 34t22 13zM0 357 l251 48v-426l-251 52v326zM168 139q16 21 16 54t-15.5 53.5t-40.5 20.5q-26 0 -42 -21t-16 -56q0 -32 16 -52t41 -20t41 21z" /> -<glyph unicode="" horiz-adv-x="356" d="M225 276q0 34 -52 34h-15q-7 0 -13 -4.5t-7 -11.5l-14 -60v-3q0 -5 3.5 -8.5t8.5 -3.5h12q15 0 28 3t24.5 9t18 17.5t6.5 27.5zM356 243q0 -58 -48 -93q-47 -35 -133 -35h-13q-7 0 -13 -4.5t-7 -11.5l-16 -69q-2 -7 -9 -12.5t-15 -5.5h-46q-7 0 -11.5 4t-4.5 11q0 2 3 14 h32q8 0 14.5 5t7.5 12l16 69q2 7 8.5 12t13.5 5h13q85 0 132 35t47 92q0 28 -11 44q40 -20 40 -72zM316 283q0 -57 -48 -93q-47 -35 -133 -35h-13q-7 0 -13 -4.5t-7 -11.5l-16 -68q-2 -8 -8.5 -13.5t-15.5 -5.5h-46q-7 0 -11.5 4t-4.5 11v4l66 283q1 7 8 12.5t15 5.5h97 q14 0 26.5 -0.5t26.5 -3t24.5 -6.5t21 -11t17 -16t10.5 -22.5t4 -29.5z" /> -<glyph unicode="" horiz-adv-x="341" d="M99 242q0 27 14 46t34 19q17 0 25.5 -11t8.5 -27q0 -10 -3 -25q-4 -14 -10 -34q-6 -19 -9 -31q-5 -20 7.5 -34.5t32.5 -14.5q35 0 57.5 39.5t22.5 95.5q0 43 -27.5 70t-77.5 27q-56 0 -90.5 -35.5t-34.5 -85.5q0 -29 17 -50q6 -6 4 -14q-2 -5 -5 -20q-2 -5 -5.5 -6.5 t-7.5 -0.5q-26 11 -39 37t-13 60q0 22 7 44t22 42.5t36 36.5t51 25.5t65 9.5t65.5 -12t51 -32t32 -46.5t11.5 -54.5q0 -75 -38 -124t-98 -49q-20 0 -37.5 9t-24.5 22q-15 -58 -18 -69q-8 -30 -36 -70h-17q-6 51 2 84l33 138q-8 17 -8 41z" /> -<glyph unicode="" d="M426 121q2 -9 -6.5 -18t-27.5 -15l-2 -1l-64 20l17 6q21 7 21 13q-2 10 -37 4l-36 -12l-61 -21v-22l96 32l64 -20l-99 -34l-61 -21v1v-1l-69 22v39v-19q-40 -14 -84 -6q-3 0 -11 1.5t-12 2t-11 1.5t-11.5 2.5t-10 3t-8.5 3t-6.5 4t-5 5t-1.5 5.5q-2 25 34 37l59 -18 l-15 -6q-15 -5 -6 -13q9 -9 25 -4l64 22v44l-27 8l27 9v177l88 -23q91 -24 90 -95q-1 -90 -82 -67v117q0 6 -7 9t-13.5 1t-6.5 -9v-148l6 2q58 20 104 17q80 -6 86 -35zM34 133h0.5h1.5l98 33l27 -8v-19l-68 -24z" /> -<glyph unicode="" d="M427 195q0 -28 -27 -39q2 -9 2 -19q0 -51 -55.5 -87.5t-134 -36.5t-134 36.5t-55.5 87.5q0 10 2 20q-25 11 -25 38q0 18 12.5 30.5t29.5 12.5q19 0 32 -15q52 36 129 39l35 104q3 7 10 5l83 -20q1 0 3 -1q8 20 30 20q13 0 23 -10t10 -23.5t-10 -23.5t-23 -10 q-14 0 -23.5 9.5t-9.5 23.5q-2 -1 -3 0l-77 18l-31 -92q79 -2 132 -40q13 16 33 16q17 0 29.5 -12.5t12.5 -30.5zM116 161.5q0 -12.5 9 -21.5t21.5 -9t21.5 9t9 21.5t-9 22t-21.5 9.5t-21.5 -9.5t-9 -22zM282 77q4 3 0.5 6.5t-7.5 0.5q-18 -19 -62 -19t-62 19 q-3 3 -6.5 -0.5t-0.5 -6.5q21 -22 70 -22q47 0 68 22zM280.5 131q12.5 0 21.5 9t9 21.5t-9 22t-21.5 9.5t-22 -9.5t-9.5 -22t9.5 -21.5t22 -9z" /> -<glyph unicode="" d="M414 147q13 -25 13 -52q0 -48 -34.5 -82t-83.5 -34q-30 0 -56 13q-19 -3 -37 -3q-85 0 -144.5 59t-59.5 142q0 20 4 40q-16 27 -16 59q0 48 34.5 82t83.5 34q34 0 63 -18q17 3 35 3q84 0 143.5 -58.5t59.5 -141.5q0 -22 -5 -43zM318.5 94.5q14.5 19.5 14.5 44.5 q0 21 -8.5 35.5t-23.5 23.5q-14 10 -34 16q-21 6 -45 12q-20 4 -29 7q-8 2 -16 6t-12 9t-4 12q0 11 12 19q14 8 36 8q23 0 34 -7q10 -8 18 -23q6 -11 12 -16t18 -5t20.5 8.5t8.5 19.5t-6.5 22.5t-20 22t-33.5 17t-47 6.5q-35 0 -60 -10q-26 -9 -39.5 -27t-13.5 -40 q0 -24 13 -41q13 -16 35 -25q21 -9 53 -16q23 -4 37 -9q14 -4 22 -11q8 -8 8 -20q0 -14 -15 -25q-16 -10 -41 -10q-18 0 -29.5 5t-17.5 13t-11 21q-5 11 -12 17q-8 6 -18 6q-13 0 -21.5 -8t-8.5 -19q0 -18 13 -36t34 -29q28 -15 72 -15q37 0 64 11t41.5 30.5z" /> -<glyph unicode="" horiz-adv-x="420" d="M153 276q21 0 35.5 -14t14.5 -33.5t-14.5 -33t-35.5 -13.5t-36 13.5t-15 33t15 33.5t36 14zM272 276q21 0 35.5 -13.5t14.5 -33t-14.5 -33.5t-35.5 -14t-36 14t-15 33.5t15 33t36 13.5zM403 202q10 7 15 0.5t-1 -15.5q-29 -36 -88 -60q26 -89 -22 -131q-32 -27 -64 -14 q-27 10 -26 42q0 -1 -0.5 24.5t-0.5 53.5l-4 1t-7 2v-36v-33t0 -12q1 -36 -32 -44q-36 -9 -65 23q-40 43 -16 124q-60 25 -89 60q-6 9 -1 15.5t14 -0.5l4 -3v165q0 17 12.5 29t28.5 12h300q16 0 26 -12t10 -29v-165q2 0 6 3zM376 186v159q0 22 -6.5 30.5t-24.5 8.5h-266 q-20 0 -26.5 -8.5t-6.5 -30.5v-160q23 -14 51 -19.5t46 -4.5t34 0q15 1 22 -6q1 0 1.5 -1l0.5 -1q9 -8 15 -12q1 22 27 20q16 1 34 0t46 5t53 20z" /> -<glyph unicode="" d="M9 124h-9v51h9v-51zM30 107h-9v81h9v-81zM47 103h-9v94h9v-94zM64 99h-9v94h9v-94zM85 99h-8v123h8v-123zM102 99h-8v140h8v-140zM124 99h-9v149h9v-149zM141 99h-9v153h9v-153zM162 99h-8v149h8v-149zM179 99h-8v145h8v-145zM196 99h-8v162h8v-162zM218 99h-9v175h9 v-175zM374 100h-146q-6 0 -6 6v167q0 4 5 6q17 6 34 6q36 0 62.5 -24.5t30.5 -59.5q9 4 20 4q22 0 37.5 -15.5t15.5 -37.5t-15.5 -37t-37.5 -15z" /> -<glyph unicode="" horiz-adv-x="265" d="M0 231v60q25 8 43 23.5t29 36.5t15 54h61v-108h102v-66h-102v-110q0 -37 4 -47.5t15 -16.5q14 -9 33 -9q32 0 65 21v-67q-28 -13 -50.5 -18t-48.5 -5q-29 0 -51.5 7t-38.5 21t-22.5 29.5t-6.5 44.5v149h-47v1z" /> -<glyph unicode="" horiz-adv-x="407" d="M296 34h-83l-56 -55h-55v55h-102v297l28 74h379v-259zM370 164v204h-305v-269h83v-55l56 55h102zM269 294h37v-111h-37v111zM167 183v111h37v-111h-37z" /> -<glyph unicode="" d="M276 284q-15 0 -32 -7q32 103 120 101q66 -2 62 -86q-2 -63 -87 -172q-87 -114 -147 -114q-37 0 -63 70q-18 66 -34 127q-19 69 -41 69q-5 0 -34 -20l-20 26q33 29 62 56q42 36 63 38q50 5 62 -68q12 -80 17 -99q14 -65 32 -65q13 0 40 42.5t29 64.5q3 37 -29 37z" /> -<glyph unicode="" d="M364.5 343q62.5 -62 62.5 -149.5t-62.5 -149.5t-150.5 -62v0q-54 0 -101 26l-113 -29l30 109q-28 49 -28 106q0 87 62 149t150 62t150.5 -62zM214 18q73 0 125 51.5t52 124.5t-52 124.5t-125 51.5t-124.5 -51.5t-51.5 -124.5q0 -51 27 -94l4 -6l-18 -65l67 17l6 -3 q42 -25 90 -25zM311 150q9 -5 10 -7q4 -6 -3 -25q-3 -8 -15 -15.5t-21 -9.5q-18 -2 -33 2q-17 6 -30 11q-8 4 -15.5 8.5t-14.5 9t-13 9.5t-11.5 10t-10.5 10.5t-8.5 9.5t-7 8.5t-5.5 7t-3.5 5l-1.5 2.5q-22 29 -22 55q0 24 19 44q6 7 14 7q6 0 10 -1q8 0 12 -9q2 -3 6 -13 l7 -17.5t3 -8.5q3 -5 1 -9q-3 -7 -5 -9l-3 -3t-3 -3.5t-2 -2.5q-6 -6 -3 -11q13 -22 30 -37q13 -11 43 -26q7 -3 11 1q12 15 17 21q4 6 12 3q6 -3 36 -17z" /> -<glyph unicode="" d="M213 323q-24 18 -47 27.5t-38.5 10.5t-28 0t-18.5 -4l-6 -3q59 51 138 51t139 -51q-3 1 -7 3t-17.5 4t-28.5 0t-38.5 -11t-47.5 -27v0zM157 282q-39 -40 -65 -78t-34.5 -63.5t-12 -44.5t-1.5 -28l3 -9q-47 58 -47 133q0 84 57 145q38 -16 100 -55zM427 192 q0 -75 -47 -133q1 3 2.5 9t-1.5 27.5t-12 45.5t-34.5 62.5t-65.5 78.5q28 17 53 31t36 19l11 5q58 -61 58 -145zM212 236q38 -27 67.5 -57t45 -53t26 -42t13.5 -29l3 -10q-62 -66 -153.5 -66t-154.5 66q2 4 5 11.5t15 30t28 44.5t44 51t61 54z" /> -<glyph unicode="" d="M414 271q-5 0 -49 -10q-10 -3 -62.5 -45.5t-56.5 -55.5q-2 -10 -2 -27l-1 -15q0 -9 4 -39q4 -1 32 -1t32 -1l-1 -20q-6 1 -105 1q-6 0 -44 -1t-49 -1l4 19h15.5t27 2t15.5 6q1 1 1.5 2t1 2.5t0.5 3v4.5v6v8v10v13q0 17 -1 27q-3 10 -51.5 69.5t-65.5 72.5q-3 1 -28.5 4 t-29.5 4l-1 18q2 1 17.5 1t35.5 -0.5t44 0.5q23 0 61 -0.5t45 -0.5l-3 -16q-4 -1 -30.5 -2.5t-31.5 -3.5q16 -24 50 -68.5t39 -51.5q2 3 41.5 36t40.5 43q-38 7 -54 7l-3 20h20h38.5h30.5q72 0 86 -2z" /> -<glyph unicode="" d="M422 277q5 -35 5 -69v-32l-5 -69q-4 -29 -17 -42q-14 -14 -42 -18q-27 -2 -64.5 -3t-61.5 -1h-24q-111 1 -145 4l-8 1t-13 2t-12.5 5t-13 10t-10 16.5t-5.5 18.5l-2 7q-4 35 -4 69v32l4 69q4 29 17 42q14 15 43 18q27 2 64 3t61 1h24q90 0 150 -4q28 -3 42 -18 q4 -4 7 -9.5t5 -11t3 -10.5t2 -8v-3zM271 189l14 7l-115 60v-120z" /> -<glyph unicode="" horiz-adv-x="352" d="M170 224q18 0 57.5 -1t59.5 -2q15 0 26 -3q28 -6 34 -40q5 -35 5 -59q0 -39 -3 -87q-1 -12 -7 -25q-11 -24 -43 -25q-103 -3 -152 -3q-17 0 -47.5 1t-40.5 1t-22 4q-20 5 -29 26q-6 17 -8 52q-1 41 2 94q1 15 5 31q9 31 42 33q31 0 121 3zM202 33q4 -3 13 -9 q9 -5 17.5 -1t10.5 15q2 9 2 14v60q0 8 -3 15q-3 13 -12 16.5t-20 -4.5q-2 -1 -4.5 -3.5l-3.5 -3.5v50h-21v-158h21q-1 4 0 9zM162 24v118h-22v-7v-76q0 -8 -6 -12q-4 -5 -9 -3q-3 1 -3 7v84v7h-22v-3v-96q0 -3 1 -9q4 -16 20 -11q4 1 13 7q2 1 6 6v-12h22zM323 79 q0 4 0.5 11t0.5 12.5t-1 10.5q-1 14 -9 22t-21 9q-14 1 -23.5 -6.5t-10.5 -21.5q-3 -33 0 -67q2 -15 14 -22.5t28 -3.5q13 3 19.5 15.5t2.5 26.5h-22q0 -10 -1 -14q-1 -9 -9 -9t-9 8q-1 9 -2 30q16 -1 43 -1zM103 159v23h-74v-23h24v-135h25v135h25zM247 364v-34v-59 q0 -6 4 -7q3 -1 7 2q7 5 7 14v26v31v27h22v-119h-22v12l-5 -5q-8 -6 -11 -7q-8 -4 -14.5 -0.5t-8.5 11.5q-1 4 -1 7v100q7 1 22 1zM66 405h22q2 0 4 -4q10 -34 14 -51q0 -1 2 -3q4 18 9 32q1 3 3 10.5t3 11.5q1 3 4 4h22q0 -1 -1 -4q-1 -1 -1 -2q-4 -14 -13 -42t-13 -42 q-2 -6 -2 -10v-59h-23q0 3 -0.5 8.5t-0.5 9.5t1 8q2 36 -13 78q-9 27 -17 55zM208 304v-11t-0.5 -13t-1.5 -11q-1 -11 -10 -18.5t-21 -7.5t-20 7.5t-11 18.5q-1 7 -1 21q0 38 1 49q4 27 31 27q26 0 31 -27q0 -1 0.5 -2.5t0.5 -2.5q0 -5 0.5 -15t0.5 -15zM167 305v-28 q0 -6 1 -8q4 -5 8 -5t8 5q1 2 1 8v49v12q-1 7 -9 7q-7 0 -9 -7q-1 -2 -1 -6t0.5 -13t0.5 -14zM206 83v31q0 9 11 9q8 0 8 -7v-5.5v-4.5v-50v-3.5v-3.5q-1 -7 -8 -7q-11 1 -11 9q-1 16 0 32zM299 97h-20q0 4 0.5 10.5t0.5 10.5q1 6 9 6q7 0 8 -6q2 -10 2 -21z" /> -</font> -</defs></svg> \ No newline at end of file diff --git a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.ttf b/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.ttf deleted file mode 100755 index 5d489fdd1..000000000 Binary files a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff b/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff deleted file mode 100755 index 933b2bf85..000000000 Binary files a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff2 b/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff2 deleted file mode 100755 index 35970e277..000000000 Binary files a/packages/react-docs-example/public/fonts/Material-Design-Iconic-Font.woff2 and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Black.ttf b/packages/react-docs-example/public/fonts/Roboto-Black.ttf deleted file mode 100755 index 689fe5cb3..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Black.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-BlackItalic.ttf b/packages/react-docs-example/public/fonts/Roboto-BlackItalic.ttf deleted file mode 100755 index 0b4e0ee10..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-BlackItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Bold.ttf b/packages/react-docs-example/public/fonts/Roboto-Bold.ttf deleted file mode 100755 index d3f01ad24..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Bold.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-BoldItalic.ttf b/packages/react-docs-example/public/fonts/Roboto-BoldItalic.ttf deleted file mode 100755 index 41cc1e753..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-BoldItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Italic.ttf b/packages/react-docs-example/public/fonts/Roboto-Italic.ttf deleted file mode 100755 index 6a1cee5b2..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Italic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Light.ttf b/packages/react-docs-example/public/fonts/Roboto-Light.ttf deleted file mode 100755 index 219063a57..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Light.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-LightItalic.ttf b/packages/react-docs-example/public/fonts/Roboto-LightItalic.ttf deleted file mode 100755 index 0e81e876f..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-LightItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Medium.ttf b/packages/react-docs-example/public/fonts/Roboto-Medium.ttf deleted file mode 100755 index 1a7f3b0bb..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Medium.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-MediumItalic.ttf b/packages/react-docs-example/public/fonts/Roboto-MediumItalic.ttf deleted file mode 100755 index 003029527..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-MediumItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Regular.ttf b/packages/react-docs-example/public/fonts/Roboto-Regular.ttf deleted file mode 100755 index 2c97eeadf..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Regular.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-Thin.ttf b/packages/react-docs-example/public/fonts/Roboto-Thin.ttf deleted file mode 100755 index b74a4fd1a..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-Thin.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/Roboto-ThinItalic.ttf b/packages/react-docs-example/public/fonts/Roboto-ThinItalic.ttf deleted file mode 100755 index dd0ddb852..000000000 Binary files a/packages/react-docs-example/public/fonts/Roboto-ThinItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Bold.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Bold.ttf deleted file mode 100755 index 07ef607d5..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Bold.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-BoldItalic.ttf b/packages/react-docs-example/public/fonts/RobotoMono-BoldItalic.ttf deleted file mode 100755 index 1cca0bf45..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-BoldItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Italic.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Italic.ttf deleted file mode 100755 index ef92c372c..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Italic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Light.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Light.ttf deleted file mode 100755 index 63229b280..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Light.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-LightItalic.ttf b/packages/react-docs-example/public/fonts/RobotoMono-LightItalic.ttf deleted file mode 100755 index f25bed56a..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-LightItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Medium.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Medium.ttf deleted file mode 100755 index 88ff0c15a..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Medium.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-MediumItalic.ttf b/packages/react-docs-example/public/fonts/RobotoMono-MediumItalic.ttf deleted file mode 100755 index 307efad8f..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-MediumItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Regular.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Regular.ttf deleted file mode 100755 index b158a334e..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Regular.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-Thin.ttf b/packages/react-docs-example/public/fonts/RobotoMono-Thin.ttf deleted file mode 100755 index 309484d32..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-Thin.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/fonts/RobotoMono-ThinItalic.ttf b/packages/react-docs-example/public/fonts/RobotoMono-ThinItalic.ttf deleted file mode 100755 index e1bb9121e..000000000 Binary files a/packages/react-docs-example/public/fonts/RobotoMono-ThinItalic.ttf and /dev/null differ diff --git a/packages/react-docs-example/public/index.html b/packages/react-docs-example/public/index.html deleted file mode 100644 index fcc1c6e0c..000000000 --- a/packages/react-docs-example/public/index.html +++ /dev/null @@ -1,24 +0,0 @@ -<!DOCTYPE html> -<html> - -<head> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Example Docs Page</title> - <link rel="stylesheet" href="/css/github-gist.css"> - <link rel="stylesheet" href="/css/basscss_responsive_custom.css"> - <link rel="stylesheet" href="/css/basscss_responsive_padding.css"> - <link rel="stylesheet" href="/css/basscss_responsive_margin.css"> - <link rel="stylesheet" href="/css/basscss_responsive_type_scale.css"> - <link rel="stylesheet" href="/css/material-design-iconic-font.min.css"> - <link rel="stylesheet" href="/css/roboto.css"> - <link rel="stylesheet" href="/css/roboto_mono.css"> -</head> - -<body style="margin: 0px; min-width: 355px; font-family: 'Roboto';"> - <!-- Main --> - <div id="app"></div> - <script type="text/javascript" crossorigin="anonymous" src="/bundle.js" charset="utf-8"></script> -</body> - -</html> diff --git a/packages/react-docs-example/ts/docs.tsx b/packages/react-docs-example/ts/docs.tsx deleted file mode 100644 index 9ac94bd00..000000000 --- a/packages/react-docs-example/ts/docs.tsx +++ /dev/null @@ -1,98 +0,0 @@ -import * as React from 'react'; - -import { - constants, - DocAgnosticFormat, - DocsInfo, - DocsInfoConfig, - Documentation, - SupportedDocJson, - TypeDocNode, -} from '@0xproject/react-docs'; - -import * as v0TypeDocJson from './json/0.1.12.json'; -import * as v2TypeDocJson from './json/0.2.0.json'; - -// tslint:disable-next-line:no-implicit-dependencies no-var-requires -const IntroMarkdownV1 = require('md/introduction'); - -const docSections = { - introduction: 'introduction', - web3Wrapper: 'web3Wrapper', - types: constants.TYPES_SECTION_NAME, -}; - -const docsInfoConfig: DocsInfoConfig = { - id: 'web3Wrapper', - type: SupportedDocJson.TypeDoc, - displayName: 'Web3 Wrapper', - packageUrl: 'https://github.com/0xProject/0x-monorepo', - menu: { - introduction: [docSections.introduction], - web3Wrapper: [docSections.web3Wrapper], - types: [docSections.types], - }, - sections: docSections, - typeConfigs: { - typeNameToExternalLink: { - Web3: 'https://github.com/ethereum/wiki/wiki/JavaScript-API', - Provider: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L150', - BigNumber: 'http://mikemcl.github.io/bignumber.js', - }, - typeNameToPrefix: { - Provider: 'Web3', - }, - typeNameToDocSection: { - Web3Wrapper: docSections.web3Wrapper, - }, - }, -}; -const docsInfo = new DocsInfo(docsInfoConfig); - -const availableVersions = ['0.1.12', '0.2.0']; -const versionToDocJSON: { [semver: string]: object } = { - [availableVersions[0]]: v0TypeDocJson, - [availableVersions[1]]: v2TypeDocJson, -}; - -export interface DocsProps {} - -export interface DocsState { - selectedVersion: string; - docAgnosticFormat?: DocAgnosticFormat; -} - -export class Docs extends React.Component<DocsProps, DocsState> { - constructor(props: DocsProps) { - super(props); - this.state = { - selectedVersion: availableVersions[1], - docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(v2TypeDocJson), - }; - } - public render(): React.ReactNode { - return ( - <Documentation - selectedVersion={this.state.selectedVersion} - availableVersions={availableVersions} - docsInfo={docsInfo} - docAgnosticFormat={this.state.docAgnosticFormat} - sourceUrl={this._getSourceUrl()} - onVersionSelected={this._onVersionSelected.bind(this)} - /> - ); - } - private _onVersionSelected(semver: string): void { - const selectedDocJSON = versionToDocJSON[semver]; - this.setState({ - selectedVersion: semver, - docAgnosticFormat: docsInfo.convertToDocAgnosticFormat(selectedDocJSON as TypeDocNode), - }); - } - private _getSourceUrl(): string { - const sourceUrl = `${docsInfoConfig.packageUrl}/blob/@0xproject/web3-wrapper@${ - this.state.selectedVersion - }/packages`; - return sourceUrl; - } -} diff --git a/packages/react-docs-example/ts/globals.d.ts b/packages/react-docs-example/ts/globals.d.ts deleted file mode 100644 index 94e63a32d..000000000 --- a/packages/react-docs-example/ts/globals.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -declare module '*.json' { - const json: any; - /* tslint:disable */ - export default json; - /* tslint:enable */ -} diff --git a/packages/react-docs-example/ts/index.tsx b/packages/react-docs-example/ts/index.tsx deleted file mode 100644 index 84a544766..000000000 --- a/packages/react-docs-example/ts/index.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import 'basscss/css/basscss.css'; -import 'less/all.less'; -import { MuiThemeProvider } from 'material-ui/styles'; -import * as React from 'react'; -import { render } from 'react-dom'; -import * as injectTapEventPlugin from 'react-tap-event-plugin'; - -import { Docs } from './docs'; - -injectTapEventPlugin(); - -render( - <MuiThemeProvider> - <Docs /> - </MuiThemeProvider>, - document.getElementById('app'), -); diff --git a/packages/react-docs-example/ts/json/0.1.12.json b/packages/react-docs-example/ts/json/0.1.12.json deleted file mode 100644 index 385684f30..000000000 --- a/packages/react-docs-example/ts/json/0.1.12.json +++ /dev/null @@ -1,3318 +0,0 @@ -{ - "id": 0, - "name": "@0xproject/web3-wrapper", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 75, - "name": "\"types/src/index\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/packages/types/src/index.ts", - "children": [ - { - "id": 102, - "name": "AbiType", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 104, - "name": "Constructor", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 36, - "character": 15 - } - ], - "defaultValue": "\"constructor\"" - }, - { - "id": 105, - "name": "Event", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 37, - "character": 9 - } - ], - "defaultValue": "\"event\"" - }, - { - "id": 106, - "name": "Fallback", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 38, - "character": 12 - } - ], - "defaultValue": "\"fallback\"" - }, - { - "id": 103, - "name": "Function", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 35, - "character": 12 - } - ], - "defaultValue": "\"function\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [104, 105, 106, 103] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 34, - "character": 19 - } - ] - }, - { - "id": 139, - "name": "BlockParamLiteral", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 140, - "name": "Latest", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 64, - "character": 10 - } - ], - "defaultValue": "\"latest\"" - }, - { - "id": 141, - "name": "Pending", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 65, - "character": 11 - } - ], - "defaultValue": "\"pending\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [140, 141] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 63, - "character": 29 - } - ] - }, - { - "id": 122, - "name": "SolidityTypes", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 123, - "name": "Address", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 50, - "character": 11 - } - ], - "defaultValue": "\"address\"" - }, - { - "id": 126, - "name": "Uint", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 53, - "character": 8 - } - ], - "defaultValue": "\"uint\"" - }, - { - "id": 124, - "name": "Uint256", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 51, - "character": 11 - } - ], - "defaultValue": "\"uint256\"" - }, - { - "id": 125, - "name": "Uint8", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 52, - "character": 9 - } - ], - "defaultValue": "\"uint8\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [123, 126, 124, 125] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 49, - "character": 25 - } - ] - }, - { - "id": 107, - "name": "DecodedLogArgs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "indexSignature": { - "id": 108, - "name": "__index", - "kind": 8192, - "kindString": "Index signature", - "flags": {}, - "parameters": [ - { - "id": 109, - "name": "argName", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "ContractEventArg", - "id": 151 - } - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 43, - "character": 31 - } - ] - }, - { - "id": 99, - "name": "JSONRPCPayload", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 101, - "name": "method", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 31, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 100, - "name": "params", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 30, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [101, 100] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 29, - "character": 31 - } - ] - }, - { - "id": 110, - "name": "LogWithDecodedArgs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "typeParameter": [ - { - "id": 111, - "name": "ArgsType", - "kind": 131072, - "kindString": "Type parameter", - "flags": {} - } - ], - "children": [ - { - "id": 119, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 414, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.address" - } - }, - { - "id": 113, - "name": "args", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 125, - "character": 16 - } - ], - "type": { - "type": "typeParameter", - "name": "ArgsType" - }, - "inheritedFrom": { - "type": "reference", - "name": "DecodedLogEntry.args" - } - }, - { - "id": 117, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 412, - "character": 21 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.blockHash" - } - }, - { - "id": 118, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 413, - "character": 23 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.blockNumber" - } - }, - { - "id": 120, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 415, - "character": 16 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.data" - } - }, - { - "id": 112, - "name": "event", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 124, - "character": 17 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "DecodedLogEntry.event" - } - }, - { - "id": 114, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 409, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.logIndex" - } - }, - { - "id": 121, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 416, - "character": 18 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.topics" - } - }, - { - "id": 116, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 411, - "character": 27 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.transactionHash" - } - }, - { - "id": 115, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 410, - "character": 28 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.transactionIndex" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [119, 113, 117, 118, 120, 112, 114, 121, 116, 115] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 47, - "character": 35 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "DecodedLogEntry", - "typeArguments": [ - { - "type": "typeParameter", - "name": "ArgsType" - } - ] - } - ] - }, - { - "id": 142, - "name": "RawLogEntry", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 148, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 76, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 146, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 74, - "character": 13 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 147, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 75, - "character": 15 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 149, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 77, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 143, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 71, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 150, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 78, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 145, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 73, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 144, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 72, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [148, 146, 147, 149, 143, 150, 145, 144] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 70, - "character": 28 - } - ] - }, - { - "id": 87, - "name": "TransactionReceipt", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 88, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 16, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 89, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 17, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 97, - "name": "contractAddress", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 25, - "character": 19 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 95, - "name": "cumulativeGasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 23, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 92, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 20, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 96, - "name": "gasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 24, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 98, - "name": "logs", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 26, - "character": 8 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "name": "LogEntry" - } - } - }, - { - "id": 94, - "name": "status", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 22, - "character": 10 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "null" - }, - { - "type": "unknown", - "name": "0" - }, - { - "type": "unknown", - "name": "1" - } - ] - } - }, - { - "id": 93, - "name": "to", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 21, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 90, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 18, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 91, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 19, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [88, 89, 97, 95, 92, 96, 98, 94, 93, 90, 91] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 15, - "character": 35 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TransactionReceiptWithDecodedLogs", - "id": 127 - } - ] - }, - { - "id": 127, - "name": "TransactionReceiptWithDecodedLogs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 129, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 16, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.blockHash", - "id": 88 - } - }, - { - "id": 130, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 17, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.blockNumber", - "id": 89 - } - }, - { - "id": 138, - "name": "contractAddress", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 25, - "character": 19 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.contractAddress", - "id": 97 - } - }, - { - "id": 136, - "name": "cumulativeGasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 23, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.cumulativeGasUsed", - "id": 95 - } - }, - { - "id": 133, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 20, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.from", - "id": 92 - } - }, - { - "id": 137, - "name": "gasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 24, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.gasUsed", - "id": 96 - } - }, - { - "id": 128, - "name": "logs", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 57, - "character": 8 - } - ], - "type": { - "type": "reference", - "name": "Array", - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "reference", - "name": "LogWithDecodedArgs", - "id": 110, - "typeArguments": [ - { - "type": "reference", - "name": "DecodedLogArgs", - "id": 107 - } - ] - }, - { - "type": "reference", - "name": "LogEntry" - } - ] - } - ] - }, - "overwrites": { - "type": "reference", - "name": "TransactionReceipt.logs", - "id": 98 - } - }, - { - "id": 135, - "name": "status", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 22, - "character": 10 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "null" - }, - { - "type": "unknown", - "name": "0" - }, - { - "type": "unknown", - "name": "1" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.status", - "id": 94 - } - }, - { - "id": 134, - "name": "to", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 21, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.to", - "id": 93 - } - }, - { - "id": 131, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 18, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.transactionHash", - "id": 90 - } - }, - { - "id": 132, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 19, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.transactionIndex", - "id": 91 - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [129, 130, 138, 136, 133, 137, 128, 135, 134, 131, 132] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 56, - "character": 50 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TransactionReceipt", - "id": 87 - } - ] - }, - { - "id": 76, - "name": "TxData", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 77, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 5, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - }, - { - "id": 78, - "name": "gas", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 6, - "character": 7 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 79, - "name": "gasPrice", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 7, - "character": 12 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - }, - { - "id": 80, - "name": "nonce", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 8, - "character": 9 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [77, 78, 79, 80] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 4, - "character": 23 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TxDataPayable", - "id": 81 - } - ] - }, - { - "id": 81, - "name": "TxDataPayable", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 83, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 5, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.from", - "id": 77 - } - }, - { - "id": 84, - "name": "gas", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 6, - "character": 7 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.gas", - "id": 78 - } - }, - { - "id": 85, - "name": "gasPrice", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 7, - "character": 12 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.gasPrice", - "id": 79 - } - }, - { - "id": 86, - "name": "nonce", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 8, - "character": 9 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.nonce", - "id": 80 - } - }, - { - "id": 82, - "name": "value", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 12, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [83, 84, 85, 86, 82] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 11, - "character": 30 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TxData", - "id": 76 - } - ] - }, - { - "id": 153, - "name": "BlockParam", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 68, - "character": 22 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "name": "BlockParamLiteral", - "id": 139 - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 151, - "name": "ContractEventArg", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 41, - "character": 28 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "BigNumber" - } - ] - } - }, - { - "id": 152, - "name": "RawLog", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 48, - "character": 18 - } - ], - "type": { - "type": "reference", - "name": "LogEntry" - } - } - ], - "groups": [ - { - "title": "Enumerations", - "kind": 4, - "children": [102, 139, 122] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [107, 99, 110, 142, 87, 127, 76, 81] - }, - { - "title": "Type aliases", - "kind": 4194304, - "children": [153, 151, 152] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 1, - "character": 0 - } - ] - }, - { - "id": 1, - "name": "\"web3-wrapper/src/index\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/packages/web3-wrapper/src/index.ts", - "children": [ - { - "id": 11, - "name": "Web3Wrapper", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 12, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 13, - "name": "new Web3Wrapper", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "parameters": [ - { - "id": 14, - "name": "provider", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - }, - { - "id": 15, - "name": "defaults", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reference", - "name": "Partial", - "typeArguments": [ - { - "type": "reference", - "name": "TxData" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Web3Wrapper", - "id": 11 - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 20, - "character": 38 - } - ] - }, - { - "id": 42, - "name": "doesContractExistAtAddressAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 43, - "name": "doesContractExistAtAddressAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 44, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 75, - "character": 48 - } - ] - }, - { - "id": 69, - "name": "estimateGasAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 70, - "name": "estimateGasAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 71, - "name": "data", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 133, - "character": 33 - } - ] - }, - { - "id": 57, - "name": "getAvailableAddressesAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 58, - "name": "getAvailableAddressesAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 97, - "character": 43 - } - ] - }, - { - "id": 39, - "name": "getBalanceInWeiAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 40, - "name": "getBalanceInWeiAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 41, - "name": "owner", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "BigNumber" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 69, - "character": 37 - } - ] - }, - { - "id": 51, - "name": "getBlockAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 52, - "name": "getBlockAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 53, - "name": "blockParam", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "Web3.BlockParam" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "BlockWithoutTransactionData" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 89, - "character": 30 - } - ] - }, - { - "id": 49, - "name": "getBlockNumberAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 50, - "name": "getBlockNumberAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 85, - "character": 36 - } - ] - }, - { - "id": 54, - "name": "getBlockTimestampAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 55, - "name": "getBlockTimestampAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 56, - "name": "blockParam", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "Web3.BlockParam" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 93, - "character": 39 - } - ] - }, - { - "id": 16, - "name": "getContractDefaults", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 17, - "name": "getContractDefaults", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Partial", - "typeArguments": [ - { - "type": "reference", - "name": "TxData" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 33, - "character": 30 - } - ] - }, - { - "id": 62, - "name": "getContractFromAbi", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 63, - "name": "getContractFromAbi", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 64, - "name": "abi", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Web3.ContractAbi" - } - } - ], - "type": { - "type": "reference", - "name": "Contract", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 125, - "character": 29 - } - ] - }, - { - "id": 65, - "name": "getContractInstance", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 66, - "name": "getContractInstance", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 67, - "name": "abi", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Web3.ContractAbi" - } - }, - { - "id": 68, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "ContractInstance" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 129, - "character": 30 - } - ] - }, - { - "id": 34, - "name": "getCurrentProvider", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 35, - "name": "getCurrentProvider", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 62, - "character": 29 - } - ] - }, - { - "id": 59, - "name": "getLogsAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 60, - "name": "getLogsAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 61, - "name": "filter", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "FilterObject" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "name": "LogEntry" - } - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 101, - "character": 29 - } - ] - }, - { - "id": 29, - "name": "getNetworkIdAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 30, - "name": "getNetworkIdAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 50, - "character": 34 - } - ] - }, - { - "id": 27, - "name": "getNodeVersionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 28, - "name": "getNodeVersionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 46, - "character": 36 - } - ] - }, - { - "id": 31, - "name": "getTransactionReceiptAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 32, - "name": "getTransactionReceiptAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 33, - "name": "txHash", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "TransactionReceipt" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 55, - "character": 43 - } - ] - }, - { - "id": 21, - "name": "isAddress", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 22, - "name": "isAddress", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 23, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 39, - "character": 20 - } - ] - }, - { - "id": 24, - "name": "isSenderAddressAvailableAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 25, - "name": "isSenderAddressAvailableAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 26, - "name": "senderAddress", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 42, - "character": 46 - } - ] - }, - { - "id": 72, - "name": "sendTransactionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 73, - "name": "sendTransactionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 74, - "name": "txData", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "TxData" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 137, - "character": 37 - } - ] - }, - { - "id": 18, - "name": "setProvider", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 19, - "name": "setProvider", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 20, - "name": "provider", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 36, - "character": 22 - } - ] - }, - { - "id": 45, - "name": "signTransactionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 46, - "name": "signTransactionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 47, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 48, - "name": "message", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 81, - "character": 37 - } - ] - }, - { - "id": 36, - "name": "toWei", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 37, - "name": "toWei", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 38, - "name": "ethAmount", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 65, - "character": 16 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [12] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 42, - 69, - 57, - 39, - 51, - 49, - 54, - 16, - 62, - 65, - 34, - 59, - 29, - 27, - 31, - 21, - 24, - 72, - 18, - 45, - 36 - ] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 17, - "character": 24 - } - ] - }, - { - "id": 2, - "name": "RawLogEntry", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 8, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 12, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 6, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 10, - "character": 13 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 7, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 11, - "character": 15 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 9, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 13, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 3, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 7, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 10, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 14, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 5, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 9, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 8, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [8, 6, 7, 9, 3, 10, 5, 4] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 6, - "character": 21 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [11] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [2] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [75, 1] - } - ] -} diff --git a/packages/react-docs-example/ts/json/0.2.0.json b/packages/react-docs-example/ts/json/0.2.0.json deleted file mode 100644 index 48bcb61a7..000000000 --- a/packages/react-docs-example/ts/json/0.2.0.json +++ /dev/null @@ -1,3401 +0,0 @@ -{ - "id": 0, - "name": "@0xproject/web3-wrapper", - "kind": 0, - "flags": {}, - "children": [ - { - "id": 75, - "name": "\"types/src/index\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/packages/types/src/index.ts", - "children": [ - { - "id": 104, - "name": "AbiType", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 106, - "name": "Constructor", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 37, - "character": 15 - } - ], - "defaultValue": "\"constructor\"" - }, - { - "id": 107, - "name": "Event", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 38, - "character": 9 - } - ], - "defaultValue": "\"event\"" - }, - { - "id": 108, - "name": "Fallback", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 39, - "character": 12 - } - ], - "defaultValue": "\"fallback\"" - }, - { - "id": 105, - "name": "Function", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 36, - "character": 12 - } - ], - "defaultValue": "\"function\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [106, 107, 108, 105] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 35, - "character": 19 - } - ] - }, - { - "id": 141, - "name": "BlockParamLiteral", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 142, - "name": "Latest", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 65, - "character": 10 - } - ], - "defaultValue": "\"latest\"" - }, - { - "id": 143, - "name": "Pending", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 66, - "character": 11 - } - ], - "defaultValue": "\"pending\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [142, 143] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 64, - "character": 29 - } - ] - }, - { - "id": 124, - "name": "SolidityTypes", - "kind": 4, - "kindString": "Enumeration", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 125, - "name": "Address", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 51, - "character": 11 - } - ], - "defaultValue": "\"address\"" - }, - { - "id": 128, - "name": "Uint", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 54, - "character": 8 - } - ], - "defaultValue": "\"uint\"" - }, - { - "id": 126, - "name": "Uint256", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 52, - "character": 11 - } - ], - "defaultValue": "\"uint256\"" - }, - { - "id": 127, - "name": "Uint8", - "kind": 16, - "kindString": "Enumeration member", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 53, - "character": 9 - } - ], - "defaultValue": "\"uint8\"" - } - ], - "groups": [ - { - "title": "Enumeration members", - "kind": 16, - "children": [125, 128, 126, 127] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 50, - "character": 25 - } - ] - }, - { - "id": 109, - "name": "DecodedLogArgs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "indexSignature": { - "id": 110, - "name": "__index", - "kind": 8192, - "kindString": "Index signature", - "flags": {}, - "parameters": [ - { - "id": 111, - "name": "argName", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "ContractEventArg", - "id": 153 - } - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 44, - "character": 31 - } - ] - }, - { - "id": 101, - "name": "JSONRPCPayload", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 103, - "name": "method", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 32, - "character": 10 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 102, - "name": "params", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 31, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "any" - } - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [103, 102] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 30, - "character": 31 - } - ] - }, - { - "id": 112, - "name": "LogWithDecodedArgs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "typeParameter": [ - { - "id": 113, - "name": "ArgsType", - "kind": 131072, - "kindString": "Type parameter", - "flags": {} - } - ], - "children": [ - { - "id": 121, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 413, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.address" - } - }, - { - "id": 115, - "name": "args", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 124, - "character": 16 - } - ], - "type": { - "type": "typeParameter", - "name": "ArgsType" - }, - "inheritedFrom": { - "type": "reference", - "name": "DecodedLogEntry.args" - } - }, - { - "id": 119, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 411, - "character": 21 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.blockHash" - } - }, - { - "id": 120, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 412, - "character": 23 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.blockNumber" - } - }, - { - "id": 122, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 414, - "character": 16 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.data" - } - }, - { - "id": 114, - "name": "event", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 123, - "character": 17 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "DecodedLogEntry.event" - } - }, - { - "id": 116, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 408, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.logIndex" - } - }, - { - "id": 123, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 415, - "character": 18 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.topics" - } - }, - { - "id": 118, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 410, - "character": 27 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.transactionHash" - } - }, - { - "id": 117, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/node_modules/web3-typescript-typings/index.d.ts", - "line": 409, - "character": 28 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "number" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "LogEntry.transactionIndex" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [121, 115, 119, 120, 122, 114, 116, 123, 118, 117] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 48, - "character": 35 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "DecodedLogEntry", - "typeArguments": [ - { - "type": "typeParameter", - "name": "ArgsType" - } - ] - } - ] - }, - { - "id": 144, - "name": "RawLogEntry", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 150, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 77, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 148, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 75, - "character": 13 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 149, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 76, - "character": 15 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 151, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 78, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 145, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 72, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 152, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 79, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 147, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 74, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 146, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 73, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [150, 148, 149, 151, 145, 152, 147, 146] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 71, - "character": 28 - } - ] - }, - { - "id": 89, - "name": "TransactionReceipt", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 90, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 17, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 91, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 18, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 99, - "name": "contractAddress", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 26, - "character": 19 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 97, - "name": "cumulativeGasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 24, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 94, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 21, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 98, - "name": "gasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 25, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - }, - { - "id": 100, - "name": "logs", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 27, - "character": 8 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "reference", - "name": "LogEntry" - } - } - }, - { - "id": 96, - "name": "status", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 23, - "character": 10 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "null" - }, - { - "type": "unknown", - "name": "0" - }, - { - "type": "unknown", - "name": "1" - } - ] - } - }, - { - "id": 95, - "name": "to", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 22, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 92, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 19, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 93, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 20, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [90, 91, 99, 97, 94, 98, 100, 96, 95, 92, 93] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 16, - "character": 35 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TransactionReceiptWithDecodedLogs", - "id": 129 - } - ] - }, - { - "id": 129, - "name": "TransactionReceiptWithDecodedLogs", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 131, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 17, - "character": 13 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.blockHash", - "id": 90 - } - }, - { - "id": 132, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 18, - "character": 15 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.blockNumber", - "id": 91 - } - }, - { - "id": 140, - "name": "contractAddress", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 26, - "character": 19 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.contractAddress", - "id": 99 - } - }, - { - "id": 138, - "name": "cumulativeGasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 24, - "character": 21 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.cumulativeGasUsed", - "id": 97 - } - }, - { - "id": 135, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 21, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.from", - "id": 94 - } - }, - { - "id": 139, - "name": "gasUsed", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 25, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.gasUsed", - "id": 98 - } - }, - { - "id": 130, - "name": "logs", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 58, - "character": 8 - } - ], - "type": { - "type": "reference", - "name": "Array", - "typeArguments": [ - { - "type": "union", - "types": [ - { - "type": "reference", - "name": "LogWithDecodedArgs", - "id": 112, - "typeArguments": [ - { - "type": "reference", - "name": "DecodedLogArgs", - "id": 109 - } - ] - }, - { - "type": "reference", - "name": "LogEntry" - } - ] - } - ] - }, - "overwrites": { - "type": "reference", - "name": "TransactionReceipt.logs", - "id": 100 - } - }, - { - "id": 137, - "name": "status", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 23, - "character": 10 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "null" - }, - { - "type": "unknown", - "name": "0" - }, - { - "type": "unknown", - "name": "1" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.status", - "id": 96 - } - }, - { - "id": 136, - "name": "to", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 22, - "character": 6 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.to", - "id": 95 - } - }, - { - "id": 133, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 19, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.transactionHash", - "id": 92 - } - }, - { - "id": 134, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 20, - "character": 20 - } - ], - "type": { - "type": "intrinsic", - "name": "number" - }, - "inheritedFrom": { - "type": "reference", - "name": "TransactionReceipt.transactionIndex", - "id": 93 - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [131, 132, 140, 138, 135, 139, 130, 137, 136, 133, 134] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 57, - "character": 50 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TransactionReceipt", - "id": 89 - } - ] - }, - { - "id": 76, - "name": "TxData", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 77, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 5, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - }, - { - "id": 78, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 6, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - } - }, - { - "id": 79, - "name": "gas", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 7, - "character": 7 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 80, - "name": "gasPrice", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 8, - "character": 12 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - }, - { - "id": 81, - "name": "nonce", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 9, - "character": 9 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [77, 78, 79, 80, 81] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 4, - "character": 23 - } - ], - "extendedBy": [ - { - "type": "reference", - "name": "TxDataPayable", - "id": 82 - } - ] - }, - { - "id": 82, - "name": "TxDataPayable", - "kind": 256, - "kindString": "Interface", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 84, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 5, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.data", - "id": 77 - } - }, - { - "id": 85, - "name": "from", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 6, - "character": 8 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "string" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.from", - "id": 78 - } - }, - { - "id": 86, - "name": "gas", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 7, - "character": 7 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.gas", - "id": 79 - } - }, - { - "id": 87, - "name": "gasPrice", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 8, - "character": 12 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.gasPrice", - "id": 80 - } - }, - { - "id": 88, - "name": "nonce", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 9, - "character": 9 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "undefined" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - }, - "inheritedFrom": { - "type": "reference", - "name": "TxData.nonce", - "id": 81 - } - }, - { - "id": 83, - "name": "value", - "kind": 1024, - "kindString": "Property", - "flags": { - "isExported": true, - "isOptional": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 13, - "character": 9 - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [84, 85, 86, 87, 88, 83] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 12, - "character": 30 - } - ], - "extendedTypes": [ - { - "type": "reference", - "name": "TxData", - "id": 76 - } - ] - }, - { - "id": 155, - "name": "BlockParam", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 69, - "character": 22 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "reference", - "name": "BlockParamLiteral", - "id": 141 - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 153, - "name": "ContractEventArg", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 42, - "character": 28 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "BigNumber" - }, - { - "type": "intrinsic", - "name": "number" - } - ] - } - }, - { - "id": 154, - "name": "RawLog", - "kind": 4194304, - "kindString": "Type alias", - "flags": { - "isExported": true - }, - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 49, - "character": 18 - } - ], - "type": { - "type": "reference", - "name": "LogEntry" - } - } - ], - "groups": [ - { - "title": "Enumerations", - "kind": 4, - "children": [104, 141, 124] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [109, 101, 112, 144, 89, 129, 76, 82] - }, - { - "title": "Type aliases", - "kind": 4194304, - "children": [155, 153, 154] - } - ], - "sources": [ - { - "fileName": "types/src/index.ts", - "line": 1, - "character": 0 - } - ] - }, - { - "id": 1, - "name": "\"web3-wrapper/src/index\"", - "kind": 1, - "kindString": "External module", - "flags": { - "isExported": true - }, - "originalName": - "/Users/fabioberger/Documents/projects/0x_project/0x-monorepo/packages/web3-wrapper/src/index.ts", - "children": [ - { - "id": 11, - "name": "Web3Wrapper", - "kind": 128, - "kindString": "Class", - "flags": { - "isExported": true - }, - "children": [ - { - "id": 12, - "name": "constructor", - "kind": 512, - "kindString": "Constructor", - "flags": { - "isExported": true - }, - "signatures": [ - { - "id": 13, - "name": "new Web3Wrapper", - "kind": 16384, - "kindString": "Constructor signature", - "flags": {}, - "parameters": [ - { - "id": 14, - "name": "provider", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - }, - { - "id": 15, - "name": "defaults", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reference", - "name": "Partial", - "typeArguments": [ - { - "type": "reference", - "name": "TxData" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Web3Wrapper", - "id": 11 - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 20, - "character": 38 - } - ] - }, - { - "id": 68, - "name": "callAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 69, - "name": "callAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 70, - "name": "callData", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "CallData" - } - }, - { - "id": 71, - "name": "defaultBlock", - "kind": 32768, - "kindString": "Parameter", - "flags": { - "isOptional": true - }, - "type": { - "type": "reference", - "name": "Web3.BlockParam" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 135, - "character": 26 - } - ] - }, - { - "id": 42, - "name": "doesContractExistAtAddressAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 43, - "name": "doesContractExistAtAddressAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 44, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 76, - "character": 48 - } - ] - }, - { - "id": 65, - "name": "estimateGasAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 66, - "name": "estimateGasAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 67, - "name": "txData", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Partial", - "typeArguments": [ - { - "type": "reference", - "name": "TxData" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 131, - "character": 33 - } - ] - }, - { - "id": 57, - "name": "getAvailableAddressesAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 58, - "name": "getAvailableAddressesAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 98, - "character": 43 - } - ] - }, - { - "id": 39, - "name": "getBalanceInWeiAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 40, - "name": "getBalanceInWeiAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 41, - "name": "owner", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "BigNumber" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 70, - "character": 37 - } - ] - }, - { - "id": 51, - "name": "getBlockAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 52, - "name": "getBlockAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 53, - "name": "blockParam", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "Web3.BlockParam" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "BlockWithoutTransactionData" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 90, - "character": 30 - } - ] - }, - { - "id": 49, - "name": "getBlockNumberAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 50, - "name": "getBlockNumberAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 86, - "character": 36 - } - ] - }, - { - "id": 54, - "name": "getBlockTimestampAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 55, - "name": "getBlockTimestampAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 56, - "name": "blockParam", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "reference", - "name": "Web3.BlockParam" - } - ] - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 94, - "character": 39 - } - ] - }, - { - "id": 16, - "name": "getContractDefaults", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 17, - "name": "getContractDefaults", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Partial", - "typeArguments": [ - { - "type": "reference", - "name": "TxData" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 33, - "character": 30 - } - ] - }, - { - "id": 62, - "name": "getContractFromAbi", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 63, - "name": "getContractFromAbi", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 64, - "name": "abi", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Web3.ContractAbi" - } - } - ], - "type": { - "type": "reference", - "name": "Contract", - "typeArguments": [ - { - "type": "intrinsic", - "name": "any" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 127, - "character": 29 - } - ] - }, - { - "id": 34, - "name": "getCurrentProvider", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 35, - "name": "getCurrentProvider", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 63, - "character": 29 - } - ] - }, - { - "id": 59, - "name": "getLogsAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 60, - "name": "getLogsAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 61, - "name": "filter", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "FilterObject" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "array", - "elementType": { - "type": "reference", - "name": "LogEntry" - } - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 103, - "character": 29 - } - ] - }, - { - "id": 29, - "name": "getNetworkIdAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 30, - "name": "getNetworkIdAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "number" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 51, - "character": 34 - } - ] - }, - { - "id": 27, - "name": "getNodeVersionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 28, - "name": "getNodeVersionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 47, - "character": 36 - } - ] - }, - { - "id": 31, - "name": "getTransactionReceiptAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 32, - "name": "getTransactionReceiptAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 33, - "name": "txHash", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "reference", - "name": "TransactionReceipt" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 56, - "character": 43 - } - ] - }, - { - "id": 21, - "name": "isAddress", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 22, - "name": "isAddress", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 23, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "intrinsic", - "name": "boolean" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 39, - "character": 20 - } - ] - }, - { - "id": 24, - "name": "isSenderAddressAvailableAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 25, - "name": "isSenderAddressAvailableAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 26, - "name": "senderAddress", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "boolean" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 42, - "character": 46 - } - ] - }, - { - "id": 72, - "name": "sendTransactionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 73, - "name": "sendTransactionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 74, - "name": "txData", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "TxData" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 139, - "character": 37 - } - ] - }, - { - "id": 18, - "name": "setProvider", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 19, - "name": "setProvider", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 20, - "name": "provider", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "Provider" - } - } - ], - "type": { - "type": "intrinsic", - "name": "void" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 36, - "character": 22 - } - ] - }, - { - "id": 45, - "name": "signTransactionAsync", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 46, - "name": "signTransactionAsync", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 47, - "name": "address", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 48, - "name": "message", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "intrinsic", - "name": "string" - } - } - ], - "type": { - "type": "reference", - "name": "Promise", - "typeArguments": [ - { - "type": "intrinsic", - "name": "string" - } - ] - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 82, - "character": 37 - } - ] - }, - { - "id": 36, - "name": "toWei", - "kind": 2048, - "kindString": "Method", - "flags": { - "isExported": true, - "isPublic": true - }, - "signatures": [ - { - "id": 37, - "name": "toWei", - "kind": 4096, - "kindString": "Call signature", - "flags": {}, - "parameters": [ - { - "id": 38, - "name": "ethAmount", - "kind": 32768, - "kindString": "Parameter", - "flags": {}, - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "type": { - "type": "reference", - "name": "BigNumber" - } - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 66, - "character": 16 - } - ] - } - ], - "groups": [ - { - "title": "Constructors", - "kind": 512, - "children": [12] - }, - { - "title": "Methods", - "kind": 2048, - "children": [ - 68, - 42, - 65, - 57, - 39, - 51, - 49, - 54, - 16, - 62, - 34, - 59, - 29, - 27, - 31, - 21, - 24, - 72, - 18, - 45, - 36 - ] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 17, - "character": 24 - } - ] - }, - { - "id": 2, - "name": "RawLogEntry", - "kind": 256, - "kindString": "Interface", - "flags": {}, - "children": [ - { - "id": 8, - "name": "address", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 12, - "character": 11 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 6, - "name": "blockHash", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 10, - "character": 13 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 7, - "name": "blockNumber", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 11, - "character": 15 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 9, - "name": "data", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 13, - "character": 8 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 3, - "name": "logIndex", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 7, - "character": 12 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - }, - { - "id": 10, - "name": "topics", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 14, - "character": 10 - } - ], - "type": { - "type": "array", - "elementType": { - "type": "intrinsic", - "name": "string" - } - } - }, - { - "id": 5, - "name": "transactionHash", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 9, - "character": 19 - } - ], - "type": { - "type": "intrinsic", - "name": "string" - } - }, - { - "id": 4, - "name": "transactionIndex", - "kind": 1024, - "kindString": "Property", - "flags": {}, - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 8, - "character": 20 - } - ], - "type": { - "type": "union", - "types": [ - { - "type": "intrinsic", - "name": "string" - }, - { - "type": "intrinsic", - "name": "null" - } - ] - } - } - ], - "groups": [ - { - "title": "Properties", - "kind": 1024, - "children": [8, 6, 7, 9, 3, 10, 5, 4] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 6, - "character": 21 - } - ] - } - ], - "groups": [ - { - "title": "Classes", - "kind": 128, - "children": [11] - }, - { - "title": "Interfaces", - "kind": 256, - "children": [2] - } - ], - "sources": [ - { - "fileName": "web3-wrapper/src/index.ts", - "line": 1, - "character": 0 - } - ] - } - ], - "groups": [ - { - "title": "External modules", - "kind": 1, - "children": [75, 1] - } - ] -} diff --git a/packages/react-docs-example/tsconfig.json b/packages/react-docs-example/tsconfig.json deleted file mode 100644 index 2f12470d6..000000000 --- a/packages/react-docs-example/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "./lib/", - "jsx": "react", - "baseUrl": "./", - "strictNullChecks": false, - "paths": { - "*": ["node_modules/@types/*", "*"] - } - }, - "include": ["./ts/**/*"] -} diff --git a/packages/react-docs-example/tslint.json b/packages/react-docs-example/tslint.json deleted file mode 100644 index ee918e360..000000000 --- a/packages/react-docs-example/tslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["@0xproject/tslint-config"], - "rules": { - "no-object-literal-type-assertion": false, - "completed-docs": false, - "prefer-function-over-method": false - } -} diff --git a/packages/react-docs-example/webpack.config.js b/packages/react-docs-example/webpack.config.js deleted file mode 100644 index 30f3132da..000000000 --- a/packages/react-docs-example/webpack.config.js +++ /dev/null @@ -1,83 +0,0 @@ -const path = require('path'); -const webpack = require('webpack'); - -module.exports = { - entry: ['./ts/index.tsx'], - output: { - path: path.join(__dirname, '/public'), - filename: 'bundle.js', - chunkFilename: 'bundle-[name].js', - publicPath: '/', - }, - devtool: 'source-map', - resolve: { - modules: [path.join(__dirname, '/ts'), 'node_modules'], - extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.md'], - alias: { - ts: path.join(__dirname, '/ts'), - less: path.join(__dirname, '/less'), - md: path.join(__dirname, '/md'), - }, - }, - module: { - rules: [ - { - test: /\.js$/, - loader: 'source-map-loader', - exclude: [ - // instead of /\/node_modules\// - path.join(process.cwd(), 'node_modules'), - ], - }, - { - test: /\.tsx?$/, - loader: 'awesome-typescript-loader', - }, - { - test: /\.css$/, - loaders: ['style-loader', 'css-loader'], - }, - { - test: /\.less$/, - loader: 'style-loader!css-loader!less-loader', - exclude: /node_modules/, - }, - { - test: /\.json$/, - loader: 'json-loader', - }, - { - test: /\.md$/, - use: 'raw-loader', - }, - ], - }, - devServer: { - port: 3000, - disableHostCheck: true, - historyApiFallback: { - // Fixes issue where having dots in URL path that aren't part of fileNames causes webpack-dev-server - // to fail. - // Source: https://github.com/cvut/fittable/issues/171 - rewrites: [ - { - from: /.*$/, - to: function() { - return 'index.html'; - }, - }, - ], - }, - contentBase: path.join(__dirname, '/public'), - }, - plugins: - process.env.NODE_ENV === 'production' - ? [ - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: JSON.stringify(process.env.NODE_ENV), - }, - }), - ] - : [], -}; diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index c0efc4a0b..5d56207de 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -1,6 +1,8 @@ ## @0xproject/react-docs -A full-page React component for rendering beautiful documentation for Solidity and Typescript code generated with [TypeDoc](http://typedoc.org/) or [Doxity](https://github.com/0xproject/doxity). See a [live example](http://react-docs-example.s3-website-us-east-1.amazonaws.com/). +#### WARNING: Alpha software. Expect things to break when trying to use. + +A full-page React component for rendering beautiful documentation for Solidity and Typescript code generated with [TypeDoc](http://typedoc.org/) or [Doxity](https://github.com/0xproject/doxity). <div style="text-align: center;"> <img src="https://s3.eu-west-2.amazonaws.com/0x-wiki-images/screenshot.png" style="padding-bottom: 20px; padding-top: 20px;" width="80%" /> @@ -27,8 +29,6 @@ yarn add @0xproject/react-docs ## Usage -View the [live example](http://react-docs-example.s3-website-us-east-1.amazonaws.com/) that renders the [@0xproject/web3-wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) Typescript package. It's source code is in the [react-docs-example](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs-example) 0x monorepo subpackage. - This package exposes both a single `Documentation` react component that will render a docs page, as well as all of it's sub-components in case someone wants to build their own layout. Currently this package still has some external dependencies outside of the `Documentation` component, so please start your project off by copying the [react-docs-example](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs-example) directory and modifying it there. If you need changes in the [react-docs](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs) package, fork the 0x monorepo, make the required changes and submit a PR. Until we merge it, you can have your project depend on your own custom fork. -- cgit v1.2.3 From 1588f4ac391038b9206ba2220226f2f11fd8fe0f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 17:51:58 +0200 Subject: Stop exporting crypto --- packages/contracts/test/utils/address_utils.ts | 3 ++- packages/order-utils/src/index.ts | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/contracts/test/utils/address_utils.ts b/packages/contracts/test/utils/address_utils.ts index a9fb6921a..3cf8ec786 100644 --- a/packages/contracts/test/utils/address_utils.ts +++ b/packages/contracts/test/utils/address_utils.ts @@ -1,4 +1,5 @@ -import { crypto, generatePseudoRandomSalt } from '@0xproject/order-utils'; +import { generatePseudoRandomSalt } from '@0xproject/order-utils'; +import { crypto } from '@0xproject/order-utils/lib/src/crypto'; export const addressUtils = { generatePseudoRandomAddress(): string { diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 5852a01b9..c685a94e2 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -1,7 +1,6 @@ export { orderHashUtils } from './order_hash'; export { signatureUtils } from './signature_utils'; export { constants } from './constants'; -export { crypto } from './crypto'; export { generatePseudoRandomSalt } from './salt'; export { OrderError, -- cgit v1.2.3 From 36d615318d7a0d63c254b42f029d393aea04c674 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 17:52:09 +0200 Subject: Omit several exports from order-utils docs --- packages/order-utils/package.json | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index c49abfdae..d4b04df1c 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -31,7 +31,14 @@ "contracts_v2": "DummyERC20Token", "postpublish": { "assets": [], - "shouldPublishDocs": true + "shouldPublishDocs": true, + "omitExports": [ + "AbstractBalanceAndProxyAllowanceFetcher", + "AbstractOrderFilledCancelledFetcher", + "BalanceAndProxyAllowanceLazyStore", + "OrderFilledCancelledLazyStore", + "ExchangeTransferSimulator" + ] } }, "license": "Apache-2.0", -- cgit v1.2.3 From a728247d6c4819d15a7fadd4cd6dd582f150b258 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 18:28:56 +0200 Subject: Display camelCase names all-caps properly --- .../src/components/markdown_section.tsx | 2 +- .../src/components/nested_sidebar_menu.tsx | 2 +- packages/react-shared/src/utils/utils.ts | 22 ++++++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index 3b65b3075..09b214548 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -42,7 +42,7 @@ export class MarkdownSection extends React.Component<MarkdownSectionProps, Markd const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults; const id = utils.getIdFromName(sectionName); - const finalSectionName = utils.convertDashesToSpaces(sectionName); + const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); return ( <div className="md-px1 sm-px2 overflow-hidden" diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 4b1c2f365..c8bddb59a 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -45,7 +45,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N }; public render(): React.ReactNode { const navigation = _.map(this.props.topLevelMenu, (menuItems: string[], sectionName: string) => { - const finalSectionName = utils.convertDashesToSpaces(sectionName); + const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); if (this.props.shouldDisplaySectionHeaders) { // tslint:disable-next-line:no-unused-variable const id = utils.getIdFromName(sectionName); diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index 93c7e9f7b..6dd0b9993 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -33,6 +33,28 @@ export const utils = { convertDashesToSpaces(text: string): string { return text.replace(/-/g, ' '); }, + convertCamelCaseToSpaces(text: string): string { + const charArray = _.map(text, (char, i) => { + const isNumber = !_.eq(_.parseInt(char), NaN); + const isPrevNumber = i !== 0 && !_.eq(_.parseInt(text[i - 1]), NaN); + if (isNumber && (i == 0 || isPrevNumber)) { + return char; + } + if (char === char.toUpperCase() && i !== 0) { + return ` ${char}`; + } + return char; + }); + let finalText = charArray.join(''); + const exceptions = { 'EIP ': 'E I P', 'ZRX ': 'Z R X', 'ERC ': 'E R C' }; + _.each(exceptions, (spaced, normal) => { + console.log(finalText, spaced, normal); + if (_.includes(finalText, spaced)) { + finalText = finalText.replace(spaced, normal); + } + }); + return finalText; + }, getEtherScanLinkIfExists( addressOrTxHash: string, networkId: number, -- cgit v1.2.3 From c17d6c47c3253cf32c2dada8f7f871563f7209e9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 19:24:58 +0200 Subject: Properly render class/objectLiteral properties that are simple variables --- packages/react-docs/src/utils/typedoc_utils.ts | 42 ++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index b74b9562b..2eee2fa59 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -86,7 +86,13 @@ export const typeDocUtils = { const entities = child.children; const commentObj = child.comment; const sectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; - const docSection = typeDocUtils._convertEntitiesToDocSection(entities, docsInfo, sectionName); + const isClassOrObjectLiteral = true; + const docSection = typeDocUtils._convertEntitiesToDocSection( + entities, + docsInfo, + sectionName, + isClassOrObjectLiteral, + ); docSection.comment = sectionComment; docAgnosticFormat[sectionName] = docSection; break; @@ -127,7 +133,12 @@ export const typeDocUtils = { return docAgnosticFormat; }, - _convertEntitiesToDocSection(entities: TypeDocNode[], docsInfo: DocsInfo, sectionName: string): DocSection { + _convertEntitiesToDocSection( + entities: TypeDocNode[], + docsInfo: DocsInfo, + sectionName: string, + isClassOrObjectLiteral: boolean = false, + ): DocSection { const docSection: DocSection = { comment: '', constructors: [], @@ -194,6 +205,32 @@ export const typeDocUtils = { } break; + case KindString.Variable: + if (isClassOrObjectLiteral) { + // Render as a property + const property = typeDocUtils._convertProperty( + entity, + docsInfo.sections, + sectionName, + docsInfo.id, + ); + docSection.properties.push(property); + } else { + // Otherwise, render as a type + const customType = typeDocUtils._convertCustomType( + entity, + docsInfo.sections, + sectionName, + docsInfo.id, + ); + const seenTypeNames = _.map(docSection.types, t => t.name); + const isUnseen = !_.includes(seenTypeNames, customType.name); + if (isUnseen) { + docSection.types.push(customType); + } + } + break; + case KindString.Interface: case KindString.Variable: case KindString.Enumeration: @@ -221,6 +258,7 @@ export const typeDocUtils = { throw errorUtils.spawnSwitchErr('kindString', entity.kindString); } }); + console.log('docSection', docSection); return docSection; }, _convertCustomType(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): CustomType { -- cgit v1.2.3 From 9337d207a1f4d5c28b42d1364a2a8bdc0dc841cf Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 19:41:55 +0200 Subject: Stop exporting constants from order-utils --- packages/order-utils/src/index.ts | 1 - packages/order-utils/test/order_hash_test.ts | 4 +++- packages/website/ts/redux/reducer.ts | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index c685a94e2..85d26de81 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -1,6 +1,5 @@ export { orderHashUtils } from './order_hash'; export { signatureUtils } from './signature_utils'; -export { constants } from './constants'; export { generatePseudoRandomSalt } from './salt'; export { OrderError, diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts index 0a6be83d0..3fdbbad21 100644 --- a/packages/order-utils/test/order_hash_test.ts +++ b/packages/order-utils/test/order_hash_test.ts @@ -3,7 +3,9 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import 'mocha'; -import { constants, orderHashUtils } from '../src'; +import { orderHashUtils } from '../src'; + +import { constants } from '../src/constants'; import { chaiSetup } from './utils/chai_setup'; diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index caddabcf0..15f118813 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -1,4 +1,4 @@ -import { constants, generatePseudoRandomSalt } from '@0xproject/order-utils'; +import { generatePseudoRandomSalt } from '@0xproject/order-utils'; import { ECSignature } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; @@ -16,6 +16,7 @@ import { } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; +import { constants } from 'ts/utils/constants'; // Instead of defaulting the docs version to an empty string, we pre-populate it with // a valid version value. This does not need to be updated however, since onLoad, it -- cgit v1.2.3 From d9f09b5e1e7ecc8dc56ac7184cfc0152b3c2ff32 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 19:45:09 +0200 Subject: Make rendering of individually exported functions lighter-weight --- packages/react-docs/src/components/documentation.tsx | 10 +++++++++- packages/react-docs/src/docs_info.ts | 11 +++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 4f776b237..5393652d4 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -211,6 +211,14 @@ export class Documentation extends React.Component<DocumentationProps, Documenta return null; } + const isExportedFunctionSection = + docSection.functions.length === 1 && + _.isEmpty(docSection.types) && + _.isEmpty(docSection.methods) && + _.isEmpty(docSection.constructors) && + _.isEmpty(docSection.properties) && + _.isEmpty(docSection.events); + const sortedTypes = _.sortBy(docSection.types, 'name'); const typeDefs = _.map(sortedTypes, customType => { return ( @@ -279,7 +287,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta )} {!_.isEmpty(docSection.functions) && ( <div> - <h2 style={headerStyle}>Functions</h2> + {!isExportedFunctionSection && <h2 style={headerStyle}>Functions</h2>} <div>{functionDefs}</div> </div> )} diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 0637f3e65..36a6a7301 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -52,10 +52,20 @@ export class DocsInfo { return; // no-op } + const isExportedFunctionSection = + docSection.functions.length === 1 && + _.isEmpty(docSection.types) && + _.isEmpty(docSection.methods) && + _.isEmpty(docSection.constructors) && + _.isEmpty(docSection.properties) && + _.isEmpty(docSection.events); + if (!_.isUndefined(this.sections.types) && sectionName === this.sections.types) { const sortedTypesNames = _.sortBy(docSection.types, 'name'); const typeNames = _.map(sortedTypesNames, t => t.name); menuSubsectionsBySection[sectionName] = typeNames; + } else if (isExportedFunctionSection) { + // Noop so that we don't have the method listed underneath itself. } else { let eventNames: string[] = []; if (!_.isUndefined(docSection.events)) { @@ -76,6 +86,7 @@ export class DocsInfo { ]; } }); + console.log('menuSubsectionsBySection', menuSubsectionsBySection); return menuSubsectionsBySection; } public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { -- cgit v1.2.3 From 343cd05363166a7a93fca361d5547b39f3e83d99 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 21:27:01 +0200 Subject: Add missing comments --- packages/order-utils/package.json | 9 +--- ...abstract_balance_and_proxy_allowance_fetcher.ts | 17 +++++++ .../abstract_order_filled_cancelled_fetcher.ts | 15 ++++++ packages/order-utils/src/eip712_utils.ts | 28 +++++++++--- .../order-utils/src/exchange_transfer_simulator.ts | 9 ++++ packages/order-utils/src/order_state_utils.ts | 53 +++++++++++----------- packages/order-utils/src/order_validation_utils.ts | 50 ++++++++++++++++++++ .../balance_and_proxy_allowance_lazy_store.ts | 43 ++++++++++++++++++ .../src/store/order_filled_cancelled_lazy_store.ts | 45 ++++++++++++++++++ 9 files changed, 229 insertions(+), 40 deletions(-) diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index d4b04df1c..c49abfdae 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -31,14 +31,7 @@ "contracts_v2": "DummyERC20Token", "postpublish": { "assets": [], - "shouldPublishDocs": true, - "omitExports": [ - "AbstractBalanceAndProxyAllowanceFetcher", - "AbstractOrderFilledCancelledFetcher", - "BalanceAndProxyAllowanceLazyStore", - "OrderFilledCancelledLazyStore", - "ExchangeTransferSimulator" - ] + "shouldPublishDocs": true } }, "license": "Apache-2.0", diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts index b2760d98e..7cb859ca7 100644 --- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts @@ -1,6 +1,23 @@ import { BigNumber } from '@0xproject/utils'; +/**l + * An abstract class to be implemented in order to use OrderStateUtils. The class that + * implements this interface must be capable of fetching the balance and proxyAllowance + * for an Ethereum address and assetData + */ export abstract class AbstractBalanceAndProxyAllowanceFetcher { + /** + * Get balance of assetData for userAddress + * @param assetData AssetData for which to fetch the balance + * @param userAddress Ethereum address for which to fetch the balance + * @return Balance amount in base units + */ public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber>; + /** + * Get the 0x asset proxy allowance of assetData for userAddress + * @param assetData AssetData for which to fetch the allowance + * @param userAddress Ethereum address for which to fetch the allowance + * @return Allowance amount in base units + */ public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>; } diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts index 865ea4e43..d2b01c359 100644 --- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts @@ -1,7 +1,22 @@ import { BigNumber } from '@0xproject/utils'; +/**l + * An abstract class to be implemented in order to use OrderStateUtils. The class that + * implements this interface must be capable of fetching the amount filled of an order + * and whether it's been cancelled. + */ export abstract class AbstractOrderFilledCancelledFetcher { + /** + * Get the amount of the order's takerToken amount already filled + * @param orderHash OrderHash of order we are interested in + * @return FilledTakerAmount + */ public abstract async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber>; + /** + * Whether an order is cancelled + * @param orderHash OrderHash of order we are interested in + * @return Whether or not the order is cancelled + */ public abstract async isOrderCancelledAsync(orderHash: string): Promise<boolean>; public abstract getZRXAssetData(): string; } diff --git a/packages/order-utils/src/eip712_utils.ts b/packages/order-utils/src/eip712_utils.ts index 2594e6d6d..c7b20f824 100644 --- a/packages/order-utils/src/eip712_utils.ts +++ b/packages/order-utils/src/eip712_utils.ts @@ -40,15 +40,37 @@ export const EIP712Utils = { const messageBuff = crypto.solSHA3([EIP191_PREFIX, domainSeparatorHashBuffer, hashStruct]); return messageBuff; }, + /** + * Pad an address to 32 bytes + * @param address Address to pad + * @return padded address + */ pad32Address(address: string): Buffer { const addressBuffer = ethUtil.toBuffer(address); const addressPadded = EIP712Utils.pad32Buffer(addressBuffer); return addressPadded; }, + /** + * Pad an buffer to 32 bytes + * @param buffer Address to pad + * @return padded buffer + */ pad32Buffer(buffer: Buffer): Buffer { const bufferPadded = ethUtil.setLengthLeft(buffer, EIP712_VALUE_LENGTH); return bufferPadded; }, + /** + * Hash together a EIP712 schema with the corresponding data + * @param schema EIP712-compliant schema + * @param data Data the complies to the schema + * @return A buffer containing the SHA256 hash of the schema and encoded data + */ + structHash(schema: EIP712Schema, data: { [key: string]: any }): Buffer { + const encodedData = EIP712Utils._encodeData(schema, data); + const schemaHash = EIP712Utils.compileSchema(schema); + const hashBuffer = crypto.solSHA3([schemaHash, ...encodedData]); + return hashBuffer; + }, _getDomainSeparatorSchemaBuffer(): Buffer { return EIP712Utils.compileSchema(EIP712_DOMAIN_SCHEMA); }, @@ -84,10 +106,4 @@ export const EIP712Utils = { } return encodedValues; }, - structHash(schema: EIP712Schema, data: { [key: string]: any }): Buffer { - const encodedData = EIP712Utils._encodeData(schema, data); - const schemaHash = EIP712Utils.compileSchema(schema); - const hashBuffer = crypto.solSHA3([schemaHash, ...encodedData]); - return hashBuffer; - }, }; diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts index c3a4f9c2a..81c849c64 100644 --- a/packages/order-utils/src/exchange_transfer_simulator.ts +++ b/packages/order-utils/src/exchange_transfer_simulator.ts @@ -33,6 +33,10 @@ const ERR_MSG_MAPPING = { }, }; +/** + * An exchange transfer simulator which simulates asset transfers exactly how the + * 0x exchange contract would do them. + */ export class ExchangeTransferSimulator { private readonly _store: AbstractBalanceAndProxyAllowanceLazyStore; private static _throwValidationError( @@ -43,6 +47,11 @@ export class ExchangeTransferSimulator { const errMsg = ERR_MSG_MAPPING[failureReason][tradeSide][transferType]; throw new Error(errMsg); } + /** + * Instantiate a ExchangeTransferSimulator + * @param store A class that implements AbstractBalanceAndProxyAllowanceLazyStore + * @return an instance of ExchangeTransferSimulator + */ constructor(store: AbstractBalanceAndProxyAllowanceLazyStore) { this._store = store; } diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts index 189bf4180..cb08c5ae2 100644 --- a/packages/order-utils/src/order_state_utils.ts +++ b/packages/order-utils/src/order_state_utils.ts @@ -91,6 +91,14 @@ export class OrderStateUtils { throw new Error(ExchangeContractErrs.OrderFillRoundingError); } } + /** + * Instantiate OrderStateUtils + * @param balanceAndProxyAllowanceFetcher A class that is capable of fetching balances + * and proxyAllowances for Ethereum addresses. It must implement AbstractBalanceAndProxyAllowanceFetcher + * @param orderFilledCancelledFetcher A class that is capable of fetching whether an order + * is cancelled and how much of it has been filled. It must implement AbstractOrderFilledCancelledFetcher + * @return Instance of OrderStateUtils + */ constructor( balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher, @@ -98,6 +106,14 @@ export class OrderStateUtils { this._balanceAndProxyAllowanceFetcher = balanceAndProxyAllowanceFetcher; this._orderFilledCancelledFetcher = orderFilledCancelledFetcher; } + /** + * Get the orderState for an "open" order (i.e where takerAddress=NULL_ADDRESS) + * This method will only check the maker's balance/allowance to calculate the + * OrderState. + * @param signedOrder The order of interest + * @return State relevant to the signedOrder, as well as whether the signedOrder is "valid". + * Validity is defined as a non-zero amount of the order can still be filled. + */ public async getOpenOrderStateAsync(signedOrder: SignedOrder): Promise<OrderState> { const orderRelevantState = await this.getOpenOrderRelevantStateAsync(signedOrder); const orderHash = orderHashUtils.getOrderHashHex(signedOrder); @@ -127,6 +143,11 @@ export class OrderStateUtils { return orderState; } } + /** + * Get state relevant to an order (i.e makerBalance, makerAllowance, filledTakerAssetAmount, etc... + * @param signedOrder Order of interest + * @return An instance of OrderRelevantState + */ public async getOpenOrderRelevantStateAsync(signedOrder: SignedOrder): Promise<OrderRelevantState> { const isMaker = true; const sidedOrderRelevantState = await this._getSidedOrderRelevantStateAsync( @@ -149,6 +170,12 @@ export class OrderStateUtils { }; return orderRelevantState; } + /** + * Get the max amount of the supplied order's takerAmount that could still be filled + * @param signedOrder Order of interest + * @param takerAddress Hypothetical taker of the order + * @return fillableTakerAssetAmount + */ public async getMaxFillableTakerAssetAmountAsync( signedOrder: SignedOrder, takerAddress: string, @@ -181,32 +208,6 @@ export class OrderStateUtils { return fillableTakerAssetAmount; } - public async getMaxFillableTakerAssetAmountForFailingOrderAsync( - signedOrder: SignedOrder, - takerAddress: string, - ): Promise<BigNumber> { - // Get min of taker balance & allowance - const takerAssetBalanceOfTaker = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync( - signedOrder.takerAssetData, - takerAddress, - ); - const takerAssetAllowanceOfTaker = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync( - signedOrder.takerAssetData, - takerAddress, - ); - const minTakerAssetAmount = BigNumber.min([takerAssetBalanceOfTaker, takerAssetAllowanceOfTaker]); - - // get remainingFillAmount - const orderHash = orderHashUtils.getOrderHashHex(signedOrder); - const filledTakerAssetAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash); - const remainingFillTakerAssetAmount = signedOrder.takerAssetAmount.minus(filledTakerAssetAmount); - - if (minTakerAssetAmount.gte(remainingFillTakerAssetAmount)) { - return remainingFillTakerAssetAmount; - } else { - return minTakerAssetAmount; - } - } private async _getSidedOrderRelevantStateAsync( isMakerSide: boolean, signedOrder: SignedOrder, diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index ccc6e653f..972e6f6d6 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -12,8 +12,18 @@ import { orderHashUtils } from './order_hash'; import { signatureUtils } from './signature_utils'; import { utils } from './utils'; +/** + * A utility class for validating orders + */ export class OrderValidationUtils { private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher; + /** + * A Typescript implementation mirroring the implementation of isRoundingError in the + * Exchange smart contract + * @param numerator Numerator value. When used to check an order, pass in `takerAssetFilledAmount` + * @param denominator Denominator value. When used to check an order, pass in `order.takerAssetAmount` + * @param target Target value. When used to check an order, pass in `order.makerAssetAmount` + */ public static isRoundingError(numerator: BigNumber, denominator: BigNumber, target: BigNumber): boolean { // Solidity's mulmod() in JS // Source: https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions @@ -31,6 +41,15 @@ export class OrderValidationUtils { const isError = errPercentageTimes1000000.gt(1000); return isError; } + /** + * Validate that the maker & taker have sufficient balances/allowances + * to fill the supplied order to the fillTakerAssetAmount amount + * @param exchangeTradeEmulator ExchangeTradeEmulator to use + * @param signedOrder SignedOrder to test + * @param fillTakerAssetAmount Amount of takerAsset to fill the signedOrder + * @param senderAddress Sender of the fillOrder tx + * @param zrxAssetData AssetData for the ZRX token + */ public static async validateFillOrderBalancesAllowancesThrowIfInvalidAsync( exchangeTradeEmulator: ExchangeTransferSimulator, signedOrder: SignedOrder, @@ -104,9 +123,22 @@ export class OrderValidationUtils { throw new Error(RevertReason.OrderUnfillable); } } + /** + * Instantiate OrderValidationUtils + * @param orderFilledCancelledFetcher A module that implements the AbstractOrderFilledCancelledFetcher + * @return An instance of OrderValidationUtils + */ constructor(orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher) { this._orderFilledCancelledFetcher = orderFilledCancelledFetcher; } + /** + * Validate if the supplied order is fillable, and throw if it isn't + * @param exchangeTradeEmulator ExchangeTradeEmulator instance + * @param signedOrder SignedOrder of interest + * @param zrxAssetData ZRX assetData + * @param expectedFillTakerTokenAmount If supplied, this call will make sure this amount is fillable. + * If it isn't supplied, we check if the order is fillable for a non-zero amount + */ public async validateOrderFillableOrThrowAsync( exchangeTradeEmulator: ExchangeTransferSimulator, signedOrder: SignedOrder, @@ -132,6 +164,15 @@ export class OrderValidationUtils { zrxAssetData, ); } + /** + * Validate a call to FillOrder and throw if it wouldn't succeed + * @param exchangeTradeEmulator ExchangeTradeEmulator to use + * @param provider Web3 provider to use for JSON RPC requests + * @param signedOrder SignedOrder of interest + * @param fillTakerAssetAmount Amount we'd like to fill the order for + * @param takerAddress The taker of the order + * @param zrxAssetData ZRX asset data + */ public async validateFillOrderThrowIfInvalidAsync( exchangeTradeEmulator: ExchangeTransferSimulator, provider: Provider, @@ -187,6 +228,15 @@ export class OrderValidationUtils { } return filledTakerTokenAmount; } + /** + * Validate a call to fillOrKillOrder and throw if it would fail + * @param exchangeTradeEmulator ExchangeTradeEmulator to use + * @param provider Web3 provider to use for JSON RPC requests + * @param signedOrder SignedOrder of interest + * @param fillTakerAssetAmount Amount we'd like to fill the order for + * @param takerAddress The taker of the order + * @param zrxAssetData ZRX asset data + */ public async validateFillOrKillOrderThrowIfInvalidAsync( exchangeTradeEmulator: ExchangeTransferSimulator, provider: Provider, diff --git a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts index 5a2c1d7ff..8a65178b0 100644 --- a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts +++ b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts @@ -21,11 +21,21 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx [userAddress: string]: BigNumber; }; }; + /** + * Instantiates a BalanceAndProxyAllowanceLazyStore + * @param balanceAndProxyAllowanceFetcher Class the implements the AbstractBalanceAndProxyAllowanceFetcher + * @return Instance of BalanceAndProxyAllowanceLazyStore + */ constructor(balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher) { this._balanceAndProxyAllowanceFetcher = balanceAndProxyAllowanceFetcher; this._balance = {}; this._proxyAllowance = {}; } + /** + * Get a users balance of an asset + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber> { if (_.isUndefined(this._balance[assetData]) || _.isUndefined(this._balance[assetData][userAddress])) { const balance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync(assetData, userAddress); @@ -34,12 +44,22 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx const cachedBalance = this._balance[assetData][userAddress]; return cachedBalance; } + /** + * Set the balance of an asset for a user + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public setBalance(assetData: string, userAddress: string, balance: BigNumber): void { if (_.isUndefined(this._balance[assetData])) { this._balance[assetData] = {}; } this._balance[assetData][userAddress] = balance; } + /** + * Clear the balance of an asset for a user + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public deleteBalance(assetData: string, userAddress: string): void { if (!_.isUndefined(this._balance[assetData])) { delete this._balance[assetData][userAddress]; @@ -48,6 +68,11 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx } } } + /** + * Get the 0x asset proxy allowance + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber> { if ( _.isUndefined(this._proxyAllowance[assetData]) || @@ -62,12 +87,22 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx const cachedProxyAllowance = this._proxyAllowance[assetData][userAddress]; return cachedProxyAllowance; } + /** + * Set the 0x asset proxy allowance + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public setProxyAllowance(assetData: string, userAddress: string, proxyAllowance: BigNumber): void { if (_.isUndefined(this._proxyAllowance[assetData])) { this._proxyAllowance[assetData] = {}; } this._proxyAllowance[assetData][userAddress] = proxyAllowance; } + /** + * Clear the 0x asset proxy allowance + * @param assetData AssetData of interest + * @param userAddress Ethereum address of interest + */ public deleteProxyAllowance(assetData: string, userAddress: string): void { if (!_.isUndefined(this._proxyAllowance[assetData])) { delete this._proxyAllowance[assetData][userAddress]; @@ -76,6 +111,11 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx } } } + /** + * Clear all ERC721 0x proxy allowances a user has on all items of a specific ERC721 contract + * @param tokenAddress ERc721 token address + * @param userAddress Owner Ethereum address + */ public deleteAllERC721ProxyAllowance(tokenAddress: string, userAddress: string): void { for (const assetData in this._proxyAllowance) { if (this._proxyAllowance.hasOwnProperty(assetData)) { @@ -90,6 +130,9 @@ export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProx } } } + /** + * Delete all balances & allowances + */ public deleteAll(): void { this._balance = {}; this._proxyAllowance = {}; diff --git a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts b/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts index 336c6d0ba..6155c2064 100644 --- a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts +++ b/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts @@ -15,11 +15,21 @@ export class OrderFilledCancelledLazyStore implements AbstractOrderFilledCancell private _isCancelled: { [orderHash: string]: boolean; }; + /** + * Instantiate a OrderFilledCancelledLazyStore + * @param orderFilledCancelledFetcher Class instance that implements the AbstractOrderFilledCancelledFetcher + * @returns An instance of OrderFilledCancelledLazyStore + */ constructor(orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher) { this._orderFilledCancelledFetcher = orderFilledCancelledFetcher; this._filledTakerAmount = {}; this._isCancelled = {}; } + /** + * Get the filledTakerAssetAmount of an order + * @param orderHash OrderHash from order of interest + * @return filledTakerAssetAmount + */ public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> { if (_.isUndefined(this._filledTakerAmount[orderHash])) { const filledTakerAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash); @@ -28,12 +38,26 @@ export class OrderFilledCancelledLazyStore implements AbstractOrderFilledCancell const cachedFilledTakerAmount = this._filledTakerAmount[orderHash]; return cachedFilledTakerAmount; } + /** + * Set the filledTakerAssetAmount of an order + * @param orderHash OrderHash from order of interest + * @param filledTakerAmount Desired filledTakerAssetAmount + */ public setFilledTakerAmount(orderHash: string, filledTakerAmount: BigNumber): void { this._filledTakerAmount[orderHash] = filledTakerAmount; } + /** + * Clear the filledTakerAssetAmount of an order + * @param orderHash OrderHash from order of interest + */ public deleteFilledTakerAmount(orderHash: string): void { delete this._filledTakerAmount[orderHash]; } + /** + * Check if an order has been cancelled + * @param orderHash OrderHash from order of interest + * @return Whether the order has been cancelled + */ public async getIsCancelledAsync(orderHash: string): Promise<boolean> { if (_.isUndefined(this._isCancelled[orderHash])) { const isCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(orderHash); @@ -42,22 +66,43 @@ export class OrderFilledCancelledLazyStore implements AbstractOrderFilledCancell const cachedIsCancelled = this._isCancelled[orderHash]; // tslint:disable-line:boolean-naming return cachedIsCancelled; } + /** + * Set whether an order has been cancelled or not + * @param orderHash OrderHash from order of interest + * @param isCancelled Whether this order should be cancelled or not + */ public setIsCancelled(orderHash: string, isCancelled: boolean): void { this._isCancelled[orderHash] = isCancelled; } + /** + * Clear whether the order has been cancelled if already set + * @param orderHash OrderHash from order of interest + */ public deleteIsCancelled(orderHash: string): void { delete this._isCancelled[orderHash]; } + /** + * Clear all filled/cancelled state + */ public deleteAll(): void { this.deleteAllFilled(); this.deleteAllIsCancelled(); } + /** + * Clear all cancelled state + */ public deleteAllIsCancelled(): void { this._isCancelled = {}; } + /** + * Clear all filled state + */ public deleteAllFilled(): void { this._filledTakerAmount = {}; } + /** + * Get the ZRX assetData + */ public getZRXAssetData(): string { const zrxAssetData = this._orderFilledCancelledFetcher.getZRXAssetData(); return zrxAssetData; -- cgit v1.2.3 From bcc1ad20869d10fb16678619e6fa411e53a07742 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 21:30:57 +0200 Subject: Re-order index.ts and add missing types --- packages/order-utils/src/index.ts | 35 +++++++++++++++++++++++------------ 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 85d26de81..50a5106ca 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -1,6 +1,29 @@ export { orderHashUtils } from './order_hash'; export { signatureUtils } from './signature_utils'; export { generatePseudoRandomSalt } from './salt'; +export { assetDataUtils } from './asset_data_utils'; +export { EIP712Utils } from './eip712_utils'; + +export { OrderStateUtils } from './order_state_utils'; +export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; +export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher'; + +export { OrderValidationUtils } from './order_validation_utils'; +export { ExchangeTransferSimulator } from './exchange_transfer_simulator'; +export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store'; +export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store'; + +export { Provider } from 'ethereum-types'; +export { + SignedOrder, + Order, + OrderRelevantState, + OrderState, + ECSignature, + ERC20AssetData, + ERC721AssetData, + AssetProxyId, +} from '@0xproject/types'; export { OrderError, MessagePrefixType, @@ -11,15 +34,3 @@ export { TradeSide, TransferType, } from './types'; -export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; -export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher'; -export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store'; -export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store'; -export { RemainingFillableCalculator } from './remaining_fillable_calculator'; -export { OrderStateUtils } from './order_state_utils'; -export { assetDataUtils } from './asset_data_utils'; -export { EIP712Utils } from './eip712_utils'; -export { OrderValidationUtils } from './order_validation_utils'; -export { ExchangeTransferSimulator } from './exchange_transfer_simulator'; -export { Provider } from 'ethereum-types'; -export { SignedOrder, Order, ECSignature, ERC20AssetData, ERC721AssetData, AssetProxyId } from '@0xproject/types'; -- cgit v1.2.3 From 30be039570d6a533a339c47d068e3d4ef0f4c92a Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 22:24:42 +0200 Subject: Add missing comments --- packages/order-watcher/src/order_watcher/order_watcher.ts | 6 ++++++ 1 file changed, 6 insertions(+) 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, -- cgit v1.2.3 From f42119c9286ad70504b6f8395bcdd801a1ac52c3 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 22:36:32 +0200 Subject: Add missing compiler comments --- packages/sol-compiler/src/compiler.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 3620a3ec1..2503f7315 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -67,6 +67,7 @@ export class Compiler { private readonly _specifiedContracts: string[] | TYPE_ALL_FILES_IDENTIFIER; /** * Instantiates a new instance of the Compiler class. + * @param opts Optional compiler options * @return An instance of the Compiler class. */ constructor(opts?: CompilerOptions) { -- cgit v1.2.3 From c68e1839535e0eeb7c66e8712d1ce786d0f964df Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 22:36:44 +0200 Subject: Add missing sol-cov comments --- .../sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts | 5 +++++ packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts | 5 +++++ packages/sol-cov/src/trace_collection_subprovider.ts | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts index 8e03bf7fd..0601c5729 100644 --- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts @@ -14,6 +14,11 @@ const CONFIG_FILE = 'compiler.json'; export class SolCompilerArtifactAdapter extends AbstractArtifactAdapter { private readonly _artifactsPath: string; private readonly _sourcesPath: string; + /** + * Instantiates a SolCompilerArtifactAdapter + * @param artifactsPath Path to your artifacts directory + * @param sourcesPath Path to your contract sources directory + */ constructor(artifactsPath?: string, sourcesPath?: string) { super(); const config: CompilerOptions = fs.existsSync(CONFIG_FILE) diff --git a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts index 53b77aed5..2f76f730a 100644 --- a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts @@ -9,6 +9,11 @@ import { SolCompilerArtifactAdapter } from './sol_compiler_artifact_adapter'; export class TruffleArtifactAdapter extends AbstractArtifactAdapter { private readonly _solcVersion: string; private readonly _sourcesPath: string; + /** + * Instantiates a TruffleArtifactAdapter + * @param artifactsPath Path to the truffle project's artifacts directory + * @param sourcesPath Path to the truffle project's contract sources directory + */ constructor(sourcesPath: string, solcVersion: string) { super(); this._solcVersion = solcVersion; diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-cov/src/trace_collection_subprovider.ts index 5a101dfeb..91c21fe94 100644 --- a/packages/sol-cov/src/trace_collection_subprovider.ts +++ b/packages/sol-cov/src/trace_collection_subprovider.ts @@ -63,7 +63,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider { * turn to handle a JSON RPC request. * @param payload JSON RPC payload * @param next Callback to call if this subprovider decides not to handle the request - * @param end Callback to call if subprovider handled the request and wants to pass back the request. + * @param _end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix public async handleRequest(payload: JSONRPCRequestPayload, next: NextCallback, _end: ErrorCallback): Promise<void> { -- cgit v1.2.3 From 6df874687150be40d5e93d7d8c0e3e191ea08982 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 22:37:02 +0200 Subject: Omit certain exports and re-org index.ts --- packages/sol-cov/package.json | 3 ++- packages/sol-cov/src/index.ts | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index ad6a6a0a2..6021435d6 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -26,7 +26,8 @@ "config": { "postpublish": { "assets": [], - "shouldPublishDocs": true + "shouldPublishDocs": true, + "omitExports": ["ProfilerSubprovider", "RevertTraceSubprovider"] } }, "repository": { diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index 35135c295..dd102a13b 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -1,10 +1,12 @@ export { CoverageSubprovider } from './coverage_subprovider'; -// HACK: ProfilerSubprovider is a hacky way to do profiling using coverage tools. Not production ready -export { ProfilerSubprovider } from './profiler_subprovider'; -export { RevertTraceSubprovider } from './revert_trace_subprovider'; export { SolCompilerArtifactAdapter } from './artifact_adapters/sol_compiler_artifact_adapter'; export { TruffleArtifactAdapter } from './artifact_adapters/truffle_artifact_adapter'; export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; + +// HACK: ProfilerSubprovider is a hacky way to do profiling using coverage tools. Not production ready +export { ProfilerSubprovider } from './profiler_subprovider'; +export { RevertTraceSubprovider } from './revert_trace_subprovider'; + export { ContractData, TraceInfo, -- cgit v1.2.3 From 4d75689790075f734df9a2e3b80443c85e1ddc95 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 3 Aug 2018 22:42:17 +0200 Subject: Fix commebt --- packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts index 2f76f730a..dc6807cd6 100644 --- a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts @@ -12,7 +12,7 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter { /** * Instantiates a TruffleArtifactAdapter * @param artifactsPath Path to the truffle project's artifacts directory - * @param sourcesPath Path to the truffle project's contract sources directory + * @param solcVersion Solidity version with which to compile all the contracts */ constructor(sourcesPath: string, solcVersion: string) { super(); -- cgit v1.2.3 From 7759e67a5a51a213e19083f63df13e80ea4aefa2 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sat, 4 Aug 2018 10:09:08 +0200 Subject: Rename EIP712Utils to eip712Utils since objectLiterals shouldn't start with caps --- packages/contracts/test/exchange/libs.ts | 4 ++-- packages/contracts/test/utils/transaction_factory.ts | 6 +++--- packages/order-utils/src/eip712_utils.ts | 20 ++++++++++---------- packages/order-utils/src/index.ts | 2 +- packages/order-utils/src/order_hash.ts | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 5c9f9aac7..6c3305d1d 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -1,5 +1,5 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, EIP712Utils, orderHashUtils } from '@0xproject/order-utils'; +import { assetDataUtils, eip712Utils, orderHashUtils } from '@0xproject/order-utils'; import { SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; @@ -109,7 +109,7 @@ describe('Exchange libs', () => { describe('getDomainSeparatorSchema', () => { it('should output the correct domain separator schema hash', async () => { const domainSeparatorSchema = await libs.getDomainSeparatorSchemaHash.callAsync(); - const domainSchemaBuffer = EIP712Utils._getDomainSeparatorSchemaBuffer(); + const domainSchemaBuffer = eip712Utils._getDomainSeparatorSchemaBuffer(); const schemaHashHex = `0x${domainSchemaBuffer.toString('hex')}`; expect(schemaHashHex).to.be.equal(domainSeparatorSchema); }); diff --git a/packages/contracts/test/utils/transaction_factory.ts b/packages/contracts/test/utils/transaction_factory.ts index 281c1e30d..8465a6a30 100644 --- a/packages/contracts/test/utils/transaction_factory.ts +++ b/packages/contracts/test/utils/transaction_factory.ts @@ -1,4 +1,4 @@ -import { EIP712Schema, EIP712Types, EIP712Utils, generatePseudoRandomSalt } from '@0xproject/order-utils'; +import { EIP712Schema, EIP712Types, eip712Utils, generatePseudoRandomSalt } from '@0xproject/order-utils'; import { SignatureType } from '@0xproject/types'; import * as ethUtil from 'ethereumjs-util'; @@ -31,11 +31,11 @@ export class TransactionFactory { signerAddress, data, }; - const executeTransactionHashBuff = EIP712Utils.structHash( + const executeTransactionHashBuff = eip712Utils.structHash( EIP712_ZEROEX_TRANSACTION_SCHEMA, executeTransactionData, ); - const txHash = EIP712Utils.createEIP712Message(executeTransactionHashBuff, this._exchangeAddress); + const txHash = eip712Utils.createEIP712Message(executeTransactionHashBuff, this._exchangeAddress); const signature = signingUtils.signMessage(txHash, this._privateKey, signatureType); const signedTx = { exchangeAddress: this._exchangeAddress, diff --git a/packages/order-utils/src/eip712_utils.ts b/packages/order-utils/src/eip712_utils.ts index c7b20f824..b303c93dc 100644 --- a/packages/order-utils/src/eip712_utils.ts +++ b/packages/order-utils/src/eip712_utils.ts @@ -18,14 +18,14 @@ const EIP712_DOMAIN_SCHEMA: EIP712Schema = { ], }; -export const EIP712Utils = { +export const eip712Utils = { /** * Compiles the EIP712Schema and returns the hash of the schema. * @param schema The EIP712 schema. * @return The hash of the compiled schema */ compileSchema(schema: EIP712Schema): Buffer { - const eip712Schema = EIP712Utils._encodeType(schema); + const eip712Schema = eip712Utils._encodeType(schema); const eip712SchemaHashBuffer = crypto.solSHA3([eip712Schema]); return eip712SchemaHashBuffer; }, @@ -36,7 +36,7 @@ export const EIP712Utils = { * @return The hash of an EIP712 message with domain separator prefixed */ createEIP712Message(hashStruct: Buffer, contractAddress: string): Buffer { - const domainSeparatorHashBuffer = EIP712Utils._getDomainSeparatorHashBuffer(contractAddress); + const domainSeparatorHashBuffer = eip712Utils._getDomainSeparatorHashBuffer(contractAddress); const messageBuff = crypto.solSHA3([EIP191_PREFIX, domainSeparatorHashBuffer, hashStruct]); return messageBuff; }, @@ -47,7 +47,7 @@ export const EIP712Utils = { */ pad32Address(address: string): Buffer { const addressBuffer = ethUtil.toBuffer(address); - const addressPadded = EIP712Utils.pad32Buffer(addressBuffer); + const addressPadded = eip712Utils.pad32Buffer(addressBuffer); return addressPadded; }, /** @@ -66,17 +66,17 @@ export const EIP712Utils = { * @return A buffer containing the SHA256 hash of the schema and encoded data */ structHash(schema: EIP712Schema, data: { [key: string]: any }): Buffer { - const encodedData = EIP712Utils._encodeData(schema, data); - const schemaHash = EIP712Utils.compileSchema(schema); + const encodedData = eip712Utils._encodeData(schema, data); + const schemaHash = eip712Utils.compileSchema(schema); const hashBuffer = crypto.solSHA3([schemaHash, ...encodedData]); return hashBuffer; }, _getDomainSeparatorSchemaBuffer(): Buffer { - return EIP712Utils.compileSchema(EIP712_DOMAIN_SCHEMA); + return eip712Utils.compileSchema(EIP712_DOMAIN_SCHEMA); }, _getDomainSeparatorHashBuffer(exchangeAddress: string): Buffer { - const domainSeparatorSchemaBuffer = EIP712Utils._getDomainSeparatorSchemaBuffer(); - const encodedData = EIP712Utils._encodeData(EIP712_DOMAIN_SCHEMA, { + const domainSeparatorSchemaBuffer = eip712Utils._getDomainSeparatorSchemaBuffer(); + const encodedData = eip712Utils._encodeData(EIP712_DOMAIN_SCHEMA, { name: EIP712_DOMAIN_NAME, version: EIP712_DOMAIN_VERSION, verifyingContract: exchangeAddress, @@ -99,7 +99,7 @@ export const EIP712Utils = { } else if (parameter.type === EIP712Types.Uint256) { encodedValues.push(value); } else if (parameter.type === EIP712Types.Address) { - encodedValues.push(EIP712Utils.pad32Address(value)); + encodedValues.push(eip712Utils.pad32Address(value)); } else { throw new Error(`Unable to encode ${parameter.type}`); } diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 50a5106ca..f3b00a583 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -2,7 +2,7 @@ export { orderHashUtils } from './order_hash'; export { signatureUtils } from './signature_utils'; export { generatePseudoRandomSalt } from './salt'; export { assetDataUtils } from './asset_data_utils'; -export { EIP712Utils } from './eip712_utils'; +export { eip712Utils } from './eip712_utils'; export { OrderStateUtils } from './order_state_utils'; export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts index 54c500653..8e98f8767 100644 --- a/packages/order-utils/src/order_hash.ts +++ b/packages/order-utils/src/order_hash.ts @@ -3,7 +3,7 @@ import { Order, SignedOrder } from '@0xproject/types'; import * as _ from 'lodash'; import { assert } from './assert'; -import { EIP712Utils } from './eip712_utils'; +import { eip712Utils } from './eip712_utils'; import { EIP712Schema, EIP712Types } from './types'; const INVALID_TAKER_FORMAT = 'instance.takerAddress is not of a type(s) string'; @@ -69,11 +69,11 @@ export const orderHashUtils = { * @return The resulting orderHash from hashing the supplied order as a Buffer */ getOrderHashBuffer(order: SignedOrder | Order): Buffer { - const orderParamsHashBuff = EIP712Utils.structHash(EIP712_ORDER_SCHEMA, order); - const orderHashBuff = EIP712Utils.createEIP712Message(orderParamsHashBuff, order.exchangeAddress); + const orderParamsHashBuff = eip712Utils.structHash(EIP712_ORDER_SCHEMA, order); + const orderHashBuff = eip712Utils.createEIP712Message(orderParamsHashBuff, order.exchangeAddress); return orderHashBuff; }, _getOrderSchemaBuffer(): Buffer { - return EIP712Utils.compileSchema(EIP712_ORDER_SCHEMA); + return eip712Utils.compileSchema(EIP712_ORDER_SCHEMA); }, }; -- cgit v1.2.3 From 4527e9ce000d3eafcd55552df0809ea31271ba89 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Sat, 4 Aug 2018 10:09:59 +0200 Subject: Remove prefix hack and add prefix for objectLiteral functions --- packages/react-docs/src/types.ts | 1 + packages/react-docs/src/utils/typedoc_utils.ts | 31 ++++++++++++-------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 79dfe9f4f..a34e06c94 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -124,6 +124,7 @@ export interface TypescriptMethod extends BaseMethod { export interface TypescriptFunction extends BaseFunction { source?: Source; typeParameter?: TypeParameter; + callPath: string; } export interface SolidityMethod extends BaseMethod { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 2eee2fa59..b1d9850ef 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -173,6 +173,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + isClassOrObjectLiteral, ); docSection.functions.push(func); } @@ -331,7 +332,7 @@ export const typeDocUtils = { const commentIfExists = !_.isUndefined(entity.comment) ? entity.comment.shortText : undefined; const isConstructor = false; const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; - const callPath = typeDocUtils._getCallPath(sectionName, sections, isStatic, isConstructor, docId, entity.name); + const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); const property = { name: entity.name, type: typeDocUtils._convertType(entity.type, sections, sectionName, docId), @@ -367,7 +368,7 @@ export const typeDocUtils = { ? undefined : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId); - const callPath = typeDocUtils._getCallPath(sectionName, sections, isStatic, isConstructor, docId, entity.name); + const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); const method = { isConstructor, isStatic, @@ -385,28 +386,16 @@ export const typeDocUtils = { }; return method; }, - _getCallPath( - sectionName: string, - sections: SectionsMap, - isStatic: boolean, - isConstructor: boolean, - docId: string, - entityName: string, - ) { + _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string) { // HACK: we use the fact that the sectionName is the same as the property name at the top-level // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. let callPath; if (isConstructor || entityName === '__type') { callPath = ''; // TODO: Get rid of this 0x-specific logic - } else if (docId === 'ZERO_EX_JS') { - const topLevelInterface = isStatic ? 'ZeroEx.' : 'zeroEx.'; - callPath = - !_.isUndefined(sections.zeroEx) && sectionName !== sections.zeroEx - ? `${topLevelInterface}${sectionName}.` - : topLevelInterface; } else { - callPath = `${sectionName}.`; + const prefix = isStatic ? sectionName : `${sectionName[0].toLowerCase()}${sectionName.slice(1)}`; + callPath = `${prefix}.`; } return callPath; }, @@ -415,6 +404,7 @@ export const typeDocUtils = { sections: SectionsMap, sectionName: string, docId: string, + isObjectLiteral: boolean, ): TypescriptFunction { const signature = entity.signatures[0]; const source = entity.sources[0]; @@ -428,10 +418,17 @@ export const typeDocUtils = { ? undefined : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId); + let callPath = ''; + if (isObjectLiteral) { + const isConstructor = false; + const isStatic = false; + callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); + } const func = { name: signature.name, comment: hasComment ? signature.comment.shortText : undefined, returnComment: hasComment && signature.comment.returns ? signature.comment.returns : undefined, + callPath, source: { fileName: source.fileName, line: source.line, -- cgit v1.2.3 From ff3c77f7c47475d77defecfeb894a8c86c003997 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:48:18 -0400 Subject: Remove stray console.lgos --- packages/react-docs/src/docs_info.ts | 1 - packages/react-docs/src/utils/typedoc_utils.ts | 4 ---- packages/react-shared/src/utils/utils.ts | 1 - 3 files changed, 6 deletions(-) diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 36a6a7301..4267d8a98 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -86,7 +86,6 @@ export class DocsInfo { ]; } }); - console.log('menuSubsectionsBySection', menuSubsectionsBySection); return menuSubsectionsBySection; } public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index b1d9850ef..01385c982 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -259,7 +259,6 @@ export const typeDocUtils = { throw errorUtils.spawnSwitchErr('kindString', entity.kindString); } }); - console.log('docSection', docSection); return docSection; }, _convertCustomType(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): CustomType { @@ -352,9 +351,6 @@ export const typeDocUtils = { sectionName: string, docId: string, ): TypescriptMethod { - if (_.isUndefined(entity.signatures)) { - console.log(entity); - } const signature = entity.signatures[0]; const source = entity.sources[0]; const hasComment = !_.isUndefined(signature.comment); diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index 6dd0b9993..ce7effaff 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -48,7 +48,6 @@ export const utils = { let finalText = charArray.join(''); const exceptions = { 'EIP ': 'E I P', 'ZRX ': 'Z R X', 'ERC ': 'E R C' }; _.each(exceptions, (spaced, normal) => { - console.log(finalText, spaced, normal); if (_.includes(finalText, spaced)) { finalText = finalText.replace(spaced, normal); } -- cgit v1.2.3 From da304de3fc732bd7b5df0c313887627a10958a5b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:48:45 -0400 Subject: Re-order deps --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5f50e58b6..896c12fdf 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,11 @@ "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" }, "devDependencies": { + "@0x-lerna-fork/lerna": "3.0.0-beta.23", "async-child-process": "^1.1.1", "coveralls": "^3.0.0", "ganache-cli": "6.1.3", "lcov-result-merger": "^3.0.0", - "@0x-lerna-fork/lerna": "3.0.0-beta.23", "npm-run-all": "^4.1.2", "prettier": "^1.11.1", "source-map-support": "^0.5.6", -- cgit v1.2.3 From 50e0ddcf799319d1ed963a646ab74e078810ebe6 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:49:02 -0400 Subject: Update dep --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/package.json b/packages/website/package.json index fda724fc8..1bc2d94f8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -21,7 +21,7 @@ "@0xproject/contract-wrappers": "^0.0.5", "@0xproject/order-utils": "^0.0.9", "@0xproject/react-docs": "^1.0.4", - "@0xproject/react-shared": "^0.2.3", + "@0xproject/react-shared": "^1.0.5", "@0xproject/subproviders": "^1.0.4", "@0xproject/types": "^0.8.1", "@0xproject/typescript-typings": "^0.4.3", -- cgit v1.2.3 From d234ee12debc816c52b4f47fa4f2c900edfebb04 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:49:11 -0400 Subject: Update yarn.lock --- yarn.lock | 157 ++++++-------------------------------------------------------- 1 file changed, 13 insertions(+), 144 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9b8462257..5a77b4aec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,27 +690,6 @@ ethers "3.0.22" lodash "4.17.10" -"@0xproject/react-shared@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@0xproject/react-shared/-/react-shared-0.2.3.tgz#f0403b9b7f1cfbe2853b53cc983ebb13ee8753a5" - dependencies: - "@types/lodash" "4.14.104" - "@types/material-ui" "0.18.0" - "@types/node" "9.6.0" - "@types/react" "16.3.13" - "@types/react-dom" "16.0.4" - "@types/react-scroll" "0.0.31" - basscss "8.0.4" - is-mobile "0.2.2" - lodash "4.17.10" - material-ui "0.17.4" - react "15.6.1" - react-dom "15.6.1" - react-highlight "0xproject/react-highlight" - react-markdown "3.2.2" - react-scroll "1.7.7" - react-tap-event-plugin "2.0.1" - "@0xproject/sol-compiler@^0.5.3", "@0xproject/sol-compiler@^0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@0xproject/sol-compiler/-/sol-compiler-0.5.4.tgz#3e0b04b0c02c5ec046ebb962b5ed20978c6b4cdd" @@ -1107,13 +1086,6 @@ "@types/node" "*" "@types/react" "*" -"@types/react-dom@16.0.4": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.4.tgz#2e8fd45f5443780ed49bf2cdd9809e6091177a7d" - dependencies: - "@types/node" "*" - "@types/react" "*" - "@types/react-dom@^16.0.3": version "16.0.5" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96" @@ -1143,12 +1115,6 @@ "@types/history" "*" "@types/react" "*" -"@types/react-scroll@0.0.31": - version "0.0.31" - resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-0.0.31.tgz#1bb26bfd9f595da6403c2f13c2f9a3ed4d2929fa" - dependencies: - "@types/react" "*" - "@types/react-scroll@1.5.3": version "1.5.3" resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-1.5.3.tgz#cc4e94db3d7d5b1cd244bfee24091c335d3e2598" @@ -2446,7 +2412,7 @@ basscss-typography@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/basscss-typography/-/basscss-typography-3.0.4.tgz#ec946a2bad8dd1af97be9ea108ad4bb7be932464" -basscss@8.0.4, basscss@^8.0.3: +basscss@^8.0.3: version "8.0.4" resolved "https://registry.yarnpkg.com/basscss/-/basscss-8.0.4.tgz#b371a2ce25aeb9b322302f37f4e425753dd29ae1" dependencies: @@ -3870,25 +3836,6 @@ css-loader@0.23.x: postcss-modules-values "^1.1.0" source-list-map "^0.1.4" -css-loader@^0.28.9: - version "0.28.11" - resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.28.11.tgz#c3f9864a700be2711bb5a2462b2389b1a392dab7" - dependencies: - babel-code-frame "^6.26.0" - css-selector-tokenizer "^0.7.0" - cssnano "^3.10.0" - icss-utils "^2.1.0" - loader-utils "^1.0.2" - lodash.camelcase "^4.3.0" - object-assign "^4.1.1" - postcss "^5.0.6" - postcss-modules-extract-imports "^1.2.0" - postcss-modules-local-by-default "^1.2.0" - postcss-modules-scope "^1.1.0" - postcss-modules-values "^1.3.0" - postcss-value-parser "^3.3.0" - source-list-map "^2.0.0" - css-selector-tokenizer@^0.5.1: version "0.5.4" resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz#139bafd34a35fd0c1428487049e0699e6f6a2c21" @@ -3916,7 +3863,7 @@ cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" -"cssnano@>=2.6.1 <4", cssnano@^3.10.0: +"cssnano@>=2.6.1 <4": version "3.10.0" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" dependencies: @@ -6717,12 +6664,6 @@ icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - dependencies: - postcss "^6.0.1" - ieee754@^1.1.4: version "1.1.11" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.11.tgz#c16384ffe00f5b7835824e67b6f2bd44a5229455" @@ -7131,7 +7072,7 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" -is-mobile@0.2.2, is-mobile@^0.2.2: +is-mobile@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-0.2.2.tgz#0e2e006d99ed2c2155b761df80f2a3619ae2ad9f" @@ -8031,10 +7972,6 @@ lodash.camelcase@^3.0.1: dependencies: lodash._createcompounder "^3.0.0" -lodash.camelcase@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" - lodash.deburr@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-3.2.0.tgz#6da8f54334a366a7cf4c4c76ef8d80aa1b365ed5" @@ -8324,7 +8261,7 @@ marked@^0.3.12: version "0.3.19" resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" -material-ui@0.17.4, material-ui@^0.17.1: +material-ui@^0.17.1: version "0.17.4" resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-0.17.4.tgz#193999ecb49c3ec15ae0abb4e90fdf9a7bd343e0" dependencies: @@ -9503,17 +9440,6 @@ parse-asn1@^5.0.0: evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" -parse-entities@^1.0.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.2.tgz#9eaf719b29dc3bd62246b4332009072e01527777" - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - parse-entities@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.1.tgz#8112d88471319f27abae4d64964b122fe4e1b890" @@ -9890,27 +9816,21 @@ postcss-modules-extract-imports@^1.0.0: dependencies: postcss "^6.0.1" -postcss-modules-extract-imports@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" - dependencies: - postcss "^6.0.1" - -postcss-modules-local-by-default@^1.0.1, postcss-modules-local-by-default@^1.2.0: +postcss-modules-local-by-default@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069" dependencies: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" -postcss-modules-scope@^1.0.0, postcss-modules-scope@^1.1.0: +postcss-modules-scope@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90" dependencies: css-selector-tokenizer "^0.7.0" postcss "^6.0.1" -postcss-modules-values@^1.1.0, postcss-modules-values@^1.3.0: +postcss-modules-values@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20" dependencies: @@ -10589,16 +10509,6 @@ react-is@^16.3.1: version "16.4.0" resolved "https://registry.npmjs.org/react-is/-/react-is-16.4.0.tgz#cc9fdc855ac34d2e7d9d2eb7059bbc240d35ffcf" -react-markdown@3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.2.2.tgz#439774c14f25eb25d1b96c126f28ca1486fb0a24" - dependencies: - prop-types "^15.6.0" - remark-parse "^4.0.0" - unified "^6.1.5" - unist-util-visit "^1.1.3" - xtend "^4.0.1" - react-markdown@^3.2.2: version "3.3.0" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e" @@ -10661,9 +10571,9 @@ react-scroll@0xproject/react-scroll#similar-to-pr-330: lodash.throttle "^4.1.1" prop-types "^15.5.8" -react-scroll@1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.7.tgz#948c40c9a189b62bf4a53ee0fd50e5d89d37260a" +"react-scroll@github:0xproject/react-scroll#similar-to-pr-330": + version "1.7.10" + resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/091a41f8a6fd9e94bd41b9bba27356da470cb8a5" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" @@ -10675,7 +10585,7 @@ react-side-effect@^1.0.2: exenv "^1.2.1" shallowequal "^1.0.1" -react-tap-event-plugin@2.0.1, react-tap-event-plugin@^2.0.1: +react-tap-event-plugin@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/react-tap-event-plugin/-/react-tap-event-plugin-2.0.1.tgz#316beb3bc6556e29ec869a7293e89c826a9074d2" dependencies: @@ -11012,26 +10922,6 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" -remark-parse@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-4.0.0.tgz#99f1f049afac80382366e2e0d0bd55429dd45d8b" - dependencies: - collapse-white-space "^1.0.2" - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - is-word-character "^1.0.0" - markdown-escapes "^1.0.0" - parse-entities "^1.0.2" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - trim "0.0.1" - trim-trailing-lines "^1.0.0" - unherit "^1.0.4" - unist-util-remove-position "^1.0.0" - vfile-location "^2.0.0" - xtend "^4.0.1" - remark-parse@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-5.0.0.tgz#4c077f9e499044d1d5c13f80d7a98cf7b9285d95" @@ -11924,14 +11814,6 @@ source-map-loader@^0.1.6: loader-utils "~0.2.2" source-map "~0.1.33" -source-map-loader@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.3.tgz#d4b0c8cd47d54edce3e6bfa0f523f452b5b0e521" - dependencies: - async "^2.5.0" - loader-utils "~0.2.2" - source-map "~0.6.1" - source-map-resolve@^0.5.0: version "0.5.1" resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a" @@ -12359,13 +12241,6 @@ style-loader@0.13.x: dependencies: loader-utils "^1.0.2" -style-loader@^0.20.2: - version "0.20.3" - resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.20.3.tgz#ebef06b89dec491bcb1fdb3452e913a6fd1c10c4" - dependencies: - loader-utils "^1.1.0" - schema-utils "^0.4.5" - styled-components@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/styled-components/-/styled-components-3.3.0.tgz#335b1b2b673b416cd5ec012010e237ed1f877fe9" @@ -13210,12 +13085,6 @@ unist-util-visit@^1.1.0, unist-util-visit@^1.3.0: dependencies: unist-util-is "^2.1.1" -unist-util-visit@^1.1.3: - version "1.3.1" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.1.tgz#c019ac9337a62486be58531bc27e7499ae7d55c7" - dependencies: - unist-util-is "^2.1.1" - universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" @@ -13951,7 +13820,7 @@ webpack-dev-middleware@1.12.2, webpack-dev-middleware@^1.10.0: range-parser "^1.0.3" time-stamp "^2.0.0" -webpack-dev-server@^2.11.1, webpack-dev-server@^2.5.0: +webpack-dev-server@^2.5.0: version "2.11.2" resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.11.2.tgz#1f4f4c78bf1895378f376815910812daf79a216f" dependencies: @@ -13994,7 +13863,7 @@ webpack-sources@^1.0.1, webpack-sources@^1.1.0: source-list-map "^2.0.0" source-map "~0.6.1" -webpack@^3.1.0, webpack@^3.11.0: +webpack@^3.1.0: version "3.11.0" resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.11.0.tgz#77da451b1d7b4b117adaf41a1a93b5742f24d894" dependencies: -- cgit v1.2.3 From a1a777e71521a2f718264edc4bd7f9b48ccb6cce Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:49:17 -0400 Subject: Add missing type --- packages/0x.js/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index d99ce68fc..5a451859a 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -64,4 +64,5 @@ export { Provider, TransactionReceipt, TransactionReceiptWithDecodedLogs, + LogTopic, } from 'ethereum-types'; -- cgit v1.2.3 From 50bbd793c6520247629f078806226839f5b89651 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 10:55:19 -0400 Subject: Fix key --- packages/website/translations/chinese.json | 2 +- packages/website/translations/english.json | 2 +- packages/website/translations/korean.json | 2 +- packages/website/translations/russian.json | 2 +- packages/website/translations/spanish.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index b590861b7..ed1a6044a 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -13,7 +13,7 @@ "TRADITIONAL_ASSETS": "传统资产", "DIGITAL_GOODS": "数字商品", "OFFCHAIN_ORDER_RELAY": "链下订单中继", - "OONCHAIN_SETTLEMENT": "链上最终结算", + "ONCHAIN_SETTLEMENT": "链上最终结算", "OFFCHAIN_ONCHAIN_DESCRIPTION": "在 0x 协议中,所有订单都通过链下传输,大幅削减了损耗成本,能够有效避免区块链膨胀。任何人都可以构建中继方,由中继方广播订单,每促成一笔交易,就可以收取一笔交易费。", "RELAYERS_HEADER": "基于 0X 协议构建的中继方", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 0ae48d926..541c29997 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -14,7 +14,7 @@ "TRADITIONAL_ASSETS": "traditional assets", "DIGITAL_GOODS": "digital goods", "OFFCHAIN_ORDER_RELAY": "off-chain order relay", - "OONCHAIN_SETTLEMENT": "on-chain settlement", + "ONCHAIN_SETTLEMENT": "on-chain settlement", "OFFCHAIN_ONCHAIN_DESCRIPTION": "in 0x protocol, orders are transported off-chain, massively reducing gas costs and eliminating blockchain bloat. Relayers help broadcast orders and collect a fee each time they facilitate a trade. Anyone can build a relayer.", "RELAYERS_HEADER": "relayers building on 0x", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index f61e51e5c..8892f2dee 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -13,7 +13,7 @@ "TRADITIONAL_ASSETS": "전통적 자산", "DIGITAL_GOODS": "디지털 상품", "OFFCHAIN_ORDER_RELAY": "오프체인 주문 릴레이", - "OONCHAIN_SETTLEMENT": "온체인 정산", + "ONCHAIN_SETTLEMENT": "온체인 정산", "OFFCHAIN_ONCHAIN_DESCRIPTION": "0x 프로토콜에서 주문은 오프체인으로 전달되므로, 가스 비용이 대폭 줄고 블록체인이 불필요하게 커지지 않습니다. Relayer는 주문을 브로드캐스팅할 수 있게 해 주고, 주문에서 거래가 진행될 때마다 수수료를 받을 수 있습니다. 누구든지 Relayer를 생성할 수 있습니다.", "RELAYERS_HEADER": "0x 기반 Relayer", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 107798a8c..41a7a990d 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -13,7 +13,7 @@ "TRADITIONAL_ASSETS": "Традиционные активы", "DIGITAL_GOODS": "Цифровые товары", "OFFCHAIN_ORDER_RELAY": "Офчейн-ордер", - "OONCHAIN_SETTLEMENT": "Ончейн-транзакция", + "ONCHAIN_SETTLEMENT": "Ончейн-транзакция", "OFFCHAIN_ONCHAIN_DESCRIPTION": "При использовании протокола 0x ордера проводятся вне блокчейна, что сокращает расходы на газ (топливо) и предотвращает раздувание блокчейна. Релейеры помогают провести ордера и берут комиссию каждый раз, когда способствуют торгам. Любой может создать релейера.", "RELAYERS_HEADER": "РЕЛЕЙЕРЫ, РАЗРАБОТАННЫЕ НА 0X", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 3c87b2878..7780190ac 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -14,7 +14,7 @@ "TRADITIONAL_ASSETS": "activos tradicionales", "DIGITAL_GOODS": "bienes digitales", "OFFCHAIN_ORDER_RELAY": "orden retransmisión fuera de cadena", - "OONCHAIN_SETTLEMENT": "liquidación en cadena", + "ONCHAIN_SETTLEMENT": "liquidación en cadena", "OFFCHAIN_ONCHAIN_DESCRIPTION": "en el protocolo 0x, las órdenes se transportan fuera de la cadena, lo que reduce enormemente los costos de combustible y elimina el sobredimensionamiento de la cadena de bloques. Los transmisores ayudan a emitir órdenes y a cobrar un cargo cada vez que facilitan un intercambio. Cualquier persona puede crear un transmisor.", "RELAYERS_HEADER": "transmisores creados en 0x", -- cgit v1.2.3 From ea5684e0546f25fa213dfb1a780941e4056a2128 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 11:01:12 -0400 Subject: Remove unused imports --- packages/react-docs/src/components/documentation.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 5393652d4..d9a7dcd59 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -1,9 +1,7 @@ import { - AnchorTitle, colors, constants as sharedConstants, EtherscanLinkSuffixes, - HeaderSizes, MarkdownSection, NestedSidebarMenu, Networks, @@ -28,7 +26,6 @@ import { TypescriptFunction, TypescriptMethod, } from '../types'; -import { constants } from '../utils/constants'; import { Badge } from './badge'; import { Comment } from './comment'; @@ -186,6 +183,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta const eligibleVersions = _.filter(markdownVersions, mdVersion => { return semver.lte(mdVersion, this.props.selectedVersion); }); + console.log('this.props.selectedVersion', this.props.selectedVersion); if (_.isEmpty(eligibleVersions)) { throw new Error( `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${ -- cgit v1.2.3 From 6e122691d114d042a76e1d585a11a238a1f35f47 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 11:57:56 -0400 Subject: Fix bug related to react-scroll's scrollSpy and the render order of elements --- packages/website/ts/components/top_bar/top_bar.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index c921867d7..41b01c57b 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,5 +1,11 @@ import { DocsInfo, DocsMenu } from '@0xproject/react-docs'; -import { colors, MenuSubsectionsBySection, NestedSidebarMenu, Styles } from '@0xproject/react-shared'; +import { + colors, + MenuSubsectionsBySection, + NestedSidebarMenu, + Styles, + constants as sharedConstants, +} from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import Menu from 'material-ui/Menu'; @@ -409,7 +415,11 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { return this._doesUrlInclude(websitePath); }); - if (!isViewingDocsPage || _.isUndefined(this.props.menu)) { + // HACK: We need to make sure the SCROLL_CONTAINER is loaded before rendering the Sidebar + // because the sidebar renders `react-scroll` links which depend on the scroll container already + // being rendered. + const documentationContainer = document.getElementById(sharedConstants.SCROLL_CONTAINER_ID); + if (!isViewingDocsPage || _.isUndefined(this.props.menu) || _.isNull(documentationContainer)) { return undefined; } return ( -- cgit v1.2.3 From 4e6322beb55302e10770c4e16bf480e17bbf27e9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:26:39 -0400 Subject: Add missing type exports --- packages/0x.js/src/index.ts | 10 ++++++++++ packages/contract-wrappers/CHANGELOG.json | 9 +++++++++ packages/contract-wrappers/src/index.ts | 1 + 3 files changed, 20 insertions(+) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 5a451859a..54b5e6928 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -26,12 +26,14 @@ export { ERC20TokenApprovalEventArgs, ERC20TokenEvents, ERC20TokenEventArgs, + ERC721TokenEventArgs, ERC721TokenApprovalEventArgs, ERC721TokenApprovalForAllEventArgs, ERC721TokenTransferEventArgs, ERC721TokenEvents, ExchangeCancelUpToEventArgs, ExchangeAssetProxyRegisteredEventArgs, + ExchangeSignatureValidatorApprovalEventArgs, ExchangeFillEventArgs, ExchangeCancelEventArgs, ExchangeEventArgs, @@ -53,6 +55,7 @@ export { ERC20AssetData, ERC721AssetData, AssetProxyId, + OrderRelevantState, } from '@0xproject/types'; export { @@ -65,4 +68,11 @@ export { TransactionReceipt, TransactionReceiptWithDecodedLogs, LogTopic, + JSONRPCRequestPayload, + JSONRPCResponsePayload, + JSONRPCErrorCallback, + TransactionReceiptStatus, + LogEntry, + DecodedLogArgs, + LogEntryEvent, } from 'ethereum-types'; 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 fdcb42d8e17f4f5f324dd644077a07cbd4be65c7 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:27:28 -0400 Subject: Fix bug where we only rendered one TypeDoc JSON key per export, instead of all of them --- packages/monorepo-scripts/src/utils/publish_utils.ts | 14 ++++++++------ packages/react-docs/src/utils/typedoc_utils.ts | 11 +++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 2cf67946b..709a48799 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -18,12 +18,12 @@ interface ExportInfo { exportPathOrder: string[]; } -interface ExportNameToTypedocName { - [exportName: string]: string; +interface ExportNameToTypedocNames { + [exportName: string]: string[]; } interface Metadata { - exportPathToTypedocName: ExportNameToTypedocName; + exportPathToTypedocNames: ExportNameToTypedocNames; exportPathOrder: string[]; } @@ -224,10 +224,12 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); // For each entry, see if it was exported in index.ts. If not, remove it. - const exportPathToTypedocName: ExportNameToTypedocName = {}; + const exportPathToTypedocNames: ExportNameToTypedocNames = {}; _.each(typedocOutput.children, (file, i) => { const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); - exportPathToTypedocName[exportPath] = file.name; + exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) + ? [file.name] + : [...exportPathToTypedocNames[exportPath], file.name]; const exportItems = exportPathToExportedItems[exportPath]; _.each(file.children, (child, j) => { @@ -245,7 +247,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON const docJson = { metadata: { - exportPathToTypedocName, + exportPathToTypedocNames, exportPathOrder, }, typedocJson: finalTypeDocOutput, diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 01385c982..9ee1de2b4 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -60,14 +60,16 @@ export const typeDocUtils = { }, convertToDocAgnosticFormat(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo): DocAgnosticFormat { const exportPathOrder = generatedDocJson.metadata.exportPathOrder; - const exportPathToTypedocName = generatedDocJson.metadata.exportPathToTypedocName; + const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames; const typeDocJson = generatedDocJson.typedocJson; // TODO: Extract the non typeDoc exports, and render them somehow const typeDocNameOrder = _.compact( - _.map(exportPathOrder, exportPath => { - return exportPathToTypedocName[exportPath]; - }), + _.flatten( + _.map(exportPathOrder, exportPath => { + return exportPathToTypedocNames[exportPath]; + }), + ), ); const docAgnosticFormat: DocAgnosticFormat = {}; @@ -121,6 +123,7 @@ export const typeDocUtils = { }); }); if (!_.isEmpty(typeEntities)) { + console.log('typeEntities', typeEntities); docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; const docSection = typeDocUtils._convertEntitiesToDocSection( -- cgit v1.2.3 From af90a777c6d6cdd59b4d398b6b0f5051047bc5d3 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:27:39 -0400 Subject: Update types --- packages/react-docs/src/types.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index a34e06c94..18c386a2b 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -292,12 +292,12 @@ export enum AbiTypes { Event = 'event', } -export interface ExportNameToTypedocName { - [exportName: string]: string; +export interface ExportNameToTypedocNames { + [exportName: string]: string[]; } export interface Metadata { - exportPathToTypedocName: ExportNameToTypedocName; + exportPathToTypedocNames: ExportNameToTypedocNames; exportPathOrder: string[]; } -- cgit v1.2.3 From 6182d2c7f60967a978f2b885e63fab067794b452 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:28:21 -0400 Subject: Pass in typeDefinitionByName so that type declarations also link to inner-types and show the popover --- packages/react-docs/src/components/documentation.tsx | 13 +++++++++++-- packages/react-docs/src/components/interface.tsx | 19 ++++++++++++++++--- packages/react-docs/src/components/property_block.tsx | 10 ++++++++-- packages/react-docs/src/components/type.tsx | 8 +++++++- .../react-docs/src/components/type_definition.tsx | 12 ++++++++++-- 5 files changed, 52 insertions(+), 10 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index d9a7dcd59..1c32b2e16 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -225,12 +225,16 @@ export class Documentation extends React.Component<DocumentationProps, Documenta key={`type-${customType.name}`} customType={customType} docsInfo={this.props.docsInfo} + typeDefinitionByName={typeDefinitionByName} /> ); }); const sortedProperties = _.sortBy(docSection.properties, 'name'); - const propertyDefs = _.map(sortedProperties, this._renderProperty.bind(this, sectionName)); + const propertyDefs = _.map( + sortedProperties, + this._renderProperty.bind(this, sectionName, typeDefinitionByName), + ); const sortedMethods = _.sortBy(docSection.methods, 'name'); const methodDefs = _.map(sortedMethods, method => { @@ -349,7 +353,11 @@ export class Documentation extends React.Component<DocumentationProps, Documenta }); return <div>{constructorDefs}</div>; } - private _renderProperty(sectionName: string, property: Property): React.ReactNode { + private _renderProperty( + sectionName: string, + typeDefinitionByName: TypeDefinitionByName, + property: Property, + ): React.ReactNode { return ( <PropertyBlock key={`property-${property.name}-${property.type.name}`} @@ -358,6 +366,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta docsInfo={this.props.docsInfo} sourceUrl={this.props.sourceUrl} selectedVersion={this.props.selectedVersion} + typeDefinitionByName={typeDefinitionByName} /> ); } diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index 915b4bbc6..eaf57ce93 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -2,7 +2,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; -import { CustomType } from '../types'; +import { CustomType, TypeDefinitionByName } from '../types'; import { Signature } from './signature'; import { Type } from './type'; @@ -11,6 +11,7 @@ export interface InterfaceProps { type: CustomType; sectionName: string; docsInfo: DocsInfo; + typeDefinitionByName: TypeDefinitionByName; } export const Interface = (props: InterfaceProps) => { @@ -29,9 +30,15 @@ export const Interface = (props: InterfaceProps) => { shouldHideMethodName={true} shouldUseArrowSyntax={true} docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} /> ) : ( - <Type type={property.type} sectionName={props.sectionName} docsInfo={props.docsInfo} /> + <Type + type={property.type} + sectionName={props.sectionName} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> )}, </span> ); @@ -41,7 +48,13 @@ export const Interface = (props: InterfaceProps) => { const is = type.indexSignature; const param = ( <span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}> - {is.keyName}: <Type type={is.keyType} sectionName={props.sectionName} docsInfo={props.docsInfo} /> + {is.keyName}:{' '} + <Type + type={is.keyType} + sectionName={props.sectionName} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> </span> ); properties.push( diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index ea80ba7b7..6e5c451be 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -2,7 +2,7 @@ import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; -import { Property } from '../types'; +import { Property, TypeDefinitionByName } from '../types'; import { constants } from '../utils/constants'; import { Comment } from './comment'; @@ -15,6 +15,7 @@ export interface PropertyBlockProps { docsInfo: DocsInfo; sourceUrl: string; selectedVersion: string; + typeDefinitionByName: TypeDefinitionByName; } export interface PropertyBlockState { @@ -50,7 +51,12 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> {(property as any).callPath} {property.name}:{' '} - <Type type={property.type} sectionName={sectionName} docsInfo={this.props.docsInfo} /> + <Type + type={property.type} + sectionName={sectionName} + docsInfo={this.props.docsInfo} + typeDefinitionByName={this.props.typeDefinitionByName} + /> </code> {property.source && ( <SourceLink diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 40564c0d6..1c580caab 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -117,7 +117,12 @@ export function Type(props: TypeProps): any { const param = ( <span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}> {is.keyName}:{' '} - <Type type={is.keyType} sectionName={props.sectionName} docsInfo={props.docsInfo} /> + <Type + type={is.keyType} + sectionName={props.sectionName} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> </span> ); typeName = ( @@ -222,6 +227,7 @@ export function Type(props: TypeProps): any { customType={typeDefinition} shouldAddId={false} docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} /> </ReactTooltip> </span> diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index 26fbbf75c..775d9890f 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; -import { CustomType, CustomTypeChild, KindString, TypeDocTypes } from '../types'; +import { CustomType, CustomTypeChild, KindString, TypeDocTypes, TypeDefinitionByName } from '../types'; import { constants } from '../utils/constants'; import { Comment } from './comment'; @@ -19,6 +19,7 @@ export interface TypeDefinitionProps { customType: CustomType; shouldAddId?: boolean; docsInfo: DocsInfo; + typeDefinitionByName?: TypeDefinitionByName; } export interface TypeDefinitionState { @@ -44,7 +45,12 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef case KindString.Interface: typePrefix = 'Interface'; codeSnippet = ( - <Interface type={customType} sectionName={this.props.sectionName} docsInfo={this.props.docsInfo} /> + <Interface + type={customType} + sectionName={this.props.sectionName} + docsInfo={this.props.docsInfo} + typeDefinitionByName={this.props.typeDefinitionByName} + /> ); break; @@ -74,6 +80,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef type={customType.type} sectionName={this.props.sectionName} docsInfo={this.props.docsInfo} + typeDefinitionByName={this.props.typeDefinitionByName} /> ) : ( <Signature @@ -86,6 +93,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef shouldHideMethodName={true} shouldUseArrowSyntax={true} docsInfo={this.props.docsInfo} + typeDefinitionByName={this.props.typeDefinitionByName} /> )} </span> -- cgit v1.2.3 From bc5835229df6e68473279a1ac646ca50bf4092a3 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:31:52 -0400 Subject: Remove stray console log --- packages/monorepo-scripts/src/utils/publish_utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts index 709a48799..13edb70d2 100644 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ b/packages/monorepo-scripts/src/utils/publish_utils.ts @@ -327,7 +327,6 @@ function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[] const exportPathToExportedItems: ExportPathToExportedItems = {}; const exportPathOrder: string[] = []; const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; - console.log('exportsToOmit', exportsToOmit); processNode(sf); function processNode(node: ts.Node): void { -- cgit v1.2.3 From b2b3c24fd231fd78b4af167ff0823d846e8859b4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:39:11 -0400 Subject: Remove console.log --- packages/react-docs/src/components/documentation.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 1c32b2e16..f4f1d2aa9 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -183,7 +183,6 @@ export class Documentation extends React.Component<DocumentationProps, Documenta const eligibleVersions = _.filter(markdownVersions, mdVersion => { return semver.lte(mdVersion, this.props.selectedVersion); }); - console.log('this.props.selectedVersion', this.props.selectedVersion); if (_.isEmpty(eligibleVersions)) { throw new Error( `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${ -- cgit v1.2.3 From 1a89905ab9602ccd81c5702bcc13246cd1f6960b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 6 Aug 2018 15:39:21 -0400 Subject: Remove hash spy for now --- packages/react-docs/src/components/type.tsx | 1 - packages/react-shared/src/components/anchor_title.tsx | 1 - packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 -- 3 files changed, 4 deletions(-) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 1c580caab..7e96f75c3 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -204,7 +204,6 @@ export function Type(props: TypeProps): any { <ScrollLink to={typeDefinitionAnchorId} offset={0} - hashSpy={true} duration={sharedConstants.DOCS_SCROLL_DURATION_MS} containerId={sharedConstants.DOCS_CONTAINER_ID} > diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 451ba1729..01857aa6b 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -69,7 +69,6 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt </div> <ScrollLink to={this.props.id} - hashSpy={true} offset={headerSizeToScrollOffset[this.props.headerSize]} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index c8bddb59a..aef56690f 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,7 +94,6 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N key={`menuItem-${menuItemName}`} to={id} offset={0} - hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > @@ -125,7 +124,6 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N <ScrollLink to={id} offset={0} - hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > -- cgit v1.2.3 From d49af66add3f59a5da48d3d2b364cfcfd18fe04a Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 8 Aug 2018 09:32:14 -0400 Subject: Add additional special-case acronym --- packages/react-shared/src/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index ce7effaff..0c0e7722c 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -46,7 +46,7 @@ export const utils = { return char; }); let finalText = charArray.join(''); - const exceptions = { 'EIP ': 'E I P', 'ZRX ': 'Z R X', 'ERC ': 'E R C' }; + const exceptions = { 'EIP ': 'E I P', 'ZRX ': 'Z R X', 'ERC ': 'E R C', RPC: 'R P C' }; _.each(exceptions, (spaced, normal) => { if (_.includes(finalText, spaced)) { finalText = finalText.replace(spaced, normal); -- cgit v1.2.3 From ca67e7d36fb5eb91626a60156dbec4f67a7d52f7 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 8 Aug 2018 09:32:32 -0400 Subject: Remove console.log --- packages/react-docs/src/utils/typedoc_utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 9ee1de2b4..b45dc73a8 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -123,7 +123,6 @@ export const typeDocUtils = { }); }); if (!_.isEmpty(typeEntities)) { - console.log('typeEntities', typeEntities); docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; const docSection = typeDocUtils._convertEntitiesToDocSection( -- cgit v1.2.3 From 386b5bb122c189496e83da46cf53e8dfe83f0ee6 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 8 Aug 2018 09:33:20 -0400 Subject: Add back hashSpy --- packages/react-docs/src/components/type.tsx | 1 + packages/react-shared/src/components/anchor_title.tsx | 1 + packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 ++ 3 files changed, 4 insertions(+) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 7e96f75c3..1c580caab 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -204,6 +204,7 @@ export function Type(props: TypeProps): any { <ScrollLink to={typeDefinitionAnchorId} offset={0} + hashSpy={true} duration={sharedConstants.DOCS_SCROLL_DURATION_MS} containerId={sharedConstants.DOCS_CONTAINER_ID} > diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 01857aa6b..451ba1729 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -69,6 +69,7 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt </div> <ScrollLink to={this.props.id} + hashSpy={true} offset={headerSizeToScrollOffset[this.props.headerSize]} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index aef56690f..c8bddb59a 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,6 +94,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N key={`menuItem-${menuItemName}`} to={id} offset={0} + hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > @@ -124,6 +125,7 @@ export class NestedSidebarMenu extends React.Component<NestedSidebarMenuProps, N <ScrollLink to={id} offset={0} + hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} containerId={constants.DOCS_CONTAINER_ID} > -- cgit v1.2.3 From 9f42ceb5a3962c3e9e251da8791182e561139b08 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 8 Aug 2018 09:47:06 -0400 Subject: Split publish_utils since it was becoming too big and unwieldy --- .../src/doc_generate_and_upload.ts | 2 +- packages/monorepo-scripts/src/publish.ts | 3 +- .../monorepo-scripts/src/publish_release_notes.ts | 2 +- .../src/utils/doc_generate_and_upload_utils.ts | 280 +++++++++++++++ .../src/utils/github_release_utils.ts | 102 ++++++ .../monorepo-scripts/src/utils/publish_utils.ts | 379 --------------------- 6 files changed, 386 insertions(+), 382 deletions(-) create mode 100644 packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts create mode 100644 packages/monorepo-scripts/src/utils/github_release_utils.ts delete mode 100644 packages/monorepo-scripts/src/utils/publish_utils.ts diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index ab1f97ad8..e0e7e1bb5 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -1,6 +1,6 @@ import * as yargs from 'yargs'; -import { generateAndUploadDocsAsync } from './utils/publish_utils'; +import { generateAndUploadDocsAsync } from './utils/doc_generate_and_upload_utils'; const args = yargs .option('package', { diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 64ba73e36..932d912b8 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -14,7 +14,8 @@ import { Package, PackageToNextVersion, VersionChangelog } from './types'; import { changelogUtils } from './utils/changelog_utils'; import { configs } from './utils/configs'; import { utils } from './utils/utils'; -import { publishReleaseNotesAsync, generateAndUploadDocsAsync } from './utils/publish_utils'; +import { publishReleaseNotesAsync } from './utils/github_release_utils'; +import { generateAndUploadDocsAsync } from './utils/doc_generate_and_upload_utils'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index d708e8275..964f5b0bb 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -2,7 +2,7 @@ import * as promisify from 'es6-promisify'; import * as publishRelease from 'publish-release'; import { utils } from './utils/utils'; -import { publishReleaseNotesAsync } from './utils/publish_utils'; +import { publishReleaseNotesAsync } from './utils/github_release_utils'; (async () => { const shouldIncludePrivate = false; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts new file mode 100644 index 000000000..870cbe17c --- /dev/null +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -0,0 +1,280 @@ +import * as _ from 'lodash'; + +import { constants } from '../constants'; +import { utils } from './utils'; + +import { readFileSync, writeFileSync } from 'fs'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; +import * as ts from 'typescript'; + +import { ExportPathToExportedItems } from '../types'; + +interface ExportInfo { + exportPathToExportedItems: ExportPathToExportedItems; + exportPathOrder: string[]; +} + +interface ExportNameToTypedocNames { + [exportName: string]: string[]; +} + +export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { + const monorepoPackages = utils.getPackages(constants.monorepoRootPath); + const pkg = _.find(monorepoPackages, monorepoPackage => { + return _.includes(monorepoPackage.packageJson.name, packageName); + }); + if (_.isUndefined(pkg)) { + throw new Error(`Couldn't find a package.json for ${packageName}`); + } + + const packageJson = pkg.packageJson; + const omitExports = _.get(packageJson, 'config.postpublish.omitExports', []); + + const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; + const indexPath = `${pathToPackage}/src/index.ts`; + const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath, omitExports); + + const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); + if (!shouldPublishDocs) { + utils.log( + `GENERATE_UPLOAD_DOCS: ${ + packageJson.name + } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, + ); + return; + } + + const pkgNameToPath: { [name: string]: string } = {}; + _.each(monorepoPackages, pkg => { + pkgNameToPath[pkg.packageJson.name] = pkg.location; + }); + + // For each dep that is another one of our monorepo packages, we fetch it's index.ts + // and see which specific files we must pass to TypeDoc. + let typeDocExtraFileIncludes: string[] = []; + _.each(exportPathToExportedItems, (exportedItems, exportPath) => { + const isInternalToPkg = _.startsWith(exportPath, '.'); + if (isInternalToPkg) { + const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); + typeDocExtraFileIncludes.push(pathToInternalPkg); + return; // Right? + } + + const pathIfExists = pkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + + const typeDocSourceIncludes = new Set(); + const pathToIndex = `${pathIfExists}/src/index.ts`; + const exportInfo = getExportPathToExportedItems(pathToIndex); + const innerExportPathToExportedItems = exportInfo.exportPathToExportedItems; + _.each(exportedItems, exportName => { + _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { + if (!_.includes(innerExportItems, exportName)) { + return; + } + if (!_.startsWith(innerExportPath, './')) { + throw new Error( + `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is + itself exported from an external package. To fix this, export the external dependency directly, + not indirectly through ${innerExportPath}.`, + ); + } else { + const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); + typeDocSourceIncludes.add(absoluteSrcPath); + } + }); + }); + // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types + // directly, meaning no internal paths will exist to follow. Other packages also have direct exports + // in their index.ts, so we always add it to the source files passed to TypeDoc + if (typeDocSourceIncludes.size === 0) { + typeDocSourceIncludes.add(pathToIndex); + } + + typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; + }); + + // Generate Typedoc JSON file + typeDocExtraFileIncludes.push(path.join(pathToPackage, 'src', 'globals.d.ts')); + const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); + const projectFiles = typeDocExtraFileIncludes.join(' '); + const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); + // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the + // packages root dir, does not work. It only works when called via a `package.json` script located + // in the package's root. + await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { + cwd, + }); + + // Unfortunately TypeDoc children names will only be prefixed with the name of the package _if_ we passed + // TypeDoc files outside of the packages root path (i.e this package exports another package found in our + // monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add + // it here when necessary. + const typedocOutputString = readFileSync(jsonFilePath).toString(); + const typedocOutput = JSON.parse(typedocOutputString); + const finalTypeDocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (child, i) => { + if (!_.includes(child.name, '/src/')) { + const nameWithoutQuotes = child.name.replace(/"/g, ''); + const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; + finalTypeDocOutput.children[i].name = standardizedName; + } + }); + + // For each entry, see if it was exported in index.ts. If not, remove it. + const exportPathToTypedocNames: ExportNameToTypedocNames = {}; + _.each(typedocOutput.children, (file, i) => { + const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); + exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) + ? [file.name] + : [...exportPathToTypedocNames[exportPath], file.name]; + + const exportItems = exportPathToExportedItems[exportPath]; + _.each(file.children, (child, j) => { + if (!_.includes(exportItems, child.name)) { + delete finalTypeDocOutput.children[i].children[j]; + } + }); + finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); + }); + + // TODO: Add extra metadata for Class properties that are class instances + // Look in file for imports of that class, get the import name and construct a link to + // it's definition on another docs page. + + // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON + const docJson = { + metadata: { + exportPathToTypedocNames, + exportPathOrder, + }, + typedocJson: finalTypeDocOutput, + }; + + // Write modified TypeDoc JSON, without all the unexported stuff + writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); + + const fileName = `v${packageJson.version}.json`; + utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); + const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; + const s3Url = `${S3BucketPath}${fileName}`; + await execAsync( + `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, + { + cwd, + }, + ); + utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); + // Remove the generated docs directory + await execAsync(`rm -rf ${jsonFilePath}`, { + cwd, + }); +} + +function findExportPathGivenTypedocName( + exportPathToExportedItems: ExportPathToExportedItems, + packageName: string, + typedocName: string, +): string { + const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); + const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; + const exportPaths = _.keys(exportPathToExportedItems); + const sanitizedExportPaths = _.map(exportPaths, exportPath => { + if (_.startsWith(exportPath, './')) { + const sanitizedExportPath = path.join(packageName, 'src', exportPath); + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + const monorepoPrefix = '@0xproject/'; + if (_.startsWith(exportPath, monorepoPrefix)) { + const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + sanitizedExportPathToExportPath[exportPath] = exportPath; + return exportPath; + }); + // We need to sort the exportPaths by length (longest first), so that the match finding will pick + // longer matches before shorter matches, since it might match both, but the longer match is more + // precisely what we are looking for. + const sanitizedExportPathsSortedByLength = sanitizedExportPaths.sort((a: string, b: string) => { + return b.length - a.length; + }); + const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPathsSortedByLength, p => { + return _.startsWith(typeDocNameWithoutQuotes, p); + }); + if (_.isUndefined(matchingSanitizedExportPathIfExists)) { + throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); + } + const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; + return matchingExportPath; +} + +function getExportPathToExportedItems(filePath: string, omitExports?: string[]): ExportInfo { + const sourceFile = ts.createSourceFile( + 'indexFile', + readFileSync(filePath).toString(), + ts.ScriptTarget.ES2017, + /*setParentNodes */ true, + ); + const exportInfo = _getExportPathToExportedItems(sourceFile, omitExports); + return exportInfo; +} + +function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[]): ExportInfo { + const exportPathToExportedItems: ExportPathToExportedItems = {}; + const exportPathOrder: string[] = []; + const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; + processNode(sf); + + function processNode(node: ts.Node): void { + switch (node.kind) { + case ts.SyntaxKind.ExportDeclaration: { + const exportClause = (node as any).exportClause; + const exportPath = exportClause.parent.moduleSpecifier.text; + _.each(exportClause.elements, element => { + const exportItem = element.name.escapedText; + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } + }); + if (!_.isUndefined(exportPathToExportedItems[exportPath])) { + exportPathOrder.push(exportPath); + } + break; + } + + case ts.SyntaxKind.ExportKeyword: { + const foundNode: any = node; + const exportPath = './index'; + if (foundNode.parent && foundNode.parent.name) { + const exportItem = foundNode.parent.name.escapedText; + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } + } + if (!_.includes(exportPathOrder, exportPath) && !_.isUndefined(exportPathToExportedItems[exportPath])) { + exportPathOrder.push(exportPath); + } + break; + } + default: + // noop + break; + } + + ts.forEachChild(node, processNode); + } + const exportInfo = { + exportPathToExportedItems, + exportPathOrder, + }; + return exportInfo; +} diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts new file mode 100644 index 000000000..1f4c4f1e9 --- /dev/null +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -0,0 +1,102 @@ +import * as _ from 'lodash'; +import * as promisify from 'es6-promisify'; +import * as publishRelease from 'publish-release'; + +import { constants } from '../constants'; +import { Package } from '../types'; +import { utils } from './utils'; + +import { readFileSync } from 'fs'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; + +const publishReleaseAsync = promisify(publishRelease); +export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { + // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) + const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); + const latestGitCommit = result.stdout; + const shortenedGitCommit = latestGitCommit.slice(0, 7); + const tagName = `monorepo@${shortenedGitCommit}`; + + await execAsync(`git rev-parse ${tagName}`); + await execAsync('git tag ${tagName}'); + + await execAsync('git push origin ${tagName}'); + const releaseName = `0x monorepo - ${shortenedGitCommit}`; + + let assets: string[] = []; + let aggregateNotes = ''; + _.each(updatedPublishPackages, pkg => { + const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); + if (_.isEmpty(notes)) { + return; // don't include it + } + aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; + + const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); + if (!_.isUndefined(packageAssets)) { + assets = [...assets, ...packageAssets]; + } + }); + const finalAssets = adjustAssetPaths(assets); + + utils.log('Publishing release notes ', releaseName, '...'); + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 + await publishReleaseAsync({ + token: constants.githubPersonalAccessToken, + owner: '0xProject', + tag: tagName, + repo: '0x-monorepo', + name: releaseName, + notes: aggregateNotes, + draft: false, + prerelease: false, + reuseRelease: true, + reuseDraftOnly: false, + assets: finalAssets, + }); +} + +// Asset paths should described from the monorepo root. This method prefixes +// the supplied path with the absolute path to the monorepo root. +function adjustAssetPaths(assets: string[]): string[] { + const finalAssets: string[] = []; + _.each(assets, (asset: string) => { + const finalAsset = `${constants.monorepoRootPath}/${asset}`; + finalAssets.push(finalAsset); + }); + return finalAssets; +} + +function getReleaseNotesForPackage(packageName: string, version: string): string { + const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); + const changelogJSONPath = path.join( + constants.monorepoRootPath, + 'packages', + packageNameWithoutNamespace, + 'CHANGELOG.json', + ); + const changelogJSON = readFileSync(changelogJSONPath, 'utf-8'); + const changelogs = JSON.parse(changelogJSON); + const latestLog = changelogs[0]; + // If only has a `Dependencies updated` changelog, we don't include it in release notes + if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { + return ''; + } + // We sanity check that the version for the changelog notes we are about to publish to Github + // correspond to the new version of the package. + // if (version !== latestLog.version) { + // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); + // } + let notes = ''; + _.each(latestLog.changes, change => { + notes += `* ${change.note}`; + if (change.pr) { + notes += ` (#${change.pr})`; + } + notes += `\n`; + }); + return notes; +} diff --git a/packages/monorepo-scripts/src/utils/publish_utils.ts b/packages/monorepo-scripts/src/utils/publish_utils.ts deleted file mode 100644 index 13edb70d2..000000000 --- a/packages/monorepo-scripts/src/utils/publish_utils.ts +++ /dev/null @@ -1,379 +0,0 @@ -import * as _ from 'lodash'; -import * as promisify from 'es6-promisify'; -import * as publishRelease from 'publish-release'; - -import { constants } from '../constants'; -import { Package } from '../types'; -import { utils } from './utils'; - -import { readFileSync, writeFileSync } from 'fs'; -import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; -import * as ts from 'typescript'; - -import { ExportPathToExportedItems } from '../types'; - -interface ExportInfo { - exportPathToExportedItems: ExportPathToExportedItems; - exportPathOrder: string[]; -} - -interface ExportNameToTypedocNames { - [exportName: string]: string[]; -} - -interface Metadata { - exportPathToTypedocNames: ExportNameToTypedocNames; - exportPathOrder: string[]; -} - -const publishReleaseAsync = promisify(publishRelease); -export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { - // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) - const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); - const latestGitCommit = result.stdout; - const shortenedGitCommit = latestGitCommit.slice(0, 7); - const tagName = `monorepo@${shortenedGitCommit}`; - - await execAsync(`git rev-parse ${tagName}`); - await execAsync('git tag ${tagName}'); - - await execAsync('git push origin ${tagName}'); - const releaseName = `0x monorepo - ${shortenedGitCommit}`; - - let assets: string[] = []; - let aggregateNotes = ''; - _.each(updatedPublishPackages, pkg => { - const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); - if (_.isEmpty(notes)) { - return; // don't include it - } - aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; - - const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); - if (!_.isUndefined(packageAssets)) { - assets = [...assets, ...packageAssets]; - } - }); - const finalAssets = adjustAssetPaths(assets); - - utils.log('Publishing release notes ', releaseName, '...'); - // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded - // Ideally we would like to name the assets after the package they are from - // Source: https://github.com/remixz/publish-release/issues/39 - await publishReleaseAsync({ - token: constants.githubPersonalAccessToken, - owner: '0xProject', - tag: tagName, - repo: '0x-monorepo', - name: releaseName, - notes: aggregateNotes, - draft: false, - prerelease: false, - reuseRelease: true, - reuseDraftOnly: false, - assets: finalAssets, - }); -} - -// Asset paths should described from the monorepo root. This method prefixes -// the supplied path with the absolute path to the monorepo root. -function adjustAssetPaths(assets: string[]): string[] { - const finalAssets: string[] = []; - _.each(assets, (asset: string) => { - const finalAsset = `${constants.monorepoRootPath}/${asset}`; - finalAssets.push(finalAsset); - }); - return finalAssets; -} - -function getReleaseNotesForPackage(packageName: string, version: string): string { - const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); - const changelogJSONPath = path.join( - constants.monorepoRootPath, - 'packages', - packageNameWithoutNamespace, - 'CHANGELOG.json', - ); - const changelogJSON = readFileSync(changelogJSONPath, 'utf-8'); - const changelogs = JSON.parse(changelogJSON); - const latestLog = changelogs[0]; - // If only has a `Dependencies updated` changelog, we don't include it in release notes - if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { - return ''; - } - // We sanity check that the version for the changelog notes we are about to publish to Github - // correspond to the new version of the package. - // if (version !== latestLog.version) { - // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); - // } - let notes = ''; - _.each(latestLog.changes, change => { - notes += `* ${change.note}`; - if (change.pr) { - notes += ` (#${change.pr})`; - } - notes += `\n`; - }); - return notes; -} - -export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { - const monorepoPackages = utils.getPackages(constants.monorepoRootPath); - const pkg = _.find(monorepoPackages, monorepoPackage => { - return _.includes(monorepoPackage.packageJson.name, packageName); - }); - if (_.isUndefined(pkg)) { - throw new Error(`Couldn't find a package.json for ${packageName}`); - } - - const packageJson = pkg.packageJson; - const omitExports = _.get(packageJson, 'config.postpublish.omitExports', []); - - const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; - const indexPath = `${pathToPackage}/src/index.ts`; - const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath, omitExports); - - const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); - if (!shouldPublishDocs) { - utils.log( - `GENERATE_UPLOAD_DOCS: ${ - packageJson.name - } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, - ); - return; - } - - const pkgNameToPath: { [name: string]: string } = {}; - _.each(monorepoPackages, pkg => { - pkgNameToPath[pkg.packageJson.name] = pkg.location; - }); - - // For each dep that is another one of our monorepo packages, we fetch it's index.ts - // and see which specific files we must pass to TypeDoc. - let typeDocExtraFileIncludes: string[] = []; - _.each(exportPathToExportedItems, (exportedItems, exportPath) => { - const isInternalToPkg = _.startsWith(exportPath, '.'); - if (isInternalToPkg) { - const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); - typeDocExtraFileIncludes.push(pathToInternalPkg); - return; // Right? - } - - const pathIfExists = pkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { - return; // It's an external package - } - - const typeDocSourceIncludes = new Set(); - const pathToIndex = `${pathIfExists}/src/index.ts`; - const exportInfo = getExportPathToExportedItems(pathToIndex); - const innerExportPathToExportedItems = exportInfo.exportPathToExportedItems; - _.each(exportedItems, exportName => { - _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { - if (!_.includes(innerExportItems, exportName)) { - return; - } - if (!_.startsWith(innerExportPath, './')) { - throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is - itself exported from an external package. To fix this, export the external dependency directly, - not indirectly through ${innerExportPath}.`, - ); - } else { - const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); - typeDocSourceIncludes.add(absoluteSrcPath); - } - }); - }); - // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types - // directly, meaning no internal paths will exist to follow. Other packages also have direct exports - // in their index.ts, so we always add it to the source files passed to TypeDoc - if (typeDocSourceIncludes.size === 0) { - typeDocSourceIncludes.add(pathToIndex); - } - - typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; - }); - - // Generate Typedoc JSON file - typeDocExtraFileIncludes.push(path.join(pathToPackage, 'src', 'globals.d.ts')); - const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); - const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); - // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the - // packages root dir, does not work. It only works when called via a `package.json` script located - // in the package's root. - await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { - cwd, - }); - - // Unfortunately TypeDoc children names will only be prefixed with the name of the package _if_ we passed - // TypeDoc files outside of the packages root path (i.e this package exports another package found in our - // monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add - // it here when necessary. - const typedocOutputString = readFileSync(jsonFilePath).toString(); - const typedocOutput = JSON.parse(typedocOutputString); - const finalTypeDocOutput = _.clone(typedocOutput); - _.each(typedocOutput.children, (child, i) => { - if (!_.includes(child.name, '/src/')) { - const nameWithoutQuotes = child.name.replace(/"/g, ''); - const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; - finalTypeDocOutput.children[i].name = standardizedName; - } - }); - - // For each entry, see if it was exported in index.ts. If not, remove it. - const exportPathToTypedocNames: ExportNameToTypedocNames = {}; - _.each(typedocOutput.children, (file, i) => { - const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); - exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) - ? [file.name] - : [...exportPathToTypedocNames[exportPath], file.name]; - - const exportItems = exportPathToExportedItems[exportPath]; - _.each(file.children, (child, j) => { - if (!_.includes(exportItems, child.name)) { - delete finalTypeDocOutput.children[i].children[j]; - } - }); - finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); - }); - - // TODO: Add extra metadata for Class properties that are class instances - // Look in file for imports of that class, get the import name and construct a link to - // it's definition on another docs page. - - // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON - const docJson = { - metadata: { - exportPathToTypedocNames, - exportPathOrder, - }, - typedocJson: finalTypeDocOutput, - }; - - // Write modified TypeDoc JSON, without all the unexported stuff - writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); - - const fileName = `v${packageJson.version}.json`; - utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); - const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; - const s3Url = `${S3BucketPath}${fileName}`; - await execAsync( - `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, - { - cwd, - }, - ); - utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); - // Remove the generated docs directory - await execAsync(`rm -rf ${jsonFilePath}`, { - cwd, - }); -} - -function findExportPathGivenTypedocName( - exportPathToExportedItems: ExportPathToExportedItems, - packageName: string, - typedocName: string, -): string { - const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); - const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; - const exportPaths = _.keys(exportPathToExportedItems); - const sanitizedExportPaths = _.map(exportPaths, exportPath => { - if (_.startsWith(exportPath, './')) { - const sanitizedExportPath = path.join(packageName, 'src', exportPath); - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; - } - const monorepoPrefix = '@0xproject/'; - if (_.startsWith(exportPath, monorepoPrefix)) { - const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; - } - sanitizedExportPathToExportPath[exportPath] = exportPath; - return exportPath; - }); - // We need to sort the exportPaths by length (longest first), so that the match finding will pick - // longer matches before shorter matches, since it might match both, but the longer match is more - // precisely what we are looking for. - const sanitizedExportPathsSortedByLength = sanitizedExportPaths.sort((a: string, b: string) => { - return b.length - a.length; - }); - const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPathsSortedByLength, p => { - return _.startsWith(typeDocNameWithoutQuotes, p); - }); - if (_.isUndefined(matchingSanitizedExportPathIfExists)) { - throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); - } - const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; - return matchingExportPath; -} - -function getExportPathToExportedItems(filePath: string, omitExports?: string[]): ExportInfo { - const sourceFile = ts.createSourceFile( - 'indexFile', - readFileSync(filePath).toString(), - ts.ScriptTarget.ES2017, - /*setParentNodes */ true, - ); - const exportInfo = _getExportPathToExportedItems(sourceFile, omitExports); - return exportInfo; -} - -function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[]): ExportInfo { - const exportPathToExportedItems: ExportPathToExportedItems = {}; - const exportPathOrder: string[] = []; - const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; - processNode(sf); - - function processNode(node: ts.Node): void { - switch (node.kind) { - case ts.SyntaxKind.ExportDeclaration: { - const exportClause = (node as any).exportClause; - const exportPath = exportClause.parent.moduleSpecifier.text; - _.each(exportClause.elements, element => { - const exportItem = element.name.escapedText; - if (!_.includes(exportsToOmit, exportItem)) { - exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) - ? [exportItem] - : [...exportPathToExportedItems[exportPath], exportItem]; - } - }); - if (!_.isUndefined(exportPathToExportedItems[exportPath])) { - exportPathOrder.push(exportPath); - } - break; - } - - case ts.SyntaxKind.ExportKeyword: { - const foundNode: any = node; - const exportPath = './index'; - if (foundNode.parent && foundNode.parent.name) { - const exportItem = foundNode.parent.name.escapedText; - if (!_.includes(exportsToOmit, exportItem)) { - exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) - ? [exportItem] - : [...exportPathToExportedItems[exportPath], exportItem]; - } - } - if (!_.includes(exportPathOrder, exportPath) && !_.isUndefined(exportPathToExportedItems[exportPath])) { - exportPathOrder.push(exportPath); - } - break; - } - default: - // noop - break; - } - - ts.forEachChild(node, processNode); - } - const exportInfo = { - exportPathToExportedItems, - exportPathOrder, - }; - return exportInfo; -} -- cgit v1.2.3 From 3d1c8dfe06ba23696bb1fadb7754145da2f108be Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 16:52:45 -0700 Subject: Remove old comment --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 870cbe17c..a7ac9765a 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -58,7 +58,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: if (isInternalToPkg) { const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); typeDocExtraFileIncludes.push(pathToInternalPkg); - return; // Right? + return; } const pathIfExists = pkgNameToPath[exportPath]; -- cgit v1.2.3 From 67666446bf6620bd83e4f90f6fffaac71c1bb00c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 16:55:37 -0700 Subject: Add a check to make sure types part of the exported interface are also exported from the packages index.ts --- .../src/utils/doc_generate_and_upload_utils.ts | 54 ++++++++++++++++++++-- 1 file changed, 51 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index a7ac9765a..84fb9d20c 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -19,6 +19,12 @@ interface ExportNameToTypedocNames { [exportName: string]: string[]; } +// TODO: Add the EXTERNAL_TYPE_TO_LINK mapping to the Doc JSON +const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { + BigNumber: 'http://mikemcl.github.io/bignumber.js', + Error: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L134', +}; + export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { const monorepoPackages = utils.getPackages(constants.monorepoRootPath); const pkg = _.find(monorepoPackages, monorepoPackage => { @@ -141,9 +147,24 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); }); - // TODO: Add extra metadata for Class properties that are class instances - // Look in file for imports of that class, get the import name and construct a link to - // it's definition on another docs page. + const allExportedItems = _.flatten(_.values(exportPathToExportedItems)); + const propertyName = ''; // Root has no property name + const referenceNamesWithDuplicates = getAllReferenceNames(propertyName, finalTypeDocOutput, []); + const referenceNames = _.uniq(referenceNamesWithDuplicates); + + const missingReferences: string[] = []; + _.each(referenceNames, referenceName => { + if (!_.includes(allExportedItems, referenceName) && _.isUndefined(EXTERNAL_TYPE_TO_LINK[referenceName])) { + missingReferences.push(referenceName); + } + }); + if (!_.isEmpty(missingReferences)) { + throw new Error( + `${packageName} package needs to export ${missingReferences.join( + ', ', + )} from it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, + ); + } // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON const docJson = { @@ -171,7 +192,34 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // Remove the generated docs directory await execAsync(`rm -rf ${jsonFilePath}`, { cwd, + +function getAllReferenceNames(propertyName: string, node: any, referenceNames: string[]): string[] { + let updatedReferenceNames = referenceNames; + if (!_.isObject(node)) { + return updatedReferenceNames; + } + // Some nodes of type reference are for subtypes, which we don't want to return. + // We therefore filter them out. + const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites']; + if ( + !_.isUndefined(node.type) && + _.isString(node.type) && + node.type === 'reference' && + _.isUndefined(node.typeArguments) && + !_.includes(SUB_TYPE_PROPERTY_NAMES, propertyName) + ) { + return [...referenceNames, node.name]; + } + _.each(node, (nodeValue, innerPropertyName) => { + if (_.isArray(nodeValue)) { + _.each(nodeValue, aNode => { + updatedReferenceNames = getAllReferenceNames(innerPropertyName, aNode, updatedReferenceNames); + }); + } else if (_.isObject(nodeValue)) { + updatedReferenceNames = getAllReferenceNames(innerPropertyName, nodeValue, updatedReferenceNames); + } }); + return updatedReferenceNames; } function findExportPathGivenTypedocName( -- cgit v1.2.3 From 952367d5328e0f2a0d1361aed326fbbf0364dd2b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 16:55:52 -0700 Subject: Add missing types from 0x.js index.ts --- packages/0x.js/src/index.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 54b5e6928..7bb624a64 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -1,6 +1,13 @@ export { ZeroEx } from './0x'; -export { Web3ProviderEngine, RPCSubprovider } from '@0xproject/subproviders'; +export { + Web3ProviderEngine, + RPCSubprovider, + Callback, + JSONRPCRequestPayloadWithMethod, + ErrorCallback, + Subprovider, +} from '@0xproject/subproviders'; export { EventCallback, @@ -75,4 +82,6 @@ export { LogEntry, DecodedLogArgs, LogEntryEvent, + DecodedLogEntry, + DecodedLogEntryEvent, } from 'ethereum-types'; -- cgit v1.2.3 From 8169155a6547fb0283cd0f5362aad3c0b173b00b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 16:56:05 -0700 Subject: Update yarn.lock --- yarn.lock | 7 ------- 1 file changed, 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index 5a77b4aec..f8c5b3980 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10571,13 +10571,6 @@ react-scroll@0xproject/react-scroll#similar-to-pr-330: lodash.throttle "^4.1.1" prop-types "^15.5.8" -"react-scroll@github:0xproject/react-scroll#similar-to-pr-330": - version "1.7.10" - resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/091a41f8a6fd9e94bd41b9bba27356da470cb8a5" - dependencies: - lodash.throttle "^4.1.1" - prop-types "^15.5.8" - react-side-effect@^1.0.2: version "1.1.5" resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d" -- cgit v1.2.3 From b10cba600da44318f1d8246124c211ab92683626 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 18:10:11 -0700 Subject: Refactor 0x.js to simply re-export it's own sub-dependencies rather then wrapping them in a ZeroEx object --- packages/0x.js/package.json | 18 +- packages/0x.js/src/0x.ts | 279 - packages/0x.js/src/artifacts.ts | 7 - packages/0x.js/src/artifacts/ZRXToken.json | 10031 ------------------- packages/0x.js/src/index.ts | 84 +- .../0x.js/src/schemas/zero_ex_config_schema.ts | 5 - .../zero_ex_private_network_config_schema.ts | 35 - .../zero_ex_public_network_config_schema.ts | 43 - packages/0x.js/src/types.ts | 7 - packages/0x.js/src/utils/constants.ts | 4 - packages/0x.js/test/0x.js_test.ts | 150 - packages/0x.js/test/global_hooks.ts | 17 - packages/0x.js/test/utils/chai_setup.ts | 13 - packages/0x.js/test/utils/constants.ts | 9 - packages/0x.js/test/utils/token_utils.ts | 9 - packages/0x.js/test/utils/web3_wrapper.ts | 12 - yarn.lock | 8 +- 17 files changed, 60 insertions(+), 10671 deletions(-) delete mode 100644 packages/0x.js/src/0x.ts delete mode 100644 packages/0x.js/src/artifacts.ts delete mode 100644 packages/0x.js/src/artifacts/ZRXToken.json delete mode 100644 packages/0x.js/src/schemas/zero_ex_config_schema.ts delete mode 100644 packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts delete mode 100644 packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts delete mode 100644 packages/0x.js/src/types.ts delete mode 100644 packages/0x.js/src/utils/constants.ts delete mode 100644 packages/0x.js/test/0x.js_test.ts delete mode 100644 packages/0x.js/test/global_hooks.ts delete mode 100644 packages/0x.js/test/utils/chai_setup.ts delete mode 100644 packages/0x.js/test/utils/constants.ts delete mode 100644 packages/0x.js/test/utils/token_utils.ts delete mode 100644 packages/0x.js/test/utils/web3_wrapper.ts diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index b023ce525..98a74633d 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -15,30 +15,19 @@ "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { - "watch_without_deps": "yarn pre_build && tsc -w", - "build": "yarn pre_build && yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", + "watch_without_deps": "tsc -w", + "build": "yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", "build:all": "run-p build:umd:prod build:commonjs; exit 0;", - "pre_build": "run-s update_artifacts generate_contract_wrappers", - "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts", - "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;", - "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(ZRXToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers", "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", - "test:circleci": "run-s test:coverage", - "test": "yarn run_mocha", - "rebuild_and_test": "run-s build test", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers", + "clean": "shx rm -rf _bundles lib scripts src/generated_contract_wrappers", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc && yarn copy_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts", - "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:stage": "node scripts/stage_docs.js", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES", "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" }, "config": { - "contracts": "ZRXToken", "postpublish": { "assets": [ "packages/0x.js/_bundles/index.js", @@ -102,6 +91,7 @@ "@0xproject/base-contract": "^1.0.4", "@0xproject/contract-wrappers": "^1.0.1-rc.2", "@0xproject/order-utils": "^1.0.1-rc.2", + "@0xproject/order-watcher": "1.0.1-rc.2", "@0xproject/sol-compiler": "^1.0.4", "@0xproject/subproviders": "^1.0.4", "@0xproject/types": "^1.0.1-rc.3", diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts deleted file mode 100644 index 48d00c1ac..000000000 --- a/packages/0x.js/src/0x.ts +++ /dev/null @@ -1,279 +0,0 @@ -import { assert } from '@0xproject/assert'; -import { - ContractWrappers, - ContractWrappersConfig, - ERC20ProxyWrapper, - ERC20TokenWrapper, - ERC721ProxyWrapper, - ERC721TokenWrapper, - EtherTokenWrapper, - ExchangeWrapper, -} from '@0xproject/contract-wrappers'; -import { - assetDataUtils, - ecSignOrderHashAsync, - generatePseudoRandomSalt, - isValidSignatureAsync, - orderHashUtils, -} from '@0xproject/order-utils'; -// HACK: Since we export assetDataUtils from ZeroEx and it has AssetProxyId, ERC20AssetData and ERC721AssetData -// in it's public interface, we need to import these types here. -// tslint:disable-next-line:no-unused-variable -import { AssetProxyId, ERC20AssetData, ERC721AssetData, Order, SignedOrder, SignerType } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; - -import { constants } from './utils/constants'; - -/** - * The ZeroEx class is the single entry-point into the 0x.js library. It contains all of the library's functionality - * and all calls to the library should be made through a ZeroEx instance. - */ -export class ZeroEx { - /** - * When creating an order without a specified taker or feeRecipient you must supply the Solidity - * address null type (as opposed to Javascripts `null`, `undefined` or empty string). We expose - * this constant for your convenience. - */ - public static NULL_ADDRESS = constants.NULL_ADDRESS; - /** - * An instance of the ExchangeWrapper class containing methods for interacting with the 0x Exchange smart contract. - */ - public exchange: ExchangeWrapper; - /** - * An instance of the ERC20TokenWrapper class containing methods for interacting with any ERC20 token smart contract. - */ - public erc20Token: ERC20TokenWrapper; - /** - * An instance of the ERC721TokenWrapper class containing methods for interacting with any ERC721 token smart contract. - */ - public erc721Token: ERC721TokenWrapper; - /** - * An instance of the EtherTokenWrapper class containing methods for interacting with the - * wrapped ETH ERC20 token smart contract. - */ - public etherToken: EtherTokenWrapper; - /** - * An instance of the ERC20ProxyWrapper class containing methods for interacting with the - * ERC20 proxy smart contract. - */ - public erc20Proxy: ERC20ProxyWrapper; - /** - * An instance of the ERC721ProxyWrapper class containing methods for interacting with the - * ERC721 proxy smart contract. - */ - public erc721Proxy: ERC721ProxyWrapper; - private readonly _contractWrappers: ContractWrappers; - /** - * Generates a pseudo-random 256-bit salt. - * The salt can be included in a 0x order, ensuring that the order generates a unique orderHash - * and will not collide with other outstanding orders that are identical in all other parameters. - * @return A pseudo-random 256-bit number that can be used as a salt. - */ - public static generatePseudoRandomSalt(): BigNumber { - return generatePseudoRandomSalt(); - } - /** - * Computes the orderHash for a supplied order. - * @param order An object that conforms to the Order or SignedOrder interface definitions. - * @return The resulting orderHash from hashing the supplied order. - */ - public static getOrderHashHex(order: Order | SignedOrder): string { - return orderHashUtils.getOrderHashHex(order); - } - /** - * Checks if the supplied hex encoded order hash is valid. - * Note: Valid means it has the expected format, not that an order with the orderHash exists. - * Use this method when processing orderHashes submitted as user input. - * @param orderHash Hex encoded orderHash. - * @return Whether the supplied orderHash has the expected format. - */ - public static isValidOrderHash(orderHash: string): boolean { - return orderHashUtils.isValidOrderHash(orderHash); - } - /** - * A unit amount is defined as the amount of a token above the specified decimal places (integer part). - * E.g: If a currency has 18 decimal places, 1e18 or one quintillion of the currency is equivalent - * to 1 unit. - * @param amount The amount in baseUnits that you would like converted to units. - * @param decimals The number of decimal places the unit amount has. - * @return The amount in units. - */ - public static toUnitAmount(amount: BigNumber, decimals: number): BigNumber { - assert.isValidBaseUnitAmount('amount', amount); - assert.isNumber('decimals', decimals); - const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals); - return unitAmount; - } - /** - * A baseUnit is defined as the smallest denomination of a token. An amount expressed in baseUnits - * is the amount expressed in the smallest denomination. - * E.g: 1 unit of a token with 18 decimal places is expressed in baseUnits as 1000000000000000000 - * @param amount The amount of units that you would like converted to baseUnits. - * @param decimals The number of decimal places the unit amount has. - * @return The amount in baseUnits. - */ - public static toBaseUnitAmount(amount: BigNumber, decimals: number): BigNumber { - assert.isBigNumber('amount', amount); - assert.isNumber('decimals', decimals); - const baseUnitAmount = Web3Wrapper.toBaseUnitAmount(amount, decimals); - return baseUnitAmount; - } - /** - * Encodes an ERC20 token address into a hex encoded assetData string, usable in the makerAssetData or - * takerAssetData fields in a 0x order. - * @param tokenAddress The ERC20 token address to encode - * @return The hex encoded assetData string - */ - public static encodeERC20AssetData(tokenAddress: string): string { - return assetDataUtils.encodeERC20AssetData(tokenAddress); - } - /** - * Decodes an ERC20 assetData hex string into it's corresponding ERC20 tokenAddress & assetProxyId - * @param assetData Hex encoded assetData string to decode - * @return An object containing the decoded tokenAddress & assetProxyId - */ - public static decodeERC20AssetData(assetData: string): ERC20AssetData { - return assetDataUtils.decodeERC20AssetData(assetData); - } - /** - * Encodes an ERC721 token address into a hex encoded assetData string, usable in the makerAssetData or - * takerAssetData fields in a 0x order. - * @param tokenAddress The ERC721 token address to encode - * @param tokenId The ERC721 tokenId to encode - * @return The hex encoded assetData string - */ - public static encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): string { - return assetDataUtils.encodeERC721AssetData(tokenAddress, tokenId); - } - /** - * Decodes an ERC721 assetData hex string into it's corresponding ERC721 tokenAddress, tokenId & assetProxyId - * @param assetData Hex encoded assetData string to decode - * @return An object containing the decoded tokenAddress, tokenId & assetProxyId - */ - public static decodeERC721AssetData(assetData: string): ERC721AssetData { - return assetDataUtils.decodeERC721AssetData(assetData); - } - /** - * Decode and return the assetProxyId from the assetData - * @param assetData Hex encoded assetData string to decode - * @return The assetProxyId - */ - public static decodeAssetProxyId(assetData: string): AssetProxyId { - return assetDataUtils.decodeAssetProxyId(assetData); - } - /** - * Decode any assetData into it's corresponding assetData object - * @param assetData Hex encoded assetData string to decode - * @return Either a ERC20 or ERC721 assetData object - */ - public static decodeAssetDataOrThrow(assetData: string): ERC20AssetData | ERC721AssetData { - return assetDataUtils.decodeAssetDataOrThrow(assetData); - } - /** - * Instantiates a new ZeroEx instance that provides the public interface to the 0x.js library. - * @param provider The Provider instance you would like the 0x.js library to use for interacting with - * the Ethereum network. - * @param config The configuration object. Look up the type for the description. - * @return An instance of the 0x.js ZeroEx class. - */ - constructor(provider: Provider, config: ContractWrappersConfig) { - assert.isWeb3Provider('provider', provider); - this._contractWrappers = new ContractWrappers(provider, config); - - this.erc20Proxy = this._contractWrappers.erc20Proxy; - this.erc721Proxy = this._contractWrappers.erc721Proxy; - this.erc20Token = this._contractWrappers.erc20Token; - this.erc721Token = this._contractWrappers.erc721Token; - this.exchange = this._contractWrappers.exchange; - this.etherToken = this._contractWrappers.etherToken; - } - /** - * Verifies that the provided signature is valid according to the 0x Protocol smart contracts - * @param data The hex encoded data signed by the supplied signature. - * @param signature The hex encoded signature. - * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. - * @return Whether the signature is valid for the supplied signerAddress and data. - */ - public async isValidSignatureAsync(data: string, signature: string, signerAddress: string): Promise<boolean> { - const isValid = await isValidSignatureAsync( - this._contractWrappers.getProvider(), - data, - signature, - signerAddress, - ); - return isValid; - } - /** - * Sets a new web3 provider for 0x.js. Updating the provider will stop all - * subscriptions so you will need to re-subscribe to all events relevant to your app after this call. - * @param provider The Web3Provider you would like the 0x.js library to use from now on. - * @param networkId The id of the network your provider is connected to - */ - public setProvider(provider: Provider, networkId: number): void { - this._contractWrappers.setProvider(provider, networkId); - } - /** - * Get the provider instance currently used by 0x.js - * @return Web3 provider instance - */ - public getProvider(): Provider { - return this._contractWrappers.getProvider(); - } - /** - * Get user Ethereum addresses available through the supplied web3 provider available for sending transactions. - * @return An array of available user Ethereum addresses. - */ - public async getAvailableAddressesAsync(): Promise<string[]> { - // Hack: Get Web3Wrapper from ContractWrappers - const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper; - const availableAddresses = await web3Wrapper.getAvailableAddressesAsync(); - return availableAddresses; - } - /** - * Signs an orderHash and returns it's elliptic curve signature. - * This method currently supports TestRPC, Geth and Parity above and below V1.6.6 - * @param orderHash Hex encoded orderHash to sign. - * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address - * must be available via the Provider supplied to 0x.js. - * @param signerType the signer type that will perform the `eth_sign` operation. E.g Default, Metamask, Ledger or Trezor. - * Some implementations exhibit different behaviour. Default will assume a spec compliant eth_sign implementation. - * This parameter is defaulted to `SignerType.Default`. - * @return A hex encoded string of the Elliptic curve signature parameters generated by signing the orderHash and signature type. - */ - public async ecSignOrderHashAsync( - orderHash: string, - signerAddress: string, - signerType: SignerType = SignerType.Default, - ): Promise<string> { - const signature = await ecSignOrderHashAsync( - this._contractWrappers.getProvider(), - orderHash, - signerAddress, - signerType, - ); - return signature; - } - /** - * Waits for a transaction to be mined and returns the transaction receipt. - * @param txHash Transaction hash - * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined. - * @param timeoutMs How long (in ms) to poll for transaction mined until aborting. - * @return Transaction receipt with decoded log args. - */ - public async awaitTransactionMinedAsync( - txHash: string, - pollingIntervalMs: number = 1000, - timeoutMs?: number, - ): Promise<TransactionReceiptWithDecodedLogs> { - // Hack: Get Web3Wrapper from ContractWrappers - const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper; - const transactionReceiptWithDecodedLogs = await web3Wrapper.awaitTransactionMinedAsync( - txHash, - pollingIntervalMs, - timeoutMs, - ); - return transactionReceiptWithDecodedLogs; - } -} diff --git a/packages/0x.js/src/artifacts.ts b/packages/0x.js/src/artifacts.ts deleted file mode 100644 index f68969d28..000000000 --- a/packages/0x.js/src/artifacts.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; - -import * as ZRXToken from './artifacts/ZRXToken.json'; - -export const artifacts = { - ZRXToken: (ZRXToken as any) as ContractArtifact, -}; diff --git a/packages/0x.js/src/artifacts/ZRXToken.json b/packages/0x.js/src/artifacts/ZRXToken.json deleted file mode 100644 index becbb83df..000000000 --- a/packages/0x.js/src/artifacts/ZRXToken.json +++ /dev/null @@ -1,10031 +0,0 @@ -{ - "schemaVersion": "2.0.0", - "contractName": "ZRXToken", - "compilerOutput": { - "abi": [ - { - "constant": true, - "inputs": [], - "name": "name", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_spender", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_from", - "type": "address" - }, - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "decimals", - "outputs": [ - { - "name": "", - "type": "uint8" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [], - "name": "symbol", - "outputs": [ - { - "name": "", - "type": "string" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": false, - "inputs": [ - { - "name": "_to", - "type": "address" - }, - { - "name": "_value", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "name": "", - "type": "bool" - } - ], - "payable": false, - "type": "function" - }, - { - "constant": true, - "inputs": [ - { - "name": "_owner", - "type": "address" - }, - { - "name": "_spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "name": "", - "type": "uint256" - } - ], - "payable": false, - "type": "function" - }, - { - "inputs": [], - "payable": false, - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_from", - "type": "address" - }, - { - "indexed": true, - "name": "_to", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "name": "_owner", - "type": "address" - }, - { - "indexed": true, - "name": "_spender", - "type": "address" - }, - { - "indexed": false, - "name": "_value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - } - ], - "devdoc": { - "methods": { - "transferFrom(address,address,uint256)": { - "details": "ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.", - "params": { - "_from": "Address to transfer from.", - "_to": "Address to transfer to.", - "_value": "Amount to transfer." - }, - "return": "Success of transfer." - } - } - }, - "evm": { - "assembly": " /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":958:964 10**27 */\n 0x33b2e3c9fd0803ce8000000\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n 0x3\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\n jumpi(tag_1, iszero(callvalue))\n invalid\ntag_1:\ntag_2:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1222:1233 totalSupply */\n sload(0x3)\n sub(exp(0x2, 0xa0), 0x1)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1208:1218 msg.sender */\n caller\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n and\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1207 balances */\n 0x0\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1233 balances[msg.sender] = totalSupply */\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\ntag_3:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\ntag_4:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n return\nstop\n\nsub_0: assembly {\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(calldatasize))\n and(div(calldataload(0x0), 0x100000000000000000000000000000000000000000000000000000000), 0xffffffff)\n 0x6fdde03\n dup2\n eq\n tag_2\n jumpi\n dup1\n 0x95ea7b3\n eq\n tag_3\n jumpi\n dup1\n 0x18160ddd\n eq\n tag_4\n jumpi\n dup1\n 0x23b872dd\n eq\n tag_5\n jumpi\n dup1\n 0x313ce567\n eq\n tag_6\n jumpi\n dup1\n 0x70a08231\n eq\n tag_7\n jumpi\n dup1\n 0x95d89b41\n eq\n tag_8\n jumpi\n dup1\n 0xa9059cbb\n eq\n tag_9\n jumpi\n dup1\n 0xdd62ed3e\n eq\n tag_10\n jumpi\n tag_1:\n invalid\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_2:\n jumpi(tag_11, iszero(callvalue))\n invalid\n tag_11:\n tag_12\n jump(tag_13)\n tag_12:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_15:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_14:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_16:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_3:\n jumpi(tag_17, iszero(callvalue))\n invalid\n tag_17:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_19)\n tag_18:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_4:\n jumpi(tag_20, iszero(callvalue))\n invalid\n tag_20:\n tag_21\n jump(tag_22)\n tag_21:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_5:\n jumpi(tag_23, iszero(callvalue))\n invalid\n tag_23:\n tag_18\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n calldataload(0x44)\n jump(tag_25)\n tag_24:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_6:\n jumpi(tag_26, iszero(callvalue))\n invalid\n tag_26:\n tag_27\n jump(tag_28)\n tag_27:\n 0x40\n dup1\n mload\n 0xff\n swap1\n swap3\n and\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_7:\n jumpi(tag_29, iszero(callvalue))\n invalid\n tag_29:\n tag_21\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n jump(tag_31)\n tag_30:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_8:\n jumpi(tag_32, iszero(callvalue))\n invalid\n tag_32:\n tag_12\n jump(tag_34)\n tag_33:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_36:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_35:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_37:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_9:\n jumpi(tag_38, iszero(callvalue))\n invalid\n tag_38:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_40)\n tag_39:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_10:\n jumpi(tag_41, iszero(callvalue))\n invalid\n tag_41:\n tag_21\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n jump(tag_43)\n tag_42:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_13:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x11\n dup2\n mstore\n 0x30782050726f746f636f6c20546f6b656e000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_19:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1168:1178 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1167 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap5\n dup8\n and\n dup1\n dup5\n mstore\n swap5\n dup3\n mstore\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1198 */\n dup7\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n dup1\n mload\n dup7\n dup2\n mstore\n swap1\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n swap3\n swap5\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n swap3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\n swap3\n swap2\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1263:1267 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_44:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_22:\n sload(0x3)\n dup2\n jump\t// out\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_25:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1161:1165 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n dup2\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1205 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1213:1223 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1224 */\n swap1\n swap6\n and\n dup4\n mstore\n swap4\n dup2\n mstore\n dup4\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1253 */\n swap3\n dup3\n mstore\n dup2\n swap1\n mstore\n swap2\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1263 */\n dup4\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1292:1298 */\n dup3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1288 */\n dup2\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1298 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n dup1\n iszero\n tag_47\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1348 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1336 */\n dup4\n dup2\n add\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1353 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n tag_47:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n iszero\n tag_48\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup6\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1386 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup1\n dup3\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1401 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1430 */\n swap2\n dup8\n and\n dup2\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1440 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":768:778 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1458:1478 */\n dup2\n lt\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n iszero\n tag_49\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup7\n and\n 0x0\n swap1\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1505 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1513:1523 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1524 */\n swap1\n swap5\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1534 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n tag_49:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1578:1581 */\n dup4\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1571:1576 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1583:1589 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n mload(0x40)\n dup1\n dup3\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n log3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1611:1615 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1604:1615 */\n swap2\n pop\n jump(tag_50)\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_48:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1653:1658 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1646:1658 */\n swap2\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_50:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_45:\n pop\n swap4\n swap3\n pop\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_28:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":924:926 18 */\n 0x12\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_31:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1035:1039 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_51:\n swap2\n swap1\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_34:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x3\n dup2\n mstore\n 0x5a52580000000000000000000000000000000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_40:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":276:286 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":178:182 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup2\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:297 */\n dup3\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53\n jumpi\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:335 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:323 */\n dup3\n dup2\n add\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:340 */\n lt\n iszero\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n iszero\n tag_54\n jumpi\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":365:375 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:364 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n dup2\n mstore\n 0x20\n dup2\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:386 */\n dup1\n sload\n dup9\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap4\n dup8\n and\n dup1\n dup4\n mstore\n swap2\n dup5\n swap1\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:423 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n dup4\n mload\n dup7\n dup2\n mstore\n swap4\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap2\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n swap3\n swap1\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":491:495 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":484:495 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_54:\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":521:526 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":514:526 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_55:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_52:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_43:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1351:1355 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n swap1\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1381 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1399 */\n swap4\n dup6\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_56:\n swap3\n swap2\n pop\n pop\n jump\t// out\n}\n", - "bytecode": { - "linkReferences": {}, - "object": "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b61078d8061004a6000396000f300606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029", - "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE PUSH12 0x33B2E3C9FD0803CE8000000 PUSH1 0x3 SSTORE CALLVALUE ISZERO PUSH2 0x1C JUMPI INVALID JUMPDEST JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SSTORE JUMPDEST JUMPDEST PUSH2 0x78D DUP1 PUSH2 0x4A PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ", - "sourceMap": "795:447:3:-;;;958:6;932:32;;1150:90;;;;;;;1222:11;;-1:-1:-1;;;;;1208:10:3;1199:20;:8;:20;;;;;;;;;;:34;1150:90;795:447;;;;;;;" - }, - "deployedBytecode": { - "linkReferences": {}, - "object": "0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029", - "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ", - "sourceMap": "795:447:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1087:187:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;932:32:3;;;;;;;;;;;;;;;;;;;;;;;;;;1066:609:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;891:35:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:99:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1064:37:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125:410:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1280:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49:3;;;;;;;;;;;;;;;;;;;:::o;1087:187:0:-;1160:19;1168:10;1160:19;;1144:4;1160:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:38;;;1208;;;;;;;1144:4;;1160:29;:19;1208:38;;;;;;;;;;;-1:-1:-1;1263:4:0;1087:187;;;;;:::o;932:32:3:-;;;;:::o;1066:609:2:-;1198:14;;;;1161:4;1198:14;;;:7;:14;;;;;;;;1213:10;1198:26;;;;;;;;;;;;1238:15;;;;;;;;;;:25;;;;;;:60;;;1292:6;1279:9;:19;;1238:60;:115;;;;-1:-1:-1;1340:13:2;;;:8;:13;;;;;;;;;;;1314:22;;;:39;;1238:115;1234:435;;;1378:13;;;;:8;:13;;;;;;;;;;;:23;;;;;;1415:15;;;;;;:25;;;;;;;768:10;1458:20;;1454:95;;;1498:14;;;;;;;;:7;:14;;;;;;;;1513:10;1498:26;;;;;;;;;:36;;;;;;;1454:95;1578:3;1562:28;;1571:5;1562:28;;;1583:6;1562:28;;;;;;;;;;;;;;;;;;1611:4;1604:11;;;;1234:435;1653:5;1646:12;;1234:435;1066:609;;;;;;;:::o;891:35:3:-;924:2;891:35;:::o;982:99:0:-;1058:16;;;1035:4;1058:16;;;;;;;;;;;982:99;;;;:::o;1064:37:3:-;;;;;;;;;;;;;;;;;;;:::o;125:410:0:-;267:20;276:10;267:20;178:4;267:20;;;;;;;;;;;:30;;;;;;:73;;-1:-1:-1;327:13:0;;;:8;:13;;;;;;;;;;;301:22;;;:39;;267:73;263:266;;;356:20;365:10;356:20;;:8;:20;;;;;;;;;;;:30;;;;;;;400:13;;;;;;;;;;:23;;;;;;437:33;;;;;;;400:13;;437:33;;;;;;;;;;;-1:-1:-1;491:4:0;484:11;;263:266;-1:-1:-1;521:5:0;514:12;;263:266;125:410;;;;;:::o;1280:126::-;1374:15;;;;1351:4;1374:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;1280:126;;;;;:::o" - }, - "gasEstimates": { - "creation": { - "codeDepositCost": "386600", - "executionCost": "40780", - "totalCost": "427380" - }, - "external": { - "allowance(address,address)": "737", - "approve(address,uint256)": "22218", - "balanceOf(address)": "579", - "decimals()": "270", - "name()": "530", - "symbol()": "662", - "totalSupply()": "417", - "transfer(address,uint256)": "43393", - "transferFrom(address,address,uint256)": "64116" - } - }, - "legacyAssembly": { - ".code": [ - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "60" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "40" - }, - { - "begin": 795, - "end": 1242, - "name": "MSTORE" - }, - { - "begin": 958, - "end": 964, - "name": "PUSH", - "value": "33B2E3C9FD0803CE8000000" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH", - "value": "3" - }, - { - "begin": 932, - "end": 964, - "name": "SSTORE" - }, - { - "begin": 1150, - "end": 1240, - "name": "CALLVALUE" - }, - { - "begin": 1150, - "end": 1240, - "name": "ISZERO" - }, - { - "begin": 1150, - "end": 1240, - "name": "PUSH [tag]", - "value": "1" - }, - { - "begin": 1150, - "end": 1240, - "name": "JUMPI" - }, - { - "begin": 1150, - "end": 1240, - "name": "INVALID" - }, - { - "begin": 1150, - "end": 1240, - "name": "tag", - "value": "1" - }, - { - "begin": 1150, - "end": 1240, - "name": "JUMPDEST" - }, - { - "begin": 1150, - "end": 1240, - "name": "tag", - "value": "2" - }, - { - "begin": 1150, - "end": 1240, - "name": "JUMPDEST" - }, - { - "begin": 1222, - "end": 1233, - "name": "PUSH", - "value": "3" - }, - { - "begin": 1222, - "end": 1233, - "name": "SLOAD" - }, - { - "begin": -1, - "end": -1, - "name": "PUSH", - "value": "1" - }, - { - "begin": -1, - "end": -1, - "name": "PUSH", - "value": "A0" - }, - { - "begin": -1, - "end": -1, - "name": "PUSH", - "value": "2" - }, - { - "begin": -1, - "end": -1, - "name": "EXP" - }, - { - "begin": -1, - "end": -1, - "name": "SUB" - }, - { - "begin": 1208, - "end": 1218, - "name": "CALLER" - }, - { - "begin": 1199, - "end": 1219, - "name": "AND" - }, - { - "begin": 1199, - "end": 1207, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1199, - "end": 1219, - "name": "SWAP1" - }, - { - "begin": 1199, - "end": 1219, - "name": "DUP2" - }, - { - "begin": 1199, - "end": 1219, - "name": "MSTORE" - }, - { - "begin": 1199, - "end": 1219, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1199, - "end": 1219, - "name": "DUP2" - }, - { - "begin": 1199, - "end": 1219, - "name": "SWAP1" - }, - { - "begin": 1199, - "end": 1219, - "name": "MSTORE" - }, - { - "begin": 1199, - "end": 1219, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1199, - "end": 1219, - "name": "SWAP1" - }, - { - "begin": 1199, - "end": 1219, - "name": "SHA3" - }, - { - "begin": 1199, - "end": 1233, - "name": "SSTORE" - }, - { - "begin": 1150, - "end": 1240, - "name": "tag", - "value": "3" - }, - { - "begin": 1150, - "end": 1240, - "name": "JUMPDEST" - }, - { - "begin": 795, - "end": 1242, - "name": "tag", - "value": "4" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPDEST" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH #[$]", - "value": "0000000000000000000000000000000000000000000000000000000000000000" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [$]", - "value": "0000000000000000000000000000000000000000000000000000000000000000" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "0" - }, - { - "begin": 795, - "end": 1242, - "name": "CODECOPY" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "0" - }, - { - "begin": 795, - "end": 1242, - "name": "RETURN" - } - ], - ".data": { - "0": { - ".code": [ - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "60" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "40" - }, - { - "begin": 795, - "end": 1242, - "name": "MSTORE" - }, - { - "begin": 795, - "end": 1242, - "name": "CALLDATASIZE" - }, - { - "begin": 795, - "end": 1242, - "name": "ISZERO" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "1" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "FFFFFFFF" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "100000000000000000000000000000000000000000000000000000000" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "0" - }, - { - "begin": 795, - "end": 1242, - "name": "CALLDATALOAD" - }, - { - "begin": 795, - "end": 1242, - "name": "DIV" - }, - { - "begin": 795, - "end": 1242, - "name": "AND" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "6FDDE03" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP2" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "2" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "95EA7B3" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "3" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "18160DDD" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "4" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "23B872DD" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "5" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "313CE567" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "6" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "70A08231" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "7" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "95D89B41" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "8" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "A9059CBB" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "9" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "DUP1" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH", - "value": "DD62ED3E" - }, - { - "begin": 795, - "end": 1242, - "name": "EQ" - }, - { - "begin": 795, - "end": 1242, - "name": "PUSH [tag]", - "value": "10" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPI" - }, - { - "begin": 795, - "end": 1242, - "name": "tag", - "value": "1" - }, - { - "begin": 795, - "end": 1242, - "name": "JUMPDEST" - }, - { - "begin": 795, - "end": 1242, - "name": "INVALID" - }, - { - "begin": 1009, - "end": 1058, - "name": "tag", - "value": "2" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMPDEST" - }, - { - "begin": 1009, - "end": 1058, - "name": "CALLVALUE" - }, - { - "begin": 1009, - "end": 1058, - "name": "ISZERO" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH [tag]", - "value": "11" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMPI" - }, - { - "begin": 1009, - "end": 1058, - "name": "INVALID" - }, - { - "begin": 1009, - "end": 1058, - "name": "tag", - "value": "11" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMPDEST" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH [tag]", - "value": "12" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH [tag]", - "value": "13" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMP" - }, - { - "begin": 1009, - "end": 1058, - "name": "tag", - "value": "12" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMPDEST" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "MLOAD" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP3" - }, - { - "begin": 1009, - "end": 1058, - "name": "MSTORE" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "MLOAD" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "ADD" - }, - { - "begin": 1009, - "end": 1058, - "name": "MSTORE" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "MLOAD" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP3" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP3" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "ADD" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP6" - }, - { - "begin": 1009, - "end": 1058, - "name": "ADD" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP4" - }, - { - "begin": 18, - "end": 20, - "name": "DUP3" - }, - { - "begin": 18, - "end": 20, - "name": "ISZERO" - }, - { - "begin": 13, - "end": 16, - "name": "PUSH [tag]", - "value": "14" - }, - { - "begin": 7, - "end": 12, - "name": "JUMPI" - }, - { - "begin": 32, - "end": 37, - "name": "tag", - "value": "15" - }, - { - "begin": 32, - "end": 37, - "name": "JUMPDEST" - }, - { - "begin": 59, - "end": 62, - "name": "DUP1" - }, - { - "begin": 53, - "end": 58, - "name": "MLOAD" - }, - { - "begin": 48, - "end": 51, - "name": "DUP3" - }, - { - "begin": 41, - "end": 47, - "name": "MSTORE" - }, - { - "begin": 93, - "end": 95, - "name": "PUSH", - "value": "20" - }, - { - "begin": 88, - "end": 91, - "name": "DUP4" - }, - { - "begin": 85, - "end": 87, - "name": "GT" - }, - { - "begin": 78, - "end": 84, - "name": "ISZERO" - }, - { - "begin": 73, - "end": 76, - "name": "PUSH [tag]", - "value": "14" - }, - { - "begin": 67, - "end": 72, - "name": "JUMPI" - }, - { - "begin": 152, - "end": 155, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP1" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP3" - }, - { - "begin": 152, - "end": 155, - "name": "ADD" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP2" - }, - { - "begin": 117, - "end": 119, - "name": "PUSH", - "value": "20" - }, - { - "begin": 108, - "end": 111, - "name": "SWAP2" - }, - { - "begin": 108, - "end": 111, - "name": "DUP3" - }, - { - "begin": 108, - "end": 111, - "name": "ADD" - }, - { - "begin": 108, - "end": 111, - "name": "SWAP2" - }, - { - "begin": 130, - "end": 133, - "name": "ADD" - }, - { - "begin": 172, - "end": 177, - "name": "PUSH [tag]", - "value": "15" - }, - { - "begin": 167, - "end": 171, - "name": "JUMP" - }, - { - "begin": 181, - "end": 184, - "name": "tag", - "value": "14" - }, - { - "begin": 181, - "end": 184, - "name": "JUMPDEST" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP2" - }, - { - "begin": 3, - "end": 189, - "name": "ADD" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "1F" - }, - { - "begin": 3, - "end": 189, - "name": "AND" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "ISZERO" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH [tag]", - "value": "16" - }, - { - "begin": 3, - "end": 189, - "name": "JUMPI" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP3" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "MLOAD" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP4" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "20" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "100" - }, - { - "begin": 3, - "end": 189, - "name": "EXP" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "NOT" - }, - { - "begin": 3, - "end": 189, - "name": "AND" - }, - { - "begin": 3, - "end": 189, - "name": "DUP2" - }, - { - "begin": 3, - "end": 189, - "name": "MSTORE" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "20" - }, - { - "begin": 3, - "end": 189, - "name": "ADD" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP2" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "tag", - "value": "16" - }, - { - "begin": 3, - "end": 189, - "name": "JUMPDEST" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP3" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "40" - }, - { - "begin": 3, - "end": 189, - "name": "MLOAD" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP2" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "RETURN" - }, - { - "begin": 1087, - "end": 1274, - "name": "tag", - "value": "3" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPDEST" - }, - { - "begin": 1087, - "end": 1274, - "name": "CALLVALUE" - }, - { - "begin": 1087, - "end": 1274, - "name": "ISZERO" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH [tag]", - "value": "17" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPI" - }, - { - "begin": 1087, - "end": 1274, - "name": "INVALID" - }, - { - "begin": 1087, - "end": 1274, - "name": "tag", - "value": "17" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPDEST" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH [tag]", - "value": "18" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH", - "value": "4" - }, - { - "begin": 1087, - "end": 1274, - "name": "CALLDATALOAD" - }, - { - "begin": 1087, - "end": 1274, - "name": "AND" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH", - "value": "24" - }, - { - "begin": 1087, - "end": 1274, - "name": "CALLDATALOAD" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH [tag]", - "value": "19" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMP" - }, - { - "begin": 1087, - "end": 1274, - "name": "tag", - "value": "18" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPDEST" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1087, - "end": 1274, - "name": "DUP1" - }, - { - "begin": 1087, - "end": 1274, - "name": "MLOAD" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP2" - }, - { - "begin": 1087, - "end": 1274, - "name": "ISZERO" - }, - { - "begin": 1087, - "end": 1274, - "name": "ISZERO" - }, - { - "begin": 1087, - "end": 1274, - "name": "DUP3" - }, - { - "begin": 1087, - "end": 1274, - "name": "MSTORE" - }, - { - "begin": 1087, - "end": 1274, - "name": "MLOAD" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP1" - }, - { - "begin": 1087, - "end": 1274, - "name": "DUP2" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP1" - }, - { - "begin": 1087, - "end": 1274, - "name": "SUB" - }, - { - "begin": 1087, - "end": 1274, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1087, - "end": 1274, - "name": "ADD" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP1" - }, - { - "begin": 1087, - "end": 1274, - "name": "RETURN" - }, - { - "begin": 932, - "end": 964, - "name": "tag", - "value": "4" - }, - { - "begin": 932, - "end": 964, - "name": "JUMPDEST" - }, - { - "begin": 932, - "end": 964, - "name": "CALLVALUE" - }, - { - "begin": 932, - "end": 964, - "name": "ISZERO" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH [tag]", - "value": "20" - }, - { - "begin": 932, - "end": 964, - "name": "JUMPI" - }, - { - "begin": 932, - "end": 964, - "name": "INVALID" - }, - { - "begin": 932, - "end": 964, - "name": "tag", - "value": "20" - }, - { - "begin": 932, - "end": 964, - "name": "JUMPDEST" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH [tag]", - "value": "21" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH [tag]", - "value": "22" - }, - { - "begin": 932, - "end": 964, - "name": "JUMP" - }, - { - "begin": 932, - "end": 964, - "name": "tag", - "value": "21" - }, - { - "begin": 932, - "end": 964, - "name": "JUMPDEST" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH", - "value": "40" - }, - { - "begin": 932, - "end": 964, - "name": "DUP1" - }, - { - "begin": 932, - "end": 964, - "name": "MLOAD" - }, - { - "begin": 932, - "end": 964, - "name": "SWAP2" - }, - { - "begin": 932, - "end": 964, - "name": "DUP3" - }, - { - "begin": 932, - "end": 964, - "name": "MSTORE" - }, - { - "begin": 932, - "end": 964, - "name": "MLOAD" - }, - { - "begin": 932, - "end": 964, - "name": "SWAP1" - }, - { - "begin": 932, - "end": 964, - "name": "DUP2" - }, - { - "begin": 932, - "end": 964, - "name": "SWAP1" - }, - { - "begin": 932, - "end": 964, - "name": "SUB" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH", - "value": "20" - }, - { - "begin": 932, - "end": 964, - "name": "ADD" - }, - { - "begin": 932, - "end": 964, - "name": "SWAP1" - }, - { - "begin": 932, - "end": 964, - "name": "RETURN" - }, - { - "begin": 1066, - "end": 1675, - "name": "tag", - "value": "5" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPDEST" - }, - { - "begin": 1066, - "end": 1675, - "name": "CALLVALUE" - }, - { - "begin": 1066, - "end": 1675, - "name": "ISZERO" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH [tag]", - "value": "23" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPI" - }, - { - "begin": 1066, - "end": 1675, - "name": "INVALID" - }, - { - "begin": 1066, - "end": 1675, - "name": "tag", - "value": "23" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPDEST" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH [tag]", - "value": "18" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "4" - }, - { - "begin": 1066, - "end": 1675, - "name": "CALLDATALOAD" - }, - { - "begin": 1066, - "end": 1675, - "name": "DUP2" - }, - { - "begin": 1066, - "end": 1675, - "name": "AND" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP1" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "24" - }, - { - "begin": 1066, - "end": 1675, - "name": "CALLDATALOAD" - }, - { - "begin": 1066, - "end": 1675, - "name": "AND" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "44" - }, - { - "begin": 1066, - "end": 1675, - "name": "CALLDATALOAD" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH [tag]", - "value": "25" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMP" - }, - { - "begin": 1066, - "end": 1675, - "name": "tag", - "value": "24" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPDEST" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1066, - "end": 1675, - "name": "DUP1" - }, - { - "begin": 1066, - "end": 1675, - "name": "MLOAD" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP2" - }, - { - "begin": 1066, - "end": 1675, - "name": "ISZERO" - }, - { - "begin": 1066, - "end": 1675, - "name": "ISZERO" - }, - { - "begin": 1066, - "end": 1675, - "name": "DUP3" - }, - { - "begin": 1066, - "end": 1675, - "name": "MSTORE" - }, - { - "begin": 1066, - "end": 1675, - "name": "MLOAD" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP1" - }, - { - "begin": 1066, - "end": 1675, - "name": "DUP2" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP1" - }, - { - "begin": 1066, - "end": 1675, - "name": "SUB" - }, - { - "begin": 1066, - "end": 1675, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1066, - "end": 1675, - "name": "ADD" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP1" - }, - { - "begin": 1066, - "end": 1675, - "name": "RETURN" - }, - { - "begin": 891, - "end": 926, - "name": "tag", - "value": "6" - }, - { - "begin": 891, - "end": 926, - "name": "JUMPDEST" - }, - { - "begin": 891, - "end": 926, - "name": "CALLVALUE" - }, - { - "begin": 891, - "end": 926, - "name": "ISZERO" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH [tag]", - "value": "26" - }, - { - "begin": 891, - "end": 926, - "name": "JUMPI" - }, - { - "begin": 891, - "end": 926, - "name": "INVALID" - }, - { - "begin": 891, - "end": 926, - "name": "tag", - "value": "26" - }, - { - "begin": 891, - "end": 926, - "name": "JUMPDEST" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH [tag]", - "value": "27" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH [tag]", - "value": "28" - }, - { - "begin": 891, - "end": 926, - "name": "JUMP" - }, - { - "begin": 891, - "end": 926, - "name": "tag", - "value": "27" - }, - { - "begin": 891, - "end": 926, - "name": "JUMPDEST" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH", - "value": "40" - }, - { - "begin": 891, - "end": 926, - "name": "DUP1" - }, - { - "begin": 891, - "end": 926, - "name": "MLOAD" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH", - "value": "FF" - }, - { - "begin": 891, - "end": 926, - "name": "SWAP1" - }, - { - "begin": 891, - "end": 926, - "name": "SWAP3" - }, - { - "begin": 891, - "end": 926, - "name": "AND" - }, - { - "begin": 891, - "end": 926, - "name": "DUP3" - }, - { - "begin": 891, - "end": 926, - "name": "MSTORE" - }, - { - "begin": 891, - "end": 926, - "name": "MLOAD" - }, - { - "begin": 891, - "end": 926, - "name": "SWAP1" - }, - { - "begin": 891, - "end": 926, - "name": "DUP2" - }, - { - "begin": 891, - "end": 926, - "name": "SWAP1" - }, - { - "begin": 891, - "end": 926, - "name": "SUB" - }, - { - "begin": 891, - "end": 926, - "name": "PUSH", - "value": "20" - }, - { - "begin": 891, - "end": 926, - "name": "ADD" - }, - { - "begin": 891, - "end": 926, - "name": "SWAP1" - }, - { - "begin": 891, - "end": 926, - "name": "RETURN" - }, - { - "begin": 982, - "end": 1081, - "name": "tag", - "value": "7" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPDEST" - }, - { - "begin": 982, - "end": 1081, - "name": "CALLVALUE" - }, - { - "begin": 982, - "end": 1081, - "name": "ISZERO" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH [tag]", - "value": "29" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPI" - }, - { - "begin": 982, - "end": 1081, - "name": "INVALID" - }, - { - "begin": 982, - "end": 1081, - "name": "tag", - "value": "29" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPDEST" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH [tag]", - "value": "21" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH", - "value": "4" - }, - { - "begin": 982, - "end": 1081, - "name": "CALLDATALOAD" - }, - { - "begin": 982, - "end": 1081, - "name": "AND" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH [tag]", - "value": "31" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMP" - }, - { - "begin": 982, - "end": 1081, - "name": "tag", - "value": "30" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPDEST" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH", - "value": "40" - }, - { - "begin": 982, - "end": 1081, - "name": "DUP1" - }, - { - "begin": 982, - "end": 1081, - "name": "MLOAD" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP2" - }, - { - "begin": 982, - "end": 1081, - "name": "DUP3" - }, - { - "begin": 982, - "end": 1081, - "name": "MSTORE" - }, - { - "begin": 982, - "end": 1081, - "name": "MLOAD" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP1" - }, - { - "begin": 982, - "end": 1081, - "name": "DUP2" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP1" - }, - { - "begin": 982, - "end": 1081, - "name": "SUB" - }, - { - "begin": 982, - "end": 1081, - "name": "PUSH", - "value": "20" - }, - { - "begin": 982, - "end": 1081, - "name": "ADD" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP1" - }, - { - "begin": 982, - "end": 1081, - "name": "RETURN" - }, - { - "begin": 1064, - "end": 1101, - "name": "tag", - "value": "8" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMPDEST" - }, - { - "begin": 1064, - "end": 1101, - "name": "CALLVALUE" - }, - { - "begin": 1064, - "end": 1101, - "name": "ISZERO" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH [tag]", - "value": "32" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMPI" - }, - { - "begin": 1064, - "end": 1101, - "name": "INVALID" - }, - { - "begin": 1064, - "end": 1101, - "name": "tag", - "value": "32" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMPDEST" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH [tag]", - "value": "12" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH [tag]", - "value": "34" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMP" - }, - { - "begin": 1064, - "end": 1101, - "name": "tag", - "value": "33" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMPDEST" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "MLOAD" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP3" - }, - { - "begin": 1064, - "end": 1101, - "name": "MSTORE" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "MLOAD" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "ADD" - }, - { - "begin": 1064, - "end": 1101, - "name": "MSTORE" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "MLOAD" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP3" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP3" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "ADD" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP6" - }, - { - "begin": 1064, - "end": 1101, - "name": "ADD" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP4" - }, - { - "begin": 18, - "end": 20, - "name": "DUP3" - }, - { - "begin": 18, - "end": 20, - "name": "ISZERO" - }, - { - "begin": 13, - "end": 16, - "name": "PUSH [tag]", - "value": "14" - }, - { - "begin": 7, - "end": 12, - "name": "JUMPI" - }, - { - "begin": 32, - "end": 37, - "name": "tag", - "value": "36" - }, - { - "begin": 32, - "end": 37, - "name": "JUMPDEST" - }, - { - "begin": 59, - "end": 62, - "name": "DUP1" - }, - { - "begin": 53, - "end": 58, - "name": "MLOAD" - }, - { - "begin": 48, - "end": 51, - "name": "DUP3" - }, - { - "begin": 41, - "end": 47, - "name": "MSTORE" - }, - { - "begin": 93, - "end": 95, - "name": "PUSH", - "value": "20" - }, - { - "begin": 88, - "end": 91, - "name": "DUP4" - }, - { - "begin": 85, - "end": 87, - "name": "GT" - }, - { - "begin": 78, - "end": 84, - "name": "ISZERO" - }, - { - "begin": 73, - "end": 76, - "name": "PUSH [tag]", - "value": "14" - }, - { - "begin": 67, - "end": 72, - "name": "JUMPI" - }, - { - "begin": 152, - "end": 155, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP1" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP3" - }, - { - "begin": 152, - "end": 155, - "name": "ADD" - }, - { - "begin": 152, - "end": 155, - "name": "SWAP2" - }, - { - "begin": 117, - "end": 119, - "name": "PUSH", - "value": "20" - }, - { - "begin": 108, - "end": 111, - "name": "SWAP2" - }, - { - "begin": 108, - "end": 111, - "name": "DUP3" - }, - { - "begin": 108, - "end": 111, - "name": "ADD" - }, - { - "begin": 108, - "end": 111, - "name": "SWAP2" - }, - { - "begin": 130, - "end": 133, - "name": "ADD" - }, - { - "begin": 172, - "end": 177, - "name": "PUSH [tag]", - "value": "15" - }, - { - "begin": 167, - "end": 171, - "name": "JUMP" - }, - { - "begin": 181, - "end": 184, - "name": "tag", - "value": "35" - }, - { - "begin": 181, - "end": 184, - "name": "JUMPDEST" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP2" - }, - { - "begin": 3, - "end": 189, - "name": "ADD" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "1F" - }, - { - "begin": 3, - "end": 189, - "name": "AND" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "ISZERO" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH [tag]", - "value": "16" - }, - { - "begin": 3, - "end": 189, - "name": "JUMPI" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP3" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "MLOAD" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "1" - }, - { - "begin": 3, - "end": 189, - "name": "DUP4" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "20" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "100" - }, - { - "begin": 3, - "end": 189, - "name": "EXP" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "NOT" - }, - { - "begin": 3, - "end": 189, - "name": "AND" - }, - { - "begin": 3, - "end": 189, - "name": "DUP2" - }, - { - "begin": 3, - "end": 189, - "name": "MSTORE" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "20" - }, - { - "begin": 3, - "end": 189, - "name": "ADD" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP2" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "tag", - "value": "37" - }, - { - "begin": 3, - "end": 189, - "name": "JUMPDEST" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP3" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "POP" - }, - { - "begin": 3, - "end": 189, - "name": "PUSH", - "value": "40" - }, - { - "begin": 3, - "end": 189, - "name": "MLOAD" - }, - { - "begin": 3, - "end": 189, - "name": "DUP1" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP2" - }, - { - "begin": 3, - "end": 189, - "name": "SUB" - }, - { - "begin": 3, - "end": 189, - "name": "SWAP1" - }, - { - "begin": 3, - "end": 189, - "name": "RETURN" - }, - { - "begin": 125, - "end": 535, - "name": "tag", - "value": "9" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPDEST" - }, - { - "begin": 125, - "end": 535, - "name": "CALLVALUE" - }, - { - "begin": 125, - "end": 535, - "name": "ISZERO" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH [tag]", - "value": "38" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPI" - }, - { - "begin": 125, - "end": 535, - "name": "INVALID" - }, - { - "begin": 125, - "end": 535, - "name": "tag", - "value": "38" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPDEST" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH [tag]", - "value": "18" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH", - "value": "4" - }, - { - "begin": 125, - "end": 535, - "name": "CALLDATALOAD" - }, - { - "begin": 125, - "end": 535, - "name": "AND" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH", - "value": "24" - }, - { - "begin": 125, - "end": 535, - "name": "CALLDATALOAD" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH [tag]", - "value": "40" - }, - { - "begin": 125, - "end": 535, - "name": "JUMP" - }, - { - "begin": 125, - "end": 535, - "name": "tag", - "value": "39" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPDEST" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH", - "value": "40" - }, - { - "begin": 125, - "end": 535, - "name": "DUP1" - }, - { - "begin": 125, - "end": 535, - "name": "MLOAD" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP2" - }, - { - "begin": 125, - "end": 535, - "name": "ISZERO" - }, - { - "begin": 125, - "end": 535, - "name": "ISZERO" - }, - { - "begin": 125, - "end": 535, - "name": "DUP3" - }, - { - "begin": 125, - "end": 535, - "name": "MSTORE" - }, - { - "begin": 125, - "end": 535, - "name": "MLOAD" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP1" - }, - { - "begin": 125, - "end": 535, - "name": "DUP2" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP1" - }, - { - "begin": 125, - "end": 535, - "name": "SUB" - }, - { - "begin": 125, - "end": 535, - "name": "PUSH", - "value": "20" - }, - { - "begin": 125, - "end": 535, - "name": "ADD" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP1" - }, - { - "begin": 125, - "end": 535, - "name": "RETURN" - }, - { - "begin": 1280, - "end": 1406, - "name": "tag", - "value": "10" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPDEST" - }, - { - "begin": 1280, - "end": 1406, - "name": "CALLVALUE" - }, - { - "begin": 1280, - "end": 1406, - "name": "ISZERO" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH [tag]", - "value": "41" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPI" - }, - { - "begin": 1280, - "end": 1406, - "name": "INVALID" - }, - { - "begin": 1280, - "end": 1406, - "name": "tag", - "value": "41" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPDEST" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH [tag]", - "value": "21" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH", - "value": "4" - }, - { - "begin": 1280, - "end": 1406, - "name": "CALLDATALOAD" - }, - { - "begin": 1280, - "end": 1406, - "name": "DUP2" - }, - { - "begin": 1280, - "end": 1406, - "name": "AND" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP1" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH", - "value": "24" - }, - { - "begin": 1280, - "end": 1406, - "name": "CALLDATALOAD" - }, - { - "begin": 1280, - "end": 1406, - "name": "AND" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH [tag]", - "value": "43" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMP" - }, - { - "begin": 1280, - "end": 1406, - "name": "tag", - "value": "42" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPDEST" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1280, - "end": 1406, - "name": "DUP1" - }, - { - "begin": 1280, - "end": 1406, - "name": "MLOAD" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP2" - }, - { - "begin": 1280, - "end": 1406, - "name": "DUP3" - }, - { - "begin": 1280, - "end": 1406, - "name": "MSTORE" - }, - { - "begin": 1280, - "end": 1406, - "name": "MLOAD" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP1" - }, - { - "begin": 1280, - "end": 1406, - "name": "DUP2" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP1" - }, - { - "begin": 1280, - "end": 1406, - "name": "SUB" - }, - { - "begin": 1280, - "end": 1406, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1280, - "end": 1406, - "name": "ADD" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP1" - }, - { - "begin": 1280, - "end": 1406, - "name": "RETURN" - }, - { - "begin": 1009, - "end": 1058, - "name": "tag", - "value": "13" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMPDEST" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "MLOAD" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP3" - }, - { - "begin": 1009, - "end": 1058, - "name": "ADD" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP1" - }, - { - "begin": 1009, - "end": 1058, - "name": "SWAP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "MSTORE" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "11" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "MSTORE" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "30782050726F746F636F6C20546F6B656E000000000000000000000000000000" - }, - { - "begin": 1009, - "end": 1058, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP3" - }, - { - "begin": 1009, - "end": 1058, - "name": "ADD" - }, - { - "begin": 1009, - "end": 1058, - "name": "MSTORE" - }, - { - "begin": 1009, - "end": 1058, - "name": "DUP2" - }, - { - "begin": 1009, - "end": 1058, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 1087, - "end": 1274, - "name": "tag", - "value": "19" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPDEST" - }, - { - "begin": 1160, - "end": 1179, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1168, - "end": 1178, - "name": "CALLER" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP2" - }, - { - "begin": 1160, - "end": 1179, - "name": "AND" - }, - { - "begin": 1144, - "end": 1148, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP2" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP2" - }, - { - "begin": 1160, - "end": 1179, - "name": "MSTORE" - }, - { - "begin": 1160, - "end": 1167, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1160, - "end": 1179, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1160, - "end": 1179, - "name": "SWAP1" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP2" - }, - { - "begin": 1160, - "end": 1179, - "name": "MSTORE" - }, - { - "begin": 1160, - "end": 1179, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP1" - }, - { - "begin": 1160, - "end": 1179, - "name": "DUP4" - }, - { - "begin": 1160, - "end": 1179, - "name": "SHA3" - }, - { - "begin": 1160, - "end": 1189, - "name": "SWAP5" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP8" - }, - { - "begin": 1160, - "end": 1189, - "name": "AND" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP1" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP5" - }, - { - "begin": 1160, - "end": 1189, - "name": "MSTORE" - }, - { - "begin": 1160, - "end": 1189, - "name": "SWAP5" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP3" - }, - { - "begin": 1160, - "end": 1189, - "name": "MSTORE" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP1" - }, - { - "begin": 1160, - "end": 1189, - "name": "DUP4" - }, - { - "begin": 1160, - "end": 1189, - "name": "SHA3" - }, - { - "begin": 1160, - "end": 1198, - "name": "DUP7" - }, - { - "begin": 1160, - "end": 1198, - "name": "SWAP1" - }, - { - "begin": 1160, - "end": 1198, - "name": "SSTORE" - }, - { - "begin": 1208, - "end": 1246, - "name": "DUP1" - }, - { - "begin": 1208, - "end": 1246, - "name": "MLOAD" - }, - { - "begin": 1208, - "end": 1246, - "name": "DUP7" - }, - { - "begin": 1208, - "end": 1246, - "name": "DUP2" - }, - { - "begin": 1208, - "end": 1246, - "name": "MSTORE" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP1" - }, - { - "begin": 1208, - "end": 1246, - "name": "MLOAD" - }, - { - "begin": 1144, - "end": 1148, - "name": "SWAP3" - }, - { - "begin": 1144, - "end": 1148, - "name": "SWAP5" - }, - { - "begin": 1160, - "end": 1189, - "name": "SWAP4" - }, - { - "begin": 1160, - "end": 1179, - "name": "SWAP3" - }, - { - "begin": 1208, - "end": 1246, - "name": "PUSH", - "value": "8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP3" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP2" - }, - { - "begin": 1208, - "end": 1246, - "name": "DUP2" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP1" - }, - { - "begin": 1208, - "end": 1246, - "name": "SUB" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP1" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP2" - }, - { - "begin": 1208, - "end": 1246, - "name": "ADD" - }, - { - "begin": 1208, - "end": 1246, - "name": "SWAP1" - }, - { - "begin": 1208, - "end": 1246, - "name": "LOG3" - }, - { - "begin": -1, - "end": -1, - "name": "POP" - }, - { - "begin": 1263, - "end": 1267, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1087, - "end": 1274, - "name": "tag", - "value": "44" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMPDEST" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP3" - }, - { - "begin": 1087, - "end": 1274, - "name": "SWAP2" - }, - { - "begin": 1087, - "end": 1274, - "name": "POP" - }, - { - "begin": 1087, - "end": 1274, - "name": "POP" - }, - { - "begin": 1087, - "end": 1274, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 932, - "end": 964, - "name": "tag", - "value": "22" - }, - { - "begin": 932, - "end": 964, - "name": "JUMPDEST" - }, - { - "begin": 932, - "end": 964, - "name": "PUSH", - "value": "3" - }, - { - "begin": 932, - "end": 964, - "name": "SLOAD" - }, - { - "begin": 932, - "end": 964, - "name": "DUP2" - }, - { - "begin": 932, - "end": 964, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 1066, - "end": 1675, - "name": "tag", - "value": "25" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPDEST" - }, - { - "begin": 1198, - "end": 1212, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP1" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP5" - }, - { - "begin": 1198, - "end": 1212, - "name": "AND" - }, - { - "begin": 1161, - "end": 1165, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP2" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP2" - }, - { - "begin": 1198, - "end": 1212, - "name": "MSTORE" - }, - { - "begin": 1198, - "end": 1205, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1198, - "end": 1212, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1198, - "end": 1212, - "name": "SWAP1" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP2" - }, - { - "begin": 1198, - "end": 1212, - "name": "MSTORE" - }, - { - "begin": 1198, - "end": 1212, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP1" - }, - { - "begin": 1198, - "end": 1212, - "name": "DUP4" - }, - { - "begin": 1198, - "end": 1212, - "name": "SHA3" - }, - { - "begin": 1213, - "end": 1223, - "name": "CALLER" - }, - { - "begin": 1198, - "end": 1224, - "name": "SWAP1" - }, - { - "begin": 1198, - "end": 1224, - "name": "SWAP6" - }, - { - "begin": 1198, - "end": 1224, - "name": "AND" - }, - { - "begin": 1198, - "end": 1224, - "name": "DUP4" - }, - { - "begin": 1198, - "end": 1224, - "name": "MSTORE" - }, - { - "begin": 1198, - "end": 1224, - "name": "SWAP4" - }, - { - "begin": 1198, - "end": 1224, - "name": "DUP2" - }, - { - "begin": 1198, - "end": 1224, - "name": "MSTORE" - }, - { - "begin": 1198, - "end": 1224, - "name": "DUP4" - }, - { - "begin": 1198, - "end": 1224, - "name": "DUP3" - }, - { - "begin": 1198, - "end": 1224, - "name": "SHA3" - }, - { - "begin": 1198, - "end": 1224, - "name": "SLOAD" - }, - { - "begin": 1238, - "end": 1253, - "name": "SWAP3" - }, - { - "begin": 1238, - "end": 1253, - "name": "DUP3" - }, - { - "begin": 1238, - "end": 1253, - "name": "MSTORE" - }, - { - "begin": 1238, - "end": 1253, - "name": "DUP2" - }, - { - "begin": 1238, - "end": 1253, - "name": "SWAP1" - }, - { - "begin": 1238, - "end": 1253, - "name": "MSTORE" - }, - { - "begin": 1238, - "end": 1253, - "name": "SWAP2" - }, - { - "begin": 1238, - "end": 1253, - "name": "DUP3" - }, - { - "begin": 1238, - "end": 1253, - "name": "SHA3" - }, - { - "begin": 1238, - "end": 1253, - "name": "SLOAD" - }, - { - "begin": 1238, - "end": 1263, - "name": "DUP4" - }, - { - "begin": 1238, - "end": 1263, - "name": "SWAP1" - }, - { - "begin": 1238, - "end": 1263, - "name": "LT" - }, - { - "begin": 1238, - "end": 1263, - "name": "DUP1" - }, - { - "begin": 1238, - "end": 1263, - "name": "ISZERO" - }, - { - "begin": 1238, - "end": 1263, - "name": "SWAP1" - }, - { - "begin": 1238, - "end": 1298, - "name": "PUSH [tag]", - "value": "46" - }, - { - "begin": 1238, - "end": 1298, - "name": "JUMPI" - }, - { - "begin": 1238, - "end": 1298, - "name": "POP" - }, - { - "begin": 1292, - "end": 1298, - "name": "DUP3" - }, - { - "begin": 1279, - "end": 1288, - "name": "DUP2" - }, - { - "begin": 1279, - "end": 1298, - "name": "LT" - }, - { - "begin": 1279, - "end": 1298, - "name": "ISZERO" - }, - { - "begin": 1238, - "end": 1298, - "name": "tag", - "value": "46" - }, - { - "begin": 1238, - "end": 1298, - "name": "JUMPDEST" - }, - { - "begin": 1238, - "end": 1353, - "name": "DUP1" - }, - { - "begin": 1238, - "end": 1353, - "name": "ISZERO" - }, - { - "begin": 1238, - "end": 1353, - "name": "PUSH [tag]", - "value": "47" - }, - { - "begin": 1238, - "end": 1353, - "name": "JUMPI" - }, - { - "begin": -1, - "end": -1, - "name": "POP" - }, - { - "begin": 1340, - "end": 1353, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1340, - "end": 1353, - "name": "DUP5" - }, - { - "begin": 1340, - "end": 1353, - "name": "AND" - }, - { - "begin": 1340, - "end": 1348, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1340, - "end": 1353, - "name": "SWAP1" - }, - { - "begin": 1340, - "end": 1353, - "name": "DUP2" - }, - { - "begin": 1340, - "end": 1353, - "name": "MSTORE" - }, - { - "begin": 1340, - "end": 1353, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1340, - "end": 1353, - "name": "DUP2" - }, - { - "begin": 1340, - "end": 1353, - "name": "SWAP1" - }, - { - "begin": 1340, - "end": 1353, - "name": "MSTORE" - }, - { - "begin": 1340, - "end": 1353, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1340, - "end": 1353, - "name": "SWAP1" - }, - { - "begin": 1340, - "end": 1353, - "name": "SHA3" - }, - { - "begin": 1340, - "end": 1353, - "name": "SLOAD" - }, - { - "begin": 1314, - "end": 1336, - "name": "DUP4" - }, - { - "begin": 1314, - "end": 1336, - "name": "DUP2" - }, - { - "begin": 1314, - "end": 1336, - "name": "ADD" - }, - { - "begin": 1314, - "end": 1353, - "name": "LT" - }, - { - "begin": 1314, - "end": 1353, - "name": "ISZERO" - }, - { - "begin": 1238, - "end": 1353, - "name": "tag", - "value": "47" - }, - { - "begin": 1238, - "end": 1353, - "name": "JUMPDEST" - }, - { - "begin": 1234, - "end": 1669, - "name": "ISZERO" - }, - { - "begin": 1234, - "end": 1669, - "name": "PUSH [tag]", - "value": "48" - }, - { - "begin": 1234, - "end": 1669, - "name": "JUMPI" - }, - { - "begin": 1378, - "end": 1391, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP1" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP6" - }, - { - "begin": 1378, - "end": 1391, - "name": "AND" - }, - { - "begin": 1378, - "end": 1386, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1378, - "end": 1391, - "name": "SWAP1" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP2" - }, - { - "begin": 1378, - "end": 1391, - "name": "MSTORE" - }, - { - "begin": 1378, - "end": 1391, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP2" - }, - { - "begin": 1378, - "end": 1391, - "name": "SWAP1" - }, - { - "begin": 1378, - "end": 1391, - "name": "MSTORE" - }, - { - "begin": 1378, - "end": 1391, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP1" - }, - { - "begin": 1378, - "end": 1391, - "name": "DUP3" - }, - { - "begin": 1378, - "end": 1391, - "name": "SHA3" - }, - { - "begin": 1378, - "end": 1401, - "name": "DUP1" - }, - { - "begin": 1378, - "end": 1401, - "name": "SLOAD" - }, - { - "begin": 1378, - "end": 1401, - "name": "DUP8" - }, - { - "begin": 1378, - "end": 1401, - "name": "ADD" - }, - { - "begin": 1378, - "end": 1401, - "name": "SWAP1" - }, - { - "begin": 1378, - "end": 1401, - "name": "SSTORE" - }, - { - "begin": 1415, - "end": 1430, - "name": "SWAP2" - }, - { - "begin": 1415, - "end": 1430, - "name": "DUP8" - }, - { - "begin": 1415, - "end": 1430, - "name": "AND" - }, - { - "begin": 1415, - "end": 1430, - "name": "DUP2" - }, - { - "begin": 1415, - "end": 1430, - "name": "MSTORE" - }, - { - "begin": 1415, - "end": 1430, - "name": "SHA3" - }, - { - "begin": 1415, - "end": 1440, - "name": "DUP1" - }, - { - "begin": 1415, - "end": 1440, - "name": "SLOAD" - }, - { - "begin": 1415, - "end": 1440, - "name": "DUP5" - }, - { - "begin": 1415, - "end": 1440, - "name": "SWAP1" - }, - { - "begin": 1415, - "end": 1440, - "name": "SUB" - }, - { - "begin": 1415, - "end": 1440, - "name": "SWAP1" - }, - { - "begin": 1415, - "end": 1440, - "name": "SSTORE" - }, - { - "begin": 768, - "end": 778, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1458, - "end": 1478, - "name": "DUP2" - }, - { - "begin": 1458, - "end": 1478, - "name": "LT" - }, - { - "begin": 1454, - "end": 1549, - "name": "ISZERO" - }, - { - "begin": 1454, - "end": 1549, - "name": "PUSH [tag]", - "value": "49" - }, - { - "begin": 1454, - "end": 1549, - "name": "JUMPI" - }, - { - "begin": 1498, - "end": 1512, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP1" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP7" - }, - { - "begin": 1498, - "end": 1512, - "name": "AND" - }, - { - "begin": 1498, - "end": 1512, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1498, - "end": 1512, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP2" - }, - { - "begin": 1498, - "end": 1512, - "name": "MSTORE" - }, - { - "begin": 1498, - "end": 1505, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1498, - "end": 1512, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1498, - "end": 1512, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP2" - }, - { - "begin": 1498, - "end": 1512, - "name": "MSTORE" - }, - { - "begin": 1498, - "end": 1512, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP1" - }, - { - "begin": 1498, - "end": 1512, - "name": "DUP4" - }, - { - "begin": 1498, - "end": 1512, - "name": "SHA3" - }, - { - "begin": 1513, - "end": 1523, - "name": "CALLER" - }, - { - "begin": 1498, - "end": 1524, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1524, - "name": "SWAP5" - }, - { - "begin": 1498, - "end": 1524, - "name": "AND" - }, - { - "begin": 1498, - "end": 1524, - "name": "DUP4" - }, - { - "begin": 1498, - "end": 1524, - "name": "MSTORE" - }, - { - "begin": 1498, - "end": 1524, - "name": "SWAP3" - }, - { - "begin": 1498, - "end": 1524, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1524, - "name": "MSTORE" - }, - { - "begin": 1498, - "end": 1524, - "name": "SHA3" - }, - { - "begin": 1498, - "end": 1534, - "name": "DUP1" - }, - { - "begin": 1498, - "end": 1534, - "name": "SLOAD" - }, - { - "begin": 1498, - "end": 1534, - "name": "DUP5" - }, - { - "begin": 1498, - "end": 1534, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1534, - "name": "SUB" - }, - { - "begin": 1498, - "end": 1534, - "name": "SWAP1" - }, - { - "begin": 1498, - "end": 1534, - "name": "SSTORE" - }, - { - "begin": 1454, - "end": 1549, - "name": "tag", - "value": "49" - }, - { - "begin": 1454, - "end": 1549, - "name": "JUMPDEST" - }, - { - "begin": 1578, - "end": 1581, - "name": "DUP4" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1562, - "end": 1590, - "name": "AND" - }, - { - "begin": 1571, - "end": 1576, - "name": "DUP6" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1562, - "end": 1590, - "name": "AND" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF" - }, - { - "begin": 1583, - "end": 1589, - "name": "DUP6" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1562, - "end": 1590, - "name": "MLOAD" - }, - { - "begin": 1562, - "end": 1590, - "name": "DUP1" - }, - { - "begin": 1562, - "end": 1590, - "name": "DUP3" - }, - { - "begin": 1562, - "end": 1590, - "name": "DUP2" - }, - { - "begin": 1562, - "end": 1590, - "name": "MSTORE" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1562, - "end": 1590, - "name": "ADD" - }, - { - "begin": 1562, - "end": 1590, - "name": "SWAP2" - }, - { - "begin": 1562, - "end": 1590, - "name": "POP" - }, - { - "begin": 1562, - "end": 1590, - "name": "POP" - }, - { - "begin": 1562, - "end": 1590, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1562, - "end": 1590, - "name": "MLOAD" - }, - { - "begin": 1562, - "end": 1590, - "name": "DUP1" - }, - { - "begin": 1562, - "end": 1590, - "name": "SWAP2" - }, - { - "begin": 1562, - "end": 1590, - "name": "SUB" - }, - { - "begin": 1562, - "end": 1590, - "name": "SWAP1" - }, - { - "begin": 1562, - "end": 1590, - "name": "LOG3" - }, - { - "begin": 1611, - "end": 1615, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1604, - "end": 1615, - "name": "SWAP2" - }, - { - "begin": 1604, - "end": 1615, - "name": "POP" - }, - { - "begin": 1604, - "end": 1615, - "name": "PUSH [tag]", - "value": "50" - }, - { - "begin": 1604, - "end": 1615, - "name": "JUMP" - }, - { - "begin": 1234, - "end": 1669, - "name": "tag", - "value": "48" - }, - { - "begin": 1234, - "end": 1669, - "name": "JUMPDEST" - }, - { - "begin": 1653, - "end": 1658, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1646, - "end": 1658, - "name": "SWAP2" - }, - { - "begin": 1646, - "end": 1658, - "name": "POP" - }, - { - "begin": 1234, - "end": 1669, - "name": "tag", - "value": "50" - }, - { - "begin": 1234, - "end": 1669, - "name": "JUMPDEST" - }, - { - "begin": 1066, - "end": 1675, - "name": "tag", - "value": "45" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMPDEST" - }, - { - "begin": 1066, - "end": 1675, - "name": "POP" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP4" - }, - { - "begin": 1066, - "end": 1675, - "name": "SWAP3" - }, - { - "begin": 1066, - "end": 1675, - "name": "POP" - }, - { - "begin": 1066, - "end": 1675, - "name": "POP" - }, - { - "begin": 1066, - "end": 1675, - "name": "POP" - }, - { - "begin": 1066, - "end": 1675, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 891, - "end": 926, - "name": "tag", - "value": "28" - }, - { - "begin": 891, - "end": 926, - "name": "JUMPDEST" - }, - { - "begin": 924, - "end": 926, - "name": "PUSH", - "value": "12" - }, - { - "begin": 891, - "end": 926, - "name": "DUP2" - }, - { - "begin": 891, - "end": 926, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 982, - "end": 1081, - "name": "tag", - "value": "31" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPDEST" - }, - { - "begin": 1058, - "end": 1074, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1058, - "end": 1074, - "name": "DUP2" - }, - { - "begin": 1058, - "end": 1074, - "name": "AND" - }, - { - "begin": 1035, - "end": 1039, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1058, - "end": 1074, - "name": "SWAP1" - }, - { - "begin": 1058, - "end": 1074, - "name": "DUP2" - }, - { - "begin": 1058, - "end": 1074, - "name": "MSTORE" - }, - { - "begin": 1058, - "end": 1074, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1058, - "end": 1074, - "name": "DUP2" - }, - { - "begin": 1058, - "end": 1074, - "name": "SWAP1" - }, - { - "begin": 1058, - "end": 1074, - "name": "MSTORE" - }, - { - "begin": 1058, - "end": 1074, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1058, - "end": 1074, - "name": "SWAP1" - }, - { - "begin": 1058, - "end": 1074, - "name": "SHA3" - }, - { - "begin": 1058, - "end": 1074, - "name": "SLOAD" - }, - { - "begin": 982, - "end": 1081, - "name": "tag", - "value": "51" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMPDEST" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP2" - }, - { - "begin": 982, - "end": 1081, - "name": "SWAP1" - }, - { - "begin": 982, - "end": 1081, - "name": "POP" - }, - { - "begin": 982, - "end": 1081, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 1064, - "end": 1101, - "name": "tag", - "value": "34" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMPDEST" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "MLOAD" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP3" - }, - { - "begin": 1064, - "end": 1101, - "name": "ADD" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP1" - }, - { - "begin": 1064, - "end": 1101, - "name": "SWAP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "MSTORE" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "3" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "MSTORE" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "5A52580000000000000000000000000000000000000000000000000000000000" - }, - { - "begin": 1064, - "end": 1101, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP3" - }, - { - "begin": 1064, - "end": 1101, - "name": "ADD" - }, - { - "begin": 1064, - "end": 1101, - "name": "MSTORE" - }, - { - "begin": 1064, - "end": 1101, - "name": "DUP2" - }, - { - "begin": 1064, - "end": 1101, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 125, - "end": 535, - "name": "tag", - "value": "40" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPDEST" - }, - { - "begin": 267, - "end": 287, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 276, - "end": 286, - "name": "CALLER" - }, - { - "begin": 267, - "end": 287, - "name": "AND" - }, - { - "begin": 178, - "end": 182, - "name": "PUSH", - "value": "0" - }, - { - "begin": 267, - "end": 287, - "name": "SWAP1" - }, - { - "begin": 267, - "end": 287, - "name": "DUP2" - }, - { - "begin": 267, - "end": 287, - "name": "MSTORE" - }, - { - "begin": 267, - "end": 287, - "name": "PUSH", - "value": "20" - }, - { - "begin": 267, - "end": 287, - "name": "DUP2" - }, - { - "begin": 267, - "end": 287, - "name": "SWAP1" - }, - { - "begin": 267, - "end": 287, - "name": "MSTORE" - }, - { - "begin": 267, - "end": 287, - "name": "PUSH", - "value": "40" - }, - { - "begin": 267, - "end": 287, - "name": "DUP2" - }, - { - "begin": 267, - "end": 287, - "name": "SHA3" - }, - { - "begin": 267, - "end": 287, - "name": "SLOAD" - }, - { - "begin": 267, - "end": 297, - "name": "DUP3" - }, - { - "begin": 267, - "end": 297, - "name": "SWAP1" - }, - { - "begin": 267, - "end": 297, - "name": "LT" - }, - { - "begin": 267, - "end": 297, - "name": "DUP1" - }, - { - "begin": 267, - "end": 297, - "name": "ISZERO" - }, - { - "begin": 267, - "end": 297, - "name": "SWAP1" - }, - { - "begin": 267, - "end": 340, - "name": "PUSH [tag]", - "value": "53" - }, - { - "begin": 267, - "end": 340, - "name": "JUMPI" - }, - { - "begin": -1, - "end": -1, - "name": "POP" - }, - { - "begin": 327, - "end": 340, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 327, - "end": 340, - "name": "DUP4" - }, - { - "begin": 327, - "end": 340, - "name": "AND" - }, - { - "begin": 327, - "end": 335, - "name": "PUSH", - "value": "0" - }, - { - "begin": 327, - "end": 340, - "name": "SWAP1" - }, - { - "begin": 327, - "end": 340, - "name": "DUP2" - }, - { - "begin": 327, - "end": 340, - "name": "MSTORE" - }, - { - "begin": 327, - "end": 340, - "name": "PUSH", - "value": "20" - }, - { - "begin": 327, - "end": 340, - "name": "DUP2" - }, - { - "begin": 327, - "end": 340, - "name": "SWAP1" - }, - { - "begin": 327, - "end": 340, - "name": "MSTORE" - }, - { - "begin": 327, - "end": 340, - "name": "PUSH", - "value": "40" - }, - { - "begin": 327, - "end": 340, - "name": "SWAP1" - }, - { - "begin": 327, - "end": 340, - "name": "SHA3" - }, - { - "begin": 327, - "end": 340, - "name": "SLOAD" - }, - { - "begin": 301, - "end": 323, - "name": "DUP3" - }, - { - "begin": 301, - "end": 323, - "name": "DUP2" - }, - { - "begin": 301, - "end": 323, - "name": "ADD" - }, - { - "begin": 301, - "end": 340, - "name": "LT" - }, - { - "begin": 301, - "end": 340, - "name": "ISZERO" - }, - { - "begin": 267, - "end": 340, - "name": "tag", - "value": "53" - }, - { - "begin": 267, - "end": 340, - "name": "JUMPDEST" - }, - { - "begin": 263, - "end": 529, - "name": "ISZERO" - }, - { - "begin": 263, - "end": 529, - "name": "PUSH [tag]", - "value": "54" - }, - { - "begin": 263, - "end": 529, - "name": "JUMPI" - }, - { - "begin": 356, - "end": 376, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 365, - "end": 375, - "name": "CALLER" - }, - { - "begin": 356, - "end": 376, - "name": "DUP2" - }, - { - "begin": 356, - "end": 376, - "name": "AND" - }, - { - "begin": 356, - "end": 364, - "name": "PUSH", - "value": "0" - }, - { - "begin": 356, - "end": 376, - "name": "DUP2" - }, - { - "begin": 356, - "end": 376, - "name": "DUP2" - }, - { - "begin": 356, - "end": 376, - "name": "MSTORE" - }, - { - "begin": 356, - "end": 376, - "name": "PUSH", - "value": "20" - }, - { - "begin": 356, - "end": 376, - "name": "DUP2" - }, - { - "begin": 356, - "end": 376, - "name": "DUP2" - }, - { - "begin": 356, - "end": 376, - "name": "MSTORE" - }, - { - "begin": 356, - "end": 376, - "name": "PUSH", - "value": "40" - }, - { - "begin": 356, - "end": 376, - "name": "DUP1" - }, - { - "begin": 356, - "end": 376, - "name": "DUP4" - }, - { - "begin": 356, - "end": 376, - "name": "SHA3" - }, - { - "begin": 356, - "end": 386, - "name": "DUP1" - }, - { - "begin": 356, - "end": 386, - "name": "SLOAD" - }, - { - "begin": 356, - "end": 386, - "name": "DUP9" - }, - { - "begin": 356, - "end": 386, - "name": "SWAP1" - }, - { - "begin": 356, - "end": 386, - "name": "SUB" - }, - { - "begin": 356, - "end": 386, - "name": "SWAP1" - }, - { - "begin": 356, - "end": 386, - "name": "SSTORE" - }, - { - "begin": 400, - "end": 413, - "name": "SWAP4" - }, - { - "begin": 400, - "end": 413, - "name": "DUP8" - }, - { - "begin": 400, - "end": 413, - "name": "AND" - }, - { - "begin": 400, - "end": 413, - "name": "DUP1" - }, - { - "begin": 400, - "end": 413, - "name": "DUP4" - }, - { - "begin": 400, - "end": 413, - "name": "MSTORE" - }, - { - "begin": 400, - "end": 413, - "name": "SWAP2" - }, - { - "begin": 400, - "end": 413, - "name": "DUP5" - }, - { - "begin": 400, - "end": 413, - "name": "SWAP1" - }, - { - "begin": 400, - "end": 413, - "name": "SHA3" - }, - { - "begin": 400, - "end": 423, - "name": "DUP1" - }, - { - "begin": 400, - "end": 423, - "name": "SLOAD" - }, - { - "begin": 400, - "end": 423, - "name": "DUP8" - }, - { - "begin": 400, - "end": 423, - "name": "ADD" - }, - { - "begin": 400, - "end": 423, - "name": "SWAP1" - }, - { - "begin": 400, - "end": 423, - "name": "SSTORE" - }, - { - "begin": 437, - "end": 470, - "name": "DUP4" - }, - { - "begin": 437, - "end": 470, - "name": "MLOAD" - }, - { - "begin": 437, - "end": 470, - "name": "DUP7" - }, - { - "begin": 437, - "end": 470, - "name": "DUP2" - }, - { - "begin": 437, - "end": 470, - "name": "MSTORE" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP4" - }, - { - "begin": 437, - "end": 470, - "name": "MLOAD" - }, - { - "begin": 400, - "end": 413, - "name": "SWAP2" - }, - { - "begin": 400, - "end": 413, - "name": "SWAP4" - }, - { - "begin": 437, - "end": 470, - "name": "PUSH", - "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP3" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP1" - }, - { - "begin": 437, - "end": 470, - "name": "DUP2" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP1" - }, - { - "begin": 437, - "end": 470, - "name": "SUB" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP1" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP2" - }, - { - "begin": 437, - "end": 470, - "name": "ADD" - }, - { - "begin": 437, - "end": 470, - "name": "SWAP1" - }, - { - "begin": 437, - "end": 470, - "name": "LOG3" - }, - { - "begin": -1, - "end": -1, - "name": "POP" - }, - { - "begin": 491, - "end": 495, - "name": "PUSH", - "value": "1" - }, - { - "begin": 484, - "end": 495, - "name": "PUSH [tag]", - "value": "44" - }, - { - "begin": 484, - "end": 495, - "name": "JUMP" - }, - { - "begin": 263, - "end": 529, - "name": "tag", - "value": "54" - }, - { - "begin": 263, - "end": 529, - "name": "JUMPDEST" - }, - { - "begin": -1, - "end": -1, - "name": "POP" - }, - { - "begin": 521, - "end": 526, - "name": "PUSH", - "value": "0" - }, - { - "begin": 514, - "end": 526, - "name": "PUSH [tag]", - "value": "44" - }, - { - "begin": 514, - "end": 526, - "name": "JUMP" - }, - { - "begin": 263, - "end": 529, - "name": "tag", - "value": "55" - }, - { - "begin": 263, - "end": 529, - "name": "JUMPDEST" - }, - { - "begin": 125, - "end": 535, - "name": "tag", - "value": "52" - }, - { - "begin": 125, - "end": 535, - "name": "JUMPDEST" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP3" - }, - { - "begin": 125, - "end": 535, - "name": "SWAP2" - }, - { - "begin": 125, - "end": 535, - "name": "POP" - }, - { - "begin": 125, - "end": 535, - "name": "POP" - }, - { - "begin": 125, - "end": 535, - "name": "JUMP", - "value": "[out]" - }, - { - "begin": 1280, - "end": 1406, - "name": "tag", - "value": "43" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPDEST" - }, - { - "begin": 1374, - "end": 1389, - "name": "PUSH", - "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP1" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP4" - }, - { - "begin": 1374, - "end": 1389, - "name": "AND" - }, - { - "begin": 1351, - "end": 1355, - "name": "PUSH", - "value": "0" - }, - { - "begin": 1374, - "end": 1389, - "name": "SWAP1" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP2" - }, - { - "begin": 1374, - "end": 1389, - "name": "MSTORE" - }, - { - "begin": 1374, - "end": 1381, - "name": "PUSH", - "value": "1" - }, - { - "begin": 1374, - "end": 1389, - "name": "PUSH", - "value": "20" - }, - { - "begin": 1374, - "end": 1389, - "name": "SWAP1" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP2" - }, - { - "begin": 1374, - "end": 1389, - "name": "MSTORE" - }, - { - "begin": 1374, - "end": 1389, - "name": "PUSH", - "value": "40" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP1" - }, - { - "begin": 1374, - "end": 1389, - "name": "DUP4" - }, - { - "begin": 1374, - "end": 1389, - "name": "SHA3" - }, - { - "begin": 1374, - "end": 1399, - "name": "SWAP4" - }, - { - "begin": 1374, - "end": 1399, - "name": "DUP6" - }, - { - "begin": 1374, - "end": 1399, - "name": "AND" - }, - { - "begin": 1374, - "end": 1399, - "name": "DUP4" - }, - { - "begin": 1374, - "end": 1399, - "name": "MSTORE" - }, - { - "begin": 1374, - "end": 1399, - "name": "SWAP3" - }, - { - "begin": 1374, - "end": 1399, - "name": "SWAP1" - }, - { - "begin": 1374, - "end": 1399, - "name": "MSTORE" - }, - { - "begin": 1374, - "end": 1399, - "name": "SHA3" - }, - { - "begin": 1374, - "end": 1399, - "name": "SLOAD" - }, - { - "begin": 1280, - "end": 1406, - "name": "tag", - "value": "56" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMPDEST" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP3" - }, - { - "begin": 1280, - "end": 1406, - "name": "SWAP2" - }, - { - "begin": 1280, - "end": 1406, - "name": "POP" - }, - { - "begin": 1280, - "end": 1406, - "name": "POP" - }, - { - "begin": 1280, - "end": 1406, - "name": "JUMP", - "value": "[out]" - } - ] - } - } - }, - "methodIdentifiers": { - "allowance(address,address)": "dd62ed3e", - "approve(address,uint256)": "095ea7b3", - "balanceOf(address)": "70a08231", - "decimals()": "313ce567", - "name()": "06fdde03", - "symbol()": "95d89b41", - "totalSupply()": "18160ddd", - "transfer(address,uint256)": "a9059cbb", - "transferFrom(address,address,uint256)": "23b872dd" - } - }, - "metadata": "{\"compiler\":{\"version\":\"0.4.11+commit.68ef5810\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"transferFrom(address,address,uint256)\":{\"details\":\"ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\",\"params\":{\"_from\":\"Address to transfer from.\",\"_to\":\"Address to transfer to.\",\"_value\":\"Amount to transfer.\"},\"return\":\"Success of transfer.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":\"ZRXToken\"},\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"1.0.0/ERC20Token/ERC20Token_v1.sol\":{\"keccak256\":\"0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d\",\"urls\":[\"bzzr://d12710a563415ad98ff28ecb3aab0b68467b3d023e7c130c73ed9918ef86158e\"]},\"1.0.0/Token/Token_v1.sol\":{\"keccak256\":\"0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37\",\"urls\":[\"bzzr://a62ae857a4cf2e8948e36d02470c612ac1a5ac20ebe1c1b553ad1ed8becb634e\"]},\"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":{\"keccak256\":\"0x2e1f4b899081cedd8940a9cd0f0f7413264c883312ed0ba9c53885766fe0a1a5\",\"urls\":[\"bzzr://47c42a58e56ffe81e49c8aabd3c391f5fa807fea299b3a2178501e3669baeb52\"]},\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":{\"keccak256\":\"0x9eeb623d48909b083c77688b13b610811c53e37622b3fcbaa23c01873230f5d6\",\"urls\":[\"bzzr://84f3b5c2653068092771d443281018ff2ee0543817426d0fb6f9037a3570e37f\"]}},\"version\":1}", - "userdoc": { - "methods": {} - } - }, - "sources": { - "1.0.0/ERC20Token/ERC20Token_v1.sol": { - "id": 0, - "legacyAST": { - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "^", - "0.4", - ".11" - ] - }, - "id": 126, - "name": "PragmaDirective", - "src": "0:24:0" - }, - { - "attributes": { - "file": "../Token/Token_v1.sol" - }, - "id": 128, - "name": "ImportDirective", - "src": "26:58:0" - }, - { - "attributes": { - "fullyImplemented": true, - "isLibrary": false, - "linearizedBaseContracts": [ - 322, - 397 - ], - "name": "ERC20Token_v1" - }, - "children": [ - { - "children": [ - { - "attributes": { - "name": "Token" - }, - "id": 129, - "name": "UserDefinedTypeName", - "src": "112:5:0" - } - ], - "id": 130, - "name": "InheritanceSpecifier", - "src": "112:5:0" - }, - { - "attributes": { - "constant": false, - "name": "transfer", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 131, - "name": "ElementaryTypeName", - "src": "143:7:0" - } - ], - "id": 132, - "name": "VariableDeclaration", - "src": "143:11:0" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 133, - "name": "ElementaryTypeName", - "src": "156:4:0" - } - ], - "id": 134, - "name": "VariableDeclaration", - "src": "156:11:0" - } - ], - "id": 135, - "name": "ParameterList", - "src": "142:26:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 136, - "name": "ElementaryTypeName", - "src": "178:4:0" - } - ], - "id": 137, - "name": "VariableDeclaration", - "src": "178:4:0" - } - ], - "id": 138, - "name": "ParameterList", - "src": "177:6:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 139, - "name": "Identifier", - "src": "267:8:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 140, - "name": "Identifier", - "src": "276:3:0" - } - ], - "id": 141, - "name": "MemberAccess", - "src": "276:10:0" - } - ], - "id": 142, - "name": "IndexAccess", - "src": "267:20:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 143, - "name": "Identifier", - "src": "291:6:0" - } - ], - "id": 144, - "name": "BinaryOperation", - "src": "267:30:0" - }, - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 145, - "name": "Identifier", - "src": "301:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 146, - "name": "Identifier", - "src": "310:3:0" - } - ], - "id": 147, - "name": "IndexAccess", - "src": "301:13:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 148, - "name": "Identifier", - "src": "317:6:0" - } - ], - "id": 149, - "name": "BinaryOperation", - "src": "301:22:0" - }, - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 150, - "name": "Identifier", - "src": "327:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 151, - "name": "Identifier", - "src": "336:3:0" - } - ], - "id": 152, - "name": "IndexAccess", - "src": "327:13:0" - } - ], - "id": 153, - "name": "BinaryOperation", - "src": "301:39:0" - } - ], - "id": 154, - "name": "BinaryOperation", - "src": "267:73:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "-=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 155, - "name": "Identifier", - "src": "356:8:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 156, - "name": "Identifier", - "src": "365:3:0" - } - ], - "id": 157, - "name": "MemberAccess", - "src": "365:10:0" - } - ], - "id": 158, - "name": "IndexAccess", - "src": "356:20:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 159, - "name": "Identifier", - "src": "380:6:0" - } - ], - "id": 160, - "name": "Assignment", - "src": "356:30:0" - } - ], - "id": 161, - "name": "ExpressionStatement", - "src": "356:30:0" - }, - { - "children": [ - { - "attributes": { - "operator": "+=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 162, - "name": "Identifier", - "src": "400:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 163, - "name": "Identifier", - "src": "409:3:0" - } - ], - "id": 164, - "name": "IndexAccess", - "src": "400:13:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 165, - "name": "Identifier", - "src": "417:6:0" - } - ], - "id": 166, - "name": "Assignment", - "src": "400:23:0" - } - ], - "id": 167, - "name": "ExpressionStatement", - "src": "400:23:0" - }, - { - "children": [ - { - "attributes": { - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "type": "function (address,address,uint256) constant", - "value": "Transfer" - }, - "id": 168, - "name": "Identifier", - "src": "437:8:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 169, - "name": "Identifier", - "src": "446:3:0" - } - ], - "id": 170, - "name": "MemberAccess", - "src": "446:10:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 171, - "name": "Identifier", - "src": "458:3:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 172, - "name": "Identifier", - "src": "463:6:0" - } - ], - "id": 173, - "name": "FunctionCall", - "src": "437:33:0" - } - ], - "id": 174, - "name": "ExpressionStatement", - "src": "437:33:0" - }, - { - "children": [ - { - "attributes": { - "hexvalue": "74727565", - "subdenomination": null, - "token": "true", - "type": "bool", - "value": "true" - }, - "id": 175, - "name": "Literal", - "src": "491:4:0" - } - ], - "id": 176, - "name": "Return", - "src": "484:11:0" - } - ], - "id": 177, - "name": "Block", - "src": "342:164:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "hexvalue": "66616c7365", - "subdenomination": null, - "token": "false", - "type": "bool", - "value": "false" - }, - "id": 178, - "name": "Literal", - "src": "521:5:0" - } - ], - "id": 179, - "name": "Return", - "src": "514:12:0" - } - ], - "id": 180, - "name": "Block", - "src": "512:17:0" - } - ], - "id": 181, - "name": "IfStatement", - "src": "263:266:0" - } - ], - "id": 182, - "name": "Block", - "src": "184:351:0" - } - ], - "id": 183, - "name": "FunctionDefinition", - "src": "125:410:0" - }, - { - "attributes": { - "constant": false, - "name": "transferFrom", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_from", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 184, - "name": "ElementaryTypeName", - "src": "563:7:0" - } - ], - "id": 185, - "name": "VariableDeclaration", - "src": "563:13:0" - }, - { - "attributes": { - "constant": false, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 186, - "name": "ElementaryTypeName", - "src": "578:7:0" - } - ], - "id": 187, - "name": "VariableDeclaration", - "src": "578:11:0" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 188, - "name": "ElementaryTypeName", - "src": "591:4:0" - } - ], - "id": 189, - "name": "VariableDeclaration", - "src": "591:11:0" - } - ], - "id": 190, - "name": "ParameterList", - "src": "562:41:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 191, - "name": "ElementaryTypeName", - "src": "613:4:0" - } - ], - "id": 192, - "name": "VariableDeclaration", - "src": "613:4:0" - } - ], - "id": 193, - "name": "ParameterList", - "src": "612:6:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 194, - "name": "Identifier", - "src": "633:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 195, - "name": "Identifier", - "src": "642:5:0" - } - ], - "id": 196, - "name": "IndexAccess", - "src": "633:15:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 197, - "name": "Identifier", - "src": "652:6:0" - } - ], - "id": 198, - "name": "BinaryOperation", - "src": "633:25:0" - }, - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 199, - "name": "Identifier", - "src": "662:7:0" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 200, - "name": "Identifier", - "src": "670:5:0" - } - ], - "id": 201, - "name": "IndexAccess", - "src": "662:14:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 202, - "name": "Identifier", - "src": "677:3:0" - } - ], - "id": 203, - "name": "MemberAccess", - "src": "677:10:0" - } - ], - "id": 204, - "name": "IndexAccess", - "src": "662:26:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 205, - "name": "Identifier", - "src": "692:6:0" - } - ], - "id": 206, - "name": "BinaryOperation", - "src": "662:36:0" - } - ], - "id": 207, - "name": "BinaryOperation", - "src": "633:65:0" - }, - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 208, - "name": "Identifier", - "src": "702:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 209, - "name": "Identifier", - "src": "711:3:0" - } - ], - "id": 210, - "name": "IndexAccess", - "src": "702:13:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 211, - "name": "Identifier", - "src": "718:6:0" - } - ], - "id": 212, - "name": "BinaryOperation", - "src": "702:22:0" - }, - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 213, - "name": "Identifier", - "src": "728:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 214, - "name": "Identifier", - "src": "737:3:0" - } - ], - "id": 215, - "name": "IndexAccess", - "src": "728:13:0" - } - ], - "id": 216, - "name": "BinaryOperation", - "src": "702:39:0" - } - ], - "id": 217, - "name": "BinaryOperation", - "src": "633:108:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "+=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 218, - "name": "Identifier", - "src": "757:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 219, - "name": "Identifier", - "src": "766:3:0" - } - ], - "id": 220, - "name": "IndexAccess", - "src": "757:13:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 221, - "name": "Identifier", - "src": "774:6:0" - } - ], - "id": 222, - "name": "Assignment", - "src": "757:23:0" - } - ], - "id": 223, - "name": "ExpressionStatement", - "src": "757:23:0" - }, - { - "children": [ - { - "attributes": { - "operator": "-=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 224, - "name": "Identifier", - "src": "794:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 225, - "name": "Identifier", - "src": "803:5:0" - } - ], - "id": 226, - "name": "IndexAccess", - "src": "794:15:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 227, - "name": "Identifier", - "src": "813:6:0" - } - ], - "id": 228, - "name": "Assignment", - "src": "794:25:0" - } - ], - "id": 229, - "name": "ExpressionStatement", - "src": "794:25:0" - }, - { - "children": [ - { - "attributes": { - "operator": "-=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 230, - "name": "Identifier", - "src": "833:7:0" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 231, - "name": "Identifier", - "src": "841:5:0" - } - ], - "id": 234, - "name": "IndexAccess", - "src": "833:14:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 232, - "name": "Identifier", - "src": "848:3:0" - } - ], - "id": 233, - "name": "MemberAccess", - "src": "848:10:0" - } - ], - "id": 235, - "name": "IndexAccess", - "src": "833:26:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 236, - "name": "Identifier", - "src": "863:6:0" - } - ], - "id": 237, - "name": "Assignment", - "src": "833:36:0" - } - ], - "id": 238, - "name": "ExpressionStatement", - "src": "833:36:0" - }, - { - "children": [ - { - "attributes": { - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "type": "function (address,address,uint256) constant", - "value": "Transfer" - }, - "id": 239, - "name": "Identifier", - "src": "883:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 240, - "name": "Identifier", - "src": "892:5:0" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 241, - "name": "Identifier", - "src": "899:3:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 242, - "name": "Identifier", - "src": "904:6:0" - } - ], - "id": 243, - "name": "FunctionCall", - "src": "883:28:0" - } - ], - "id": 244, - "name": "ExpressionStatement", - "src": "883:28:0" - }, - { - "children": [ - { - "attributes": { - "hexvalue": "74727565", - "subdenomination": null, - "token": "true", - "type": "bool", - "value": "true" - }, - "id": 245, - "name": "Literal", - "src": "932:4:0" - } - ], - "id": 246, - "name": "Return", - "src": "925:11:0" - } - ], - "id": 247, - "name": "Block", - "src": "743:204:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "hexvalue": "66616c7365", - "subdenomination": null, - "token": "false", - "type": "bool", - "value": "false" - }, - "id": 248, - "name": "Literal", - "src": "962:5:0" - } - ], - "id": 249, - "name": "Return", - "src": "955:12:0" - } - ], - "id": 250, - "name": "Block", - "src": "953:17:0" - } - ], - "id": 251, - "name": "IfStatement", - "src": "629:341:0" - } - ], - "id": 252, - "name": "Block", - "src": "619:357:0" - } - ], - "id": 253, - "name": "FunctionDefinition", - "src": "541:435:0" - }, - { - "attributes": { - "constant": true, - "name": "balanceOf", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_owner", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 254, - "name": "ElementaryTypeName", - "src": "1001:7:0" - } - ], - "id": 255, - "name": "VariableDeclaration", - "src": "1001:14:0" - } - ], - "id": 256, - "name": "ParameterList", - "src": "1000:16:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 257, - "name": "ElementaryTypeName", - "src": "1035:4:0" - } - ], - "id": 258, - "name": "VariableDeclaration", - "src": "1035:4:0" - } - ], - "id": 259, - "name": "ParameterList", - "src": "1034:6:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 260, - "name": "Identifier", - "src": "1058:8:0" - }, - { - "attributes": { - "type": "address", - "value": "_owner" - }, - "id": 261, - "name": "Identifier", - "src": "1067:6:0" - } - ], - "id": 262, - "name": "IndexAccess", - "src": "1058:16:0" - } - ], - "id": 263, - "name": "Return", - "src": "1051:23:0" - } - ], - "id": 264, - "name": "Block", - "src": "1041:40:0" - } - ], - "id": 265, - "name": "FunctionDefinition", - "src": "982:99:0" - }, - { - "attributes": { - "constant": false, - "name": "approve", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_spender", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 266, - "name": "ElementaryTypeName", - "src": "1104:7:0" - } - ], - "id": 267, - "name": "VariableDeclaration", - "src": "1104:16:0" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 268, - "name": "ElementaryTypeName", - "src": "1122:4:0" - } - ], - "id": 269, - "name": "VariableDeclaration", - "src": "1122:11:0" - } - ], - "id": 270, - "name": "ParameterList", - "src": "1103:31:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 271, - "name": "ElementaryTypeName", - "src": "1144:4:0" - } - ], - "id": 272, - "name": "VariableDeclaration", - "src": "1144:4:0" - } - ], - "id": 273, - "name": "ParameterList", - "src": "1143:6:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 274, - "name": "Identifier", - "src": "1160:7:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 275, - "name": "Identifier", - "src": "1168:3:0" - } - ], - "id": 276, - "name": "MemberAccess", - "src": "1168:10:0" - } - ], - "id": 278, - "name": "IndexAccess", - "src": "1160:19:0" - }, - { - "attributes": { - "type": "address", - "value": "_spender" - }, - "id": 277, - "name": "Identifier", - "src": "1180:8:0" - } - ], - "id": 279, - "name": "IndexAccess", - "src": "1160:29:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 280, - "name": "Identifier", - "src": "1192:6:0" - } - ], - "id": 281, - "name": "Assignment", - "src": "1160:38:0" - } - ], - "id": 282, - "name": "ExpressionStatement", - "src": "1160:38:0" - }, - { - "children": [ - { - "attributes": { - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "type": "function (address,address,uint256) constant", - "value": "Approval" - }, - "id": 283, - "name": "Identifier", - "src": "1208:8:0" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 284, - "name": "Identifier", - "src": "1217:3:0" - } - ], - "id": 285, - "name": "MemberAccess", - "src": "1217:10:0" - }, - { - "attributes": { - "type": "address", - "value": "_spender" - }, - "id": 286, - "name": "Identifier", - "src": "1229:8:0" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 287, - "name": "Identifier", - "src": "1239:6:0" - } - ], - "id": 288, - "name": "FunctionCall", - "src": "1208:38:0" - } - ], - "id": 289, - "name": "ExpressionStatement", - "src": "1208:38:0" - }, - { - "children": [ - { - "attributes": { - "hexvalue": "74727565", - "subdenomination": null, - "token": "true", - "type": "bool", - "value": "true" - }, - "id": 290, - "name": "Literal", - "src": "1263:4:0" - } - ], - "id": 291, - "name": "Return", - "src": "1256:11:0" - } - ], - "id": 292, - "name": "Block", - "src": "1150:124:0" - } - ], - "id": 293, - "name": "FunctionDefinition", - "src": "1087:187:0" - }, - { - "attributes": { - "constant": true, - "name": "allowance", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_owner", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 294, - "name": "ElementaryTypeName", - "src": "1299:7:0" - } - ], - "id": 295, - "name": "VariableDeclaration", - "src": "1299:14:0" - }, - { - "attributes": { - "constant": false, - "name": "_spender", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 296, - "name": "ElementaryTypeName", - "src": "1315:7:0" - } - ], - "id": 297, - "name": "VariableDeclaration", - "src": "1315:16:0" - } - ], - "id": 298, - "name": "ParameterList", - "src": "1298:34:0" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 299, - "name": "ElementaryTypeName", - "src": "1351:4:0" - } - ], - "id": 300, - "name": "VariableDeclaration", - "src": "1351:4:0" - } - ], - "id": 301, - "name": "ParameterList", - "src": "1350:6:0" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 302, - "name": "Identifier", - "src": "1374:7:0" - }, - { - "attributes": { - "type": "address", - "value": "_owner" - }, - "id": 303, - "name": "Identifier", - "src": "1382:6:0" - } - ], - "id": 304, - "name": "IndexAccess", - "src": "1374:15:0" - }, - { - "attributes": { - "type": "address", - "value": "_spender" - }, - "id": 305, - "name": "Identifier", - "src": "1390:8:0" - } - ], - "id": 306, - "name": "IndexAccess", - "src": "1374:25:0" - } - ], - "id": 307, - "name": "Return", - "src": "1367:32:0" - } - ], - "id": 308, - "name": "Block", - "src": "1357:49:0" - } - ], - "id": 309, - "name": "FunctionDefinition", - "src": "1280:126:0" - }, - { - "attributes": { - "constant": false, - "name": "balances", - "storageLocation": "default", - "type": "mapping(address => uint256)", - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 310, - "name": "ElementaryTypeName", - "src": "1421:7:0" - }, - { - "attributes": { - "name": "uint" - }, - "id": 311, - "name": "ElementaryTypeName", - "src": "1432:4:0" - } - ], - "id": 312, - "name": "Mapping", - "src": "1412:25:0" - } - ], - "id": 313, - "name": "VariableDeclaration", - "src": "1412:34:0" - }, - { - "attributes": { - "constant": false, - "name": "allowed", - "storageLocation": "default", - "type": "mapping(address => mapping(address => uint256))", - "visibility": "internal" - }, - "children": [ - { - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 314, - "name": "ElementaryTypeName", - "src": "1461:7:0" - }, - { - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 315, - "name": "ElementaryTypeName", - "src": "1481:7:0" - }, - { - "attributes": { - "name": "uint" - }, - "id": 316, - "name": "ElementaryTypeName", - "src": "1492:4:0" - } - ], - "id": 317, - "name": "Mapping", - "src": "1472:25:0" - } - ], - "id": 318, - "name": "Mapping", - "src": "1452:46:0" - } - ], - "id": 319, - "name": "VariableDeclaration", - "src": "1452:54:0" - }, - { - "attributes": { - "constant": false, - "name": "totalSupply", - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 320, - "name": "ElementaryTypeName", - "src": "1512:4:0" - } - ], - "id": 321, - "name": "VariableDeclaration", - "src": "1512:23:0" - } - ], - "id": 322, - "name": "ContractDefinition", - "src": "86:1452:0" - } - ], - "name": "SourceUnit" - } - }, - "1.0.0/Token/Token_v1.sol": { - "id": 1, - "legacyAST": { - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "^", - "0.4", - ".11" - ] - }, - "id": 324, - "name": "PragmaDirective", - "src": "0:24:1" - }, - { - "attributes": { - "fullyImplemented": true, - "isLibrary": false, - "linearizedBaseContracts": [ - 397 - ], - "name": "Token_v1" - }, - "children": [ - { - "attributes": { - "constant": true, - "name": "totalSupply", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [], - "id": 325, - "name": "ParameterList", - "src": "110:2:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "supply", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 326, - "name": "ElementaryTypeName", - "src": "131:4:1" - } - ], - "id": 327, - "name": "VariableDeclaration", - "src": "131:11:1" - } - ], - "id": 328, - "name": "ParameterList", - "src": "130:13:1" - }, - { - "children": [], - "id": 329, - "name": "Block", - "src": "144:2:1" - } - ], - "id": 330, - "name": "FunctionDefinition", - "src": "90:56:1" - }, - { - "attributes": { - "constant": true, - "name": "balanceOf", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_owner", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 331, - "name": "ElementaryTypeName", - "src": "274:7:1" - } - ], - "id": 332, - "name": "VariableDeclaration", - "src": "274:14:1" - } - ], - "id": 333, - "name": "ParameterList", - "src": "273:16:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "balance", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 334, - "name": "ElementaryTypeName", - "src": "308:4:1" - } - ], - "id": 335, - "name": "VariableDeclaration", - "src": "308:12:1" - } - ], - "id": 336, - "name": "ParameterList", - "src": "307:14:1" - }, - { - "children": [], - "id": 337, - "name": "Block", - "src": "322:2:1" - } - ], - "id": 338, - "name": "FunctionDefinition", - "src": "255:69:1" - }, - { - "attributes": { - "constant": false, - "name": "transfer", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 339, - "name": "ElementaryTypeName", - "src": "578:7:1" - } - ], - "id": 340, - "name": "VariableDeclaration", - "src": "578:11:1" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 341, - "name": "ElementaryTypeName", - "src": "591:4:1" - } - ], - "id": 342, - "name": "VariableDeclaration", - "src": "591:11:1" - } - ], - "id": 343, - "name": "ParameterList", - "src": "577:26:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "success", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 344, - "name": "ElementaryTypeName", - "src": "613:4:1" - } - ], - "id": 345, - "name": "VariableDeclaration", - "src": "613:12:1" - } - ], - "id": 346, - "name": "ParameterList", - "src": "612:14:1" - }, - { - "children": [], - "id": 347, - "name": "Block", - "src": "627:2:1" - } - ], - "id": 348, - "name": "FunctionDefinition", - "src": "560:69:1" - }, - { - "attributes": { - "constant": false, - "name": "transferFrom", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_from", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 349, - "name": "ElementaryTypeName", - "src": "972:7:1" - } - ], - "id": 350, - "name": "VariableDeclaration", - "src": "972:13:1" - }, - { - "attributes": { - "constant": false, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 351, - "name": "ElementaryTypeName", - "src": "987:7:1" - } - ], - "id": 352, - "name": "VariableDeclaration", - "src": "987:11:1" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 353, - "name": "ElementaryTypeName", - "src": "1000:4:1" - } - ], - "id": 354, - "name": "VariableDeclaration", - "src": "1000:11:1" - } - ], - "id": 355, - "name": "ParameterList", - "src": "971:41:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "success", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 356, - "name": "ElementaryTypeName", - "src": "1022:4:1" - } - ], - "id": 357, - "name": "VariableDeclaration", - "src": "1022:12:1" - } - ], - "id": 358, - "name": "ParameterList", - "src": "1021:14:1" - }, - { - "children": [], - "id": 359, - "name": "Block", - "src": "1036:2:1" - } - ], - "id": 360, - "name": "FunctionDefinition", - "src": "950:88:1" - }, - { - "attributes": { - "constant": false, - "name": "approve", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_spender", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 361, - "name": "ElementaryTypeName", - "src": "1338:7:1" - } - ], - "id": 362, - "name": "VariableDeclaration", - "src": "1338:16:1" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 363, - "name": "ElementaryTypeName", - "src": "1356:4:1" - } - ], - "id": 364, - "name": "VariableDeclaration", - "src": "1356:11:1" - } - ], - "id": 365, - "name": "ParameterList", - "src": "1337:31:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "success", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 366, - "name": "ElementaryTypeName", - "src": "1378:4:1" - } - ], - "id": 367, - "name": "VariableDeclaration", - "src": "1378:12:1" - } - ], - "id": 368, - "name": "ParameterList", - "src": "1377:14:1" - }, - { - "children": [], - "id": 369, - "name": "Block", - "src": "1392:2:1" - } - ], - "id": 370, - "name": "FunctionDefinition", - "src": "1321:73:1" - }, - { - "attributes": { - "constant": true, - "name": "allowance", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_owner", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 371, - "name": "ElementaryTypeName", - "src": "1621:7:1" - } - ], - "id": 372, - "name": "VariableDeclaration", - "src": "1621:14:1" - }, - { - "attributes": { - "constant": false, - "name": "_spender", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 373, - "name": "ElementaryTypeName", - "src": "1637:7:1" - } - ], - "id": 374, - "name": "VariableDeclaration", - "src": "1637:16:1" - } - ], - "id": 375, - "name": "ParameterList", - "src": "1620:34:1" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "remaining", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 376, - "name": "ElementaryTypeName", - "src": "1673:4:1" - } - ], - "id": 377, - "name": "VariableDeclaration", - "src": "1673:14:1" - } - ], - "id": 378, - "name": "ParameterList", - "src": "1672:16:1" - }, - { - "children": [], - "id": 379, - "name": "Block", - "src": "1689:2:1" - } - ], - "id": 380, - "name": "FunctionDefinition", - "src": "1602:89:1" - }, - { - "attributes": { - "name": "Transfer" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "name": "_from", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 381, - "name": "ElementaryTypeName", - "src": "1712:7:1" - } - ], - "id": 382, - "name": "VariableDeclaration", - "src": "1712:21:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 383, - "name": "ElementaryTypeName", - "src": "1735:7:1" - } - ], - "id": 384, - "name": "VariableDeclaration", - "src": "1735:19:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 385, - "name": "ElementaryTypeName", - "src": "1756:4:1" - } - ], - "id": 386, - "name": "VariableDeclaration", - "src": "1756:11:1" - } - ], - "id": 387, - "name": "ParameterList", - "src": "1711:57:1" - } - ], - "id": 388, - "name": "EventDefinition", - "src": "1697:72:1" - }, - { - "attributes": { - "name": "Approval" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "indexed": true, - "name": "_owner", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 389, - "name": "ElementaryTypeName", - "src": "1789:7:1" - } - ], - "id": 390, - "name": "VariableDeclaration", - "src": "1789:22:1" - }, - { - "attributes": { - "constant": false, - "indexed": true, - "name": "_spender", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 391, - "name": "ElementaryTypeName", - "src": "1813:7:1" - } - ], - "id": 392, - "name": "VariableDeclaration", - "src": "1813:24:1" - }, - { - "attributes": { - "constant": false, - "indexed": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 393, - "name": "ElementaryTypeName", - "src": "1839:4:1" - } - ], - "id": 394, - "name": "VariableDeclaration", - "src": "1839:11:1" - } - ], - "id": 395, - "name": "ParameterList", - "src": "1788:63:1" - } - ], - "id": 396, - "name": "EventDefinition", - "src": "1774:78:1" - } - ], - "id": 397, - "name": "ContractDefinition", - "src": "26:1828:1" - } - ], - "name": "SourceUnit" - } - }, - "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": { - "id": 2, - "legacyAST": { - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "^", - "0.4", - ".11" - ] - }, - "id": 33, - "name": "PragmaDirective", - "src": "580:24:2" - }, - { - "attributes": { - "file": "../ERC20Token/ERC20Token_v1.sol" - }, - "id": 35, - "name": "ImportDirective", - "src": "606:78:2" - }, - { - "attributes": { - "fullyImplemented": true, - "isLibrary": false, - "linearizedBaseContracts": [ - 124, - 322, - 397 - ], - "name": "UnlimitedAllowanceToken_v1" - }, - "children": [ - { - "children": [ - { - "attributes": { - "name": "ERC20Token" - }, - "id": 36, - "name": "UserDefinedTypeName", - "src": "725:10:2" - } - ], - "id": 37, - "name": "InheritanceSpecifier", - "src": "725:10:2" - }, - { - "attributes": { - "constant": true, - "name": "MAX_UINT", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 38, - "name": "ElementaryTypeName", - "src": "743:4:2" - }, - { - "attributes": { - "operator": "-", - "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639935" - }, - "children": [ - { - "attributes": { - "operator": "**", - "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639936" - }, - "children": [ - { - "attributes": { - "hexvalue": "32", - "subdenomination": null, - "token": null, - "type": "int_const 2", - "value": "2" - }, - "id": 39, - "name": "Literal", - "src": "768:1:2" - }, - { - "attributes": { - "hexvalue": "323536", - "subdenomination": null, - "token": null, - "type": "int_const 256", - "value": "256" - }, - "id": 40, - "name": "Literal", - "src": "771:3:2" - } - ], - "id": 41, - "name": "BinaryOperation", - "src": "768:6:2" - }, - { - "attributes": { - "hexvalue": "31", - "subdenomination": null, - "token": null, - "type": "int_const 1", - "value": "1" - }, - "id": 42, - "name": "Literal", - "src": "777:1:2" - } - ], - "id": 43, - "name": "BinaryOperation", - "src": "768:10:2" - } - ], - "id": 44, - "name": "VariableDeclaration", - "src": "743:35:2" - }, - { - "attributes": { - "constant": false, - "name": "transferFrom", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "_from", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 45, - "name": "ElementaryTypeName", - "src": "1088:7:2" - } - ], - "id": 46, - "name": "VariableDeclaration", - "src": "1088:13:2" - }, - { - "attributes": { - "constant": false, - "name": "_to", - "storageLocation": "default", - "type": "address", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "address" - }, - "id": 47, - "name": "ElementaryTypeName", - "src": "1103:7:2" - } - ], - "id": 48, - "name": "VariableDeclaration", - "src": "1103:11:2" - }, - { - "attributes": { - "constant": false, - "name": "_value", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 49, - "name": "ElementaryTypeName", - "src": "1116:4:2" - } - ], - "id": 50, - "name": "VariableDeclaration", - "src": "1116:11:2" - } - ], - "id": 51, - "name": "ParameterList", - "src": "1087:41:2" - }, - { - "children": [ - { - "attributes": { - "constant": false, - "name": "", - "storageLocation": "default", - "type": "bool", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "bool" - }, - "id": 52, - "name": "ElementaryTypeName", - "src": "1161:4:2" - } - ], - "id": 53, - "name": "VariableDeclaration", - "src": "1161:4:2" - } - ], - "id": 54, - "name": "ParameterList", - "src": "1160:6:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "constant": false, - "name": "allowance", - "storageLocation": "default", - "type": "uint256", - "visibility": "internal" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 55, - "name": "ElementaryTypeName", - "src": "1181:4:2" - } - ], - "id": 56, - "name": "VariableDeclaration", - "src": "1181:14:2" - }, - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 57, - "name": "Identifier", - "src": "1198:7:2" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 58, - "name": "Identifier", - "src": "1206:5:2" - } - ], - "id": 59, - "name": "IndexAccess", - "src": "1198:14:2" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 60, - "name": "Identifier", - "src": "1213:3:2" - } - ], - "id": 61, - "name": "MemberAccess", - "src": "1213:10:2" - } - ], - "id": 62, - "name": "IndexAccess", - "src": "1198:26:2" - } - ], - "id": 63, - "name": "VariableDeclarationStatement", - "src": "1181:43:2" - }, - { - "children": [ - { - "attributes": { - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": "&&", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 64, - "name": "Identifier", - "src": "1238:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 65, - "name": "Identifier", - "src": "1247:5:2" - } - ], - "id": 66, - "name": "IndexAccess", - "src": "1238:15:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 67, - "name": "Identifier", - "src": "1257:6:2" - } - ], - "id": 68, - "name": "BinaryOperation", - "src": "1238:25:2" - }, - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256", - "value": "allowance" - }, - "id": 69, - "name": "Identifier", - "src": "1279:9:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 70, - "name": "Identifier", - "src": "1292:6:2" - } - ], - "id": 71, - "name": "BinaryOperation", - "src": "1279:19:2" - } - ], - "id": 72, - "name": "BinaryOperation", - "src": "1238:60:2" - }, - { - "attributes": { - "operator": ">=", - "type": "bool" - }, - "children": [ - { - "attributes": { - "operator": "+", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 73, - "name": "Identifier", - "src": "1314:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 74, - "name": "Identifier", - "src": "1323:3:2" - } - ], - "id": 75, - "name": "IndexAccess", - "src": "1314:13:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 76, - "name": "Identifier", - "src": "1330:6:2" - } - ], - "id": 77, - "name": "BinaryOperation", - "src": "1314:22:2" - }, - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 78, - "name": "Identifier", - "src": "1340:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 79, - "name": "Identifier", - "src": "1349:3:2" - } - ], - "id": 80, - "name": "IndexAccess", - "src": "1340:13:2" - } - ], - "id": 81, - "name": "BinaryOperation", - "src": "1314:39:2" - } - ], - "id": 82, - "name": "BinaryOperation", - "src": "1238:115:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "+=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 83, - "name": "Identifier", - "src": "1378:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 84, - "name": "Identifier", - "src": "1387:3:2" - } - ], - "id": 85, - "name": "IndexAccess", - "src": "1378:13:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 86, - "name": "Identifier", - "src": "1395:6:2" - } - ], - "id": 87, - "name": "Assignment", - "src": "1378:23:2" - } - ], - "id": 88, - "name": "ExpressionStatement", - "src": "1378:23:2" - }, - { - "children": [ - { - "attributes": { - "operator": "-=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 89, - "name": "Identifier", - "src": "1415:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 90, - "name": "Identifier", - "src": "1424:5:2" - } - ], - "id": 91, - "name": "IndexAccess", - "src": "1415:15:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 92, - "name": "Identifier", - "src": "1434:6:2" - } - ], - "id": 93, - "name": "Assignment", - "src": "1415:25:2" - } - ], - "id": 94, - "name": "ExpressionStatement", - "src": "1415:25:2" - }, - { - "children": [ - { - "attributes": { - "operator": "<", - "type": "bool" - }, - "children": [ - { - "attributes": { - "type": "uint256", - "value": "allowance" - }, - "id": 95, - "name": "Identifier", - "src": "1458:9:2" - }, - { - "attributes": { - "type": "uint256", - "value": "MAX_UINT" - }, - "id": 96, - "name": "Identifier", - "src": "1470:8:2" - } - ], - "id": 97, - "name": "BinaryOperation", - "src": "1458:20:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "-=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => mapping(address => uint256))", - "value": "allowed" - }, - "id": 98, - "name": "Identifier", - "src": "1498:7:2" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 99, - "name": "Identifier", - "src": "1506:5:2" - } - ], - "id": 102, - "name": "IndexAccess", - "src": "1498:14:2" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 100, - "name": "Identifier", - "src": "1513:3:2" - } - ], - "id": 101, - "name": "MemberAccess", - "src": "1513:10:2" - } - ], - "id": 103, - "name": "IndexAccess", - "src": "1498:26:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 104, - "name": "Identifier", - "src": "1528:6:2" - } - ], - "id": 105, - "name": "Assignment", - "src": "1498:36:2" - } - ], - "id": 106, - "name": "ExpressionStatement", - "src": "1498:36:2" - } - ], - "id": 107, - "name": "Block", - "src": "1480:69:2" - } - ], - "id": 108, - "name": "IfStatement", - "src": "1454:95:2" - }, - { - "children": [ - { - "attributes": { - "type": "tuple()", - "type_conversion": false - }, - "children": [ - { - "attributes": { - "type": "function (address,address,uint256) constant", - "value": "Transfer" - }, - "id": 109, - "name": "Identifier", - "src": "1562:8:2" - }, - { - "attributes": { - "type": "address", - "value": "_from" - }, - "id": 110, - "name": "Identifier", - "src": "1571:5:2" - }, - { - "attributes": { - "type": "address", - "value": "_to" - }, - "id": 111, - "name": "Identifier", - "src": "1578:3:2" - }, - { - "attributes": { - "type": "uint256", - "value": "_value" - }, - "id": 112, - "name": "Identifier", - "src": "1583:6:2" - } - ], - "id": 113, - "name": "FunctionCall", - "src": "1562:28:2" - } - ], - "id": 114, - "name": "ExpressionStatement", - "src": "1562:28:2" - }, - { - "children": [ - { - "attributes": { - "hexvalue": "74727565", - "subdenomination": null, - "token": "true", - "type": "bool", - "value": "true" - }, - "id": 115, - "name": "Literal", - "src": "1611:4:2" - } - ], - "id": 116, - "name": "Return", - "src": "1604:11:2" - } - ], - "id": 117, - "name": "Block", - "src": "1364:262:2" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "hexvalue": "66616c7365", - "subdenomination": null, - "token": "false", - "type": "bool", - "value": "false" - }, - "id": 118, - "name": "Literal", - "src": "1653:5:2" - } - ], - "id": 119, - "name": "Return", - "src": "1646:12:2" - } - ], - "id": 120, - "name": "Block", - "src": "1632:37:2" - } - ], - "id": 121, - "name": "IfStatement", - "src": "1234:435:2" - } - ], - "id": 122, - "name": "Block", - "src": "1171:504:2" - } - ], - "id": 123, - "name": "FunctionDefinition", - "src": "1066:609:2" - } - ], - "id": 124, - "name": "ContractDefinition", - "src": "686:991:2" - } - ], - "name": "SourceUnit" - } - }, - "2.0.0/tokens/ZRXToken/ZRXToken.sol": { - "id": 3, - "legacyAST": { - "children": [ - { - "attributes": { - "literals": [ - "solidity", - "0.4", - ".11" - ] - }, - "id": 1, - "name": "PragmaDirective", - "src": "580:23:3" - }, - { - "attributes": { - "file": "../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol" - }, - "id": 3, - "name": "ImportDirective", - "src": "650:142:3" - }, - { - "attributes": { - "fullyImplemented": true, - "isLibrary": false, - "linearizedBaseContracts": [ - 31, - 124, - 322, - 397 - ], - "name": "ZRXToken" - }, - "children": [ - { - "children": [ - { - "attributes": { - "name": "UnlimitedAllowanceToken" - }, - "id": 4, - "name": "UserDefinedTypeName", - "src": "816:23:3" - } - ], - "id": 5, - "name": "InheritanceSpecifier", - "src": "816:23:3" - }, - { - "attributes": { - "constant": true, - "name": "decimals", - "storageLocation": "default", - "type": "uint8", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint8" - }, - "id": 6, - "name": "ElementaryTypeName", - "src": "891:5:3" - }, - { - "attributes": { - "hexvalue": "3138", - "subdenomination": null, - "token": null, - "type": "int_const 18", - "value": "18" - }, - "id": 7, - "name": "Literal", - "src": "924:2:3" - } - ], - "id": 8, - "name": "VariableDeclaration", - "src": "891:35:3" - }, - { - "attributes": { - "constant": false, - "name": "totalSupply", - "storageLocation": "default", - "type": "uint256", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "uint" - }, - "id": 9, - "name": "ElementaryTypeName", - "src": "932:4:3" - }, - { - "attributes": { - "operator": "**", - "type": "int_const 1000000000000000000000000000" - }, - "children": [ - { - "attributes": { - "hexvalue": "3130", - "subdenomination": null, - "token": null, - "type": "int_const 10", - "value": "10" - }, - "id": 10, - "name": "Literal", - "src": "958:2:3" - }, - { - "attributes": { - "hexvalue": "3237", - "subdenomination": null, - "token": null, - "type": "int_const 27", - "value": "27" - }, - "id": 11, - "name": "Literal", - "src": "962:2:3" - } - ], - "id": 12, - "name": "BinaryOperation", - "src": "958:6:3" - } - ], - "id": 13, - "name": "VariableDeclaration", - "src": "932:32:3" - }, - { - "attributes": { - "constant": true, - "name": "name", - "storageLocation": "default", - "type": "string memory", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "string" - }, - "id": 14, - "name": "ElementaryTypeName", - "src": "1009:6:3" - }, - { - "attributes": { - "hexvalue": "30782050726f746f636f6c20546f6b656e", - "subdenomination": null, - "token": null, - "type": "literal_string \"0x Protocol Token\"", - "value": "0x Protocol Token" - }, - "id": 15, - "name": "Literal", - "src": "1039:19:3" - } - ], - "id": 16, - "name": "VariableDeclaration", - "src": "1009:49:3" - }, - { - "attributes": { - "constant": true, - "name": "symbol", - "storageLocation": "default", - "type": "string memory", - "visibility": "public" - }, - "children": [ - { - "attributes": { - "name": "string" - }, - "id": 17, - "name": "ElementaryTypeName", - "src": "1064:6:3" - }, - { - "attributes": { - "hexvalue": "5a5258", - "subdenomination": null, - "token": null, - "type": "literal_string \"ZRX\"", - "value": "ZRX" - }, - "id": 18, - "name": "Literal", - "src": "1096:5:3" - } - ], - "id": 19, - "name": "VariableDeclaration", - "src": "1064:37:3" - }, - { - "attributes": { - "constant": false, - "name": "ZRXToken", - "payable": false, - "visibility": "public" - }, - "children": [ - { - "children": [], - "id": 20, - "name": "ParameterList", - "src": "1167:2:3" - }, - { - "children": [], - "id": 21, - "name": "ParameterList", - "src": "1189:0:3" - }, - { - "children": [ - { - "children": [ - { - "attributes": { - "operator": "=", - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "uint256" - }, - "children": [ - { - "attributes": { - "type": "mapping(address => uint256)", - "value": "balances" - }, - "id": 22, - "name": "Identifier", - "src": "1199:8:3" - }, - { - "attributes": { - "member_name": "sender", - "type": "address" - }, - "children": [ - { - "attributes": { - "type": "msg", - "value": "msg" - }, - "id": 23, - "name": "Identifier", - "src": "1208:3:3" - } - ], - "id": 24, - "name": "MemberAccess", - "src": "1208:10:3" - } - ], - "id": 25, - "name": "IndexAccess", - "src": "1199:20:3" - }, - { - "attributes": { - "type": "uint256", - "value": "totalSupply" - }, - "id": 26, - "name": "Identifier", - "src": "1222:11:3" - } - ], - "id": 27, - "name": "Assignment", - "src": "1199:34:3" - } - ], - "id": 28, - "name": "ExpressionStatement", - "src": "1199:34:3" - } - ], - "id": 29, - "name": "Block", - "src": "1189:51:3" - } - ], - "id": 30, - "name": "FunctionDefinition", - "src": "1150:90:3" - } - ], - "id": 31, - "name": "ContractDefinition", - "src": "795:447:3" - } - ], - "name": "SourceUnit" - } - } - }, - "sourceCodes": { - "1.0.0/ERC20Token/ERC20Token_v1.sol": "pragma solidity ^0.4.11;\n\nimport { Token_v1 as Token } from \"../Token/Token_v1.sol\";\n\ncontract ERC20Token_v1 is Token {\n\n function transfer(address _to, uint _value) returns (bool) {\n //Default assumes totalSupply can't be over max (2^256 - 1).\n if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n Transfer(msg.sender, _to, _value);\n return true;\n } else { return false; }\n }\n\n function transferFrom(address _from, address _to, uint _value) returns (bool) {\n if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[_to] += _value;\n balances[_from] -= _value;\n allowed[_from][msg.sender] -= _value;\n Transfer(_from, _to, _value);\n return true;\n } else { return false; }\n }\n\n function balanceOf(address _owner) constant returns (uint) {\n return balances[_owner];\n }\n\n function approve(address _spender, uint _value) returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n function allowance(address _owner, address _spender) constant returns (uint) {\n return allowed[_owner][_spender];\n }\n\n mapping (address => uint) balances;\n mapping (address => mapping (address => uint)) allowed;\n uint public totalSupply;\n}\n", - "1.0.0/Token/Token_v1.sol": "pragma solidity ^0.4.11;\n\ncontract Token_v1 {\n\n /// @return total amount of tokens\n function totalSupply() constant returns (uint supply) {}\n\n /// @param _owner The address from which the balance will be retrieved\n /// @return The balance\n function balanceOf(address _owner) constant returns (uint balance) {}\n\n /// @notice send `_value` token to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transfer(address _to, uint _value) returns (bool success) {}\n\n /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint _value) returns (bool success) {}\n\n /// @notice `msg.sender` approves `_addr` to spend `_value` tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @param _value The amount of wei to be approved for transfer\n /// @return Whether the approval was successful or not\n function approve(address _spender, uint _value) returns (bool success) {}\n\n /// @param _owner The address of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address _owner, address _spender) constant returns (uint remaining) {}\n\n event Transfer(address indexed _from, address indexed _to, uint _value);\n event Approval(address indexed _owner, address indexed _spender, uint _value);\n}\n\n", - "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.4.11;\n\nimport { ERC20Token_v1 as ERC20Token } from \"../ERC20Token/ERC20Token_v1.sol\";\n\ncontract UnlimitedAllowanceToken_v1 is ERC20Token {\n\n uint constant MAX_UINT = 2**256 - 1;\n\n /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\n /// @param _from Address to transfer from.\n /// @param _to Address to transfer to.\n /// @param _value Amount to transfer.\n /// @return Success of transfer.\n function transferFrom(address _from, address _to, uint _value)\n public\n returns (bool)\n {\n uint allowance = allowed[_from][msg.sender];\n if (balances[_from] >= _value\n && allowance >= _value\n && balances[_to] + _value >= balances[_to]\n ) {\n balances[_to] += _value;\n balances[_from] -= _value;\n if (allowance < MAX_UINT) {\n allowed[_from][msg.sender] -= _value;\n }\n Transfer(_from, _to, _value);\n return true;\n } else {\n return false;\n }\n }\n}\n", - "2.0.0/tokens/ZRXToken/ZRXToken.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity 0.4.11;\n\n// solhint-disable-next-line max-line-length\nimport { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from \"../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\";\n\n\ncontract ZRXToken is UnlimitedAllowanceToken {\n\n // solhint-disable const-name-snakecase\n uint8 constant public decimals = 18;\n uint public totalSupply = 10**27; // 1 billion tokens, 18 decimal places\n string constant public name = \"0x Protocol Token\";\n string constant public symbol = \"ZRX\";\n // solhint-enableconst-name-snakecase\n\n function ZRXToken()\n public\n {\n balances[msg.sender] = totalSupply;\n }\n}\n" - }, - "sourceTreeHashHex": "0xbcce67d129fe53ddb9717b4f567b33108c41a4f4324aa47ac609037e41f5b95d", - "compiler": { - "name": "solc", - "version": "soljson-v0.4.11+commit.68ef5810.js", - "settings": { - "optimizer": { - "enabled": true, - "runs": 1000000 - }, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode.object", - "evm.bytecode.sourceMap", - "evm.deployedBytecode.object", - "evm.deployedBytecode.sourceMap" - ] - } - } - } - }, - "networks": { - "50": { - "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c", - "links": {}, - "constructorArgs": "[]" - } - } -} diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 2ba60e730..975de7e70 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -1,47 +1,35 @@ -export { ZeroEx } from './0x'; - -export { Web3ProviderEngine, RPCSubprovider } from '@0xproject/subproviders'; - export { - ExchangeContractErrs, - Order, - SignedOrder, - SignerType, - ECSignature, - OrderStateValid, - OrderStateInvalid, - OrderState, - Token, - ERC20AssetData, - ERC721AssetData, - AssetProxyId, -} from '@0xproject/types'; - -export { - BlockParamLiteral, - FilterObject, - BlockParam, - LogWithDecodedArgs, - ContractEventArg, - Provider, - TransactionReceipt, - TransactionReceiptWithDecodedLogs, -} from 'ethereum-types'; + assetDataUtils, + ecSignOrderHashAsync, + generatePseudoRandomSalt, + isValidSignatureAsync, + orderHashUtils, +} from '@0xproject/order-utils'; export { + ContractWrappers, + ERC20TokenWrapper, + ERC721TokenWrapper, + EtherTokenWrapper, + ExchangeWrapper, + ERC20ProxyWrapper, + ERC721ProxyWrapper, + ForwarderWrapper, + ContractWrappersError, EventCallback, ContractEvent, IndexedFilterValues, BlockRange, OrderFillRequest, ContractEventArgs, + ContractWrappersConfig, MethodOpts, OrderTransactionOpts, TransactionOpts, LogEvent, DecodedLogEvent, - OnOrderStateChangeCallback, - ContractWrappersError, + OrderStatus, + OrderInfo, WETH9Events, WETH9WithdrawalEventArgs, WETH9ApprovalEventArgs, @@ -56,11 +44,43 @@ export { ERC721TokenApprovalForAllEventArgs, ERC721TokenTransferEventArgs, ERC721TokenEvents, + ERC721TokenEventArgs, ExchangeCancelUpToEventArgs, ExchangeAssetProxyRegisteredEventArgs, ExchangeFillEventArgs, ExchangeCancelEventArgs, ExchangeEventArgs, - ContractWrappersConfig, - OrderInfo, + ExchangeEvents, } from '@0xproject/contract-wrappers'; + +export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; + +export { Web3ProviderEngine, RPCSubprovider, Callback, ErrorCallback, Subprovider } from '@0xproject/subproviders'; + +export { BigNumber } from '@0xproject/utils'; + +export { + Order, + SignedOrder, + ECSignature, + OrderStateValid, + OrderStateInvalid, + OrderState, + AssetProxyId, + ExchangeContractErrs, + SignerType, + Token, + ERC20AssetData, + ERC721AssetData, +} from '@0xproject/types'; + +export { + BlockParamLiteral, + FilterObject, + BlockParam, + ContractEventArg, + LogWithDecodedArgs, + Provider, + TransactionReceipt, + TransactionReceiptWithDecodedLogs, +} from 'ethereum-types'; diff --git a/packages/0x.js/src/schemas/zero_ex_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_config_schema.ts deleted file mode 100644 index a9c3c64fc..000000000 --- a/packages/0x.js/src/schemas/zero_ex_config_schema.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const zeroExConfigSchema = { - id: '/ZeroExConfig', - oneOf: [{ $ref: '/ZeroExPrivateNetworkConfig' }, { $ref: '/ZeroExPublicNetworkConfig' }], - type: 'object', -}; diff --git a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts deleted file mode 100644 index 378b86e77..000000000 --- a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts +++ /dev/null @@ -1,35 +0,0 @@ -export const zeroExPrivateNetworkConfigSchema = { - id: '/ZeroExPrivateNetworkConfig', - properties: { - networkId: { - type: 'number', - minimum: 1, - }, - gasPrice: { $ref: '/Number' }, - zrxContractAddress: { $ref: '/Address' }, - exchangeContractAddress: { $ref: '/Address' }, - erc20ProxyContractAddress: { $ref: '/Address' }, - erc721ProxyContractAddress: { $ref: '/Address' }, - orderWatcherConfig: { - type: 'object', - properties: { - pollingIntervalMs: { - type: 'number', - minimum: 0, - }, - numConfirmations: { - type: 'number', - minimum: 0, - }, - }, - }, - }, - type: 'object', - required: [ - 'networkId', - 'zrxContractAddress', - 'exchangeContractAddress', - 'erc20ProxyContractAddress', - 'erc721ProxyContractAddress', - ], -}; 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 deleted file mode 100644 index f2a9a4d56..000000000 --- a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts +++ /dev/null @@ -1,43 +0,0 @@ -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: [ - networkNameToId.mainnet, - networkNameToId.ropsten, - networkNameToId.rinkeby, - networkNameToId.kovan, - networkNameToId.ganache, - ], - }, - gasPrice: { $ref: '/Number' }, - zrxContractAddress: { $ref: '/Address' }, - exchangeContractAddress: { $ref: '/Address' }, - erc20ProxyContractAddress: { $ref: '/Address' }, - erc721ProxyContractAddress: { $ref: '/Address' }, - orderWatcherConfig: { - type: 'object', - properties: { - pollingIntervalMs: { - type: 'number', - minimum: 0, - }, - numConfirmations: { - type: 'number', - minimum: 0, - }, - }, - }, - }, - type: 'object', - required: ['networkId'], -}; diff --git a/packages/0x.js/src/types.ts b/packages/0x.js/src/types.ts deleted file mode 100644 index 651b15abd..000000000 --- a/packages/0x.js/src/types.ts +++ /dev/null @@ -1,7 +0,0 @@ -export enum InternalZeroExError { - NoAbiDecoder = 'NO_ABI_DECODER', - ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY', - WethNotInTokenRegistry = 'WETH_NOT_IN_TOKEN_REGISTRY', -} - -// tslint:disable:max-file-line-count diff --git a/packages/0x.js/src/utils/constants.ts b/packages/0x.js/src/utils/constants.ts deleted file mode 100644 index 5a5ba0e0a..000000000 --- a/packages/0x.js/src/utils/constants.ts +++ /dev/null @@ -1,4 +0,0 @@ -export const constants = { - NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - TESTRPC_NETWORK_ID: 50, -}; diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts deleted file mode 100644 index be2a94482..000000000 --- a/packages/0x.js/test/0x.js_test.ts +++ /dev/null @@ -1,150 +0,0 @@ -import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { BigNumber } from '@0xproject/utils'; -import * as chai from 'chai'; -import 'mocha'; - -import { ERC20TokenApprovalEventArgs, ERC20TokenEvents, LogWithDecodedArgs, ZeroEx } from '../src'; - -import { chaiSetup } from './utils/chai_setup'; -import { constants } from './utils/constants'; -import { tokenUtils } from './utils/token_utils'; -import { provider, web3Wrapper } from './utils/web3_wrapper'; - -const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper); -chaiSetup.configure(); -const expect = chai.expect; - -describe('ZeroEx library', () => { - let zeroEx: ZeroEx; - before(async () => { - const config = { - networkId: constants.TESTRPC_NETWORK_ID, - }; - zeroEx = new ZeroEx(provider, config); - }); - describe('#setProvider', () => { - it('overrides provider in nested web3s and invalidates contractInstances', async () => { - // Instantiate the contract instances with the current provider - await (zeroEx.exchange as any)._getExchangeContractAsync(); - expect((zeroEx.exchange as any)._exchangeContractIfExists).to.not.be.undefined(); - - // Add property to newProvider so that we can differentiate it from old provider - (provider as any).zeroExTestId = 1; - zeroEx.setProvider(provider, constants.TESTRPC_NETWORK_ID); - - // Check that contractInstances with old provider are removed after provider update - expect((zeroEx.exchange as any)._exchangeContractIfExists).to.be.undefined(); - - // Check that all nested zeroExContract/web3Wrapper instances return the updated provider - const nestedWeb3WrapperProvider = ((zeroEx as any)._contractWrappers as ContractWrappers).getProvider(); - expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number'); - const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getProvider(); - expect(exchangeWeb3WrapperProvider.zeroExTestId).to.be.a('number'); - }); - }); - describe('#isValidSignature', () => { - const dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0'; - const ethSignSignature = - '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403'; - const address = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; - const bytes32Zeros = '0x0000000000000000000000000000000000000000000000000000000000000000'; - it("should return false if the data doesn't pertain to the signature & address", async () => { - return expect( - (zeroEx.exchange as any).isValidSignatureAsync(bytes32Zeros, address, ethSignSignature), - ).to.become(false); - }); - it("should return false if the address doesn't pertain to the signature & data", async () => { - const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42'; - return expect( - (zeroEx.exchange as any).isValidSignatureAsync(dataHex, validUnrelatedAddress, ethSignSignature), - ).to.become(false); - }); - it("should return false if the signature doesn't pertain to the dataHex & address", async () => { - const signatureArray = ethSignSignature.split(''); - // tslint:disable-next-line:custom-no-magic-numbers - signatureArray[5] = 'C'; // V = 28, instead of 27 - const wrongSignature = signatureArray.join(''); - return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, wrongSignature)).to.become( - false, - ); - }); - it('should return true if the signature does pertain to the dataHex & address', async () => { - return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, ethSignSignature)).to.become( - true, - ); - }); - }); - describe('#toUnitAmount', () => { - it('should throw if invalid baseUnit amount supplied as argument', () => { - const invalidBaseUnitAmount = new BigNumber(1000000000.4); - const decimals = 6; - expect(() => ZeroEx.toUnitAmount(invalidBaseUnitAmount, decimals)).to.throw( - 'amount should be in baseUnits (no decimals), found value: 1000000000.4', - ); - }); - it('Should return the expected unit amount for the decimals passed in', () => { - const baseUnitAmount = new BigNumber(1000000000); - const decimals = 6; - const unitAmount = ZeroEx.toUnitAmount(baseUnitAmount, decimals); - const expectedUnitAmount = new BigNumber(1000); - expect(unitAmount).to.be.bignumber.equal(expectedUnitAmount); - }); - }); - describe('#toBaseUnitAmount', () => { - it('Should return the expected base unit amount for the decimals passed in', () => { - const unitAmount = new BigNumber(1000); - const decimals = 6; - const baseUnitAmount = ZeroEx.toBaseUnitAmount(unitAmount, decimals); - const expectedUnitAmount = new BigNumber(1000000000); - expect(baseUnitAmount).to.be.bignumber.equal(expectedUnitAmount); - }); - it('should throw if unitAmount has more decimals then specified as the max decimal precision', () => { - const unitAmount = new BigNumber(0.823091); - const decimals = 5; - expect(() => ZeroEx.toBaseUnitAmount(unitAmount, decimals)).to.throw( - 'Invalid unit amount: 0.823091 - Too many decimal places', - ); - }); - }); - describe('#awaitTransactionMinedAsync', () => { - beforeEach(async () => { - await blockchainLifecycle.startAsync(); - }); - afterEach(async () => { - await blockchainLifecycle.revertAsync(); - }); - it('returns transaction receipt with decoded logs', async () => { - const availableAddresses = await zeroEx.getAvailableAddressesAsync(); - const coinbase = availableAddresses[0]; - const zrxTokenAddress = tokenUtils.getProtocolTokenAddress(); - const erc20ProxyAddress = zeroEx.erc20Proxy.getContractAddress(); - const txHash = await zeroEx.erc20Token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase); - const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash); - // tslint:disable-next-line:no-unnecessary-type-assertion - const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ERC20TokenApprovalEventArgs>; - expect(log.event).to.be.equal(ERC20TokenEvents.Approval); - expect(log.args._owner).to.be.equal(coinbase); - expect(log.args._spender).to.be.equal(erc20ProxyAddress); - expect(log.args._value).to.be.bignumber.equal(zeroEx.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS); - }); - }); - describe('#config', () => { - it('allows to specify exchange contract address', async () => { - const zeroExConfig = { - exchangeContractAddress: ZeroEx.NULL_ADDRESS, - networkId: constants.TESTRPC_NETWORK_ID, - }; - const zeroExWithWrongExchangeAddress = new ZeroEx(provider, zeroExConfig); - expect(zeroExWithWrongExchangeAddress.exchange.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS); - }); - it('allows to specify erc20Proxy contract address', async () => { - const zeroExConfig = { - erc20ProxyContractAddress: ZeroEx.NULL_ADDRESS, - networkId: constants.TESTRPC_NETWORK_ID, - }; - const zeroExWithWrongERC20ProxyAddress = new ZeroEx(provider, zeroExConfig); - expect(zeroExWithWrongERC20ProxyAddress.erc20Proxy.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS); - }); - }); -}); diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts deleted file mode 100644 index 364828231..000000000 --- a/packages/0x.js/test/global_hooks.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { runV2MigrationsAsync } from '@0xproject/migrations'; - -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. - const mochaTestTimeoutMs = 20000; - this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this - const txDefaults = { - gas: devConstants.GAS_LIMIT, - from: devConstants.TESTRPC_FIRST_ADDRESS, - }; - const artifactsDir = `../migrations/artifacts/2.0.0`; - await runV2MigrationsAsync(provider, artifactsDir, txDefaults); -}); diff --git a/packages/0x.js/test/utils/chai_setup.ts b/packages/0x.js/test/utils/chai_setup.ts deleted file mode 100644 index 1a8733093..000000000 --- a/packages/0x.js/test/utils/chai_setup.ts +++ /dev/null @@ -1,13 +0,0 @@ -import * as chai from 'chai'; -import chaiAsPromised = require('chai-as-promised'); -import ChaiBigNumber = require('chai-bignumber'); -import * as dirtyChai from 'dirty-chai'; - -export const chaiSetup = { - configure(): void { - chai.config.includeStack = true; - chai.use(ChaiBigNumber()); - chai.use(dirtyChai); - chai.use(chaiAsPromised); - }, -}; diff --git a/packages/0x.js/test/utils/constants.ts b/packages/0x.js/test/utils/constants.ts deleted file mode 100644 index cf030259c..000000000 --- a/packages/0x.js/test/utils/constants.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const constants = { - NULL_ADDRESS: '0x0000000000000000000000000000000000000000', - ROPSTEN_NETWORK_ID: 3, - KOVAN_NETWORK_ID: 42, - TESTRPC_NETWORK_ID: 50, - KOVAN_RPC_URL: 'https://kovan.infura.io/', - ROPSTEN_RPC_URL: 'https://ropsten.infura.io/', - ZRX_DECIMALS: 18, -}; diff --git a/packages/0x.js/test/utils/token_utils.ts b/packages/0x.js/test/utils/token_utils.ts deleted file mode 100644 index a439c464d..000000000 --- a/packages/0x.js/test/utils/token_utils.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { artifacts } from '../../src/artifacts'; - -import { constants } from './constants'; - -export const tokenUtils = { - getProtocolTokenAddress(): string { - return artifacts.ZRXToken.networks[constants.TESTRPC_NETWORK_ID].address; - }, -}; diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts deleted file mode 100644 index 02c8c5918..000000000 --- a/packages/0x.js/test/utils/web3_wrapper.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { devConstants, web3Factory } from '@0xproject/dev-utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -import { Provider } from 'ethereum-types'; - -const txDefaults = { - from: devConstants.TESTRPC_FIRST_ADDRESS, - gas: devConstants.GAS_LIMIT, -}; -const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true }); -const web3Wrapper = new Web3Wrapper(provider); - -export { provider, web3Wrapper, txDefaults }; diff --git a/yarn.lock b/yarn.lock index 598af599b..e8d5f3018 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5275,9 +5275,9 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22: - version "3.0.18" - resolved "https://codeload.github.com/0xproject/ethers.js/tar.gz/b91342bd200d142af0165d6befddf783c8ae8447" +ethers@3.0.22: + version "3.0.22" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" dependencies: aes-js "3.0.0" bn.js "^4.4.0" @@ -6028,7 +6028,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "0.6.0" + ethereumjs-wallet "~0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" -- cgit v1.2.3 From c320c8742e140f00d93a82ade91c01e6602b861d Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 18:20:45 -0700 Subject: Add CHANGELOG entry about public interface refactor --- packages/0x.js/CHANGELOG.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 756a8991f..66ada59e8 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.0.1-rc.4", + "changes": [ + { + "note": + "Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`" + } + ] + }, { "version": "1.0.1-rc.3", "changes": [ -- cgit v1.2.3 From 336519a690ab694344c95f5102c324a4fc48f438 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 18:50:12 -0700 Subject: Add PR nr. --- packages/0x.js/CHANGELOG.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 8196a039f..0f5a10e43 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -4,7 +4,8 @@ "changes": [ { "note": - "Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`" + "Re-organize the exported interface of 0x.js. Remove the `ZeroEx` class, and instead export the same exports as `0x.js`'s sub-packages: `@0xproject/contract-wrappers`, `@0xproject/order-utils` and `@0xproject/order-watcher`", + "pr": 963 } ] }, -- cgit v1.2.3 From f2d9dfb56b52a0316f618232b8054d8993adcdd4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 13 Aug 2018 20:51:04 -0700 Subject: Remove 0x.js from Circle CI --- .circleci/config.yml | 482 +++++++++++++++++++++++++-------------------------- 1 file changed, 237 insertions(+), 245 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a6fb511b9..d4082f511 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,250 +1,242 @@ version: 2 jobs: - build: - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - checkout - - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-{{ .Branch }} - - yarn-packages-master - - yarn-packages- - - run: - name: yarn - command: yarn --frozen-lockfile install - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules/ - - run: > - if [ -z "$(git diff --name-only v2-prototype packages/website)" ]; then - yarn build --exclude website - else - yarn build - fi - - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - test-contracts-ganache: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci contracts - test-contracts-geth: - docker: - - image: circleci/node:9 - - image: albrow/0x-devnet - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is - # initialized - - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - test-publish: - docker: - - image: circleci/node:9 - - image: verdaccio/verdaccio - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:publish:circleci - test-rest: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci 0x.js - - run: yarn wsrun test:circleci @0xproject/abi-gen - - run: yarn wsrun test:circleci @0xproject/assert - - run: yarn wsrun test:circleci @0xproject/base-contract - - run: yarn wsrun test:circleci @0xproject/connect - - run: yarn wsrun test:circleci @0xproject/contract-wrappers - - run: yarn wsrun test:circleci @0xproject/dev-utils - - run: yarn wsrun test:circleci @0xproject/json-schemas - - run: yarn wsrun test:circleci @0xproject/metacoin - - run: yarn wsrun test:circleci @0xproject/order-utils - - run: yarn wsrun test:circleci @0xproject/order-watcher - - run: yarn wsrun test:circleci @0xproject/sol-compiler - - run: yarn wsrun test:circleci @0xproject/sol-cov - - run: yarn wsrun test:circleci @0xproject/sra-report - - run: yarn wsrun test:circleci @0xproject/subproviders - - run: yarn wsrun test:circleci @0xproject/web3-wrapper - - run: yarn wsrun test:circleci @0xproject/utils - - save_cache: - key: coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/0x.js/coverage/lcov.info - - save_cache: - key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/abi-gen/coverage/lcov.info - - save_cache: - key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/assert/coverage/lcov.info - - save_cache: - key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/base-contract/coverage/lcov.info - - save_cache: - key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/connect/coverage/lcov.info - - save_cache: - key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/contract-wrappers/coverage/lcov.info - - save_cache: - key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/dev-utils/coverage/lcov.info - - save_cache: - key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/json-schemas/coverage/lcov.info - - save_cache: - key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/metacoin/coverage/lcov.info - - save_cache: - key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-utils/coverage/lcov.info - - save_cache: - key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-watcher/coverage/lcov.info - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-cov/coverage/lcov.info - - save_cache: - key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sra-report/coverage/lcov.info - - save_cache: - key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/subproviders/coverage/lcov.info - - save_cache: - key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/web3-wrapper/coverage/lcov.info - static-tests: - working_directory: ~/repo - docker: - - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn prettier:ci - - run: yarn lerna run lint - submit-coverage: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn report_coverage + build: + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - checkout + - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + - yarn-packages-{{ .Branch }} + - yarn-packages-master + - yarn-packages- + - run: + name: yarn + command: yarn --frozen-lockfile install + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + paths: + - node_modules/ + - run: > + if [ -z "$(git diff --name-only v2-prototype packages/website)" ]; then + yarn build --exclude website + else + yarn build + fi + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + test-contracts-ganache: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci contracts + test-contracts-geth: + docker: + - image: circleci/node:9 + - image: albrow/0x-devnet + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is + # initialized + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts + test-publish: + docker: + - image: circleci/node:9 + - image: verdaccio/verdaccio + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:publish:circleci + test-rest: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci @0xproject/abi-gen + - run: yarn wsrun test:circleci @0xproject/assert + - run: yarn wsrun test:circleci @0xproject/base-contract + - run: yarn wsrun test:circleci @0xproject/connect + - run: yarn wsrun test:circleci @0xproject/contract-wrappers + - run: yarn wsrun test:circleci @0xproject/dev-utils + - run: yarn wsrun test:circleci @0xproject/json-schemas + - run: yarn wsrun test:circleci @0xproject/metacoin + - run: yarn wsrun test:circleci @0xproject/order-utils + - run: yarn wsrun test:circleci @0xproject/order-watcher + - run: yarn wsrun test:circleci @0xproject/sol-compiler + - run: yarn wsrun test:circleci @0xproject/sol-cov + - run: yarn wsrun test:circleci @0xproject/sra-report + - run: yarn wsrun test:circleci @0xproject/subproviders + - run: yarn wsrun test:circleci @0xproject/web3-wrapper + - run: yarn wsrun test:circleci @0xproject/utils + - save_cache: + key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/abi-gen/coverage/lcov.info + - save_cache: + key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/assert/coverage/lcov.info + - save_cache: + key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/base-contract/coverage/lcov.info + - save_cache: + key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/connect/coverage/lcov.info + - save_cache: + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/dev-utils/coverage/lcov.info + - save_cache: + key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/json-schemas/coverage/lcov.info + - save_cache: + key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/metacoin/coverage/lcov.info + - save_cache: + key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-utils/coverage/lcov.info + - save_cache: + key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-watcher/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-compiler/coverage/lcov.info + - save_cache: + key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-cov/coverage/lcov.info + - save_cache: + key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sra-report/coverage/lcov.info + - save_cache: + key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/subproviders/coverage/lcov.info + - save_cache: + key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/web3-wrapper/coverage/lcov.info + static-tests: + working_directory: ~/repo + docker: + - image: circleci/node:9 + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn prettier:ci + - run: yarn lerna run lint + submit-coverage: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn report_coverage workflows: - version: 2 - main: - jobs: - - build - - test-contracts-ganache: - requires: + version: 2 + main: + jobs: - build - - test-contracts-geth: - requires: - - build - - test-rest: - requires: - - build - - static-tests: - requires: - - build - - test-publish: - requires: - - build - - submit-coverage: - requires: - - test-rest + - test-contracts-ganache: + requires: + - build + - test-contracts-geth: + requires: + - build + - test-rest: + requires: + - build + - static-tests: + requires: + - build + - test-publish: + requires: + - build + - submit-coverage: + requires: + - test-rest -- cgit v1.2.3 From 1d9408a8e04aaea35bcf517fd3332b9bcc62bba0 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 14:39:59 -0700 Subject: Fix additional merge conflicts --- .../test/calldata_optimization_utils_test.ts | 2 +- .../src/utils/doc_generate_and_upload_utils.ts | 15 +-- packages/order-utils/src/signature_utils.ts | 2 +- packages/order-utils/test/market_utils_test.ts | 3 +- packages/order-utils/test/signature_utils_test.ts | 39 +++++--- .../order-utils/test/utils/test_order_factory.ts | 3 +- yarn.lock | 104 ++++++++++++++++++--- 7 files changed, 135 insertions(+), 33 deletions(-) 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'; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 84fb9d20c..777d908fb 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -1,15 +1,14 @@ -import * as _ from 'lodash'; - -import { constants } from '../constants'; -import { utils } from './utils'; - import { readFileSync, writeFileSync } from 'fs'; +import * as _ from 'lodash'; import * as path from 'path'; import { exec as execAsync } from 'promisify-child-process'; import * as ts from 'typescript'; +import { constants } from '../constants'; import { ExportPathToExportedItems } from '../types'; +import { utils } from './utils'; + interface ExportInfo { exportPathToExportedItems: ExportPathToExportedItems; exportPathOrder: string[]; @@ -83,8 +82,8 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: } if (!_.startsWith(innerExportPath, './')) { throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is - itself exported from an external package. To fix this, export the external dependency directly, + `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is + itself exported from an external package. To fix this, export the external dependency directly, not indirectly through ${innerExportPath}.`, ); } else { @@ -192,6 +191,8 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // Remove the generated docs directory await execAsync(`rm -rf ${jsonFilePath}`, { cwd, + }); +} function getAllReferenceNames(propertyName: string, node: any, referenceNames: string[]): string[] { let updatedReferenceNames = referenceNames; diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index d466bb00d..40bbcef98 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -49,7 +49,7 @@ export const signatureUtils = { case SignatureType.EthSign: { const ecSignature = signatureUtils.parseECSignature(signature); - const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data, SignerType.EthSign); + const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data, SignerType.Default); return signatureUtils.isValidECSignature(prefixedMessageHex, ecSignature, signerAddress); } diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts index 21c0a4802..5d94cc55c 100644 --- a/packages/order-utils/test/market_utils_test.ts +++ b/packages/order-utils/test/market_utils_test.ts @@ -2,7 +2,8 @@ import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import 'mocha'; -import { constants, marketUtils } from '../src'; +import { marketUtils } from '../src'; +import { constants } from '../src/constants'; import { chaiSetup } from './utils/chai_setup'; import { testOrderFactory } from './utils/test_order_factory'; diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index 06ff86515..4ce99a1c7 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -6,8 +6,8 @@ import * as _ from 'lodash'; import 'mocha'; import * as Sinon from 'sinon'; -import { signatureUtils, generatePseudoRandomSalt } from '../src'; -import { convertECSignatureToSignatureHex, isValidSignatureAsync } from '../src/signature_utils'; +import { generatePseudoRandomSalt } from '../src'; +import { signatureUtils } from '../src/signature_utils'; import { chaiSetup } from './utils/chai_setup'; import { provider, web3Wrapper } from './utils/web3_wrapper'; @@ -16,7 +16,7 @@ chaiSetup.configure(); const expect = chai.expect; describe('Signature utils', () => { - describe('#isValidSignature', () => { + describe('#isValidSignatureAsync', () => { let dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0'; const ethSignSignature = '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403'; @@ -255,7 +255,12 @@ describe('Signature utils', () => { SignerType.Default, ); - const isValidSignature = await isValidSignatureAsync(provider, orderHash, ecSignature, makerAddress); + const isValidSignature = await signatureUtils.isValidSignatureAsync( + provider, + orderHash, + ecSignature, + makerAddress, + ); expect(isValidSignature).to.be.true(); }); }); @@ -268,32 +273,44 @@ describe('Signature utils', () => { it('should concatenate v,r,s and append the Trezor signature type', async () => { const expectedSignatureWithSignatureType = '0x1baca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf208'; - const signatureWithSignatureType = convertECSignatureToSignatureHex(ecSignature, SignerType.Trezor); + const signatureWithSignatureType = signatureUtils.convertECSignatureToSignatureHex( + ecSignature, + SignerType.Trezor, + ); expect(signatureWithSignatureType).to.equal(expectedSignatureWithSignatureType); }); it('should concatenate v,r,s and append the EthSign signature type when SignerType is Default', async () => { const expectedSignatureWithSignatureType = '0x1baca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf203'; - const signatureWithSignatureType = convertECSignatureToSignatureHex(ecSignature, SignerType.Default); + const signatureWithSignatureType = signatureUtils.convertECSignatureToSignatureHex( + ecSignature, + SignerType.Default, + ); expect(signatureWithSignatureType).to.equal(expectedSignatureWithSignatureType); }); it('should concatenate v,r,s and append the EthSign signature type when SignerType is Ledger', async () => { const expectedSignatureWithSignatureType = '0x1baca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf203'; - const signatureWithSignatureType = convertECSignatureToSignatureHex(ecSignature, SignerType.Ledger); + const signatureWithSignatureType = signatureUtils.convertECSignatureToSignatureHex( + ecSignature, + SignerType.Ledger, + ); expect(signatureWithSignatureType).to.equal(expectedSignatureWithSignatureType); }); it('should concatenate v,r,s and append the EthSign signature type when SignerType is Metamask', async () => { const expectedSignatureWithSignatureType = '0x1baca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf203'; - const signatureWithSignatureType = convertECSignatureToSignatureHex(ecSignature, SignerType.Metamask); + const signatureWithSignatureType = signatureUtils.convertECSignatureToSignatureHex( + ecSignature, + SignerType.Metamask, + ); expect(signatureWithSignatureType).to.equal(expectedSignatureWithSignatureType); }); it('should throw if the SignerType is invalid', async () => { const expectedMessage = 'Unrecognized SignerType: INVALID_SIGNER'; - expect(() => convertECSignatureToSignatureHex(ecSignature, 'INVALID_SIGNER' as SignerType)).to.throw( - expectedMessage, - ); + expect(() => + signatureUtils.convertECSignatureToSignatureHex(ecSignature, 'INVALID_SIGNER' as SignerType), + ).to.throw(expectedMessage); }); }); }); diff --git a/packages/order-utils/test/utils/test_order_factory.ts b/packages/order-utils/test/utils/test_order_factory.ts index 75dc6f1f2..69184f129 100644 --- a/packages/order-utils/test/utils/test_order_factory.ts +++ b/packages/order-utils/test/utils/test_order_factory.ts @@ -1,7 +1,8 @@ import { Order, SignedOrder } from '@0xproject/types'; import * as _ from 'lodash'; -import { constants, orderFactory } from '../../src'; +import { constants } from '../../src/constants'; +import { orderFactory } from '../../src/order_factory'; const BASE_TEST_ORDER: Order = orderFactory.createOrder( constants.NULL_ADDRESS, diff --git a/yarn.lock b/yarn.lock index 50a5ef161..6fafdb83f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -690,6 +690,27 @@ ethers "3.0.22" lodash "4.17.10" +"@0xproject/react-shared@^0.2.3": + version "0.2.3" + resolved "https://registry.yarnpkg.com/@0xproject/react-shared/-/react-shared-0.2.3.tgz#f0403b9b7f1cfbe2853b53cc983ebb13ee8753a5" + dependencies: + "@types/lodash" "4.14.104" + "@types/material-ui" "0.18.0" + "@types/node" "9.6.0" + "@types/react" "16.3.13" + "@types/react-dom" "16.0.4" + "@types/react-scroll" "0.0.31" + basscss "8.0.4" + is-mobile "0.2.2" + lodash "4.17.10" + material-ui "0.17.4" + react "15.6.1" + react-dom "15.6.1" + react-highlight "0xproject/react-highlight" + react-markdown "3.2.2" + react-scroll "1.7.7" + react-tap-event-plugin "2.0.1" + "@0xproject/sol-compiler@^0.5.3", "@0xproject/sol-compiler@^0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@0xproject/sol-compiler/-/sol-compiler-0.5.4.tgz#3e0b04b0c02c5ec046ebb962b5ed20978c6b4cdd" @@ -1101,6 +1122,13 @@ "@types/node" "*" "@types/react" "*" +"@types/react-dom@16.0.4": + version "16.0.4" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.4.tgz#2e8fd45f5443780ed49bf2cdd9809e6091177a7d" + dependencies: + "@types/node" "*" + "@types/react" "*" + "@types/react-dom@^16.0.3": version "16.0.5" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96" @@ -1136,6 +1164,12 @@ "@types/history" "*" "@types/react" "*" +"@types/react-scroll@0.0.31": + version "0.0.31" + resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-0.0.31.tgz#1bb26bfd9f595da6403c2f13c2f9a3ed4d2929fa" + dependencies: + "@types/react" "*" + "@types/react-scroll@1.5.3": version "1.5.3" resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-1.5.3.tgz#cc4e94db3d7d5b1cd244bfee24091c335d3e2598" @@ -2454,7 +2488,7 @@ basscss-typography@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/basscss-typography/-/basscss-typography-3.0.4.tgz#ec946a2bad8dd1af97be9ea108ad4bb7be932464" -basscss@^8.0.3: +basscss@8.0.4, basscss@^8.0.3: version "8.0.4" resolved "https://registry.yarnpkg.com/basscss/-/basscss-8.0.4.tgz#b371a2ce25aeb9b322302f37f4e425753dd29ae1" dependencies: @@ -5952,7 +5986,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "0.6.0" + ethereumjs-wallet "~0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" @@ -6850,12 +6884,6 @@ icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" -icss-utils@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-2.1.0.tgz#83f0a0ec378bf3246178b6c2ad9136f135b1c962" - dependencies: - postcss "^6.0.1" - ieee754@1.1.8: version "1.1.8" resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" @@ -7274,7 +7302,7 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" -is-mobile@^0.2.2: +is-mobile@0.2.2, is-mobile@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-0.2.2.tgz#0e2e006d99ed2c2155b761df80f2a3619ae2ad9f" @@ -8559,11 +8587,11 @@ marked@0.3.18: version "0.3.18" resolved "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz#3ef058cd926101849b92a7a7c15db18c7fc76b2f" -marked@^0.3.12, marked@^0.3.5: +marked@^0.3.12: version "0.3.19" resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" -material-ui@^0.17.1: +material-ui@0.17.4, material-ui@^0.17.1: version "0.17.4" resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-0.17.4.tgz#193999ecb49c3ec15ae0abb4e90fdf9a7bd343e0" dependencies: @@ -9848,6 +9876,17 @@ parse-asn1@^5.0.0: evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" +parse-entities@^1.0.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.2.tgz#9eaf719b29dc3bd62246b4332009072e01527777" + dependencies: + character-entities "^1.0.0" + character-entities-legacy "^1.0.0" + character-reference-invalid "^1.0.0" + is-alphanumerical "^1.0.0" + is-decimal "^1.0.0" + is-hexadecimal "^1.0.0" + parse-entities@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.1.tgz#8112d88471319f27abae4d64964b122fe4e1b890" @@ -11058,6 +11097,13 @@ react-scroll@0xproject/react-scroll#similar-to-pr-330: lodash.throttle "^4.1.1" prop-types "^15.5.8" +react-scroll@1.7.7: + version "1.7.7" + resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.7.tgz#948c40c9a189b62bf4a53ee0fd50e5d89d37260a" + dependencies: + lodash.throttle "^4.1.1" + prop-types "^15.5.8" + react-side-effect@^1.0.2, react-side-effect@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d" @@ -11460,6 +11506,26 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" +remark-parse@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-4.0.0.tgz#99f1f049afac80382366e2e0d0bd55429dd45d8b" + dependencies: + collapse-white-space "^1.0.2" + is-alphabetical "^1.0.0" + is-decimal "^1.0.0" + is-whitespace-character "^1.0.0" + is-word-character "^1.0.0" + markdown-escapes "^1.0.0" + parse-entities "^1.0.2" + repeat-string "^1.5.4" + state-toggle "^1.0.0" + trim "0.0.1" + trim-trailing-lines "^1.0.0" + unherit "^1.0.4" + unist-util-remove-position "^1.0.0" + vfile-location "^2.0.0" + xtend "^4.0.1" + remark-parse@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-5.0.0.tgz#4c077f9e499044d1d5c13f80d7a98cf7b9285d95" @@ -13723,6 +13789,10 @@ unist-util-is@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.1.tgz#0c312629e3f960c66e931e812d3d80e77010947b" +unist-util-is@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.2.tgz#1193fa8f2bfbbb82150633f3a8d2eb9a1c1d55db" + unist-util-remove-position@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz#5a85c1555fc1ba0c101b86707d15e50fa4c871bb" @@ -13733,12 +13803,24 @@ unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz#3ccbdc53679eed6ecf3777dd7f5e3229c1b6aa3c" +unist-util-visit-parents@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.0.1.tgz#63fffc8929027bee04bfef7d2cce474f71cb6217" + dependencies: + unist-util-is "^2.1.2" + unist-util-visit@^1.1.0, unist-util-visit@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.0.tgz#41ca7c82981fd1ce6c762aac397fc24e35711444" dependencies: unist-util-is "^2.1.1" +unist-util-visit@^1.1.3: + version "1.4.0" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.0.tgz#1cb763647186dc26f5e1df5db6bd1e48b3cc2fb1" + dependencies: + unist-util-visit-parents "^2.0.0" + universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" -- cgit v1.2.3 From 8bebffb14775234d5cc8dd730ba6d55ebfa941c7 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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/0x.js/src/index.ts | 46 +++++++++++++++++++++++++++++++-- packages/contract-wrappers/src/index.ts | 1 + packages/ethereum-types/src/index.ts | 8 +++--- packages/sol-compiler/src/index.ts | 2 ++ 4 files changed, 51 insertions(+), 6 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index bb93b86ea..a26d827d7 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -46,18 +46,24 @@ export { ExchangeCancelEventArgs, ExchangeEventArgs, ExchangeEvents, + ContractEvents, } from '@0xproject/contract-wrappers'; +export { ContractWrapper } from '@0xproject/contract-wrappers/lib/src/contract_wrappers/contract_wrapper'; + +export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; + export { Web3ProviderEngine, RPCSubprovider, Callback, JSONRPCRequestPayloadWithMethod, ErrorCallback, - Subprovider, } from '@0xproject/subproviders'; -export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; +export { Web3Wrapper, NodeType } from '@0xproject/web3-wrapper'; + +export { AbiDecoder } from '@0xproject/utils'; export { BigNumber } from '@0xproject/utils'; @@ -74,10 +80,22 @@ export { Token, ERC20AssetData, ERC721AssetData, + SignatureType, + OrderRelevantState, } from '@0xproject/types'; +export { + ContractArtifact, + GeneratedCompilerOptions, + ContractNetworks, + ContractVersionData, + ContractNetworkData, + Source, +} from '@0xproject/sol-compiler'; + export { BlockParamLiteral, + ContractAbi, FilterObject, BlockParam, LogWithDecodedArgs, @@ -95,4 +113,28 @@ export { LogEntryEvent, DecodedLogEntry, DecodedLogEntryEvent, + RawLog, + AbiDefinition, + TxData, + CallData, + BlockWithoutTransactionData, + BlockWithTransactionData, + Transaction, + TraceParams, + TransactionTrace, + AbstractBlock, + CallTxDataBase, + StructLog, + TxDataPayable, + FunctionAbi, + EventAbi, + EventParameter, + OpCode, + MethodAbi, + ConstructorAbi, + FallbackAbi, + DataItem, + ConstructorStateMutability, + StateMutability, + AbiType, } from 'ethereum-types'; 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 { diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index f4d445e3b..b2af028fb 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -20,7 +20,7 @@ export type ConstructorStateMutability = 'nonpayable' | 'payable'; export type StateMutability = 'pure' | 'view' | ConstructorStateMutability; export interface MethodAbi { - type: AbiType.Function; + type: 'function'; name: string; inputs: DataItem[]; outputs: DataItem[]; @@ -30,14 +30,14 @@ export interface MethodAbi { } export interface ConstructorAbi { - type: AbiType.Constructor; + type: 'constructor'; inputs: DataItem[]; payable: boolean; stateMutability: ConstructorStateMutability; } export interface FallbackAbi { - type: AbiType.Fallback; + type: 'fallback'; payable: boolean; } @@ -46,7 +46,7 @@ export interface EventParameter extends DataItem { } export interface EventAbi { - type: AbiType.Event; + type: 'event'; name: string; inputs: EventParameter[]; anonymous: boolean; diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index 89d529887..fe72a37d6 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -6,4 +6,6 @@ export { ContractNetworks, GeneratedCompilerOptions, ContractNetworkData, + ContractVersionData, + Source, } from './utils/types'; -- cgit v1.2.3 From 04e00e0c2849951b352692a8d8327160dc7475f8 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 16:34:21 -0700 Subject: Improve missing type detection --- .../src/utils/doc_generate_and_upload_utils.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 777d908fb..dfaaf1c07 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -22,6 +22,10 @@ interface ExportNameToTypedocNames { const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { BigNumber: 'http://mikemcl.github.io/bignumber.js', Error: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L134', + Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', + 'solc.StandardContractOutput': + 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', + 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', }; export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { @@ -159,9 +163,9 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); if (!_.isEmpty(missingReferences)) { throw new Error( - `${packageName} package needs to export ${missingReferences.join( - ', ', - )} from it's index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, + `${packageName} package needs to export: \n${missingReferences.join( + '\n', + )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, ); } @@ -201,7 +205,7 @@ function getAllReferenceNames(propertyName: string, node: any, referenceNames: s } // Some nodes of type reference are for subtypes, which we don't want to return. // We therefore filter them out. - const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites']; + const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes']; if ( !_.isUndefined(node.type) && _.isString(node.type) && -- cgit v1.2.3 From 19e17ba12859a9cc94ce480fc6b29e28c711321e Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 16:34:48 -0700 Subject: Add ability to hide specific class constructors --- .../src/utils/doc_generate_and_upload_utils.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index dfaaf1c07..187358421 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -28,6 +28,16 @@ const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', }; +const CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[] = [ + 'ERC20ProxyWrapper', + 'ERC20TokenWrapper', + 'ERC721ProxyWrapper', + 'ERC721TokenWrapper', + 'EtherTokenWrapper', + 'ExchangeWrapper', + 'ForwarderWrapper', +]; + export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { const monorepoPackages = utils.getPackages(constants.monorepoRootPath); const pkg = _.find(monorepoPackages, monorepoPackage => { @@ -146,6 +156,17 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: if (!_.includes(exportItems, child.name)) { delete finalTypeDocOutput.children[i].children[j]; } + if (child.kindString === 'Class' && _.includes(CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name)) { + const classChildren = typedocOutput.children[i].children[j].children; + _.each(classChildren, (classChild, k) => { + if (classChild.kindString === 'Constructor') { + delete finalTypeDocOutput.children[i].children[j].children[k]; + finalTypeDocOutput.children[i].children[j].children = _.compact( + finalTypeDocOutput.children[i].children[j].children, + ); + } + }); + } }); finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); }); -- cgit v1.2.3 From 267078ed6cea11aa8accc2336898694b77e8f169 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 17:23:36 -0700 Subject: Remove duplicate Typescript import --- packages/monorepo-scripts/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index c8c74ebd2..a5b03ac80 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -64,8 +64,7 @@ "semver": "5.5.0", "semver-diff": "^2.1.0", "semver-sort": "0.0.4", - "typedoc": "0xProject/typedoc", - "typescript": "2.7.1" + "typedoc": "0xProject/typedoc" }, "publishConfig": { "access": "public" -- cgit v1.2.3 From cb5d8d75bf03910d1e763eb34907ada296ed3062 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 17:24:48 -0700 Subject: Link class reference types exported in same package to their declaration --- .../react-docs/src/components/documentation.tsx | 3 +- .../react-docs/src/components/event_definition.tsx | 7 +- packages/react-docs/src/components/interface.tsx | 10 +- .../react-docs/src/components/property_block.tsx | 3 +- packages/react-docs/src/components/signature.tsx | 22 +++- .../react-docs/src/components/signature_block.tsx | 1 + packages/react-docs/src/components/type.tsx | 31 ++++-- .../react-docs/src/components/type_definition.tsx | 7 +- packages/react-docs/src/types.ts | 1 + packages/react-docs/src/utils/typedoc_utils.ts | 122 ++++++++++++++++----- 10 files changed, 163 insertions(+), 44 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index f4f1d2aa9..82e444018 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -30,8 +30,8 @@ import { import { Badge } from './badge'; import { Comment } from './comment'; import { EventDefinition } from './event_definition'; -import { SignatureBlock } from './signature_block'; import { PropertyBlock } from './property_block'; +import { SignatureBlock } from './signature_block'; import { TypeDefinition } from './type_definition'; const networkNameToColor: { [network: string]: string } = { @@ -225,6 +225,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta customType={customType} docsInfo={this.props.docsInfo} typeDefinitionByName={typeDefinitionByName} + isInPopover={false} /> ); }); diff --git a/packages/react-docs/src/components/event_definition.tsx b/packages/react-docs/src/components/event_definition.tsx index b4dc729a9..6cb80c6b0 100644 --- a/packages/react-docs/src/components/event_definition.tsx +++ b/packages/react-docs/src/components/event_definition.tsx @@ -53,7 +53,12 @@ export class EventDefinition extends React.Component<EventDefinitionProps, Event const indexed = <span style={{ color: colors.green }}> indexed</span>; const eventArgs = _.map(this.props.event.eventArgs, (eventArg: EventArg) => { const type = ( - <Type type={eventArg.type} sectionName={this.props.sectionName} docsInfo={this.props.docsInfo} /> + <Type + type={eventArg.type} + sectionName={this.props.sectionName} + docsInfo={this.props.docsInfo} + isInPopover={false} + /> ); return ( <span key={`eventArg-${eventArg.name}`}> diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index eaf57ce93..93b10e96d 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -7,14 +7,17 @@ import { CustomType, TypeDefinitionByName } from '../types'; import { Signature } from './signature'; import { Type } from './type'; +const defaultProps = {}; + export interface InterfaceProps { type: CustomType; sectionName: string; docsInfo: DocsInfo; typeDefinitionByName: TypeDefinitionByName; + isInPopover: boolean; } -export const Interface = (props: InterfaceProps) => { +export const Interface: React.SFC<InterfaceProps> = (props: InterfaceProps): any => { const type = props.type; const properties = _.map(type.children, property => { return ( @@ -31,6 +34,7 @@ export const Interface = (props: InterfaceProps) => { shouldUseArrowSyntax={true} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={props.isInPopover} /> ) : ( <Type @@ -38,6 +42,7 @@ export const Interface = (props: InterfaceProps) => { sectionName={props.sectionName} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={props.isInPopover} /> )}, </span> @@ -54,6 +59,7 @@ export const Interface = (props: InterfaceProps) => { sectionName={props.sectionName} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={props.isInPopover} /> </span> ); @@ -77,3 +83,5 @@ export const Interface = (props: InterfaceProps) => { </span> ); }; + +Interface.defaultProps = defaultProps; diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index 6e5c451be..f181e21d2 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -6,8 +6,8 @@ import { Property, TypeDefinitionByName } from '../types'; import { constants } from '../utils/constants'; import { Comment } from './comment'; -import { Type } from './type'; import { SourceLink } from './source_link'; +import { Type } from './type'; export interface PropertyBlockProps { property: Property; @@ -56,6 +56,7 @@ export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyB sectionName={sectionName} docsInfo={this.props.docsInfo} typeDefinitionByName={this.props.typeDefinitionByName} + isInPopover={false} /> </code> {property.source && ( diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx index d9567c9f6..bf9c8be24 100644 --- a/packages/react-docs/src/components/signature.tsx +++ b/packages/react-docs/src/components/signature.tsx @@ -17,6 +17,7 @@ export interface SignatureProps { typeParameter?: TypeParameter; callPath?: string; docsInfo: DocsInfo; + isInPopover: boolean; } const defaultProps = { @@ -27,7 +28,13 @@ const defaultProps = { export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => { const sectionName = props.sectionName; - const parameters = renderParameters(props.parameters, props.docsInfo, sectionName, props.typeDefinitionByName); + const parameters = renderParameters( + props.parameters, + props.docsInfo, + sectionName, + props.isInPopover, + props.typeDefinitionByName, + ); const paramStringArray: any[] = []; // HACK: For now we don't put params on newlines if there are less then 2 of them. // Ideally we would check the character length of the resulting method signature and @@ -57,7 +64,13 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => { const methodName = props.shouldHideMethodName ? '' : props.name; const typeParameterIfExists = _.isUndefined(props.typeParameter) ? undefined - : renderTypeParameter(props.typeParameter, props.docsInfo, sectionName, props.typeDefinitionByName); + : renderTypeParameter( + props.typeParameter, + props.docsInfo, + sectionName, + props.isInPopover, + props.typeDefinitionByName, + ); return ( <span style={{ fontSize: 15 }}> {props.callPath} @@ -72,6 +85,7 @@ export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => { sectionName={sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} + isInPopover={props.isInPopover} /> </span> )} @@ -85,6 +99,7 @@ function renderParameters( parameters: Parameter[], docsInfo: DocsInfo, sectionName: string, + isInPopover: boolean, typeDefinitionByName?: TypeDefinitionByName, ): React.ReactNode[] { const params = _.map(parameters, (p: Parameter) => { @@ -96,6 +111,7 @@ function renderParameters( sectionName={sectionName} typeDefinitionByName={typeDefinitionByName} docsInfo={docsInfo} + isInPopover={isInPopover} /> ); return ( @@ -113,6 +129,7 @@ function renderTypeParameter( typeParameter: TypeParameter, docsInfo: DocsInfo, sectionName: string, + isInPopover: boolean, typeDefinitionByName?: TypeDefinitionByName, ): React.ReactNode { const typeParam = ( @@ -123,6 +140,7 @@ function renderTypeParameter( sectionName={sectionName} typeDefinitionByName={typeDefinitionByName} docsInfo={docsInfo} + isInPopover={isInPopover} /> {`>`} </span> diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 9e5198e16..934232efe 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -81,6 +81,7 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu sectionName={this.props.sectionName} typeDefinitionByName={this.props.typeDefinitionByName} docsInfo={this.props.docsInfo} + isInPopover={false} /> </code> {(method as TypescriptMethod).source && ( diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 1c580caab..eae52e950 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -7,23 +7,26 @@ import * as ReactTooltip from 'react-tooltip'; import { DocsInfo } from '../docs_info'; import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '../types'; +import { constants } from '../utils/constants'; import { Signature } from './signature'; -import { constants } from '../utils/constants'; import { TypeDefinition } from './type_definition'; const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean']; +const defaultProps = {}; + export interface TypeProps { type: TypeDef; docsInfo: DocsInfo; sectionName: string; typeDefinitionByName?: TypeDefinitionByName; + isInPopover: boolean; } // The return type needs to be `any` here so that we can recursively define <Type /> components within // <Type /> components (e.g when rendering the union type). -export function Type(props: TypeProps): any { +export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { const type = props.type; const isReference = type.typeDocType === TypeDocTypes.Reference; const isArray = type.typeDocType === TypeDocTypes.Array; @@ -50,6 +53,7 @@ export function Type(props: TypeProps): any { sectionName={props.sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} + isInPopover={props.isInPopover} />[] </span> ); @@ -61,6 +65,7 @@ export function Type(props: TypeProps): any { sectionName={props.sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} + isInPopover={props.isInPopover} /> ); return subType; @@ -89,6 +94,7 @@ export function Type(props: TypeProps): any { sectionName={props.sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} + isInPopover={props.isInPopover} /> ); }); @@ -110,6 +116,7 @@ export function Type(props: TypeProps): any { shouldUseArrowSyntax={true} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={props.isInPopover} /> ); } else if (!_.isUndefined(type.indexSignature)) { @@ -122,6 +129,7 @@ export function Type(props: TypeProps): any { sectionName={props.sectionName} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={props.isInPopover} /> </span> ); @@ -150,6 +158,7 @@ export function Type(props: TypeProps): any { sectionName={props.sectionName} typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} + isInPopover={props.isInPopover} /> ); }); @@ -180,6 +189,7 @@ export function Type(props: TypeProps): any { ? props.docsInfo.typeConfigs.typeNameToPrefix[typeName as string] : undefined; } + const isExportedClassReference = !!props.type.isExportedClassReference; if (!_.isUndefined(typeNameUrlIfExists)) { typeName = ( <a @@ -194,12 +204,12 @@ export function Type(props: TypeProps): any { ); } else if ( (isReference || isArray) && - props.typeDefinitionByName && - props.typeDefinitionByName[typeName as string] + ((props.typeDefinitionByName && props.typeDefinitionByName[typeName as string]) || isExportedClassReference) ) { const id = Math.random().toString(); - const typeDefinitionAnchorId = `${constants.TYPES_SECTION_NAME}-${typeName}`; - let typeDefinition = props.typeDefinitionByName[typeName as string]; + const typeDefinitionAnchorId = isExportedClassReference + ? props.type.name + : `${constants.TYPES_SECTION_NAME}-${typeName}`; typeName = ( <ScrollLink to={typeDefinitionAnchorId} @@ -208,7 +218,7 @@ export function Type(props: TypeProps): any { duration={sharedConstants.DOCS_SCROLL_DURATION_MS} containerId={sharedConstants.DOCS_CONTAINER_ID} > - {sharedUtils.isUserOnMobile() ? ( + {sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? ( <span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span> ) : ( <span @@ -224,10 +234,11 @@ export function Type(props: TypeProps): any { <ReactTooltip type="light" effect="solid" id={id} className="typeTooltip"> <TypeDefinition sectionName={props.sectionName} - customType={typeDefinition} + customType={props.typeDefinitionByName[typeName as string]} shouldAddId={false} docsInfo={props.docsInfo} typeDefinitionByName={props.typeDefinitionByName} + isInPopover={true} /> </ReactTooltip> </span> @@ -248,4 +259,6 @@ export function Type(props: TypeProps): any { )} </span> ); -} +}; + +Type.defaultProps = defaultProps; diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index 775d9890f..8d1f88490 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; -import { CustomType, CustomTypeChild, KindString, TypeDocTypes, TypeDefinitionByName } from '../types'; +import { CustomType, CustomTypeChild, KindString, TypeDefinitionByName, TypeDocTypes } from '../types'; import { constants } from '../utils/constants'; import { Comment } from './comment'; @@ -20,6 +20,7 @@ export interface TypeDefinitionProps { shouldAddId?: boolean; docsInfo: DocsInfo; typeDefinitionByName?: TypeDefinitionByName; + isInPopover?: boolean; } export interface TypeDefinitionState { @@ -29,6 +30,7 @@ export interface TypeDefinitionState { export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDefinitionState> { public static defaultProps: Partial<TypeDefinitionProps> = { shouldAddId: true, + isInPopover: false, }; constructor(props: TypeDefinitionProps) { super(props); @@ -50,6 +52,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef sectionName={this.props.sectionName} docsInfo={this.props.docsInfo} typeDefinitionByName={this.props.typeDefinitionByName} + isInPopover={this.props.isInPopover} /> ); break; @@ -81,6 +84,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef sectionName={this.props.sectionName} docsInfo={this.props.docsInfo} typeDefinitionByName={this.props.typeDefinitionByName} + isInPopover={this.props.isInPopover} /> ) : ( <Signature @@ -94,6 +98,7 @@ export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDef shouldUseArrowSyntax={true} docsInfo={this.props.docsInfo} typeDefinitionByName={this.props.typeDefinitionByName} + isInPopover={this.props.isInPopover} /> )} </span> diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 18c386a2b..c39dfcba8 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -154,6 +154,7 @@ export interface Type { name: string; typeDocType: TypeDocTypes; value?: string; + isExportedClassReference?: boolean; typeArguments?: Type[]; elementType?: ElementType; types?: Type[]; diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index b45dc73a8..ab5408ec2 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -7,6 +7,7 @@ import { CustomTypeChild, DocAgnosticFormat, DocSection, + GeneratedDocJson, IndexSignature, KindString, Parameter, @@ -19,7 +20,6 @@ import { TypeParameter, TypescriptFunction, TypescriptMethod, - GeneratedDocJson, } from '../types'; import { constants } from './constants'; @@ -72,6 +72,15 @@ export const typeDocUtils = { ), ); + const classNames: string[] = []; + _.each(typeDocJson.children, file => { + _.each(file.children, child => { + if (child.kindString === KindString.Class) { + classNames.push(child.name); + } + }); + }); + const docAgnosticFormat: DocAgnosticFormat = {}; const typeEntities: TypeDocNode[] = []; _.each(typeDocNameOrder, typeDocName => { @@ -93,6 +102,7 @@ export const typeDocUtils = { entities, docsInfo, sectionName, + classNames, isClassOrObjectLiteral, ); docSection.comment = sectionComment; @@ -106,7 +116,12 @@ export const typeDocUtils = { const entities = [child]; const commentObj = child.comment; const SectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; - const docSection = typeDocUtils._convertEntitiesToDocSection(entities, docsInfo, sectionName); + const docSection = typeDocUtils._convertEntitiesToDocSection( + entities, + docsInfo, + sectionName, + classNames, + ); docSection.comment = SectionComment; docAgnosticFormat[sectionName] = docSection; break; @@ -129,6 +144,7 @@ export const typeDocUtils = { typeEntities, docsInfo, constants.TYPES_SECTION_NAME, + classNames, ); docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; } @@ -139,6 +155,7 @@ export const typeDocUtils = { entities: TypeDocNode[], docsInfo: DocsInfo, sectionName: string, + classNames: string[], isClassOrObjectLiteral: boolean = false, ): DocSection { const docSection: DocSection = { @@ -161,6 +178,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + classNames, ); docSection.constructors.push(constructor); break; @@ -176,6 +194,7 @@ export const typeDocUtils = { sectionName, docsInfo.id, isClassOrObjectLiteral, + classNames, ); docSection.functions.push(func); } @@ -191,6 +210,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + classNames, ); docSection.methods.push(method); } @@ -203,6 +223,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + classNames, ); docSection.properties.push(property); } @@ -216,6 +237,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + classNames, ); docSection.properties.push(property); } else { @@ -225,6 +247,7 @@ export const typeDocUtils = { docsInfo.sections, sectionName, docsInfo.id, + classNames, ); const seenTypeNames = _.map(docSection.types, t => t.name); const isUnseen = !_.includes(seenTypeNames, customType.name); @@ -235,14 +258,14 @@ export const typeDocUtils = { break; case KindString.Interface: - case KindString.Variable: case KindString.Enumeration: - case KindString.TypeAlias: + case KindString.TypeAlias: { const customType = typeDocUtils._convertCustomType( entity, docsInfo.sections, sectionName, docsInfo.id, + classNames, ); const seenTypeNames = _.map(docSection.types, t => t.name); const isUnseen = !_.includes(seenTypeNames, customType.name); @@ -250,6 +273,7 @@ export const typeDocUtils = { docSection.types.push(customType); } break; + } case KindString.Class: // We currently do not support more then a single class per file @@ -263,18 +287,24 @@ export const typeDocUtils = { }); return docSection; }, - _convertCustomType(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): CustomType { + _convertCustomType( + entity: TypeDocNode, + sections: SectionsMap, + sectionName: string, + docId: string, + classNames: string[], + ): CustomType { const typeIfExists = !_.isUndefined(entity.type) - ? typeDocUtils._convertType(entity.type, sections, sectionName, docId) + ? typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames) : undefined; const isConstructor = false; const methodIfExists = !_.isUndefined(entity.declaration) - ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId) + ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId, classNames) : undefined; const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature); const indexSignature = entity.indexSignature as TypeDocNode; const indexSignatureIfExists = doesIndexSignatureExist - ? typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId) + ? typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId, classNames) : undefined; const commentIfExists = !_.isUndefined(entity.comment) && !_.isUndefined(entity.comment.shortText) @@ -284,13 +314,20 @@ export const typeDocUtils = { const childrenIfExist = !_.isUndefined(entity.children) ? _.map(entity.children, (child: TypeDocNode) => { let childTypeIfExists = !_.isUndefined(child.type) - ? typeDocUtils._convertType(child.type, sections, sectionName, docId) + ? typeDocUtils._convertType(child.type, sections, sectionName, docId, classNames) : undefined; if (child.kindString === KindString.Method) { childTypeIfExists = { name: child.name, typeDocType: TypeDocTypes.Reflection, - method: typeDocUtils._convertMethod(child, isConstructor, sections, sectionName, docId), + method: typeDocUtils._convertMethod( + child, + isConstructor, + sections, + sectionName, + docId, + classNames, + ), }; } const c: CustomTypeChild = { @@ -319,16 +356,23 @@ export const typeDocUtils = { sections: SectionsMap, sectionName: string, docId: string, + classNames: string[], ): IndexSignature { const key = entity.parameters[0]; const indexSignature = { keyName: key.name, - keyType: typeDocUtils._convertType(key.type, sections, sectionName, docId), + keyType: typeDocUtils._convertType(key.type, sections, sectionName, docId, classNames), valueName: entity.type.name, }; return indexSignature; }, - _convertProperty(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): Property { + _convertProperty( + entity: TypeDocNode, + sections: SectionsMap, + sectionName: string, + docId: string, + classNames: string[], + ): Property { const source = entity.sources[0]; const commentIfExists = !_.isUndefined(entity.comment) ? entity.comment.shortText : undefined; const isConstructor = false; @@ -336,7 +380,7 @@ export const typeDocUtils = { const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); const property = { name: entity.name, - type: typeDocUtils._convertType(entity.type, sections, sectionName, docId), + type: typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames), source: { fileName: source.fileName, line: source.line, @@ -352,6 +396,7 @@ export const typeDocUtils = { sections: SectionsMap, sectionName: string, docId: string, + classNames: string[], ): TypescriptMethod { const signature = entity.signatures[0]; const source = entity.sources[0]; @@ -359,12 +404,12 @@ export const typeDocUtils = { const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; const parameters = _.map(signature.parameters, param => { - return typeDocUtils._convertParameter(param, sections, sectionName, docId); + return typeDocUtils._convertParameter(param, sections, sectionName, docId, classNames); }); - const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId); + const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId, classNames); const typeParameter = _.isUndefined(signature.typeParameter) ? undefined - : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId); + : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId, classNames); const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); const method = { @@ -384,13 +429,12 @@ export const typeDocUtils = { }; return method; }, - _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string) { + _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string): string { // HACK: we use the fact that the sectionName is the same as the property name at the top-level // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. let callPath; if (isConstructor || entityName === '__type') { callPath = ''; - // TODO: Get rid of this 0x-specific logic } else { const prefix = isStatic ? sectionName : `${sectionName[0].toLowerCase()}${sectionName.slice(1)}`; callPath = `${prefix}.`; @@ -403,18 +447,19 @@ export const typeDocUtils = { sectionName: string, docId: string, isObjectLiteral: boolean, + classNames: string[], ): TypescriptFunction { const signature = entity.signatures[0]; const source = entity.sources[0]; const hasComment = !_.isUndefined(signature.comment); const parameters = _.map(signature.parameters, param => { - return typeDocUtils._convertParameter(param, sections, sectionName, docId); + return typeDocUtils._convertParameter(param, sections, sectionName, docId, classNames); }); - const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId); + const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId, classNames); const typeParameter = _.isUndefined(signature.typeParameter) ? undefined - : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId); + : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId, classNames); let callPath = ''; if (isObjectLiteral) { @@ -442,15 +487,22 @@ export const typeDocUtils = { sections: SectionsMap, sectionName: string, docId: string, + classNames: string[], ): TypeParameter { - const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId); + const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames); const parameter = { name: entity.name, type, }; return parameter; }, - _convertParameter(entity: TypeDocNode, sections: SectionsMap, sectionName: string, docId: string): Parameter { + _convertParameter( + entity: TypeDocNode, + sections: SectionsMap, + sectionName: string, + docId: string, + classNames: string[], + ): Parameter { let comment = '<No comment>'; if (entity.comment && entity.comment.shortText) { comment = entity.comment.shortText; @@ -460,7 +512,7 @@ export const typeDocUtils = { const isOptional = !_.isUndefined(entity.flags.isOptional) ? entity.flags.isOptional : false; - const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId); + const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames); const parameter = { name: entity.name, @@ -471,12 +523,18 @@ export const typeDocUtils = { }; return parameter; }, - _convertType(entity: TypeDocType, sections: SectionsMap, sectionName: string, docId: string): Type { + _convertType( + entity: TypeDocType, + sections: SectionsMap, + sectionName: string, + docId: string, + classNames: string[], + ): Type { const typeArguments = _.map(entity.typeArguments, typeArgument => { - return typeDocUtils._convertType(typeArgument, sections, sectionName, docId); + return typeDocUtils._convertType(typeArgument, sections, sectionName, docId, classNames); }); const types = _.map(entity.types, t => { - return typeDocUtils._convertType(t, sections, sectionName, docId); + return typeDocUtils._convertType(t, sections, sectionName, docId, classNames); }); let indexSignatureIfExists; @@ -485,7 +543,13 @@ export const typeDocUtils = { !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); if (doesIndexSignatureExist) { const indexSignature = entity.declaration.indexSignature as TypeDocNode; - indexSignatureIfExists = typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId); + indexSignatureIfExists = typeDocUtils._convertIndexSignature( + indexSignature, + sections, + sectionName, + docId, + classNames, + ); } else if (!_.isUndefined(entity.declaration)) { const isConstructor = false; methodIfExists = typeDocUtils._convertMethod( @@ -494,6 +558,7 @@ export const typeDocUtils = { sections, sectionName, docId, + classNames, ); } @@ -507,6 +572,7 @@ export const typeDocUtils = { const type = { name: entity.name, value: entity.value, + isExportedClassReference: _.includes(classNames, entity.name), typeDocType: entity.type, typeArguments, elementType: elementTypeIfExists, -- cgit v1.2.3 From 83e3bb899ed88c8ac32331d2f1b533e52d5ad8cd Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 17:41:03 -0700 Subject: Move purging private underscored items to the doc json generation phase --- packages/0x.js/src/index.ts | 2 -- .../src/utils/doc_generate_and_upload_utils.ts | 31 +++++++++++++--------- .../react-docs/src/components/signature_block.tsx | 3 --- packages/react-docs/src/utils/typedoc_utils.ts | 21 ++++++--------- 4 files changed, 27 insertions(+), 30 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index a26d827d7..d8ad6a969 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -61,8 +61,6 @@ export { ErrorCallback, } from '@0xproject/subproviders'; -export { Web3Wrapper, NodeType } from '@0xproject/web3-wrapper'; - export { AbiDecoder } from '@0xproject/utils'; export { BigNumber } from '@0xproject/utils'; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 187358421..2bc5441fc 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -143,7 +143,10 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: } }); - // For each entry, see if it was exported in index.ts. If not, remove it. + // For each entry, remove it if: + // - it was not exported in index.ts + // - the constructor is to be ignored + // - it begins with an underscore const exportPathToTypedocNames: ExportNameToTypedocNames = {}; _.each(typedocOutput.children, (file, i) => { const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); @@ -155,18 +158,22 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: _.each(file.children, (child, j) => { if (!_.includes(exportItems, child.name)) { delete finalTypeDocOutput.children[i].children[j]; + return; } - if (child.kindString === 'Class' && _.includes(CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name)) { - const classChildren = typedocOutput.children[i].children[j].children; - _.each(classChildren, (classChild, k) => { - if (classChild.kindString === 'Constructor') { - delete finalTypeDocOutput.children[i].children[j].children[k]; - finalTypeDocOutput.children[i].children[j].children = _.compact( - finalTypeDocOutput.children[i].children[j].children, - ); - } - }); - } + const innerChildren = typedocOutput.children[i].children[j].children; + _.each(innerChildren, (innerChild, k) => { + const isHiddenConstructor = + child.kindString === 'Class' && + _.includes(CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name) && + innerChild.kindString === 'Constructor'; + const isPrivate = _.startsWith(innerChild.name, '_'); + if (isHiddenConstructor || isPrivate) { + delete finalTypeDocOutput.children[i].children[j].children[k]; + finalTypeDocOutput.children[i].children[j].children = _.compact( + finalTypeDocOutput.children[i].children[j].children, + ); + } + }); }); finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); }); diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 934232efe..2818d9c5f 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -44,9 +44,6 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu } public render(): React.ReactNode { const method = this.props.method; - if (typeDocUtils.isPrivateOrProtectedProperty(method.name)) { - return null; - } return ( <div diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index ab5408ec2..9843ec9fa 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -43,9 +43,6 @@ export const typeDocUtils = { isProperty(entity: TypeDocNode): boolean { return entity.kindString === KindString.Property; }, - isPrivateOrProtectedProperty(propertyName: string): boolean { - return _.startsWith(propertyName, '_'); - }, getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] { const moduleDefinitions: TypeDocNode[] = []; const jsonModules = versionDocObj.children; @@ -217,16 +214,14 @@ export const typeDocUtils = { break; case KindString.Property: - if (!typeDocUtils.isPrivateOrProtectedProperty(entity.name)) { - const property = typeDocUtils._convertProperty( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); - docSection.properties.push(property); - } + const property = typeDocUtils._convertProperty( + entity, + docsInfo.sections, + sectionName, + docsInfo.id, + classNames, + ); + docSection.properties.push(property); break; case KindString.Variable: -- cgit v1.2.3 From 3b8a343711e0b23a453a1466411e2b9ca68eb0b2 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 14 Aug 2018 17:55:38 -0700 Subject: Add version to our custom DocJson format --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 2bc5441fc..d791b010f 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -18,7 +18,8 @@ interface ExportNameToTypedocNames { [exportName: string]: string[]; } -// TODO: Add the EXTERNAL_TYPE_TO_LINK mapping to the Doc JSON +const DOC_JSON_VERSION = '0.0.1'; + const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { BigNumber: 'http://mikemcl.github.io/bignumber.js', Error: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L134', @@ -199,6 +200,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON const docJson = { + version: DOC_JSON_VERSION, metadata: { exportPathToTypedocNames, exportPathOrder, -- cgit v1.2.3 From a8d44ccc48a7177e749f534a237afb7b9c0f2f2b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 15 Aug 2018 11:36:45 -0700 Subject: Move external types to link mapping to doc generation util and refactor typedocUtils to be a class to avoid excessive param passing --- .../src/utils/doc_generate_and_upload_utils.ts | 1 + .../react-docs/src/components/signature_block.tsx | 1 - packages/react-docs/src/components/type.tsx | 12 +- packages/react-docs/src/docs_info.ts | 10 +- packages/react-docs/src/types.ts | 12 +- packages/react-docs/src/utils/typedoc_utils.ts | 351 +++++++-------------- .../website/ts/containers/connect_documentation.ts | 8 +- .../containers/contract_wrappers_documentation.ts | 6 - .../ts/containers/ethereum_types_documentation.ts | 7 +- .../ts/containers/json_schemas_documentation.ts | 8 +- .../ts/containers/order_utils_documentation.ts | 5 - .../ts/containers/order_watcher_documentation.ts | 5 - .../ts/containers/sol_compiler_documentation.ts | 6 +- .../website/ts/containers/sol_cov_documentation.ts | 6 +- .../ts/containers/subproviders_documentation.ts | 7 - .../ts/containers/web3_wrapper_documentation.ts | 7 - .../ts/containers/zero_ex_js_documentation.ts | 8 +- 17 files changed, 138 insertions(+), 322 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index d791b010f..ca3df2c74 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -27,6 +27,7 @@ const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { 'solc.StandardContractOutput': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', + Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', }; const CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[] = [ diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 2818d9c5f..05145dc23 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -5,7 +5,6 @@ import * as React from 'react'; import { DocsInfo } from '../docs_info'; import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptFunction, TypescriptMethod } from '../types'; import { constants } from '../utils/constants'; -import { typeDocUtils } from '../utils/typedoc_utils'; import { Comment } from './comment'; import { Signature } from './signature'; diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index eae52e950..145c797a3 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -179,17 +179,8 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { return [prev, ', ', curr]; }); - let typeNameUrlIfExists; - let typePrefixIfExists; - if (!_.isUndefined(props.docsInfo.typeConfigs)) { - typeNameUrlIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToExternalLink) - ? props.docsInfo.typeConfigs.typeNameToExternalLink[typeName as string] - : undefined; - typePrefixIfExists = !_.isUndefined(props.docsInfo.typeConfigs.typeNameToPrefix) - ? props.docsInfo.typeConfigs.typeNameToPrefix[typeName as string] - : undefined; - } const isExportedClassReference = !!props.type.isExportedClassReference; + const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined; if (!_.isUndefined(typeNameUrlIfExists)) { typeName = ( <a @@ -198,7 +189,6 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { className="text-decoration-none" style={{ color: colors.lightBlueA700 }} > - {!_.isUndefined(typePrefixIfExists) ? `${typePrefixIfExists}.` : ''} {typeName} </a> ); diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 4267d8a98..9e990ffc5 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -6,17 +6,16 @@ import { ContractsByVersionByNetworkId, DocAgnosticFormat, DocsInfoConfig, - DocsInfoTypeConfigs, DocsMenu, DoxityDocObj, + GeneratedDocJson, SectionNameToMarkdownByVersion, SectionsMap, SupportedDocJson, TypeDefinitionByName, - GeneratedDocJson, } from './types'; import { doxityUtils } from './utils/doxity_utils'; -import { typeDocUtils } from './utils/typedoc_utils'; +import { TypeDocUtils } from './utils/typedoc_utils'; export class DocsInfo { public id: string; @@ -27,7 +26,6 @@ export class DocsInfo { public sections: SectionsMap; public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId; - public typeConfigs: DocsInfoTypeConfigs; constructor(config: DocsInfoConfig) { this.id = config.id; this.type = config.type; @@ -37,7 +35,6 @@ export class DocsInfo { this.sections = config.markdownSections; this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId; - this.typeConfigs = config.typeConfigs; } public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection { const menuSubsectionsBySection = {} as MenuSubsectionsBySection; @@ -101,7 +98,8 @@ export class DocsInfo { if (this.type === SupportedDocJson.Doxity) { return doxityUtils.convertToDocAgnosticFormat(docObj as DoxityDocObj); } else { - return typeDocUtils.convertToDocAgnosticFormat(docObj as GeneratedDocJson, this); + const typeDocUtils = new TypeDocUtils(docObj as GeneratedDocJson, this); + return typeDocUtils.convertToDocAgnosticFormat(); } } } diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index c39dfcba8..0155685e0 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -11,12 +11,6 @@ export interface DocsInfoConfig { markdownSections: SectionsMap; sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; contractsByVersionByNetworkId?: ContractsByVersionByNetworkId; - typeConfigs?: DocsInfoTypeConfigs; -} - -export interface DocsInfoTypeConfigs { - typeNameToExternalLink?: { [typeName: string]: string }; - typeNameToPrefix?: { [typeName: string]: string }; } export interface DocsMenu { @@ -160,6 +154,7 @@ export interface Type { types?: Type[]; method?: TypescriptMethod; indexSignature?: IndexSignature; + externalLink?: string; } export interface ElementType { @@ -297,9 +292,14 @@ export interface ExportNameToTypedocNames { [exportName: string]: string[]; } +export interface ExternalTypeToLink { + [externalTypeName: string]: string; +} + export interface Metadata { exportPathToTypedocNames: ExportNameToTypedocNames; exportPathOrder: string[]; + externalTypeToLink: ExternalTypeToLink; } export interface GeneratedDocJson { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 9843ec9fa..db6063464 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -7,6 +7,7 @@ import { CustomTypeChild, DocAgnosticFormat, DocSection, + ExternalTypeToLink, GeneratedDocJson, IndexSignature, KindString, @@ -24,8 +25,39 @@ import { import { constants } from './constants'; -export const typeDocUtils = { - isType(entity: TypeDocNode): boolean { +export class TypeDocUtils { + private _typeDocNameOrder: string[]; + private _externalTypeToLink: ExternalTypeToLink; + private _docsInfo: DocsInfo; + private _typeDocJson: TypeDocNode; + private _classNames: string[]; + constructor(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo) { + this._docsInfo = docsInfo; + console.log('generatedDocJson.metadata', generatedDocJson.metadata); + const exportPathOrder = generatedDocJson.metadata.exportPathOrder; + const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames; + this._externalTypeToLink = generatedDocJson.metadata.externalTypeToLink; + this._typeDocJson = generatedDocJson.typedocJson; + + // TODO: Extract the non typeDoc exports, and render them somehow + this._typeDocNameOrder = _.compact( + _.flatten( + _.map(exportPathOrder, exportPath => { + return exportPathToTypedocNames[exportPath]; + }), + ), + ); + + this._classNames = []; + _.each(this._typeDocJson.children, file => { + _.each(file.children, child => { + if (child.kindString === KindString.Class) { + this._classNames.push(child.name); + } + }); + }); + } + public isType(entity: TypeDocNode): boolean { return ( entity.kindString === KindString.Interface || entity.kindString === KindString.Function || @@ -33,17 +65,17 @@ export const typeDocUtils = { entity.kindString === KindString.Variable || entity.kindString === KindString.Enumeration ); - }, - isMethod(entity: TypeDocNode): boolean { + } + public isMethod(entity: TypeDocNode): boolean { return entity.kindString === KindString.Method; - }, - isConstructor(entity: TypeDocNode): boolean { + } + public isConstructor(entity: TypeDocNode): boolean { return entity.kindString === KindString.Constructor; - }, - isProperty(entity: TypeDocNode): boolean { + } + public isProperty(entity: TypeDocNode): boolean { return entity.kindString === KindString.Property; - }, - getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] { + } + public getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] { const moduleDefinitions: TypeDocNode[] = []; const jsonModules = versionDocObj.children; _.each(jsonModules, jsonMod => { @@ -54,52 +86,28 @@ export const typeDocUtils = { }); }); return moduleDefinitions; - }, - convertToDocAgnosticFormat(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo): DocAgnosticFormat { - const exportPathOrder = generatedDocJson.metadata.exportPathOrder; - const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames; - const typeDocJson = generatedDocJson.typedocJson; - - // TODO: Extract the non typeDoc exports, and render them somehow - const typeDocNameOrder = _.compact( - _.flatten( - _.map(exportPathOrder, exportPath => { - return exportPathToTypedocNames[exportPath]; - }), - ), - ); - - const classNames: string[] = []; - _.each(typeDocJson.children, file => { - _.each(file.children, child => { - if (child.kindString === KindString.Class) { - classNames.push(child.name); - } - }); - }); - + } + public convertToDocAgnosticFormat(): DocAgnosticFormat { const docAgnosticFormat: DocAgnosticFormat = {}; const typeEntities: TypeDocNode[] = []; - _.each(typeDocNameOrder, typeDocName => { - const fileChildIndex = _.findIndex(typeDocJson.children, child => child.name === typeDocName); - const fileChild = typeDocJson.children[fileChildIndex]; + _.each(this._typeDocNameOrder, typeDocName => { + const fileChildIndex = _.findIndex(this._typeDocJson.children, child => child.name === typeDocName); + const fileChild = this._typeDocJson.children[fileChildIndex]; let sectionName: string; _.each(fileChild.children, child => { switch (child.kindString) { case KindString.Class: case KindString.ObjectLiteral: { sectionName = child.name; - docsInfo.sections[sectionName] = sectionName; - docsInfo.menu[sectionName] = [sectionName]; + this._docsInfo.sections[sectionName] = sectionName; + this._docsInfo.menu[sectionName] = [sectionName]; const entities = child.children; const commentObj = child.comment; const sectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; const isClassOrObjectLiteral = true; - const docSection = typeDocUtils._convertEntitiesToDocSection( + const docSection = this._convertEntitiesToDocSection( entities, - docsInfo, sectionName, - classNames, isClassOrObjectLiteral, ); docSection.comment = sectionComment; @@ -108,17 +116,12 @@ export const typeDocUtils = { } case KindString.Function: { sectionName = child.name; - docsInfo.sections[sectionName] = sectionName; - docsInfo.menu[sectionName] = [sectionName]; + this._docsInfo.sections[sectionName] = sectionName; + this._docsInfo.menu[sectionName] = [sectionName]; const entities = [child]; const commentObj = child.comment; const SectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; - const docSection = typeDocUtils._convertEntitiesToDocSection( - entities, - docsInfo, - sectionName, - classNames, - ); + const docSection = this._convertEntitiesToDocSection(entities, sectionName); docSection.comment = SectionComment; docAgnosticFormat[sectionName] = docSection; break; @@ -135,24 +138,17 @@ export const typeDocUtils = { }); }); if (!_.isEmpty(typeEntities)) { - docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; - docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; - const docSection = typeDocUtils._convertEntitiesToDocSection( - typeEntities, - docsInfo, - constants.TYPES_SECTION_NAME, - classNames, - ); + this._docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; + this._docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; + const docSection = this._convertEntitiesToDocSection(typeEntities, constants.TYPES_SECTION_NAME); docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; } return docAgnosticFormat; - }, - _convertEntitiesToDocSection( + } + private _convertEntitiesToDocSection( entities: TypeDocNode[], - docsInfo: DocsInfo, sectionName: string, - classNames: string[], isClassOrObjectLiteral: boolean = false, ): DocSection { const docSection: DocSection = { @@ -169,14 +165,7 @@ export const typeDocUtils = { switch (entity.kindString) { case KindString.Constructor: isConstructor = true; - const constructor = typeDocUtils._convertMethod( - entity, - isConstructor, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + const constructor = this._convertMethod(entity, isConstructor, sectionName); docSection.constructors.push(constructor); break; @@ -185,14 +174,7 @@ export const typeDocUtils = { const funcName = (entity as TypeDocNode).signatures[0].name; const isPublicFunc = !_.startsWith(funcName, '_'); if (isPublicFunc) { - const func = typeDocUtils._convertFunction( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - isClassOrObjectLiteral, - classNames, - ); + const func = this._convertFunction(entity, sectionName, isClassOrObjectLiteral); docSection.functions.push(func); } } @@ -201,49 +183,25 @@ export const typeDocUtils = { case KindString.Method: if (entity.flags.isPublic) { isConstructor = false; - const method = typeDocUtils._convertMethod( - entity, - isConstructor, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + const method = this._convertMethod(entity, isConstructor, sectionName); docSection.methods.push(method); } break; - case KindString.Property: - const property = typeDocUtils._convertProperty( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + case KindString.Property: { + const property = this._convertProperty(entity, sectionName); docSection.properties.push(property); break; + } case KindString.Variable: if (isClassOrObjectLiteral) { // Render as a property - const property = typeDocUtils._convertProperty( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + const property = this._convertProperty(entity, sectionName); docSection.properties.push(property); } else { // Otherwise, render as a type - const customType = typeDocUtils._convertCustomType( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + const customType = this._convertCustomType(entity, sectionName); const seenTypeNames = _.map(docSection.types, t => t.name); const isUnseen = !_.includes(seenTypeNames, customType.name); if (isUnseen) { @@ -255,13 +213,7 @@ export const typeDocUtils = { case KindString.Interface: case KindString.Enumeration: case KindString.TypeAlias: { - const customType = typeDocUtils._convertCustomType( - entity, - docsInfo.sections, - sectionName, - docsInfo.id, - classNames, - ); + const customType = this._convertCustomType(entity, sectionName); const seenTypeNames = _.map(docSection.types, t => t.name); const isUnseen = !_.includes(seenTypeNames, customType.name); if (isUnseen) { @@ -281,25 +233,17 @@ export const typeDocUtils = { } }); return docSection; - }, - _convertCustomType( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): CustomType { - const typeIfExists = !_.isUndefined(entity.type) - ? typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames) - : undefined; + } + private _convertCustomType(entity: TypeDocNode, sectionName: string): CustomType { + const typeIfExists = !_.isUndefined(entity.type) ? this._convertType(entity.type, sectionName) : undefined; const isConstructor = false; const methodIfExists = !_.isUndefined(entity.declaration) - ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId, classNames) + ? this._convertMethod(entity.declaration, isConstructor, sectionName) : undefined; const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature); const indexSignature = entity.indexSignature as TypeDocNode; const indexSignatureIfExists = doesIndexSignatureExist - ? typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId, classNames) + ? this._convertIndexSignature(indexSignature, sectionName) : undefined; const commentIfExists = !_.isUndefined(entity.comment) && !_.isUndefined(entity.comment.shortText) @@ -309,20 +253,13 @@ export const typeDocUtils = { const childrenIfExist = !_.isUndefined(entity.children) ? _.map(entity.children, (child: TypeDocNode) => { let childTypeIfExists = !_.isUndefined(child.type) - ? typeDocUtils._convertType(child.type, sections, sectionName, docId, classNames) + ? this._convertType(child.type, sectionName) : undefined; if (child.kindString === KindString.Method) { childTypeIfExists = { name: child.name, typeDocType: TypeDocTypes.Reflection, - method: typeDocUtils._convertMethod( - child, - isConstructor, - sections, - sectionName, - docId, - classNames, - ), + method: this._convertMethod(child, isConstructor, sectionName), }; } const c: CustomTypeChild = { @@ -345,37 +282,25 @@ export const typeDocUtils = { children: childrenIfExist, }; return customType; - }, - _convertIndexSignature( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): IndexSignature { + } + private _convertIndexSignature(entity: TypeDocNode, sectionName: string): IndexSignature { const key = entity.parameters[0]; const indexSignature = { keyName: key.name, - keyType: typeDocUtils._convertType(key.type, sections, sectionName, docId, classNames), + keyType: this._convertType(key.type, sectionName), valueName: entity.type.name, }; return indexSignature; - }, - _convertProperty( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): Property { + } + private _convertProperty(entity: TypeDocNode, sectionName: string): Property { const source = entity.sources[0]; const commentIfExists = !_.isUndefined(entity.comment) ? entity.comment.shortText : undefined; const isConstructor = false; const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; - const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); + const callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name); const property = { name: entity.name, - type: typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames), + type: this._convertType(entity.type, sectionName), source: { fileName: source.fileName, line: source.line, @@ -384,29 +309,22 @@ export const typeDocUtils = { callPath, }; return property; - }, - _convertMethod( - entity: TypeDocNode, - isConstructor: boolean, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): TypescriptMethod { + } + private _convertMethod(entity: TypeDocNode, isConstructor: boolean, sectionName: string): TypescriptMethod { const signature = entity.signatures[0]; const source = entity.sources[0]; const hasComment = !_.isUndefined(signature.comment); const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic; const parameters = _.map(signature.parameters, param => { - return typeDocUtils._convertParameter(param, sections, sectionName, docId, classNames); + return this._convertParameter(param, sectionName); }); - const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId, classNames); + const returnType = this._convertType(signature.type, sectionName); const typeParameter = _.isUndefined(signature.typeParameter) ? undefined - : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId, classNames); + : this._convertTypeParameter(signature.typeParameter[0], sectionName); - const callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); + const callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name); const method = { isConstructor, isStatic, @@ -416,6 +334,10 @@ export const typeDocUtils = { source: { fileName: source.fileName, line: source.line, + callPath, + parameters, + returnType, + typeParameter, }, callPath, parameters, @@ -423,8 +345,8 @@ export const typeDocUtils = { typeParameter, }; return method; - }, - _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string): string { + } + private _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string): string { // HACK: we use the fact that the sectionName is the same as the property name at the top-level // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON. let callPath; @@ -435,32 +357,25 @@ export const typeDocUtils = { callPath = `${prefix}.`; } return callPath; - }, - _convertFunction( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - isObjectLiteral: boolean, - classNames: string[], - ): TypescriptFunction { + } + private _convertFunction(entity: TypeDocNode, sectionName: string, isObjectLiteral: boolean): TypescriptFunction { const signature = entity.signatures[0]; const source = entity.sources[0]; const hasComment = !_.isUndefined(signature.comment); const parameters = _.map(signature.parameters, param => { - return typeDocUtils._convertParameter(param, sections, sectionName, docId, classNames); + return this._convertParameter(param, sectionName); }); - const returnType = typeDocUtils._convertType(signature.type, sections, sectionName, docId, classNames); + const returnType = this._convertType(signature.type, sectionName); const typeParameter = _.isUndefined(signature.typeParameter) ? undefined - : typeDocUtils._convertTypeParameter(signature.typeParameter[0], sections, sectionName, docId, classNames); + : this._convertTypeParameter(signature.typeParameter[0], sectionName); let callPath = ''; if (isObjectLiteral) { const isConstructor = false; const isStatic = false; - callPath = typeDocUtils._getCallPath(sectionName, isStatic, isConstructor, entity.name); + callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name); } const func = { name: signature.name, @@ -476,28 +391,16 @@ export const typeDocUtils = { typeParameter, }; return func; - }, - _convertTypeParameter( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): TypeParameter { - const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames); + } + private _convertTypeParameter(entity: TypeDocNode, sectionName: string): TypeParameter { + const type = this._convertType(entity.type, sectionName); const parameter = { name: entity.name, type, }; return parameter; - }, - _convertParameter( - entity: TypeDocNode, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): Parameter { + } + private _convertParameter(entity: TypeDocNode, sectionName: string): Parameter { let comment = '<No comment>'; if (entity.comment && entity.comment.shortText) { comment = entity.comment.shortText; @@ -507,7 +410,7 @@ export const typeDocUtils = { const isOptional = !_.isUndefined(entity.flags.isOptional) ? entity.flags.isOptional : false; - const type = typeDocUtils._convertType(entity.type, sections, sectionName, docId, classNames); + const type = this._convertType(entity.type, sectionName); const parameter = { name: entity.name, @@ -517,19 +420,13 @@ export const typeDocUtils = { type, }; return parameter; - }, - _convertType( - entity: TypeDocType, - sections: SectionsMap, - sectionName: string, - docId: string, - classNames: string[], - ): Type { + } + private _convertType(entity: TypeDocType, sectionName: string): Type { const typeArguments = _.map(entity.typeArguments, typeArgument => { - return typeDocUtils._convertType(typeArgument, sections, sectionName, docId, classNames); + return this._convertType(typeArgument, sectionName); }); const types = _.map(entity.types, t => { - return typeDocUtils._convertType(t, sections, sectionName, docId, classNames); + return this._convertType(t, sectionName); }); let indexSignatureIfExists; @@ -538,23 +435,10 @@ export const typeDocUtils = { !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); if (doesIndexSignatureExist) { const indexSignature = entity.declaration.indexSignature as TypeDocNode; - indexSignatureIfExists = typeDocUtils._convertIndexSignature( - indexSignature, - sections, - sectionName, - docId, - classNames, - ); + indexSignatureIfExists = this._convertIndexSignature(indexSignature, sectionName); } else if (!_.isUndefined(entity.declaration)) { const isConstructor = false; - methodIfExists = typeDocUtils._convertMethod( - entity.declaration, - isConstructor, - sections, - sectionName, - docId, - classNames, - ); + methodIfExists = this._convertMethod(entity.declaration, isConstructor, sectionName); } const elementTypeIfExists = !_.isUndefined(entity.elementType) @@ -564,10 +448,10 @@ export const typeDocUtils = { } : undefined; - const type = { + const type: Type = { name: entity.name, value: entity.value, - isExportedClassReference: _.includes(classNames, entity.name), + isExportedClassReference: _.includes(this._classNames, entity.name), typeDocType: entity.type, typeArguments, elementType: elementTypeIfExists, @@ -575,6 +459,11 @@ export const typeDocUtils = { method: methodIfExists, indexSignature: indexSignatureIfExists, }; + console.log('this._externalTypeToLink', this._externalTypeToLink); + const externalLinkIfExists = this._externalTypeToLink[entity.name]; + if (!_.isUndefined(externalLinkIfExists)) { + type.externalLink = externalLinkIfExists; + } return type; - }, -}; + } +} diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index cecfefdef..fffc60435 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -34,13 +34,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.installation]: InstallationMarkdownV1, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToExternalLink: { - Provider: constants.URL_WEB3_PROVIDER_DOCS, - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 67d19bb2a..68bb4b1f0 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -35,12 +35,6 @@ const docsInfoConfig: DocsInfoConfig = { }, }, markdownSections, - typeConfigs: { - typeNameToPrefix: {}, - typeNameToExternalLink: { - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 5f08e0236..3e23899af 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -36,12 +36,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.installation]: InstallationMarkdown, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToExternalLink: { - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index f88cec6ec..6b0089213 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -43,13 +43,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.usage]: UsageMarkdownV1, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToExternalLink: { - Schema: - 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', - }, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 2b9465d92..444ca5f2d 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -35,11 +35,6 @@ const docsInfoConfig: DocsInfoConfig = { }, }, markdownSections, - typeConfigs: { - typeNameToExternalLink: { - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 29f1adf7c..8a32fe595 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -35,11 +35,6 @@ const docsInfoConfig: DocsInfoConfig = { }, }, markdownSections, - typeConfigs: { - typeNameToExternalLink: { - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index dda3840c7..48e5b1e1c 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -37,11 +37,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.usage]: UsageMarkdown, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToExternalLink: {}, - typeNameToPrefix: {}, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 0ad7bbfd4..9e3c7489b 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -37,11 +37,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.usage]: UsageMarkdown, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToExternalLink: {}, - typeNameToPrefix: {}, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 4aaffd908..cbbc89a2b 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -39,13 +39,6 @@ const docsInfoConfig: DocsInfoConfig = { }, }, markdownSections: docSections, - typeConfigs: { - typeNameToExternalLink: { - Web3: constants.URL_WEB3_DOCS, - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - typeNameToPrefix: {}, - }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index b015fd0d9..0398e0493 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -35,13 +35,6 @@ const docsInfoConfig: DocsInfoConfig = { }, }, markdownSections: docSections, - typeConfigs: { - typeNameToExternalLink: { - Web3: constants.URL_WEB3_DOCS, - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - typeNameToPrefix: {}, - }, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 79e342e01..90b70b8ed 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -56,13 +56,7 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.errors]: ErrorsMarkdownV1, }, }, - markdownSections: markdownSections, - typeConfigs: { - typeNameToPrefix: {}, - typeNameToExternalLink: { - BigNumber: constants.URL_BIGNUMBERJS_GITHUB, - }, - }, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); -- cgit v1.2.3 From 6e74d1519b2071b8c8c19639b0e9726a278d8a84 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 15 Aug 2018 11:37:06 -0700 Subject: Add externalTypeToLink to docJson --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index ca3df2c74..be2d9f7e5 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -205,6 +205,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: metadata: { exportPathToTypedocNames, exportPathOrder, + externalTypeToLink: EXTERNAL_TYPE_TO_LINK, }, typedocJson: finalTypeDocOutput, }; -- cgit v1.2.3 From 237bac920acf8ade0bba2e7ccc1c46eb272c36d0 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 15 Aug 2018 16:38:07 -0700 Subject: Remove unused types from 0x.js index.ts discovered --- packages/0x.js/src/index.ts | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index d8ad6a969..5ac3da00d 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -9,19 +9,13 @@ export { ERC20ProxyWrapper, ERC721ProxyWrapper, ForwarderWrapper, - ContractWrappersError, - EventCallback, - ContractEvent, IndexedFilterValues, BlockRange, - OrderFillRequest, ContractEventArgs, ContractWrappersConfig, MethodOpts, OrderTransactionOpts, TransactionOpts, - LogEvent, - DecodedLogEvent, OrderStatus, OrderInfo, WETH9Events, @@ -75,7 +69,6 @@ export { OrderState, AssetProxyId, SignerType, - Token, ERC20AssetData, ERC721AssetData, SignatureType, @@ -86,7 +79,6 @@ export { ContractArtifact, GeneratedCompilerOptions, ContractNetworks, - ContractVersionData, ContractNetworkData, Source, } from '@0xproject/sol-compiler'; @@ -94,18 +86,13 @@ export { export { BlockParamLiteral, ContractAbi, - FilterObject, BlockParam, LogWithDecodedArgs, ContractEventArg, Provider, - TransactionReceipt, - TransactionReceiptWithDecodedLogs, - LogTopic, JSONRPCRequestPayload, JSONRPCResponsePayload, JSONRPCErrorCallback, - TransactionReceiptStatus, LogEntry, DecodedLogArgs, LogEntryEvent, @@ -113,26 +100,13 @@ export { DecodedLogEntryEvent, RawLog, AbiDefinition, - TxData, - CallData, - BlockWithoutTransactionData, - BlockWithTransactionData, - Transaction, - TraceParams, - TransactionTrace, - AbstractBlock, - CallTxDataBase, - StructLog, - TxDataPayable, FunctionAbi, EventAbi, EventParameter, - OpCode, MethodAbi, ConstructorAbi, FallbackAbi, DataItem, ConstructorStateMutability, StateMutability, - AbiType, } from 'ethereum-types'; -- cgit v1.2.3 From 9e7657ac5db596ff8dacf1c37784be2e9e7f87a6 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 15 Aug 2018 16:38:30 -0700 Subject: Improve Error external link --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index be2d9f7e5..b51b17db1 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -22,7 +22,7 @@ const DOC_JSON_VERSION = '0.0.1'; const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { BigNumber: 'http://mikemcl.github.io/bignumber.js', - Error: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L134', + Error: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error', Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', 'solc.StandardContractOutput': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', -- cgit v1.2.3 From baab0f27b543f8f17bad0e3a40b803763236edb9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 15 Aug 2018 16:50:23 -0700 Subject: Check for superfluous types in a packages index.ts and throw if they exist --- .../src/utils/doc_generate_and_upload_utils.ts | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index b51b17db1..b236c299f 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -185,6 +185,16 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const referenceNamesWithDuplicates = getAllReferenceNames(propertyName, finalTypeDocOutput, []); const referenceNames = _.uniq(referenceNamesWithDuplicates); + const exportedTypes = getAllTypeNames(finalTypeDocOutput, []); + const excessiveReferences = _.difference(exportedTypes, referenceNames); + if (!_.isEmpty(excessiveReferences)) { + throw new Error( + `${packageName} package exports BUT does not need: \n${excessiveReferences.join( + '\n', + )} \nin it\'s index.ts. Remove them then try again.`, + ); + } + const missingReferences: string[] = []; _.each(referenceNames, referenceName => { if (!_.includes(allExportedItems, referenceName) && _.isUndefined(EXTERNAL_TYPE_TO_LINK[referenceName])) { @@ -230,6 +240,27 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: }); } +function getAllTypeNames(node: any, typeNames: string[]): string[] { + if (!_.isObject(node)) { + return typeNames; + } + const typeKindStrings = ['Interface', 'Enumeration', 'Type alias']; + if (_.includes(typeKindStrings, node.kindString)) { + return [...typeNames, node.name]; + } + let updatedTypeNames = typeNames; + _.each(node, nodeValue => { + if (_.isArray(nodeValue)) { + _.each(nodeValue, aNode => { + updatedTypeNames = getAllTypeNames(aNode, updatedTypeNames); + }); + } else if (_.isObject(nodeValue)) { + updatedTypeNames = getAllTypeNames(nodeValue, updatedTypeNames); + } + }); + return updatedTypeNames; +} + function getAllReferenceNames(propertyName: string, node: any, referenceNames: string[]): string[] { let updatedReferenceNames = referenceNames; if (!_.isObject(node)) { -- cgit v1.2.3 From 60f026e6fdac855daef3ab8b2e8e2ade9d3d26af Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 08:45:43 -0700 Subject: Export Web3ProviderEngine directly instead of indirectly via subproviders --- packages/0x.js/package.json | 5 ++-- packages/0x.js/src/index.ts | 10 ++----- yarn.lock | 68 +++++++++++++++++++++++++-------------------- 3 files changed, 44 insertions(+), 39 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 49dca2923..006c1ed27 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -78,8 +78,8 @@ "@0xproject/base-contract": "^2.0.0-rc.1", "@0xproject/contract-wrappers": "^1.0.1-rc.3", "@0xproject/order-utils": "^1.0.1-rc.3", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/order-watcher": "1.0.1-rc.3", + "@0xproject/sol-compiler": "^1.0.5", "@0xproject/subproviders": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", "@0xproject/typescript-typings": "^1.0.4", @@ -87,7 +87,8 @@ "@0xproject/web3-wrapper": "^1.2.0", "ethereum-types": "^1.0.4", "ethers": "3.0.22", - "lodash": "^4.17.5" + "lodash": "^4.17.5", + "web3-provider-engine": "14.0.6" }, "publishConfig": { "access": "public" diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 5ac3da00d..aa59d81cc 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -47,13 +47,9 @@ export { ContractWrapper } from '@0xproject/contract-wrappers/lib/src/contract_w export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; -export { - Web3ProviderEngine, - RPCSubprovider, - Callback, - JSONRPCRequestPayloadWithMethod, - ErrorCallback, -} from '@0xproject/subproviders'; +export import Web3ProviderEngine = require('web3-provider-engine'); + +export { RPCSubprovider, Callback, JSONRPCRequestPayloadWithMethod, ErrorCallback } from '@0xproject/subproviders'; export { AbiDecoder } from '@0xproject/utils'; diff --git a/yarn.lock b/yarn.lock index a6bfae4c0..08a76d627 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1354,9 +1354,9 @@ aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" -aes-js@^0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" +aes-js@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.1.tgz#89fd1f94ae51b4c72d62466adc1a7323ff52f072" ajv-keywords@^2.1.0: version "2.1.1" @@ -2414,10 +2414,6 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" -base-x@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" - base-x@^3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.4.tgz#94c1788736da065edb1d68808869e357c977fa77" @@ -2821,7 +2817,7 @@ browserslist@^2.1.2: caniuse-lite "^1.0.30000792" electron-to-chromium "^1.3.30" -bs58@=4.0.1: +bs58@=4.0.1, bs58@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" dependencies: @@ -2831,18 +2827,13 @@ bs58@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" -bs58@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" - dependencies: - base-x "^1.1.0" - -bs58check@^1.0.8: - version "1.3.4" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" dependencies: - bs58 "^3.1.0" + bs58 "^4.0.0" create-hash "^1.1.0" + safe-buffer "^5.1.2" btoa@1.1.2: version "1.1.2" @@ -5175,7 +5166,7 @@ ethereumjs-util@5.1.5, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumj safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0: +ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" dependencies: @@ -5229,17 +5220,18 @@ ethereumjs-vm@^2.0.2, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4: rustbn.js "~0.1.1" safe-buffer "^5.1.1" -ethereumjs-wallet@0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb" +ethereumjs-wallet@~0.6.0: + version "0.6.2" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.2.tgz#67244b6af3e8113b53d709124b25477b64aeccda" dependencies: - aes-js "^0.2.3" - bs58check "^1.0.8" - ethereumjs-util "^4.4.0" - hdkey "^0.7.0" + aes-js "^3.1.1" + bs58check "^2.1.2" + ethereumjs-util "^5.2.0" + hdkey "^1.0.0" + safe-buffer "^5.1.2" scrypt.js "^0.2.0" - utf8 "^2.1.1" - uuid "^2.0.1" + utf8 "^3.0.0" + uuid "^3.3.2" ethers@3.0.22: version "3.0.22" @@ -5986,7 +5978,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "~0.6.0" + ethereumjs-wallet "0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" @@ -6651,13 +6643,21 @@ hawk@~6.0.2: hoek "4.x.x" sntp "2.x.x" -hdkey@^0.7.0, hdkey@^0.7.1: +hdkey@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632" dependencies: coinstring "^2.0.0" secp256k1 "^3.0.1" +hdkey@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.1.0.tgz#e74e7b01d2c47f797fa65d1d839adb7a44639f29" + dependencies: + coinstring "^2.0.0" + safe-buffer "^5.1.1" + secp256k1 "^3.0.1" + he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -13947,6 +13947,10 @@ utf8@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" +utf8@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -13992,6 +13996,10 @@ uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + uvm@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/uvm/-/uvm-1.7.0.tgz#685d3a149ec7118fb73a73dfdc158ab46b0f0634" -- cgit v1.2.3 From 7d09a94428e2e4b477946a7eb94fce3d47a2960f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 13:50:03 -0700 Subject: Remove unused ContractWrapper export --- packages/0x.js/src/index.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index aa59d81cc..efcb4344a 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -43,8 +43,6 @@ export { ContractEvents, } from '@0xproject/contract-wrappers'; -export { ContractWrapper } from '@0xproject/contract-wrappers/lib/src/contract_wrappers/contract_wrapper'; - export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; export import Web3ProviderEngine = require('web3-provider-engine'); -- cgit v1.2.3 From ae7bce767442f127961180f7d101265dcbc8ed80 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 13:56:29 -0700 Subject: Add links for external dep exports to docJson --- .../src/utils/doc_generate_and_upload_utils.ts | 45 ++++++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index b236c299f..e866d5bbc 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -30,6 +30,16 @@ const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', }; +/** + * If a 0x package re-exports an external package, we should add a link to it's exported items here + */ +const EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string } = { + Web3ProviderEngine: 'https://www.npmjs.com/package/web3-provider-engine', + BigNumber: 'https://www.npmjs.com/package/bignumber.js', + Schema: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/index.d.ts#L49', + ValidatorResult: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/helpers.js#L31', +}; + const CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[] = [ 'ERC20ProxyWrapper', 'ERC20TokenWrapper', @@ -67,10 +77,9 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: } const pkgNameToPath: { [name: string]: string } = {}; - _.each(monorepoPackages, pkg => { - pkgNameToPath[pkg.packageJson.name] = pkg.location; - }); + _.each(monorepoPackages, p => (pkgNameToPath[p.packageJson.name] = p.location)); + const externalExports: string[] = []; // For each dep that is another one of our monorepo packages, we fetch it's index.ts // and see which specific files we must pass to TypeDoc. let typeDocExtraFileIncludes: string[] = []; @@ -84,6 +93,9 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const pathIfExists = pkgNameToPath[exportPath]; if (_.isUndefined(pathIfExists)) { + _.each(exportedItems, exportedItem => { + externalExports.push(exportedItem); + }); return; // It's an external package } @@ -209,6 +221,24 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: ); } + const externalExportsToLink: { [externalExport: string]: string } = {}; + const externalExportsWithoutLinks: string[] = []; + _.each(externalExports, externalExport => { + const linkIfExists = EXTERNAL_EXPORT_TO_LINK[externalExport]; + if (_.isUndefined(linkIfExists)) { + externalExportsWithoutLinks.push(externalExport); + return; + } + externalExportsToLink[externalExport] = linkIfExists; + }); + if (!_.isEmpty(externalExportsWithoutLinks)) { + throw new Error( + `Found the following external exports in ${packageName}'s index.ts:\n ${externalExportsWithoutLinks.join( + '\n', + )}\nThey are missing from the EXTERNAL_EXPORT_TO_LINK mapping. Add them and try again.`, + ); + } + // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON const docJson = { version: DOC_JSON_VERSION, @@ -216,6 +246,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: exportPathToTypedocNames, exportPathOrder, externalTypeToLink: EXTERNAL_TYPE_TO_LINK, + externalExportsToLink, }, typedocJson: finalTypeDocOutput, }; @@ -367,9 +398,15 @@ function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[] case ts.SyntaxKind.ExportKeyword: { const foundNode: any = node; - const exportPath = './index'; + let exportPath = './index'; if (foundNode.parent && foundNode.parent.name) { const exportItem = foundNode.parent.name.escapedText; + const isExportImportRequireStatement = !_.isUndefined( + _.get(foundNode, 'parent.moduleReference.expression.text'), + ); + if (isExportImportRequireStatement) { + exportPath = foundNode.parent.moduleReference.expression.text; + } if (!_.includes(exportsToOmit, exportItem)) { exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) ? [exportItem] -- cgit v1.2.3 From bf9ee82d9f4a2fec392f0ee58342fc6b3be94dff Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 13:59:50 -0700 Subject: Remove stray console log --- packages/react-docs/src/utils/typedoc_utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index db6063464..e10493673 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -33,7 +33,6 @@ export class TypeDocUtils { private _classNames: string[]; constructor(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo) { this._docsInfo = docsInfo; - console.log('generatedDocJson.metadata', generatedDocJson.metadata); const exportPathOrder = generatedDocJson.metadata.exportPathOrder; const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames; this._externalTypeToLink = generatedDocJson.metadata.externalTypeToLink; -- cgit v1.2.3 From 8e3df2b5aeac9d6776640be1248863055c75cf4a Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 14:57:45 -0700 Subject: Render external dep exports --- .../src/utils/doc_generate_and_upload_utils.ts | 6 +++--- .../react-docs/src/components/documentation.tsx | 20 ++++++++++++++++++++ packages/react-docs/src/types.ts | 8 +++++++- packages/react-docs/src/utils/constants.ts | 1 + packages/react-docs/src/utils/typedoc_utils.ts | 21 +++++++++++++++++++-- 5 files changed, 50 insertions(+), 6 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index e866d5bbc..b4911c84b 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -221,7 +221,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: ); } - const externalExportsToLink: { [externalExport: string]: string } = {}; + const externalExportToLink: { [externalExport: string]: string } = {}; const externalExportsWithoutLinks: string[] = []; _.each(externalExports, externalExport => { const linkIfExists = EXTERNAL_EXPORT_TO_LINK[externalExport]; @@ -229,7 +229,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: externalExportsWithoutLinks.push(externalExport); return; } - externalExportsToLink[externalExport] = linkIfExists; + externalExportToLink[externalExport] = linkIfExists; }); if (!_.isEmpty(externalExportsWithoutLinks)) { throw new Error( @@ -246,7 +246,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: exportPathToTypedocNames, exportPathOrder, externalTypeToLink: EXTERNAL_TYPE_TO_LINK, - externalExportsToLink, + externalExportToLink, }, typedocJson: finalTypeDocOutput, }; diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 82e444018..43a1f746e 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -19,6 +19,7 @@ import { AddressByContractName, DocAgnosticFormat, Event, + ExternalExportToLink, Property, SolidityMethod, SupportedDocJson, @@ -26,6 +27,7 @@ import { TypescriptFunction, TypescriptMethod, } from '../types'; +import { constants } from '../utils/constants'; import { Badge } from './badge'; import { Comment } from './comment'; @@ -300,6 +302,8 @@ export class Documentation extends React.Component<DocumentationProps, Documenta <div>{eventDefs}</div> </div> )} + {!_.isUndefined(docSection.externalExportToLink) && + this._renderExternalExports(docSection.externalExportToLink)} {!_.isUndefined(typeDefs) && typeDefs.length > 0 && ( <div> @@ -309,6 +313,22 @@ export class Documentation extends React.Component<DocumentationProps, Documenta </div> ); } + private _renderExternalExports(externalExportToLink: ExternalExportToLink): React.ReactNode { + const externalExports = _.map(externalExportToLink, (link: string, exportName: string) => { + return ( + <div className="pt2"> + <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> + {`import { `} + <a href={link} target="_blank" style={{ color: colors.lightBlueA700, textDecoration: 'none' }}> + {exportName} + </a> + {` } from '${this.props.docsInfo.displayName}'`} + </code> + </div> + ); + }); + return <div>{externalExports}</div>; + } private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { if (this.props.docsInfo.type !== SupportedDocJson.Doxity) { return null; diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 0155685e0..8352af876 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -105,8 +105,9 @@ export interface DocSection { methods: Array<TypescriptMethod | SolidityMethod>; properties: Property[]; types: CustomType[]; - functions?: TypescriptFunction[]; + functions: TypescriptFunction[]; events?: Event[]; + externalExportToLink?: ExternalExportToLink; } export interface TypescriptMethod extends BaseMethod { @@ -296,10 +297,15 @@ export interface ExternalTypeToLink { [externalTypeName: string]: string; } +export interface ExternalExportToLink { + [externalExport: string]: string; +} + export interface Metadata { exportPathToTypedocNames: ExportNameToTypedocNames; exportPathOrder: string[]; externalTypeToLink: ExternalTypeToLink; + externalExportToLink: ExternalExportToLink; } export interface GeneratedDocJson { diff --git a/packages/react-docs/src/utils/constants.ts b/packages/react-docs/src/utils/constants.ts index c3c74fd11..97bedf2db 100644 --- a/packages/react-docs/src/utils/constants.ts +++ b/packages/react-docs/src/utils/constants.ts @@ -2,6 +2,7 @@ import { SupportedDocJson } from '../types'; export const constants = { TYPES_SECTION_NAME: 'types', + EXTERNAL_EXPORTS_SECTION_NAME: 'externalExports', TYPE_TO_SYNTAX: { [SupportedDocJson.Doxity]: 'solidity', [SupportedDocJson.TypeDoc]: 'typescript', diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index e10493673..989485dfc 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -7,13 +7,13 @@ import { CustomTypeChild, DocAgnosticFormat, DocSection, + ExternalExportToLink, ExternalTypeToLink, GeneratedDocJson, IndexSignature, KindString, Parameter, Property, - SectionsMap, Type, TypeDocNode, TypeDocType, @@ -28,6 +28,7 @@ import { constants } from './constants'; export class TypeDocUtils { private _typeDocNameOrder: string[]; private _externalTypeToLink: ExternalTypeToLink; + private _externalExportToLink: ExternalExportToLink; private _docsInfo: DocsInfo; private _typeDocJson: TypeDocNode; private _classNames: string[]; @@ -36,6 +37,7 @@ export class TypeDocUtils { const exportPathOrder = generatedDocJson.metadata.exportPathOrder; const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames; this._externalTypeToLink = generatedDocJson.metadata.externalTypeToLink; + this._externalExportToLink = generatedDocJson.metadata.externalExportToLink; this._typeDocJson = generatedDocJson.typedocJson; // TODO: Extract the non typeDoc exports, and render them somehow @@ -88,6 +90,22 @@ export class TypeDocUtils { } public convertToDocAgnosticFormat(): DocAgnosticFormat { const docAgnosticFormat: DocAgnosticFormat = {}; + + if (!_.isEmpty(this._externalExportToLink)) { + this._docsInfo.sections[constants.EXTERNAL_EXPORTS_SECTION_NAME] = constants.EXTERNAL_EXPORTS_SECTION_NAME; + this._docsInfo.menu[constants.EXTERNAL_EXPORTS_SECTION_NAME] = [constants.EXTERNAL_EXPORTS_SECTION_NAME]; + const docSection: DocSection = { + comment: 'This package also re-exports some third-party libraries for your convenience.', + constructors: [], + methods: [], + functions: [], + properties: [], + types: [], + externalExportToLink: this._externalExportToLink, + }; + docAgnosticFormat[constants.EXTERNAL_EXPORTS_SECTION_NAME] = docSection; + } + const typeEntities: TypeDocNode[] = []; _.each(this._typeDocNameOrder, typeDocName => { const fileChildIndex = _.findIndex(this._typeDocJson.children, child => child.name === typeDocName); @@ -458,7 +476,6 @@ export class TypeDocUtils { method: methodIfExists, indexSignature: indexSignatureIfExists, }; - console.log('this._externalTypeToLink', this._externalTypeToLink); const externalLinkIfExists = this._externalTypeToLink[entity.name]; if (!_.isUndefined(externalLinkIfExists)) { type.externalLink = externalLinkIfExists; -- cgit v1.2.3 From e47e9c5b34a2c189b6913c4c7082cb7ec256617f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 15:01:52 -0700 Subject: Fix external exports section name --- packages/react-docs/src/utils/constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/utils/constants.ts b/packages/react-docs/src/utils/constants.ts index 97bedf2db..0b08f2c3e 100644 --- a/packages/react-docs/src/utils/constants.ts +++ b/packages/react-docs/src/utils/constants.ts @@ -2,7 +2,7 @@ import { SupportedDocJson } from '../types'; export const constants = { TYPES_SECTION_NAME: 'types', - EXTERNAL_EXPORTS_SECTION_NAME: 'externalExports', + EXTERNAL_EXPORTS_SECTION_NAME: 'external exports', TYPE_TO_SYNTAX: { [SupportedDocJson.Doxity]: 'solidity', [SupportedDocJson.TypeDoc]: 'typescript', -- cgit v1.2.3 From 7c08f6d30aea9cde0a7fce4b3ca41e1e9a0450c3 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 15:13:28 -0700 Subject: Update yarn.lock --- yarn.lock | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index dd0ec1684..ec002cab7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3742,7 +3742,7 @@ copy-webpack-plugin@^4.0.1: p-limit "^1.0.0" serialize-javascript "^1.4.0" -copyfiles@2.0.0: +copyfiles@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.0.0.tgz#bbd78bb78e8fd6db5c67adf54249317b24560f2a" dependencies: @@ -5224,7 +5224,6 @@ ethereumjs-wallet@~0.6.0: ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22: version "3.0.18" - uid b91342bd200d142af0165d6befddf783c8ae8447 resolved "https://codeload.github.com/0xproject/ethers.js/tar.gz/b91342bd200d142af0165d6befddf783c8ae8447" dependencies: aes-js "3.0.0" @@ -5968,7 +5967,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "~0.6.0" + ethereumjs-wallet "0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" -- cgit v1.2.3 From a4c3a0d39fb42647f5c84d4e39b8f38df83a1902 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 15:15:30 -0700 Subject: Undo prettier --- .circleci/config.yml | 474 +++++++++++++++++++++++++-------------------------- 1 file changed, 237 insertions(+), 237 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d4082f511..ae8519a56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,242 +1,242 @@ version: 2 jobs: - build: - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - checkout - - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - restore_cache: - name: Restore Yarn Package Cache - keys: - - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - - yarn-packages-{{ .Branch }} - - yarn-packages-master - - yarn-packages- - - run: - name: yarn - command: yarn --frozen-lockfile install - - save_cache: - name: Save Yarn Package Cache - key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} - paths: - - node_modules/ - - run: > - if [ -z "$(git diff --name-only v2-prototype packages/website)" ]; then - yarn build --exclude website - else - yarn build - fi - - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - test-contracts-ganache: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci contracts - test-contracts-geth: - docker: - - image: circleci/node:9 - - image: albrow/0x-devnet - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is - # initialized - - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - test-publish: - docker: - - image: circleci/node:9 - - image: verdaccio/verdaccio - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:publish:circleci - test-rest: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci @0xproject/abi-gen - - run: yarn wsrun test:circleci @0xproject/assert - - run: yarn wsrun test:circleci @0xproject/base-contract - - run: yarn wsrun test:circleci @0xproject/connect - - run: yarn wsrun test:circleci @0xproject/contract-wrappers - - run: yarn wsrun test:circleci @0xproject/dev-utils - - run: yarn wsrun test:circleci @0xproject/json-schemas - - run: yarn wsrun test:circleci @0xproject/metacoin - - run: yarn wsrun test:circleci @0xproject/order-utils - - run: yarn wsrun test:circleci @0xproject/order-watcher - - run: yarn wsrun test:circleci @0xproject/sol-compiler - - run: yarn wsrun test:circleci @0xproject/sol-cov - - run: yarn wsrun test:circleci @0xproject/sra-report - - run: yarn wsrun test:circleci @0xproject/subproviders - - run: yarn wsrun test:circleci @0xproject/web3-wrapper - - run: yarn wsrun test:circleci @0xproject/utils - - save_cache: - key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/abi-gen/coverage/lcov.info - - save_cache: - key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/assert/coverage/lcov.info - - save_cache: - key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/base-contract/coverage/lcov.info - - save_cache: - key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/connect/coverage/lcov.info - - save_cache: - key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/contract-wrappers/coverage/lcov.info - - save_cache: - key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/dev-utils/coverage/lcov.info - - save_cache: - key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/json-schemas/coverage/lcov.info - - save_cache: - key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/metacoin/coverage/lcov.info - - save_cache: - key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-utils/coverage/lcov.info - - save_cache: - key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-watcher/coverage/lcov.info - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-cov/coverage/lcov.info - - save_cache: - key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sra-report/coverage/lcov.info - - save_cache: - key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/subproviders/coverage/lcov.info - - save_cache: - key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/web3-wrapper/coverage/lcov.info - static-tests: - working_directory: ~/repo - docker: - - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn prettier:ci - - run: yarn lerna run lint - submit-coverage: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn report_coverage + build: + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - checkout + - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - restore_cache: + name: Restore Yarn Package Cache + keys: + - yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + - yarn-packages-{{ .Branch }} + - yarn-packages-master + - yarn-packages- + - run: + name: yarn + command: yarn --frozen-lockfile install + - save_cache: + name: Save Yarn Package Cache + key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} + paths: + - node_modules/ + - run: > + if [ -z "$(git diff --name-only v2-prototype packages/website)" ]; then + yarn build --exclude website + else + yarn build + fi + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + test-contracts-ganache: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci contracts + test-contracts-geth: + docker: + - image: circleci/node:9 + - image: albrow/0x-devnet + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is + # initialized + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts + test-publish: + docker: + - image: circleci/node:9 + - image: verdaccio/verdaccio + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:publish:circleci + test-rest: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci @0xproject/abi-gen + - run: yarn wsrun test:circleci @0xproject/assert + - run: yarn wsrun test:circleci @0xproject/base-contract + - run: yarn wsrun test:circleci @0xproject/connect + - run: yarn wsrun test:circleci @0xproject/contract-wrappers + - run: yarn wsrun test:circleci @0xproject/dev-utils + - run: yarn wsrun test:circleci @0xproject/json-schemas + - run: yarn wsrun test:circleci @0xproject/metacoin + - run: yarn wsrun test:circleci @0xproject/order-utils + - run: yarn wsrun test:circleci @0xproject/order-watcher + - run: yarn wsrun test:circleci @0xproject/sol-compiler + - run: yarn wsrun test:circleci @0xproject/sol-cov + - run: yarn wsrun test:circleci @0xproject/sra-report + - run: yarn wsrun test:circleci @0xproject/subproviders + - run: yarn wsrun test:circleci @0xproject/web3-wrapper + - run: yarn wsrun test:circleci @0xproject/utils + - save_cache: + key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/abi-gen/coverage/lcov.info + - save_cache: + key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/assert/coverage/lcov.info + - save_cache: + key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/base-contract/coverage/lcov.info + - save_cache: + key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/connect/coverage/lcov.info + - save_cache: + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/dev-utils/coverage/lcov.info + - save_cache: + key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/json-schemas/coverage/lcov.info + - save_cache: + key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/metacoin/coverage/lcov.info + - save_cache: + key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-utils/coverage/lcov.info + - save_cache: + key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-watcher/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-compiler/coverage/lcov.info + - save_cache: + key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-cov/coverage/lcov.info + - save_cache: + key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sra-report/coverage/lcov.info + - save_cache: + key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/subproviders/coverage/lcov.info + - save_cache: + key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/web3-wrapper/coverage/lcov.info + static-tests: + working_directory: ~/repo + docker: + - image: circleci/node:9 + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn prettier:ci + - run: yarn lerna run lint + submit-coverage: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn report_coverage workflows: - version: 2 - main: - jobs: + version: 2 + main: + jobs: + - build + - test-contracts-ganache: + requires: - build - - test-contracts-ganache: - requires: - - build - - test-contracts-geth: - requires: - - build - - test-rest: - requires: - - build - - static-tests: - requires: - - build - - test-publish: - requires: - - build - - submit-coverage: - requires: - - test-rest + - test-contracts-geth: + requires: + - build + - test-rest: + requires: + - build + - static-tests: + requires: + - build + - test-publish: + requires: + - build + - submit-coverage: + requires: + - test-rest \ No newline at end of file -- cgit v1.2.3 From def575b9952908e8eebb1881a5dc0fe2e663a7c8 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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(-) 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 f7375fca98c01093f34f916f93f9bfe76278b6af Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 17:02:37 -0700 Subject: Move doc configs to a separate file --- packages/monorepo-scripts/src/doc_gen_configs.ts | 33 +++++++++++++ packages/monorepo-scripts/src/types.ts | 16 ++++++ .../src/utils/doc_generate_and_upload_utils.ts | 57 ++++------------------ 3 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 packages/monorepo-scripts/src/doc_gen_configs.ts diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts new file mode 100644 index 000000000..fd95863c3 --- /dev/null +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -0,0 +1,33 @@ +import { DocGenConfigs } from './types'; + +export const docGenConfigs: DocGenConfigs = { + DOC_JSON_VERSION: '0.0.1', + EXTERNAL_TYPE_TO_LINK: { + BigNumber: 'http://mikemcl.github.io/bignumber.js', + Error: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error', + Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', + 'solc.StandardContractOutput': + 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', + 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', + Schema: + 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', + }, + /** + * If a 0x package re-exports an external package, we should add a link to it's exported items here + */ + EXTERNAL_EXPORT_TO_LINK: { + Web3ProviderEngine: 'https://www.npmjs.com/package/web3-provider-engine', + BigNumber: 'https://www.npmjs.com/package/bignumber.js', + Schema: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/index.d.ts#L49', + ValidatorResult: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/helpers.js#L31', + }, + CLASSES_WITH_HIDDEN_CONSTRUCTORS: [ + 'ERC20ProxyWrapper', + 'ERC20TokenWrapper', + 'ERC721ProxyWrapper', + 'ERC721TokenWrapper', + 'EtherTokenWrapper', + 'ExchangeWrapper', + 'ForwarderWrapper', + ], +}; diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index 4d4600abf..5f6a6c707 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -50,6 +50,22 @@ export interface Package { packageJson: PackageJSON; } +export interface DocGenConfigs { + DOC_JSON_VERSION: string; + EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string }; + EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string }; + CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[]; +} + export interface ExportPathToExportedItems { [pkgName: string]: string[]; } + +export interface ExportInfo { + exportPathToExportedItems: ExportPathToExportedItems; + exportPathOrder: string[]; +} + +export interface ExportNameToTypedocNames { + [exportName: string]: string[]; +} diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index b4911c84b..0d9c47932 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -5,51 +5,11 @@ import { exec as execAsync } from 'promisify-child-process'; import * as ts from 'typescript'; import { constants } from '../constants'; -import { ExportPathToExportedItems } from '../types'; +import { docGenConfigs } from '../doc_gen_configs'; +import { ExportInfo, ExportNameToTypedocNames, ExportPathToExportedItems } from '../types'; import { utils } from './utils'; -interface ExportInfo { - exportPathToExportedItems: ExportPathToExportedItems; - exportPathOrder: string[]; -} - -interface ExportNameToTypedocNames { - [exportName: string]: string[]; -} - -const DOC_JSON_VERSION = '0.0.1'; - -const EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string } = { - BigNumber: 'http://mikemcl.github.io/bignumber.js', - Error: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error', - Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', - 'solc.StandardContractOutput': - 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#output-description', - 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', - Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', -}; - -/** - * If a 0x package re-exports an external package, we should add a link to it's exported items here - */ -const EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string } = { - Web3ProviderEngine: 'https://www.npmjs.com/package/web3-provider-engine', - BigNumber: 'https://www.npmjs.com/package/bignumber.js', - Schema: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/index.d.ts#L49', - ValidatorResult: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/helpers.js#L31', -}; - -const CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[] = [ - 'ERC20ProxyWrapper', - 'ERC20TokenWrapper', - 'ERC721ProxyWrapper', - 'ERC721TokenWrapper', - 'EtherTokenWrapper', - 'ExchangeWrapper', - 'ForwarderWrapper', -]; - export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { const monorepoPackages = utils.getPackages(constants.monorepoRootPath); const pkg = _.find(monorepoPackages, monorepoPackage => { @@ -178,7 +138,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: _.each(innerChildren, (innerChild, k) => { const isHiddenConstructor = child.kindString === 'Class' && - _.includes(CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name) && + _.includes(docGenConfigs.CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name) && innerChild.kindString === 'Constructor'; const isPrivate = _.startsWith(innerChild.name, '_'); if (isHiddenConstructor || isPrivate) { @@ -209,7 +169,10 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const missingReferences: string[] = []; _.each(referenceNames, referenceName => { - if (!_.includes(allExportedItems, referenceName) && _.isUndefined(EXTERNAL_TYPE_TO_LINK[referenceName])) { + if ( + !_.includes(allExportedItems, referenceName) && + _.isUndefined(docGenConfigs.EXTERNAL_TYPE_TO_LINK[referenceName]) + ) { missingReferences.push(referenceName); } }); @@ -224,7 +187,7 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: const externalExportToLink: { [externalExport: string]: string } = {}; const externalExportsWithoutLinks: string[] = []; _.each(externalExports, externalExport => { - const linkIfExists = EXTERNAL_EXPORT_TO_LINK[externalExport]; + const linkIfExists = docGenConfigs.EXTERNAL_EXPORT_TO_LINK[externalExport]; if (_.isUndefined(linkIfExists)) { externalExportsWithoutLinks.push(externalExport); return; @@ -241,11 +204,11 @@ export async function generateAndUploadDocsAsync(packageName: string, isStaging: // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON const docJson = { - version: DOC_JSON_VERSION, + version: docGenConfigs.DOC_JSON_VERSION, metadata: { exportPathToTypedocNames, exportPathOrder, - externalTypeToLink: EXTERNAL_TYPE_TO_LINK, + externalTypeToLink: docGenConfigs.EXTERNAL_TYPE_TO_LINK, externalExportToLink, }, typedocJson: finalTypeDocOutput, -- cgit v1.2.3 From 68d7eb5712750fae2bdc680c45bc5927e1837afe Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 16 Aug 2018 17:02:47 -0700 Subject: Fix comment --- packages/contracts/test/utils/erc20_wrapper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/contracts/test/utils/erc20_wrapper.ts b/packages/contracts/test/utils/erc20_wrapper.ts index 95b31dfa6..ec9e20a9b 100644 --- a/packages/contracts/test/utils/erc20_wrapper.ts +++ b/packages/contracts/test/utils/erc20_wrapper.ts @@ -21,10 +21,11 @@ export class ERC20Wrapper { private _proxyContract?: ERC20ProxyContract; private _proxyIdIfExists?: string; /** - * + * Instanitates an ERC20Wrapper * @param provider Web3 provider to use for all JSON RPC requests * @param tokenOwnerAddresses * @param contractOwnerAddress + * Instance of ERC20Wrapper */ constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) { this._dummyTokenContracts = []; -- cgit v1.2.3 From 05ce0024352f2198a3744d62d9532a7e729ef5fa Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 17 Aug 2018 12:53:27 -0700 Subject: Refactor DocGenerateAndUploadUtils to be a class, and decompose large methods for readability --- .../src/doc_generate_and_upload.ts | 5 +- packages/monorepo-scripts/src/publish.ts | 9 +- .../src/utils/doc_generate_and_upload_utils.ts | 761 ++++++++++++--------- 3 files changed, 427 insertions(+), 348 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index e0e7e1bb5..602247972 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -1,6 +1,6 @@ import * as yargs from 'yargs'; -import { generateAndUploadDocsAsync } from './utils/doc_generate_and_upload_utils'; +import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils'; const args = yargs .option('package', { @@ -19,5 +19,6 @@ const args = yargs const packageName = args.package; const isStaging = args.isStaging; - await generateAndUploadDocsAsync(packageName, isStaging); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging); + await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); })(); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index bb2dd60c1..6691fd3c1 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -13,9 +13,9 @@ import { constants } from './constants'; import { Package, PackageToNextVersion, VersionChangelog } from './types'; import { changelogUtils } from './utils/changelog_utils'; import { configs } from './utils/configs'; -import { utils } from './utils/utils'; +import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils'; import { publishReleaseNotesAsync } from './utils/github_release_utils'; -import { generateAndUploadDocsAsync } from './utils/doc_generate_and_upload_utils'; +import { utils } from './utils/utils'; const DOC_GEN_COMMAND = 'docs:json'; const NPM_NAMESPACE = '@0xproject/'; @@ -81,11 +81,12 @@ async function confirmAsync(message: string): Promise<void> { process.exit(1); }); -async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean) { +async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean): Promise<void> { for (const pkg of updatedPublicPackages) { const packageName = pkg.packageJson.name; const nameWithoutPrefix = packageName.replace('@0xproject/', ''); - await generateAndUploadDocsAsync(nameWithoutPrefix, isStaging); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging); + await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); } } diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 0d9c47932..a2902d1e4 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -6,391 +6,468 @@ import * as ts from 'typescript'; import { constants } from '../constants'; import { docGenConfigs } from '../doc_gen_configs'; -import { ExportInfo, ExportNameToTypedocNames, ExportPathToExportedItems } from '../types'; +import { ExportInfo, ExportNameToTypedocNames, ExportPathToExportedItems, PackageJSON } from '../types'; import { utils } from './utils'; -export async function generateAndUploadDocsAsync(packageName: string, isStaging: boolean): Promise<void> { - const monorepoPackages = utils.getPackages(constants.monorepoRootPath); - const pkg = _.find(monorepoPackages, monorepoPackage => { - return _.includes(monorepoPackage.packageJson.name, packageName); - }); - if (_.isUndefined(pkg)) { - throw new Error(`Couldn't find a package.json for ${packageName}`); +export class DocGenerateAndUploadUtils { + private _isStaging: boolean; + private _packageName: string; + private _omitExports: string[]; + private _packagePath: string; + private _exportPathToExportedItems: ExportPathToExportedItems; + private _exportPathOrder: string[]; + private _monoRepoPkgNameToPath: { [name: string]: string }; + private _packageJson: PackageJSON; + /** + * Recursively iterate over the TypeDoc JSON object and find all type names + */ + private static _getAllTypeNames(node: any, typeNames: string[]): string[] { + if (!_.isObject(node)) { + return typeNames; + } + const typeKindStrings = ['Interface', 'Enumeration', 'Type alias']; + if (_.includes(typeKindStrings, node.kindString)) { + return [...typeNames, node.name]; + } + let updatedTypeNames = typeNames; + _.each(node, nodeValue => { + if (_.isArray(nodeValue)) { + _.each(nodeValue, aNode => { + updatedTypeNames = DocGenerateAndUploadUtils._getAllTypeNames(aNode, updatedTypeNames); + }); + } else if (_.isObject(nodeValue)) { + updatedTypeNames = DocGenerateAndUploadUtils._getAllTypeNames(nodeValue, updatedTypeNames); + } + }); + return updatedTypeNames; } + /** + * Recursively iterate over the TypeDoc JSON object and find all reference names (i.e types, classNames, + * objectLiteral names, etc...) + */ + private static _getAllReferenceNames(propertyName: string, node: any, referenceNames: string[]): string[] { + if (!_.isObject(node)) { + return referenceNames; + } - const packageJson = pkg.packageJson; - const omitExports = _.get(packageJson, 'config.postpublish.omitExports', []); + let updatedReferenceNames = referenceNames; + // Some nodes of type reference are for subtypes, which we don't want to return. + // We therefore filter them out. + const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes']; + if ( + !_.isUndefined(node.type) && + _.isString(node.type) && + node.type === 'reference' && + _.isUndefined(node.typeArguments) && + !_.includes(SUB_TYPE_PROPERTY_NAMES, propertyName) + ) { + updatedReferenceNames = _.uniq([...referenceNames, node.name]); + return updatedReferenceNames; + } + _.each(node, (nodeValue, innerPropertyName) => { + if (_.isArray(nodeValue)) { + _.each(nodeValue, aNode => { + updatedReferenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( + innerPropertyName, + aNode, + updatedReferenceNames, + ); + }); + } else if (_.isObject(nodeValue)) { + updatedReferenceNames = updatedReferenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( + innerPropertyName, + nodeValue, + updatedReferenceNames, + ); + } + }); + return _.uniq(updatedReferenceNames); + } + private static _getExportPathToExportedItems(filePath: string, omitExports?: string[]): ExportInfo { + const sourceFile = ts.createSourceFile( + 'indexFile', + readFileSync(filePath).toString(), + ts.ScriptTarget.ES2017, + /*setParentNodes */ true, + ); + const exportPathToExportedItems: ExportPathToExportedItems = {}; + const exportPathOrder: string[] = []; + const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; - const pathToPackage = `${constants.monorepoRootPath}/packages/${packageName}`; - const indexPath = `${pathToPackage}/src/index.ts`; - const { exportPathToExportedItems, exportPathOrder } = getExportPathToExportedItems(indexPath, omitExports); + processNode(sourceFile); - const shouldPublishDocs = !!_.get(packageJson, 'config.postpublish.shouldPublishDocs'); - if (!shouldPublishDocs) { - utils.log( - `GENERATE_UPLOAD_DOCS: ${ - packageJson.name - } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, - ); - return; - } + function processNode(node: ts.Node): void { + switch (node.kind) { + case ts.SyntaxKind.ExportDeclaration: { + const exportClause = (node as any).exportClause; + const exportPath = exportClause.parent.moduleSpecifier.text; + _.each(exportClause.elements, element => { + const exportItem = element.name.escapedText; + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } + }); + if (!_.isUndefined(exportPathToExportedItems[exportPath])) { + exportPathOrder.push(exportPath); + } + break; + } - const pkgNameToPath: { [name: string]: string } = {}; - _.each(monorepoPackages, p => (pkgNameToPath[p.packageJson.name] = p.location)); + case ts.SyntaxKind.ExportKeyword: { + const foundNode: any = node; + let exportPath = './index'; + if (foundNode.parent && foundNode.parent.name) { + const exportItem = foundNode.parent.name.escapedText; + const isExportImportRequireStatement = !_.isUndefined( + _.get(foundNode, 'parent.moduleReference.expression.text'), + ); + if (isExportImportRequireStatement) { + exportPath = foundNode.parent.moduleReference.expression.text; + } + if (!_.includes(exportsToOmit, exportItem)) { + exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) + ? [exportItem] + : [...exportPathToExportedItems[exportPath], exportItem]; + } + } + if ( + !_.includes(exportPathOrder, exportPath) && + !_.isUndefined(exportPathToExportedItems[exportPath]) + ) { + exportPathOrder.push(exportPath); + } + break; + } + default: + // noop + break; + } - const externalExports: string[] = []; - // For each dep that is another one of our monorepo packages, we fetch it's index.ts - // and see which specific files we must pass to TypeDoc. - let typeDocExtraFileIncludes: string[] = []; - _.each(exportPathToExportedItems, (exportedItems, exportPath) => { - const isInternalToPkg = _.startsWith(exportPath, '.'); - if (isInternalToPkg) { - const pathToInternalPkg = path.join(pathToPackage, 'src', `${exportPath}.ts`); - typeDocExtraFileIncludes.push(pathToInternalPkg); - return; + ts.forEachChild(node, processNode); } + const exportInfo = { + exportPathToExportedItems, + exportPathOrder, + }; + return exportInfo; + } + constructor(packageName: string, isStaging: boolean) { + this._isStaging = isStaging; + this._packageName = packageName; + this._packagePath = `${constants.monorepoRootPath}/packages/${packageName}`; - const pathIfExists = pkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { - _.each(exportedItems, exportedItem => { - externalExports.push(exportedItem); - }); - return; // It's an external package - } + this._monoRepoPkgNameToPath = {}; + const monorepoPackages = utils.getPackages(constants.monorepoRootPath); + _.each(monorepoPackages, p => (this._monoRepoPkgNameToPath[p.packageJson.name] = p.location)); - const typeDocSourceIncludes = new Set(); - const pathToIndex = `${pathIfExists}/src/index.ts`; - const exportInfo = getExportPathToExportedItems(pathToIndex); - const innerExportPathToExportedItems = exportInfo.exportPathToExportedItems; - _.each(exportedItems, exportName => { - _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { - if (!_.includes(innerExportItems, exportName)) { - return; - } - if (!_.startsWith(innerExportPath, './')) { - throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is - itself exported from an external package. To fix this, export the external dependency directly, - not indirectly through ${innerExportPath}.`, - ); - } else { - const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); - typeDocSourceIncludes.add(absoluteSrcPath); - } - }); + const pkg = _.find(monorepoPackages, monorepoPackage => { + return _.includes(monorepoPackage.packageJson.name, packageName); }); - // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types - // directly, meaning no internal paths will exist to follow. Other packages also have direct exports - // in their index.ts, so we always add it to the source files passed to TypeDoc - if (typeDocSourceIncludes.size === 0) { - typeDocSourceIncludes.add(pathToIndex); + if (_.isUndefined(pkg)) { + throw new Error(`Couldn't find a package.json for ${packageName}`); } + this._packageJson = pkg.packageJson; + this._omitExports = _.get(this._packageJson, 'config.postpublish.omitExports', []); - typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; - }); - - // Generate Typedoc JSON file - typeDocExtraFileIncludes.push(path.join(pathToPackage, 'src', 'globals.d.ts')); - const jsonFilePath = path.join(pathToPackage, 'generated_docs', 'index.json'); - const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); - // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the - // packages root dir, does not work. It only works when called via a `package.json` script located - // in the package's root. - await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { - cwd, - }); + const indexPath = `${this._packagePath}/src/index.ts`; + const exportInfo = DocGenerateAndUploadUtils._getExportPathToExportedItems(indexPath, this._omitExports); + this._exportPathToExportedItems = exportInfo.exportPathToExportedItems; + this._exportPathOrder = exportInfo.exportPathOrder; - // Unfortunately TypeDoc children names will only be prefixed with the name of the package _if_ we passed - // TypeDoc files outside of the packages root path (i.e this package exports another package found in our - // monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add - // it here when necessary. - const typedocOutputString = readFileSync(jsonFilePath).toString(); - const typedocOutput = JSON.parse(typedocOutputString); - const finalTypeDocOutput = _.clone(typedocOutput); - _.each(typedocOutput.children, (child, i) => { - if (!_.includes(child.name, '/src/')) { - const nameWithoutQuotes = child.name.replace(/"/g, ''); - const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; - finalTypeDocOutput.children[i].name = standardizedName; + const shouldPublishDocs = !!_.get(this._packageJson, 'config.postpublish.shouldPublishDocs'); + if (!shouldPublishDocs) { + utils.log( + `GENERATE_UPLOAD_DOCS: ${ + this._packageJson.name + } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, + ); + return; } - }); + } + public async generateAndUploadDocsAsync(): Promise<void> { + // For each dep that is another one of our monorepo packages, we fetch it's index.ts + // and see which specific files we must pass to TypeDoc, in order to generate a Doc JSON + // the includes everything exported by the public interface. + const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage(); - // For each entry, remove it if: - // - it was not exported in index.ts - // - the constructor is to be ignored - // - it begins with an underscore - const exportPathToTypedocNames: ExportNameToTypedocNames = {}; - _.each(typedocOutput.children, (file, i) => { - const exportPath = findExportPathGivenTypedocName(exportPathToExportedItems, packageName, file.name); - exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) - ? [file.name] - : [...exportPathToTypedocNames[exportPath], file.name]; + // In order to avoid TS errors, we need to pass TypeDoc the package's global.d.ts file + typeDocExtraFileIncludes.push(path.join(this._packagePath, 'src', 'globals.d.ts')); - const exportItems = exportPathToExportedItems[exportPath]; - _.each(file.children, (child, j) => { - if (!_.includes(exportItems, child.name)) { - delete finalTypeDocOutput.children[i].children[j]; - return; - } - const innerChildren = typedocOutput.children[i].children[j].children; - _.each(innerChildren, (innerChild, k) => { - const isHiddenConstructor = - child.kindString === 'Class' && - _.includes(docGenConfigs.CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name) && - innerChild.kindString === 'Constructor'; - const isPrivate = _.startsWith(innerChild.name, '_'); - if (isHiddenConstructor || isPrivate) { - delete finalTypeDocOutput.children[i].children[j].children[k]; - finalTypeDocOutput.children[i].children[j].children = _.compact( - finalTypeDocOutput.children[i].children[j].children, - ); - } - }); + const jsonFilePath = path.join(this._packagePath, 'generated_docs', 'index.json'); + const projectFiles = typeDocExtraFileIncludes.join(' '); + const cwd = path.join(constants.monorepoRootPath, 'packages', this._packageName); + // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the + // packages root dir, does not work. It only works when called via a `package.json` script located + // in the package's root. + await execAsync(`JSON_FILE_PATH=${jsonFilePath} PROJECT_FILES="${projectFiles}" yarn docs:json`, { + cwd, }); - finalTypeDocOutput.children[i].children = _.compact(finalTypeDocOutput.children[i].children); - }); - const allExportedItems = _.flatten(_.values(exportPathToExportedItems)); - const propertyName = ''; // Root has no property name - const referenceNamesWithDuplicates = getAllReferenceNames(propertyName, finalTypeDocOutput, []); - const referenceNames = _.uniq(referenceNamesWithDuplicates); + const typedocOutputString = readFileSync(jsonFilePath).toString(); + const typedocOutput = JSON.parse(typedocOutputString); + let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); + modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput); - const exportedTypes = getAllTypeNames(finalTypeDocOutput, []); - const excessiveReferences = _.difference(exportedTypes, referenceNames); - if (!_.isEmpty(excessiveReferences)) { - throw new Error( - `${packageName} package exports BUT does not need: \n${excessiveReferences.join( - '\n', - )} \nin it\'s index.ts. Remove them then try again.`, - ); - } + const propertyName = ''; // Root has no property name + const referenceNames = DocGenerateAndUploadUtils._getAllReferenceNames(propertyName, modifiedTypedocOutput, []); + this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput); + this._lookForMissingReferenceExportsThrowIfExists(referenceNames); - const missingReferences: string[] = []; - _.each(referenceNames, referenceName => { - if ( - !_.includes(allExportedItems, referenceName) && - _.isUndefined(docGenConfigs.EXTERNAL_TYPE_TO_LINK[referenceName]) - ) { - missingReferences.push(referenceName); + // Some of our packages re-export external package exports in their index.ts + // Typedoc is incapable of rendering these packages, so we need to special-case them + const externalExportToLink: { [externalExport: string]: string } = {}; + const externalExportsWithoutLinks: string[] = []; + const externalExports: string[] = this._getAllExternalExports(); + _.each(externalExports, externalExport => { + const linkIfExists = docGenConfigs.EXTERNAL_EXPORT_TO_LINK[externalExport]; + if (_.isUndefined(linkIfExists)) { + externalExportsWithoutLinks.push(externalExport); + return; + } + externalExportToLink[externalExport] = linkIfExists; + }); + if (!_.isEmpty(externalExportsWithoutLinks)) { + throw new Error( + `Found the following external exports in ${ + this._packageName + }'s index.ts:\n ${externalExportsWithoutLinks.join( + '\n', + )}\nThey are missing from the EXTERNAL_EXPORT_TO_LINK mapping. Add them and try again.`, + ); } - }); - if (!_.isEmpty(missingReferences)) { - throw new Error( - `${packageName} package needs to export: \n${missingReferences.join( - '\n', - )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, - ); - } - const externalExportToLink: { [externalExport: string]: string } = {}; - const externalExportsWithoutLinks: string[] = []; - _.each(externalExports, externalExport => { - const linkIfExists = docGenConfigs.EXTERNAL_EXPORT_TO_LINK[externalExport]; - if (_.isUndefined(linkIfExists)) { - externalExportsWithoutLinks.push(externalExport); - return; - } - externalExportToLink[externalExport] = linkIfExists; - }); - if (!_.isEmpty(externalExportsWithoutLinks)) { - throw new Error( - `Found the following external exports in ${packageName}'s index.ts:\n ${externalExportsWithoutLinks.join( - '\n', - )}\nThey are missing from the EXTERNAL_EXPORT_TO_LINK mapping. Add them and try again.`, - ); - } + const exportPathToTypedocNames: ExportNameToTypedocNames = {}; + _.each(modifiedTypedocOutput.children, file => { + const exportPath = this._findExportPathGivenTypedocName(file.name); + exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) + ? [file.name] + : [...exportPathToTypedocNames[exportPath], file.name]; + }); - // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON - const docJson = { - version: docGenConfigs.DOC_JSON_VERSION, - metadata: { - exportPathToTypedocNames, - exportPathOrder, - externalTypeToLink: docGenConfigs.EXTERNAL_TYPE_TO_LINK, - externalExportToLink, - }, - typedocJson: finalTypeDocOutput, - }; + // Since we need additional metadata included in the doc JSON, we nest the TypeDoc JSON + // within our own custom, versioned docsJson format. + const docJson = { + version: docGenConfigs.DOC_JSON_VERSION, + metadata: { + exportPathToTypedocNames, + exportPathOrder: this._exportPathOrder, + externalTypeToLink: docGenConfigs.EXTERNAL_TYPE_TO_LINK, + externalExportToLink, + }, + typedocJson: modifiedTypedocOutput, + }; + writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); - // Write modified TypeDoc JSON, without all the unexported stuff - writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); + const fileName = `v${this._packageJson.version}.json`; + utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); - const fileName = `v${packageJson.version}.json`; - utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); - const S3BucketPath = isStaging ? `s3://staging-doc-jsons/${packageName}/` : `s3://doc-jsons/${packageName}/`; - const s3Url = `${S3BucketPath}${fileName}`; - await execAsync( - `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, - { + const S3BucketPath = this._isStaging + ? `s3://staging-doc-jsons/${this._packageName}/` + : `s3://doc-jsons/${this._packageName}/`; + const s3Url = `${S3BucketPath}${fileName}`; + await execAsync( + `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, + { + cwd, + }, + ); + utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); + // Remove the generated docs directory + await execAsync(`rm -rf ${jsonFilePath}`, { cwd, - }, - ); - utils.log(`GENERATE_UPLOAD_DOCS: Docs uploaded to S3 bucket: ${S3BucketPath}`); - // Remove the generated docs directory - await execAsync(`rm -rf ${jsonFilePath}`, { - cwd, - }); -} - -function getAllTypeNames(node: any, typeNames: string[]): string[] { - if (!_.isObject(node)) { - return typeNames; + }); } - const typeKindStrings = ['Interface', 'Enumeration', 'Type alias']; - if (_.includes(typeKindStrings, node.kindString)) { - return [...typeNames, node.name]; + /** + * Look for types that are used by the public interface but are missing from a package's index.ts + */ + private _lookForMissingReferenceExportsThrowIfExists(referenceNames: string[]): void { + const allExportedItems = _.flatten(_.values(this._exportPathToExportedItems)); + const missingReferences: string[] = []; + _.each(referenceNames, referenceName => { + if ( + !_.includes(allExportedItems, referenceName) && + _.isUndefined(docGenConfigs.EXTERNAL_TYPE_TO_LINK[referenceName]) + ) { + missingReferences.push(referenceName); + } + }); + if (!_.isEmpty(missingReferences)) { + throw new Error( + `${this._packageName} package needs to export: \n${missingReferences.join( + '\n', + )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, + ); + } } - let updatedTypeNames = typeNames; - _.each(node, nodeValue => { - if (_.isArray(nodeValue)) { - _.each(nodeValue, aNode => { - updatedTypeNames = getAllTypeNames(aNode, updatedTypeNames); - }); - } else if (_.isObject(nodeValue)) { - updatedTypeNames = getAllTypeNames(nodeValue, updatedTypeNames); + /** + * Look for exported types that are not used by the package's public interface + */ + private _lookForUnusedExportedTypesThrowIfExists(referenceNames: string[], typedocOutput: any): void { + const exportedTypes = DocGenerateAndUploadUtils._getAllTypeNames(typedocOutput, []); + const excessiveReferences = _.difference(exportedTypes, referenceNames); + if (!_.isEmpty(excessiveReferences)) { + throw new Error( + `${this._packageName} package exports BUT does not need: \n${excessiveReferences.join( + '\n', + )} \nin it\'s index.ts. Remove them then try again.`, + ); } - }); - return updatedTypeNames; -} + } + /** + * For each entry in the TypeDoc JSON, remove it if: + * - it was not exported in index.ts + * - the constructor is to be ignored + * - it begins with an underscore (i.e is private) + */ + private _pruneTypedocOutput(typedocOutput: any): any { + const modifiedTypedocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (file, i) => { + const exportPath = this._findExportPathGivenTypedocName(file.name); + const exportItems = this._exportPathToExportedItems[exportPath]; + _.each(file.children, (child, j) => { + const isNotExported = !_.includes(exportItems, child.name); + if (isNotExported) { + delete modifiedTypedocOutput.children[i].children[j]; + return; + } -function getAllReferenceNames(propertyName: string, node: any, referenceNames: string[]): string[] { - let updatedReferenceNames = referenceNames; - if (!_.isObject(node)) { - return updatedReferenceNames; + const innerChildren = typedocOutput.children[i].children[j].children; + _.each(innerChildren, (innerChild, k) => { + const isHiddenConstructor = + child.kindString === 'Class' && + _.includes(docGenConfigs.CLASSES_WITH_HIDDEN_CONSTRUCTORS, child.name) && + innerChild.kindString === 'Constructor'; + const isPrivate = _.startsWith(innerChild.name, '_'); + if (isHiddenConstructor || isPrivate) { + delete modifiedTypedocOutput.children[i].children[j].children[k]; + modifiedTypedocOutput.children[i].children[j].children = _.compact( + modifiedTypedocOutput.children[i].children[j].children, + ); + } + }); + }); + modifiedTypedocOutput.children[i].children = _.compact(modifiedTypedocOutput.children[i].children); + }); + return modifiedTypedocOutput; } - // Some nodes of type reference are for subtypes, which we don't want to return. - // We therefore filter them out. - const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes']; - if ( - !_.isUndefined(node.type) && - _.isString(node.type) && - node.type === 'reference' && - _.isUndefined(node.typeArguments) && - !_.includes(SUB_TYPE_PROPERTY_NAMES, propertyName) - ) { - return [...referenceNames, node.name]; + /** + * Unfortunately TypeDoc children names will only be prefixed with the name of the package _if_ we passed + * TypeDoc files outside of the packages root path (i.e this package exports another package from our + * monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add + * them here when necessary. + */ + private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any): any { + const modifiedTypedocOutput = _.clone(typedocOutput); + _.each(typedocOutput.children, (child, i) => { + if (!_.includes(child.name, '/src/')) { + const nameWithoutQuotes = child.name.replace(/"/g, ''); + const standardizedName = `"${this._packageName}/src/${nameWithoutQuotes}"`; + modifiedTypedocOutput.children[i].name = standardizedName; + } + }); + return modifiedTypedocOutput; } - _.each(node, (nodeValue, innerPropertyName) => { - if (_.isArray(nodeValue)) { - _.each(nodeValue, aNode => { - updatedReferenceNames = getAllReferenceNames(innerPropertyName, aNode, updatedReferenceNames); - }); - } else if (_.isObject(nodeValue)) { - updatedReferenceNames = getAllReferenceNames(innerPropertyName, nodeValue, updatedReferenceNames); - } - }); - return updatedReferenceNames; -} - -function findExportPathGivenTypedocName( - exportPathToExportedItems: ExportPathToExportedItems, - packageName: string, - typedocName: string, -): string { - const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); - const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; - const exportPaths = _.keys(exportPathToExportedItems); - const sanitizedExportPaths = _.map(exportPaths, exportPath => { - if (_.startsWith(exportPath, './')) { - const sanitizedExportPath = path.join(packageName, 'src', exportPath); - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; - } - const monorepoPrefix = '@0xproject/'; - if (_.startsWith(exportPath, monorepoPrefix)) { - const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; - sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; - return sanitizedExportPath; + /** + * Maps back each top-level TypeDoc JSON object name to the exportPath from which it was generated. + */ + private _findExportPathGivenTypedocName(typedocName: string): string { + const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); + const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; + const exportPaths = _.keys(this._exportPathToExportedItems); + const sanitizedExportPaths = _.map(exportPaths, exportPath => { + if (_.startsWith(exportPath, './')) { + const sanitizedExportPath = path.join(this._packageName, 'src', exportPath); + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + const monorepoPrefix = '@0xproject/'; + if (_.startsWith(exportPath, monorepoPrefix)) { + const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; + sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; + return sanitizedExportPath; + } + sanitizedExportPathToExportPath[exportPath] = exportPath; + return exportPath; + }); + // We need to sort the exportPaths by length (longest first), so that the match finding will pick + // longer matches before shorter matches, since it might match both, but the longer match is more + // precisely what we are looking for. + const sanitizedExportPathsSortedByLength = sanitizedExportPaths.sort((a: string, b: string) => { + return b.length - a.length; + }); + const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPathsSortedByLength, p => { + return _.startsWith(typeDocNameWithoutQuotes, p); + }); + if (_.isUndefined(matchingSanitizedExportPathIfExists)) { + throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); } - sanitizedExportPathToExportPath[exportPath] = exportPath; - return exportPath; - }); - // We need to sort the exportPaths by length (longest first), so that the match finding will pick - // longer matches before shorter matches, since it might match both, but the longer match is more - // precisely what we are looking for. - const sanitizedExportPathsSortedByLength = sanitizedExportPaths.sort((a: string, b: string) => { - return b.length - a.length; - }); - const matchingSanitizedExportPathIfExists = _.find(sanitizedExportPathsSortedByLength, p => { - return _.startsWith(typeDocNameWithoutQuotes, p); - }); - if (_.isUndefined(matchingSanitizedExportPathIfExists)) { - throw new Error(`Didn't find an exportPath for ${typeDocNameWithoutQuotes}`); + const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; + return matchingExportPath; } - const matchingExportPath = sanitizedExportPathToExportPath[matchingSanitizedExportPathIfExists]; - return matchingExportPath; -} - -function getExportPathToExportedItems(filePath: string, omitExports?: string[]): ExportInfo { - const sourceFile = ts.createSourceFile( - 'indexFile', - readFileSync(filePath).toString(), - ts.ScriptTarget.ES2017, - /*setParentNodes */ true, - ); - const exportInfo = _getExportPathToExportedItems(sourceFile, omitExports); - return exportInfo; -} - -function _getExportPathToExportedItems(sf: ts.SourceFile, omitExports?: string[]): ExportInfo { - const exportPathToExportedItems: ExportPathToExportedItems = {}; - const exportPathOrder: string[] = []; - const exportsToOmit = _.isUndefined(omitExports) ? [] : omitExports; - processNode(sf); - - function processNode(node: ts.Node): void { - switch (node.kind) { - case ts.SyntaxKind.ExportDeclaration: { - const exportClause = (node as any).exportClause; - const exportPath = exportClause.parent.moduleSpecifier.text; - _.each(exportClause.elements, element => { - const exportItem = element.name.escapedText; - if (!_.includes(exportsToOmit, exportItem)) { - exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) - ? [exportItem] - : [...exportPathToExportedItems[exportPath], exportItem]; - } + private _getAllExternalExports(): string[] { + const externalExports: string[] = []; + _.each(this._exportPathToExportedItems, (exportedItems, exportPath) => { + const pathIfExists = this._monoRepoPkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + _.each(exportedItems, exportedItem => { + externalExports.push(exportedItem); }); - if (!_.isUndefined(exportPathToExportedItems[exportPath])) { - exportPathOrder.push(exportPath); - } - break; + return; // It's an external package + } + }); + return externalExports; + } + private _getTypeDocFileIncludesForPackage(): string[] { + let typeDocExtraFileIncludes: string[] = []; + _.each(this._exportPathToExportedItems, (exportedItems, exportPath) => { + const isInternalToPkg = _.startsWith(exportPath, '.'); + if (isInternalToPkg) { + const pathToInternalPkg = path.join(this._packagePath, 'src', `${exportPath}.ts`); + typeDocExtraFileIncludes.push(pathToInternalPkg); + return; } - case ts.SyntaxKind.ExportKeyword: { - const foundNode: any = node; - let exportPath = './index'; - if (foundNode.parent && foundNode.parent.name) { - const exportItem = foundNode.parent.name.escapedText; - const isExportImportRequireStatement = !_.isUndefined( - _.get(foundNode, 'parent.moduleReference.expression.text'), - ); - if (isExportImportRequireStatement) { - exportPath = foundNode.parent.moduleReference.expression.text; + const pathIfExists = this._monoRepoPkgNameToPath[exportPath]; + if (_.isUndefined(pathIfExists)) { + return; // It's an external package + } + + const typeDocSourceIncludes = new Set(); + const pathToIndex = `${pathIfExists}/src/index.ts`; + const exportInfo = DocGenerateAndUploadUtils._getExportPathToExportedItems(pathToIndex); + const innerExportPathToExportedItems = exportInfo.exportPathToExportedItems; + _.each(exportedItems, exportName => { + _.each(innerExportPathToExportedItems, (innerExportItems, innerExportPath) => { + if (!_.includes(innerExportItems, exportName)) { + return; } - if (!_.includes(exportsToOmit, exportItem)) { - exportPathToExportedItems[exportPath] = _.isUndefined(exportPathToExportedItems[exportPath]) - ? [exportItem] - : [...exportPathToExportedItems[exportPath], exportItem]; + if (!_.startsWith(innerExportPath, './')) { + throw new Error( + `GENERATE_UPLOAD_DOCS: WARNING - ${ + this._packageName + } is exporting one of ${innerExportItems} which is + itself exported from an external package. To fix this, export the external dependency directly, + not indirectly through ${innerExportPath}.`, + ); + } else { + const absoluteSrcPath = path.join(pathIfExists, 'src', `${innerExportPath}.ts`); + typeDocSourceIncludes.add(absoluteSrcPath); } - } - if (!_.includes(exportPathOrder, exportPath) && !_.isUndefined(exportPathToExportedItems[exportPath])) { - exportPathOrder.push(exportPath); - } - break; + }); + }); + + // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types + // directly, meaning no internal paths will exist to follow. Other packages also have direct exports + // in their index.ts, so we always add it to the source files passed to TypeDoc + if (typeDocSourceIncludes.size === 0) { + typeDocSourceIncludes.add(pathToIndex); } - default: - // noop - break; - } - ts.forEachChild(node, processNode); + typeDocExtraFileIncludes = [...typeDocExtraFileIncludes, ...Array.from(typeDocSourceIncludes)]; + }); + return typeDocExtraFileIncludes; } - const exportInfo = { - exportPathToExportedItems, - exportPathOrder, - }; - return exportInfo; } -- cgit v1.2.3 From ea4d7f153aed24ca8ea136b6d0671c65462c915b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 17 Aug 2018 14:12:04 -0700 Subject: Also ignore implementationOf --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index a2902d1e4..ac4000461 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -54,7 +54,7 @@ export class DocGenerateAndUploadUtils { let updatedReferenceNames = referenceNames; // Some nodes of type reference are for subtypes, which we don't want to return. // We therefore filter them out. - const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes']; + const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes', 'implementationOf']; if ( !_.isUndefined(node.type) && _.isString(node.type) && -- cgit v1.2.3 From 0f7ced3625417f0de14d3158551971d1b558fa2e Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 17 Aug 2018 14:12:23 -0700 Subject: Make sure export isn't internal to the package --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index ac4000461..c321aa823 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -411,7 +411,7 @@ export class DocGenerateAndUploadUtils { const externalExports: string[] = []; _.each(this._exportPathToExportedItems, (exportedItems, exportPath) => { const pathIfExists = this._monoRepoPkgNameToPath[exportPath]; - if (_.isUndefined(pathIfExists)) { + if (_.isUndefined(pathIfExists) && !_.startsWith(exportPath, './')) { _.each(exportedItems, exportedItem => { externalExports.push(exportedItem); }); -- cgit v1.2.3 From fb637d92347917528e0955e291da5d07006f28e2 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Fri, 17 Aug 2018 16:09:04 -0700 Subject: Make sure we don't render protected properties --- packages/react-docs/src/utils/typedoc_utils.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 989485dfc..8ee76c98c 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -76,6 +76,9 @@ export class TypeDocUtils { public isProperty(entity: TypeDocNode): boolean { return entity.kindString === KindString.Property; } + public isUnderscorePrefixed(name: string): boolean { + return _.startsWith(name, '_'); + } public getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] { const moduleDefinitions: TypeDocNode[] = []; const jsonModules = versionDocObj.children; @@ -189,8 +192,7 @@ export class TypeDocUtils { case KindString.Function: if (entity.flags.isExported) { const funcName = (entity as TypeDocNode).signatures[0].name; - const isPublicFunc = !_.startsWith(funcName, '_'); - if (isPublicFunc) { + if (!this.isUnderscorePrefixed(funcName)) { const func = this._convertFunction(entity, sectionName, isClassOrObjectLiteral); docSection.functions.push(func); } @@ -198,7 +200,7 @@ export class TypeDocUtils { break; case KindString.Method: - if (entity.flags.isPublic) { + if (entity.flags.isPublic && !this.isUnderscorePrefixed(entity.name)) { isConstructor = false; const method = this._convertMethod(entity, isConstructor, sectionName); docSection.methods.push(method); @@ -206,8 +208,10 @@ export class TypeDocUtils { break; case KindString.Property: { - const property = this._convertProperty(entity, sectionName); - docSection.properties.push(property); + if (!this.isUnderscorePrefixed(entity.name)) { + const property = this._convertProperty(entity, sectionName); + docSection.properties.push(property); + } break; } -- cgit v1.2.3 From f29263c477dac0fb9f5dcbbafe1a053d0a3b1a0d Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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(-) 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 d149b6cdecd1744af2671ff561d5b4b136334a24 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 20 Aug 2018 13:49:50 +0100 Subject: Cleanup connect index.ts --- packages/connect/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts index 7f5eb8ed3..2ca5312fe 100644 --- a/packages/connect/src/index.ts +++ b/packages/connect/src/index.ts @@ -16,4 +16,4 @@ export { TokenTradeInfo, } from './types'; -export { Order, SignedOrder } from '@0xproject/types'; +export { SignedOrder } from '@0xproject/types'; -- cgit v1.2.3 From b4cf69b02113a51af82b596f3931cb081edde7f4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 20 Aug 2018 13:50:28 +0100 Subject: Cleanup web3-wrapper and subproviders index.ts --- packages/subproviders/src/index.ts | 7 ++++--- packages/web3-wrapper/src/index.ts | 25 ++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index eb9347bdb..b5f9b3f90 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -1,9 +1,9 @@ import Eth from '@ledgerhq/hw-app-eth'; import TransportU2F from '@ledgerhq/hw-transport-u2f'; -import { LedgerEthereumClient } from './types'; - export import Web3ProviderEngine = require('web3-provider-engine'); +import { LedgerEthereumClient } from './types'; + /** * A factory method for creating a LedgerEthereumClient usable in a browser context. * @return LedgerEthereumClient A browser client for the LedgerSubprovider @@ -38,12 +38,13 @@ export { NonceSubproviderErrors, LedgerSubproviderConfigs, PartialTxParams, - DerivedHDKeyInfo, JSONRPCRequestPayloadWithMethod, ECSignatureString, AccountFetchingConfigs, LedgerEthereumClientFactoryAsync, OnNextCompleted, + MnemonicWalletSubproviderConfigs, + LedgerGetAddressResult, } from './types'; export { ECSignature } from '@0xproject/types'; diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index dc708eb8c..7cdd25e55 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -1,6 +1,8 @@ export { Web3Wrapper } from './web3_wrapper'; export { marshaller } from './marshaller'; +export { AbiDecoder } from '@0xproject/utils'; + export { BlockParam, TxData, @@ -18,18 +20,35 @@ export { LogTopic, JSONRPCRequestPayload, TransactionReceiptStatus, - LogWithDecodedArgs, DecodedLogArgs, StructLog, JSONRPCErrorCallback, BlockParamLiteral, + ContractEventArg, + DecodedLogEntry, + LogEntryEvent, + OpCode, + TxDataPayable, + JSONRPCResponsePayload, + RawLogEntry, + DecodedLogEntryEvent, + LogWithDecodedArgs, + AbiDefinition, + RawLog, + FunctionAbi, + EventAbi, + EventParameter, + MethodAbi, + ConstructorAbi, + FallbackAbi, + DataItem, + ConstructorStateMutability, + StateMutability, } from 'ethereum-types'; export { Web3WrapperErrors, NodeType, CallDataRPC, - CallTxDataBaseRPC, - AbstractBlockRPC, BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, TransactionRPC, -- cgit v1.2.3 From b67677f47695b2e24887d0e23ca74432f063bd4f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Mon, 20 Aug 2018 13:51:23 +0100 Subject: Fix website given that it still depends on an old version of @0xproject/Types --- packages/website/ts/utils/utils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 32b07473c..39bbd404c 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -247,9 +247,12 @@ export const utils = { } = { [ExchangeContractErrs.OrderFillExpired]: 'This order has expired', [ExchangeContractErrs.OrderCancelExpired]: 'This order has expired', - [ExchangeContractErrs.OrderCancelled]: 'This order has been cancelled', + [ExchangeContractErrs.OrderCancelAmountZero]: "Order cancel amount can't be 0", + [ExchangeContractErrs.OrderAlreadyCancelledOrFilled]: + 'This order has already been completely filled or cancelled', [ExchangeContractErrs.OrderFillAmountZero]: "Order fill amount can't be 0", - [ExchangeContractErrs.OrderRemainingFillAmountZero]: 'This order has already been completely filled', + [ExchangeContractErrs.OrderRemainingFillAmountZero]: + 'This order has already been completely filled or cancelled', [ExchangeContractErrs.OrderFillRoundingError]: 'Rounding error will occur when filling this order. Please try filling a different amount.', [ExchangeContractErrs.InsufficientTakerBalance]: -- cgit v1.2.3 From e7c7af8ef4ffb5dc3f1cbe468d272f4b9424fdc7 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 11:15:59 +0100 Subject: Add more types and ignores to docGenConfigs --- packages/monorepo-scripts/src/doc_gen_configs.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index fd95863c3..41142d9c8 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -11,10 +11,13 @@ export const docGenConfigs: DocGenConfigs = { 'solc.CompilerSettings': 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#input-description', Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', + Uint8Array: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array', + 'Ganache.GanacheOpts': + 'https://github.com/0xProject/0x-monorepo/blob/ddf85112d7e4eb1581e0d82ce6eedad429641106/packages/typescript-typings/types/ganache-core/index.d.ts#L3', + 'lightwallet.keystore': + 'https://github.com/0xProject/0x-monorepo/blob/ddf85112d7e4eb1581e0d82ce6eedad429641106/packages/typescript-typings/types/eth-lightwallet/index.d.ts#L32', }, - /** - * If a 0x package re-exports an external package, we should add a link to it's exported items here - */ + // If a 0x package re-exports an external package, we should add a link to it's exported items here EXTERNAL_EXPORT_TO_LINK: { Web3ProviderEngine: 'https://www.npmjs.com/package/web3-provider-engine', BigNumber: 'https://www.npmjs.com/package/bignumber.js', @@ -30,4 +33,8 @@ export const docGenConfigs: DocGenConfigs = { 'ExchangeWrapper', 'ForwarderWrapper', ], + // Some types are not explicitly part of the public interface like params, return values, etc... But we still + // want them exported. E.g error enum types that can be thrown by methods. These must be manually added to this + // config + IGNORED_EXCESSIVE_TYPES: ['NonceSubproviderErrors', 'Web3WrapperErrors', 'ContractWrappersError', 'OrderError'], }; -- cgit v1.2.3 From 635373febb6e6d24a08549b2eb0db29a3d7619e6 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 11:17:12 +0100 Subject: Implement ignoring config types --- packages/monorepo-scripts/src/types.ts | 1 + .../monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index 5f6a6c707..9b6846f02 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -55,6 +55,7 @@ export interface DocGenConfigs { EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string }; EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string }; CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[]; + IGNORED_EXCESSIVE_TYPES: string[]; } export interface ExportPathToExportedItems { diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index c321aa823..e9586e68b 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -308,9 +308,13 @@ export class DocGenerateAndUploadUtils { private _lookForUnusedExportedTypesThrowIfExists(referenceNames: string[], typedocOutput: any): void { const exportedTypes = DocGenerateAndUploadUtils._getAllTypeNames(typedocOutput, []); const excessiveReferences = _.difference(exportedTypes, referenceNames); - if (!_.isEmpty(excessiveReferences)) { + const excessiveReferencesExceptIgnored = _.difference( + excessiveReferences, + docGenConfigs.IGNORED_EXCESSIVE_TYPES, + ); + if (!_.isEmpty(excessiveReferencesExceptIgnored)) { throw new Error( - `${this._packageName} package exports BUT does not need: \n${excessiveReferences.join( + `${this._packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join( '\n', )} \nin it\'s index.ts. Remove them then try again.`, ); -- cgit v1.2.3 From 1f65de60b4790a4602cddd74036a39e0dc87c314 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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(-) 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 ab7d083aa53f69d98c59529cb708815bf013aa6c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 15:39:39 +0100 Subject: Add missing key --- packages/react-docs/src/components/documentation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 43a1f746e..0adadb30b 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -316,7 +316,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta private _renderExternalExports(externalExportToLink: ExternalExportToLink): React.ReactNode { const externalExports = _.map(externalExportToLink, (link: string, exportName: string) => { return ( - <div className="pt2"> + <div className="pt2" key={`external-export-${exportName}`}> <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}> {`import { `} <a href={link} target="_blank" style={{ color: colors.lightBlueA700, textDecoration: 'none' }}> -- cgit v1.2.3 From 141c51eaf5cbfdb3a177d257b5f72634cc5f7759 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 16:35:13 +0100 Subject: Add missing exports to 0x.js and contract-wrappers index.ts --- packages/0x.js/src/index.ts | 2 ++ packages/contract-wrappers/src/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index efcb4344a..748662c39 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -41,6 +41,8 @@ export { ExchangeEventArgs, ExchangeEvents, ContractEvents, + EventCallback, + DecodedLogEvent, } from '@0xproject/contract-wrappers'; export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; 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 151cf03f5b697ee757ca3c2a44c5e59e3c2fe09c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 16:35:39 +0100 Subject: Add link to Array type --- packages/monorepo-scripts/src/doc_gen_configs.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index 41142d9c8..83fae1e7c 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -3,6 +3,7 @@ import { DocGenConfigs } from './types'; export const docGenConfigs: DocGenConfigs = { DOC_JSON_VERSION: '0.0.1', EXTERNAL_TYPE_TO_LINK: { + Array: 'https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Array', BigNumber: 'http://mikemcl.github.io/bignumber.js', Error: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error', Buffer: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/node/v9/index.d.ts#L262', -- cgit v1.2.3 From c52c94214f9eb9ba25edc5e4599048663cd9cfa1 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 16:36:48 +0100 Subject: Rather then look for typeArguments, we want to ignore Partial & Promise references, but still continue to search below them, as they might surround a type --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index e9586e68b..adb898628 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -59,7 +59,8 @@ export class DocGenerateAndUploadUtils { !_.isUndefined(node.type) && _.isString(node.type) && node.type === 'reference' && - _.isUndefined(node.typeArguments) && + node.name !== 'Partial' && + node.name !== 'Promise' && !_.includes(SUB_TYPE_PROPERTY_NAMES, propertyName) ) { updatedReferenceNames = _.uniq([...referenceNames, node.name]); -- cgit v1.2.3 From 7553411fb2c0483e08046a85cc3b694e2063cbfd Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 16:37:03 +0100 Subject: Fix up order-utils --- packages/order-utils/src/index.ts | 14 ++++++++++++-- packages/order-utils/src/market_utils.ts | 11 ++++++++--- packages/order-utils/src/types.ts | 10 ++++++++++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 1f393b0c4..354299304 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -9,14 +9,16 @@ export { sortingUtils } from './sorting_utils'; export { OrderStateUtils } from './order_state_utils'; export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; +export { AbstractBalanceAndProxyAllowanceLazyStore } from './abstract/abstract_balance_and_proxy_allowance_lazy_store'; export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher'; +export { AbstractOrderFilledCancelledLazyStore } from './abstract/abstract_order_filled_cancelled_lazy_store'; export { OrderValidationUtils } from './order_validation_utils'; export { ExchangeTransferSimulator } from './exchange_transfer_simulator'; export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store'; export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store'; -export { Provider } from 'ethereum-types'; +export { Provider, JSONRPCRequestPayload, JSONRPCErrorCallback, JSONRPCResponsePayload } from 'ethereum-types'; export { SignedOrder, Order, @@ -26,13 +28,21 @@ export { ERC20AssetData, ERC721AssetData, AssetProxyId, + SignerType, + SignatureType, + OrderStateValid, + OrderStateInvalid, + ExchangeContractErrs, } from '@0xproject/types'; export { - CreateOrderOpts, OrderError, EIP712Parameter, EIP712Schema, EIP712Types, TradeSide, TransferType, + FindFeeOrdersThatCoverFeesForTargetOrdersOpts, + FindOrdersThatCoverMakerAssetFillAmountOpts, + FeeOrdersAndRemainingFeeAmount, + OrdersAndRemainingFillAmount, } from './types'; diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index a0a827546..b3f302dd2 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -5,7 +5,12 @@ import * as _ from 'lodash'; import { assert } from './assert'; import { constants } from './constants'; -import { FindFeeOrdersThatCoverFeesForTargetOrdersOpts, FindOrdersThatCoverMakerAssetFillAmountOpts } from './types'; +import { + FindFeeOrdersThatCoverFeesForTargetOrdersOpts, + FindOrdersThatCoverMakerAssetFillAmountOpts, + FeeOrdersAndRemainingFeeAmount, + OrdersAndRemainingFillAmount, +} from './types'; export const marketUtils = { /** @@ -22,7 +27,7 @@ export const marketUtils = { orders: T[], makerAssetFillAmount: BigNumber, opts?: FindOrdersThatCoverMakerAssetFillAmountOpts, - ): { resultOrders: T[]; remainingFillAmount: BigNumber } { + ): OrdersAndRemainingFillAmount<T> { assert.doesConformToSchema('orders', orders, schemas.ordersSchema); assert.isValidBaseUnitAmount('makerAssetFillAmount', makerAssetFillAmount); // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders @@ -84,7 +89,7 @@ export const marketUtils = { orders: T[], feeOrders: T[], opts?: FindFeeOrdersThatCoverFeesForTargetOrdersOpts, - ): { resultOrders: T[]; remainingFeeAmount: BigNumber } { + ): FeeOrdersAndRemainingFeeAmount<T> { assert.doesConformToSchema('orders', orders, schemas.ordersSchema); assert.doesConformToSchema('feeOrders', feeOrders, schemas.ordersSchema); // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts index 2e9c79d80..4088805dc 100644 --- a/packages/order-utils/src/types.ts +++ b/packages/order-utils/src/types.ts @@ -69,3 +69,13 @@ export interface FindFeeOrdersThatCoverFeesForTargetOrdersOpts { remainingFillableFeeAmounts?: BigNumber[]; slippageBufferAmount?: BigNumber; } + +export interface FeeOrdersAndRemainingFeeAmount<T> { + resultOrders: T[]; + remainingFeeAmount: BigNumber; +} + +export interface OrdersAndRemainingFillAmount<T> { + resultOrders: T[]; + remainingFillAmount: BigNumber; +} -- cgit v1.2.3 From a7468eb858bc730d4b7ca92260314cfa0c51416b Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:16:00 +0100 Subject: Don't check if types are used for libraries only include types --- packages/monorepo-scripts/src/doc_gen_configs.ts | 3 +++ .../monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index 83fae1e7c..52cbc4f59 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -38,4 +38,7 @@ export const docGenConfigs: DocGenConfigs = { // want them exported. E.g error enum types that can be thrown by methods. These must be manually added to this // config IGNORED_EXCESSIVE_TYPES: ['NonceSubproviderErrors', 'Web3WrapperErrors', 'ContractWrappersError', 'OrderError'], + // Some libraries only export types. In those cases, we cannot check if the exported types are part of the + // "exported public interface". Thus we add them here and skip those checks. + TYPES_ONLY_LIBRARIES: ['ethereum-types', 'types'], }; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index adb898628..cc4d70d63 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -212,10 +212,16 @@ export class DocGenerateAndUploadUtils { let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput); + if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, this._packageName)) { const propertyName = ''; // Root has no property name - const referenceNames = DocGenerateAndUploadUtils._getAllReferenceNames(propertyName, modifiedTypedocOutput, []); + const referenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( + propertyName, + modifiedTypedocOutput, + [], + ); this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput); this._lookForMissingReferenceExportsThrowIfExists(referenceNames); + } // Some of our packages re-export external package exports in their index.ts // Typedoc is incapable of rendering these packages, so we need to special-case them -- cgit v1.2.3 From 1ddac0bc7b21971698a7b70f47fdfabde2335505 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:16:16 +0100 Subject: Fix type --- packages/monorepo-scripts/src/types.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index 9b6846f02..3c2ec5069 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -56,6 +56,7 @@ export interface DocGenConfigs { EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string }; CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[]; IGNORED_EXCESSIVE_TYPES: string[]; + TYPES_ONLY_LIBRARIES: string[]; } export interface ExportPathToExportedItems { -- cgit v1.2.3 From ad9bb3ea59bcedb420830e23f5a9874475c86016 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:16:24 +0100 Subject: Fix order-watcher index.ts --- packages/order-watcher/src/index.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/order-watcher/src/index.ts b/packages/order-watcher/src/index.ts index 5f84554c8..8efca6217 100644 --- a/packages/order-watcher/src/index.ts +++ b/packages/order-watcher/src/index.ts @@ -1,8 +1,14 @@ export { OrderWatcher } from './order_watcher/order_watcher'; -export { OrderStateValid, OrderStateInvalid, OrderState } from '@0xproject/types'; +export { + OrderStateValid, + OrderStateInvalid, + OrderState, + ExchangeContractErrs, + OrderRelevantState, +} from '@0xproject/types'; export { OnOrderStateChangeCallback, OrderWatcherConfig } from './types'; -export { Order, SignedOrder } from '@0xproject/types'; -export { BlockParamLiteral, BlockParam, Provider } from 'ethereum-types'; +export { SignedOrder } from '@0xproject/types'; +export { JSONRPCRequestPayload, JSONRPCErrorCallback, Provider, JSONRPCResponsePayload } from 'ethereum-types'; -- cgit v1.2.3 From 04bbd60c119b44b03eee3f6ab4459c3bfb7f283c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:16:34 +0100 Subject: Fix sol-compiler index.ts --- packages/sol-compiler/src/index.ts | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index fe72a37d6..570de931b 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,11 +1,3 @@ export { Compiler } from './compiler'; -export { - CompilerOptions, - ContractArtifact, - ContractNetworks, - GeneratedCompilerOptions, - ContractNetworkData, - ContractVersionData, - Source, -} from './utils/types'; +export { CompilerOptions } from './utils/types'; -- cgit v1.2.3 From cc90c806b09a83330c20816d1e7756f5c74e33d0 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:16:42 +0100 Subject: Fix sol-cov index.ts --- packages/sol-cov/src/index.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index dd102a13b..cb9e108fb 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -7,15 +7,14 @@ export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_a export { ProfilerSubprovider } from './profiler_subprovider'; export { RevertTraceSubprovider } from './revert_trace_subprovider'; +export { ContractData, TraceInfo, Subtrace, TraceInfoNewContract, TraceInfoExistingContract } from './types'; export { - ContractData, - TraceInfo, - Subtrace, - SourceRange, - Coverage, - TraceInfoNewContract, - TraceInfoExistingContract, - SingleFileSourceRange, -} from './types'; -export { StructLog, JSONRPCRequestPayload, Provider } from 'ethereum-types'; -export { ErrorCallback, NextCallback } from '@0xproject/subproviders'; + StructLog, + JSONRPCRequestPayload, + Provider, + JSONRPCErrorCallback, + OpCode, + JSONRPCResponsePayload, +} from 'ethereum-types'; + +export { JSONRPCRequestPayloadWithMethod } from '@0xproject/subproviders'; -- cgit v1.2.3 From c00c477307e305e2d380779bb74fa29b31072c4c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:39:35 +0100 Subject: Add doc comments to AbiDecoder --- packages/utils/src/abi_decoder.ts | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index 7f93e746e..58a58dea2 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -15,12 +15,25 @@ import * as _ from 'lodash'; import { addressUtils } from './address_utils'; import { BigNumber } from './configured_bignumber'; +/** + * AbiDecoder allows you to decode event logs given a set of supplied contract ABI's. It takes the contract's event + * signature from the ABI and attempts to decode the logs using it. + */ export class AbiDecoder { private readonly _methodIds: { [signatureHash: string]: EventAbi } = {}; + /** + * Instantiate an AbiDecoder + * @param abiArrays An array of contract ABI's + * @return AbiDecoder instance + */ constructor(abiArrays: AbiDefinition[][]) { _.forEach(abiArrays, this.addABI.bind(this)); } - // This method can only decode logs from the 0x & ERC20 smart contracts + /** + * Attempt to decode a log given the ABI's the AbiDecoder knows about. + * @param log The log to attempt to decode + * @return The decoded log if the requisite ABI was available. Otherwise the log unaltered. + */ public tryToDecodeLogOrNoop<ArgsType extends DecodedLogArgs>(log: LogEntry): LogWithDecodedArgs<ArgsType> | RawLog { const methodId = log.topics[0]; const event = this._methodIds[methodId]; @@ -75,6 +88,10 @@ export class AbiDecoder { }; } } + /** + * Add additional ABI definitions to the AbiDecoder + * @param abiArray An array of ABI definitions to add to the AbiDecoder + */ public addABI(abiArray: AbiDefinition[]): void { if (_.isUndefined(abiArray)) { return; -- cgit v1.2.3 From 809d301d582a01ff70958f380a7f8c4afe898366 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 17:48:24 +0100 Subject: Fix lowercase names involving ERC acronym --- packages/react-docs/src/utils/typedoc_utils.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 8ee76c98c..0eaf5fd6e 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -374,11 +374,17 @@ export class TypeDocUtils { if (isConstructor || entityName === '__type') { callPath = ''; } else { - const prefix = isStatic ? sectionName : `${sectionName[0].toLowerCase()}${sectionName.slice(1)}`; + const prefix = isStatic ? sectionName : this._getLowercaseSectionName(sectionName); callPath = `${prefix}.`; } return callPath; } + private _getLowercaseSectionName(sectionName: string) { + if (_.startsWith(sectionName, 'ERC')) { + return `${sectionName.slice(0, 3).toLowerCase()}${sectionName.slice(3)}`; + } + return `${sectionName[0].toLowerCase()}${sectionName.slice(1)}`; + } private _convertFunction(entity: TypeDocNode, sectionName: string, isObjectLiteral: boolean): TypescriptFunction { const signature = entity.signatures[0]; const source = entity.sources[0]; -- cgit v1.2.3 From 8bb7b5b543c4d914067b6bbb269be9cc2ac7f647 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 18:49:56 +0100 Subject: Add shouldUpload flag to docGenAndUpload command --- packages/monorepo-scripts/src/doc_generate_and_upload.ts | 9 ++++++++- .../monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 602247972..77dc2f323 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -13,12 +13,19 @@ const args = yargs type: 'boolean', demandOption: true, }) + .option('shouldUpload', { + describe: 'Whether we wish to upload the docs to S3 or not', + type: 'boolean', + demandOption: false, + default: true, + }) .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { const packageName = args.package; const isStaging = args.isStaging; + const shouldUploadDocs = args.shouldUpload; - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); })(); diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index cc4d70d63..7e8bd07da 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -12,6 +12,7 @@ import { utils } from './utils'; export class DocGenerateAndUploadUtils { private _isStaging: boolean; + private _shouldUploadDocs: boolean; private _packageName: string; private _omitExports: string[]; private _packagePath: string; @@ -155,9 +156,10 @@ export class DocGenerateAndUploadUtils { }; return exportInfo; } - constructor(packageName: string, isStaging: boolean) { + constructor(packageName: string, isStaging: boolean, shouldUploadDocs: boolean) { this._isStaging = isStaging; this._packageName = packageName; + this._shouldUploadDocs = shouldUploadDocs; this._packagePath = `${constants.monorepoRootPath}/packages/${packageName}`; this._monoRepoPkgNameToPath = {}; @@ -268,6 +270,11 @@ export class DocGenerateAndUploadUtils { }; writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); + if (this._shouldUploadDocs) { + await this._uploadDocsAsync(jsonFilePath, cwd); + } + } + private async _uploadDocsAsync(jsonFilePath: string, cwd: string) { const fileName = `v${this._packageJson.version}.json`; utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); -- cgit v1.2.3 From 6b838c034a3a489ae0b962af820270eafc52c377 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 19:07:20 +0100 Subject: Modify script so it can generate docs for a specific package or all packages with doc pages, add doc gen test to CircleCi runs --- packages/monorepo-scripts/src/doc_gen_configs.ts | 14 ++++ .../src/doc_generate_and_upload.ts | 9 +-- packages/monorepo-scripts/src/types.ts | 1 + .../src/utils/doc_generate_and_upload_utils.ts | 81 ++++++++++++---------- 4 files changed, 65 insertions(+), 40 deletions(-) diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index 52cbc4f59..a7314776e 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -2,6 +2,20 @@ import { DocGenConfigs } from './types'; export const docGenConfigs: DocGenConfigs = { DOC_JSON_VERSION: '0.0.1', + // Packages for which doc pages exist + PACKAGES_WITH_DOC_PAGES: [ + '0x.js', + 'connect', + 'json-schemas', + 'subproviders', + 'web3-wrapper', + 'contract-wrappers', + 'order-utils', + 'order-watcher', + 'sol-compiler', + 'sol-cov', + 'ethereum-types', + ]; EXTERNAL_TYPE_TO_LINK: { Array: 'https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Array', BigNumber: 'http://mikemcl.github.io/bignumber.js', diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 77dc2f323..7b6f2d9f0 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -4,9 +4,10 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils const args = yargs .option('package', { - describe: 'Monorepo sub-package for which to generate DocJSON', + describe: + 'Monorepo sub-package for which to generate DocJSON. If not supplied, it will do all defined in docGenConfigs.', type: 'string', - demandOption: true, + demandOption: false, }) .option('isStaging', { describe: 'Whether we wish to publish docs to staging or production', @@ -22,10 +23,10 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { - const packageName = args.package; + const packageNameIfExists = args.package; const isStaging = args.isStaging; const shouldUploadDocs = args.shouldUpload; - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging, shouldUploadDocs); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageNameIfExists, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); })(); diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index 3c2ec5069..b87cc47eb 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -52,6 +52,7 @@ export interface Package { export interface DocGenConfigs { DOC_JSON_VERSION: string; + PACKAGES_WITH_DOC_PAGES: string[]; EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string }; EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string }; CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[]; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 7e8bd07da..c84413e64 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -13,7 +13,7 @@ import { utils } from './utils'; export class DocGenerateAndUploadUtils { private _isStaging: boolean; private _shouldUploadDocs: boolean; - private _packageName: string; + private _packageNameIfExists: string; private _omitExports: string[]; private _packagePath: string; private _exportPathToExportedItems: ExportPathToExportedItems; @@ -156,21 +156,21 @@ export class DocGenerateAndUploadUtils { }; return exportInfo; } - constructor(packageName: string, isStaging: boolean, shouldUploadDocs: boolean) { + constructor(packageNameIfExists: string, isStaging: boolean, shouldUploadDocs: boolean) { this._isStaging = isStaging; - this._packageName = packageName; + this._packageNameIfExists = packageNameIfExists; this._shouldUploadDocs = shouldUploadDocs; - this._packagePath = `${constants.monorepoRootPath}/packages/${packageName}`; + this._packagePath = `${constants.monorepoRootPath}/packages/${packageNameIfExists}`; this._monoRepoPkgNameToPath = {}; const monorepoPackages = utils.getPackages(constants.monorepoRootPath); _.each(monorepoPackages, p => (this._monoRepoPkgNameToPath[p.packageJson.name] = p.location)); const pkg = _.find(monorepoPackages, monorepoPackage => { - return _.includes(monorepoPackage.packageJson.name, packageName); + return _.includes(monorepoPackage.packageJson.name, packageNameIfExists); }); if (_.isUndefined(pkg)) { - throw new Error(`Couldn't find a package.json for ${packageName}`); + throw new Error(`Couldn't find a package.json for ${packageNameIfExists}`); } this._packageJson = pkg.packageJson; this._omitExports = _.get(this._packageJson, 'config.postpublish.omitExports', []); @@ -191,17 +191,26 @@ export class DocGenerateAndUploadUtils { } } public async generateAndUploadDocsAsync(): Promise<void> { + if (!_.isUndefined(this._packageNameIfExists)) { + await this.generateAndUploadDocsForPackageAsync(this._packageNameIfExists); + } else { + for (const packageName of docGenConfigs.PACKAGES_WITH_DOC_PAGES) { + await this.generateAndUploadDocsForPackageAsync(packageName); + } + } + } + private async generateAndUploadDocsForPackageAsync(packageName: string): Promise<void> { // For each dep that is another one of our monorepo packages, we fetch it's index.ts // and see which specific files we must pass to TypeDoc, in order to generate a Doc JSON // the includes everything exported by the public interface. - const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage(); + const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage(packageName); // In order to avoid TS errors, we need to pass TypeDoc the package's global.d.ts file typeDocExtraFileIncludes.push(path.join(this._packagePath, 'src', 'globals.d.ts')); const jsonFilePath = path.join(this._packagePath, 'generated_docs', 'index.json'); const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages', this._packageName); + const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the // packages root dir, does not work. It only works when called via a `package.json` script located // in the package's root. @@ -211,18 +220,18 @@ export class DocGenerateAndUploadUtils { const typedocOutputString = readFileSync(jsonFilePath).toString(); const typedocOutput = JSON.parse(typedocOutputString); - let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); - modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput); + let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput, packageName); + modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput, packageName); - if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, this._packageName)) { - const propertyName = ''; // Root has no property name + if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, packageName)) { + const propertyName = ''; // Root has no property name const referenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( propertyName, modifiedTypedocOutput, [], ); - this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput); - this._lookForMissingReferenceExportsThrowIfExists(referenceNames); + this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput, packageName); + this._lookForMissingReferenceExportsThrowIfExists(referenceNames, packageName); } // Some of our packages re-export external package exports in their index.ts @@ -240,9 +249,7 @@ export class DocGenerateAndUploadUtils { }); if (!_.isEmpty(externalExportsWithoutLinks)) { throw new Error( - `Found the following external exports in ${ - this._packageName - }'s index.ts:\n ${externalExportsWithoutLinks.join( + `Found the following external exports in ${packageName}'s index.ts:\n ${externalExportsWithoutLinks.join( '\n', )}\nThey are missing from the EXTERNAL_EXPORT_TO_LINK mapping. Add them and try again.`, ); @@ -250,7 +257,7 @@ export class DocGenerateAndUploadUtils { const exportPathToTypedocNames: ExportNameToTypedocNames = {}; _.each(modifiedTypedocOutput.children, file => { - const exportPath = this._findExportPathGivenTypedocName(file.name); + const exportPath = this._findExportPathGivenTypedocName(file.name, packageName); exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) ? [file.name] : [...exportPathToTypedocNames[exportPath], file.name]; @@ -271,16 +278,16 @@ export class DocGenerateAndUploadUtils { writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); if (this._shouldUploadDocs) { - await this._uploadDocsAsync(jsonFilePath, cwd); + await this._uploadDocsAsync(jsonFilePath, cwd, packageName); } } - private async _uploadDocsAsync(jsonFilePath: string, cwd: string) { + private async _uploadDocsAsync(jsonFilePath: string, cwd: string, packageName: string) { const fileName = `v${this._packageJson.version}.json`; utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); const S3BucketPath = this._isStaging - ? `s3://staging-doc-jsons/${this._packageName}/` - : `s3://doc-jsons/${this._packageName}/`; + ? `s3://staging-doc-jsons/${packageName}/` + : `s3://doc-jsons/${packageName}/`; const s3Url = `${S3BucketPath}${fileName}`; await execAsync( `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, @@ -297,7 +304,7 @@ export class DocGenerateAndUploadUtils { /** * Look for types that are used by the public interface but are missing from a package's index.ts */ - private _lookForMissingReferenceExportsThrowIfExists(referenceNames: string[]): void { + private _lookForMissingReferenceExportsThrowIfExists(referenceNames: string[], packageName: string): void { const allExportedItems = _.flatten(_.values(this._exportPathToExportedItems)); const missingReferences: string[] = []; _.each(referenceNames, referenceName => { @@ -310,7 +317,7 @@ export class DocGenerateAndUploadUtils { }); if (!_.isEmpty(missingReferences)) { throw new Error( - `${this._packageName} package needs to export: \n${missingReferences.join( + `${packageName} package needs to export: \n${missingReferences.join( '\n', )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, ); @@ -319,7 +326,11 @@ export class DocGenerateAndUploadUtils { /** * Look for exported types that are not used by the package's public interface */ - private _lookForUnusedExportedTypesThrowIfExists(referenceNames: string[], typedocOutput: any): void { + private _lookForUnusedExportedTypesThrowIfExists( + referenceNames: string[], + typedocOutput: any, + packageName: string, + ): void { const exportedTypes = DocGenerateAndUploadUtils._getAllTypeNames(typedocOutput, []); const excessiveReferences = _.difference(exportedTypes, referenceNames); const excessiveReferencesExceptIgnored = _.difference( @@ -328,7 +339,7 @@ export class DocGenerateAndUploadUtils { ); if (!_.isEmpty(excessiveReferencesExceptIgnored)) { throw new Error( - `${this._packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join( + `${packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join( '\n', )} \nin it\'s index.ts. Remove them then try again.`, ); @@ -340,10 +351,10 @@ export class DocGenerateAndUploadUtils { * - the constructor is to be ignored * - it begins with an underscore (i.e is private) */ - private _pruneTypedocOutput(typedocOutput: any): any { + private _pruneTypedocOutput(typedocOutput: any, packageName: string): any { const modifiedTypedocOutput = _.clone(typedocOutput); _.each(typedocOutput.children, (file, i) => { - const exportPath = this._findExportPathGivenTypedocName(file.name); + const exportPath = this._findExportPathGivenTypedocName(file.name, packageName); const exportItems = this._exportPathToExportedItems[exportPath]; _.each(file.children, (child, j) => { const isNotExported = !_.includes(exportItems, child.name); @@ -377,12 +388,12 @@ export class DocGenerateAndUploadUtils { * monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add * them here when necessary. */ - private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any): any { + private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any, packageName: string): any { const modifiedTypedocOutput = _.clone(typedocOutput); _.each(typedocOutput.children, (child, i) => { if (!_.includes(child.name, '/src/')) { const nameWithoutQuotes = child.name.replace(/"/g, ''); - const standardizedName = `"${this._packageName}/src/${nameWithoutQuotes}"`; + const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; modifiedTypedocOutput.children[i].name = standardizedName; } }); @@ -391,13 +402,13 @@ export class DocGenerateAndUploadUtils { /** * Maps back each top-level TypeDoc JSON object name to the exportPath from which it was generated. */ - private _findExportPathGivenTypedocName(typedocName: string): string { + private _findExportPathGivenTypedocName(typedocName: string, packageName: string): string { const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; const exportPaths = _.keys(this._exportPathToExportedItems); const sanitizedExportPaths = _.map(exportPaths, exportPath => { if (_.startsWith(exportPath, './')) { - const sanitizedExportPath = path.join(this._packageName, 'src', exportPath); + const sanitizedExportPath = path.join(packageName, 'src', exportPath); sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; return sanitizedExportPath; } @@ -438,7 +449,7 @@ export class DocGenerateAndUploadUtils { }); return externalExports; } - private _getTypeDocFileIncludesForPackage(): string[] { + private _getTypeDocFileIncludesForPackage(packageName: string): string[] { let typeDocExtraFileIncludes: string[] = []; _.each(this._exportPathToExportedItems, (exportedItems, exportPath) => { const isInternalToPkg = _.startsWith(exportPath, '.'); @@ -464,9 +475,7 @@ export class DocGenerateAndUploadUtils { } if (!_.startsWith(innerExportPath, './')) { throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${ - this._packageName - } is exporting one of ${innerExportItems} which is + `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is itself exported from an external package. To fix this, export the external dependency directly, not indirectly through ${innerExportPath}.`, ); -- cgit v1.2.3 From fe43f84abdeb2ed6805d3879f531fbc4f46c4fec Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 23:06:21 +0100 Subject: Use bash for loop for generating docs for each package, revert changes to script --- .circleci/config.yml | 12 ++++ package.json | 6 +- packages/monorepo-scripts/src/doc_gen_configs.ts | 14 ---- .../src/doc_generate_and_upload.ts | 15 ++-- packages/monorepo-scripts/src/publish.ts | 3 +- packages/monorepo-scripts/src/types.ts | 1 - .../src/utils/doc_generate_and_upload_utils.ts | 83 ++++++++++------------ 7 files changed, 67 insertions(+), 67 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ae8519a56..844eb3b98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -66,6 +66,15 @@ jobs: keys: - repo-{{ .Environment.CIRCLE_SHA1 }} - run: yarn test:publish:circleci + test-doc-generation: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:generate_docs:circleci test-rest: docker: - image: circleci/node:9 @@ -237,6 +246,9 @@ workflows: - test-publish: requires: - build + - test-doc-generation: + requires: + - build - submit-coverage: requires: - test-rest \ No newline at end of file diff --git a/package.json b/package.json index a86bbd42a..eca1fbe60 100644 --- a/package.json +++ b/package.json @@ -32,12 +32,14 @@ "rebuild": "run-s clean build", "rebuild:no_website": "run-s clean build:no_website", "test": "wsrun test $PKG --fast-exit --serial --exclude-missing", - "generate_docs": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js", + "generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js", + "test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break; done;", "lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing", "comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete." }, "config": { - "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic" + "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic", + "packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-cov ethereum-types" }, "devDependencies": { "@0x-lerna-fork/lerna": "3.0.0-beta.23", diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index a7314776e..52cbc4f59 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -2,20 +2,6 @@ import { DocGenConfigs } from './types'; export const docGenConfigs: DocGenConfigs = { DOC_JSON_VERSION: '0.0.1', - // Packages for which doc pages exist - PACKAGES_WITH_DOC_PAGES: [ - '0x.js', - 'connect', - 'json-schemas', - 'subproviders', - 'web3-wrapper', - 'contract-wrappers', - 'order-utils', - 'order-watcher', - 'sol-compiler', - 'sol-cov', - 'ethereum-types', - ]; EXTERNAL_TYPE_TO_LINK: { Array: 'https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Array', BigNumber: 'http://mikemcl.github.io/bignumber.js', diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 7b6f2d9f0..2a53628b5 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -5,9 +5,9 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils const args = yargs .option('package', { describe: - 'Monorepo sub-package for which to generate DocJSON. If not supplied, it will do all defined in docGenConfigs.', + 'Monorepo sub-package for which to generate DocJSON', type: 'string', - demandOption: false, + demandOption: true, }) .option('isStaging', { describe: 'Whether we wish to publish docs to staging or production', @@ -23,10 +23,15 @@ const args = yargs .example("$0 --package '0x.js' --isStaging true", 'Full usage example').argv; (async () => { - const packageNameIfExists = args.package; + const packageName = args.package; const isStaging = args.isStaging; const shouldUploadDocs = args.shouldUpload; - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageNameIfExists, isStaging, shouldUploadDocs); + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(packageName, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); -})(); + + process.exit(0); +})().catch(err => { + console.log(err); + process.exit(1); +}); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 6691fd3c1..7e91b9281 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -85,7 +85,8 @@ async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], for (const pkg of updatedPublicPackages) { const packageName = pkg.packageJson.name; const nameWithoutPrefix = packageName.replace('@0xproject/', ''); - const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging); + const shouldUploadDocs = true; + const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); } } diff --git a/packages/monorepo-scripts/src/types.ts b/packages/monorepo-scripts/src/types.ts index b87cc47eb..3c2ec5069 100644 --- a/packages/monorepo-scripts/src/types.ts +++ b/packages/monorepo-scripts/src/types.ts @@ -52,7 +52,6 @@ export interface Package { export interface DocGenConfigs { DOC_JSON_VERSION: string; - PACKAGES_WITH_DOC_PAGES: string[]; EXTERNAL_TYPE_TO_LINK: { [externalType: string]: string }; EXTERNAL_EXPORT_TO_LINK: { [externalExport: string]: string }; CLASSES_WITH_HIDDEN_CONSTRUCTORS: string[]; diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index c84413e64..9e5f437fa 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -13,7 +13,7 @@ import { utils } from './utils'; export class DocGenerateAndUploadUtils { private _isStaging: boolean; private _shouldUploadDocs: boolean; - private _packageNameIfExists: string; + private _packageName: string; private _omitExports: string[]; private _packagePath: string; private _exportPathToExportedItems: ExportPathToExportedItems; @@ -156,21 +156,21 @@ export class DocGenerateAndUploadUtils { }; return exportInfo; } - constructor(packageNameIfExists: string, isStaging: boolean, shouldUploadDocs: boolean) { + constructor(packageName: string, isStaging: boolean, shouldUploadDocs: boolean) { this._isStaging = isStaging; - this._packageNameIfExists = packageNameIfExists; + this._packageName = packageName; this._shouldUploadDocs = shouldUploadDocs; - this._packagePath = `${constants.monorepoRootPath}/packages/${packageNameIfExists}`; + this._packagePath = `${constants.monorepoRootPath}/packages/${packageName}`; this._monoRepoPkgNameToPath = {}; const monorepoPackages = utils.getPackages(constants.monorepoRootPath); _.each(monorepoPackages, p => (this._monoRepoPkgNameToPath[p.packageJson.name] = p.location)); const pkg = _.find(monorepoPackages, monorepoPackage => { - return _.includes(monorepoPackage.packageJson.name, packageNameIfExists); + return _.includes(monorepoPackage.packageJson.name, packageName); }); if (_.isUndefined(pkg)) { - throw new Error(`Couldn't find a package.json for ${packageNameIfExists}`); + throw new Error(`Couldn't find a package.json for ${packageName}`); } this._packageJson = pkg.packageJson; this._omitExports = _.get(this._packageJson, 'config.postpublish.omitExports', []); @@ -191,26 +191,18 @@ export class DocGenerateAndUploadUtils { } } public async generateAndUploadDocsAsync(): Promise<void> { - if (!_.isUndefined(this._packageNameIfExists)) { - await this.generateAndUploadDocsForPackageAsync(this._packageNameIfExists); - } else { - for (const packageName of docGenConfigs.PACKAGES_WITH_DOC_PAGES) { - await this.generateAndUploadDocsForPackageAsync(packageName); - } - } - } - private async generateAndUploadDocsForPackageAsync(packageName: string): Promise<void> { // For each dep that is another one of our monorepo packages, we fetch it's index.ts // and see which specific files we must pass to TypeDoc, in order to generate a Doc JSON // the includes everything exported by the public interface. - const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage(packageName); + const typeDocExtraFileIncludes: string[] = this._getTypeDocFileIncludesForPackage(); // In order to avoid TS errors, we need to pass TypeDoc the package's global.d.ts file typeDocExtraFileIncludes.push(path.join(this._packagePath, 'src', 'globals.d.ts')); + utils.log(`GENERATE_UPLOAD_DOCS: Generating Typedoc JSON for ${this._packageName}...`); const jsonFilePath = path.join(this._packagePath, 'generated_docs', 'index.json'); const projectFiles = typeDocExtraFileIncludes.join(' '); - const cwd = path.join(constants.monorepoRootPath, 'packages', packageName); + const cwd = path.join(constants.monorepoRootPath, 'packages', this._packageName); // HACK: For some reason calling `typedoc` command directly from here, even with `cwd` set to the // packages root dir, does not work. It only works when called via a `package.json` script located // in the package's root. @@ -218,20 +210,21 @@ export class DocGenerateAndUploadUtils { cwd, }); + utils.log('GENERATE_UPLOAD_DOCS: Modifying Typedoc JSON to our custom format...'); const typedocOutputString = readFileSync(jsonFilePath).toString(); const typedocOutput = JSON.parse(typedocOutputString); - let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput, packageName); - modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput, packageName); + let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); + modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput); - if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, packageName)) { + if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, this._packageName)) { const propertyName = ''; // Root has no property name const referenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( propertyName, modifiedTypedocOutput, [], ); - this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput, packageName); - this._lookForMissingReferenceExportsThrowIfExists(referenceNames, packageName); + this._lookForUnusedExportedTypesThrowIfExists(referenceNames, modifiedTypedocOutput); + this._lookForMissingReferenceExportsThrowIfExists(referenceNames); } // Some of our packages re-export external package exports in their index.ts @@ -249,7 +242,9 @@ export class DocGenerateAndUploadUtils { }); if (!_.isEmpty(externalExportsWithoutLinks)) { throw new Error( - `Found the following external exports in ${packageName}'s index.ts:\n ${externalExportsWithoutLinks.join( + `Found the following external exports in ${ + this._packageName + }'s index.ts:\n ${externalExportsWithoutLinks.join( '\n', )}\nThey are missing from the EXTERNAL_EXPORT_TO_LINK mapping. Add them and try again.`, ); @@ -257,7 +252,7 @@ export class DocGenerateAndUploadUtils { const exportPathToTypedocNames: ExportNameToTypedocNames = {}; _.each(modifiedTypedocOutput.children, file => { - const exportPath = this._findExportPathGivenTypedocName(file.name, packageName); + const exportPath = this._findExportPathGivenTypedocName(file.name); exportPathToTypedocNames[exportPath] = _.isUndefined(exportPathToTypedocNames[exportPath]) ? [file.name] : [...exportPathToTypedocNames[exportPath], file.name]; @@ -275,19 +270,21 @@ export class DocGenerateAndUploadUtils { }, typedocJson: modifiedTypedocOutput, }; + utils.log(`GENERATE_UPLOAD_DOCS: Saving Doc JSON to: ${jsonFilePath}`); writeFileSync(jsonFilePath, JSON.stringify(docJson, null, 2)); if (this._shouldUploadDocs) { - await this._uploadDocsAsync(jsonFilePath, cwd, packageName); + await this._uploadDocsAsync(jsonFilePath, cwd); } + utils.log(`GENERATE_UPLOAD_DOCS: Doc generation done for ${this._packageName}`); } - private async _uploadDocsAsync(jsonFilePath: string, cwd: string, packageName: string) { + private async _uploadDocsAsync(jsonFilePath: string, cwd: string) { const fileName = `v${this._packageJson.version}.json`; utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); const S3BucketPath = this._isStaging - ? `s3://staging-doc-jsons/${packageName}/` - : `s3://doc-jsons/${packageName}/`; + ? `s3://staging-doc-jsons/${this._packageName}/` + : `s3://doc-jsons/${this._packageName}/`; const s3Url = `${S3BucketPath}${fileName}`; await execAsync( `aws s3 cp ${jsonFilePath} ${s3Url} --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json`, @@ -304,7 +301,7 @@ export class DocGenerateAndUploadUtils { /** * Look for types that are used by the public interface but are missing from a package's index.ts */ - private _lookForMissingReferenceExportsThrowIfExists(referenceNames: string[], packageName: string): void { + private _lookForMissingReferenceExportsThrowIfExists(referenceNames: string[]): void { const allExportedItems = _.flatten(_.values(this._exportPathToExportedItems)); const missingReferences: string[] = []; _.each(referenceNames, referenceName => { @@ -317,7 +314,7 @@ export class DocGenerateAndUploadUtils { }); if (!_.isEmpty(missingReferences)) { throw new Error( - `${packageName} package needs to export: \n${missingReferences.join( + `${this._packageName} package needs to export: \n${missingReferences.join( '\n', )} \nFrom it\'s index.ts. If any are from external dependencies, then add them to the EXTERNAL_TYPE_TO_LINK mapping.`, ); @@ -326,11 +323,7 @@ export class DocGenerateAndUploadUtils { /** * Look for exported types that are not used by the package's public interface */ - private _lookForUnusedExportedTypesThrowIfExists( - referenceNames: string[], - typedocOutput: any, - packageName: string, - ): void { + private _lookForUnusedExportedTypesThrowIfExists(referenceNames: string[], typedocOutput: any): void { const exportedTypes = DocGenerateAndUploadUtils._getAllTypeNames(typedocOutput, []); const excessiveReferences = _.difference(exportedTypes, referenceNames); const excessiveReferencesExceptIgnored = _.difference( @@ -339,7 +332,7 @@ export class DocGenerateAndUploadUtils { ); if (!_.isEmpty(excessiveReferencesExceptIgnored)) { throw new Error( - `${packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join( + `${this._packageName} package exports BUT does not need: \n${excessiveReferencesExceptIgnored.join( '\n', )} \nin it\'s index.ts. Remove them then try again.`, ); @@ -351,10 +344,10 @@ export class DocGenerateAndUploadUtils { * - the constructor is to be ignored * - it begins with an underscore (i.e is private) */ - private _pruneTypedocOutput(typedocOutput: any, packageName: string): any { + private _pruneTypedocOutput(typedocOutput: any): any { const modifiedTypedocOutput = _.clone(typedocOutput); _.each(typedocOutput.children, (file, i) => { - const exportPath = this._findExportPathGivenTypedocName(file.name, packageName); + const exportPath = this._findExportPathGivenTypedocName(file.name); const exportItems = this._exportPathToExportedItems[exportPath]; _.each(file.children, (child, j) => { const isNotExported = !_.includes(exportItems, child.name); @@ -388,12 +381,12 @@ export class DocGenerateAndUploadUtils { * monorepo). In order to enforce that the names are always prefixed with the package's name, we check and add * them here when necessary. */ - private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any, packageName: string): any { + private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any): any { const modifiedTypedocOutput = _.clone(typedocOutput); _.each(typedocOutput.children, (child, i) => { if (!_.includes(child.name, '/src/')) { const nameWithoutQuotes = child.name.replace(/"/g, ''); - const standardizedName = `"${packageName}/src/${nameWithoutQuotes}"`; + const standardizedName = `"${this._packageName}/src/${nameWithoutQuotes}"`; modifiedTypedocOutput.children[i].name = standardizedName; } }); @@ -402,13 +395,13 @@ export class DocGenerateAndUploadUtils { /** * Maps back each top-level TypeDoc JSON object name to the exportPath from which it was generated. */ - private _findExportPathGivenTypedocName(typedocName: string, packageName: string): string { + private _findExportPathGivenTypedocName(typedocName: string): string { const typeDocNameWithoutQuotes = _.replace(typedocName, /"/g, ''); const sanitizedExportPathToExportPath: { [sanitizedName: string]: string } = {}; const exportPaths = _.keys(this._exportPathToExportedItems); const sanitizedExportPaths = _.map(exportPaths, exportPath => { if (_.startsWith(exportPath, './')) { - const sanitizedExportPath = path.join(packageName, 'src', exportPath); + const sanitizedExportPath = path.join(this._packageName, 'src', exportPath); sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; return sanitizedExportPath; } @@ -449,7 +442,7 @@ export class DocGenerateAndUploadUtils { }); return externalExports; } - private _getTypeDocFileIncludesForPackage(packageName: string): string[] { + private _getTypeDocFileIncludesForPackage(): string[] { let typeDocExtraFileIncludes: string[] = []; _.each(this._exportPathToExportedItems, (exportedItems, exportPath) => { const isInternalToPkg = _.startsWith(exportPath, '.'); @@ -475,7 +468,9 @@ export class DocGenerateAndUploadUtils { } if (!_.startsWith(innerExportPath, './')) { throw new Error( - `GENERATE_UPLOAD_DOCS: WARNING - ${packageName} is exporting one of ${innerExportItems} which is + `GENERATE_UPLOAD_DOCS: WARNING - ${ + this._packageName + } is exporting one of ${innerExportItems} which is itself exported from an external package. To fix this, export the external dependency directly, not indirectly through ${innerExportPath}.`, ); -- cgit v1.2.3 From da15df2c2dd6de236f4ce4021e7be376547bef13 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 23:07:12 +0100 Subject: Stop logging to console for each packages without a package.json --- packages/monorepo-scripts/src/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts index 26ac801bd..2ce36942c 100644 --- a/packages/monorepo-scripts/src/utils/utils.ts +++ b/packages/monorepo-scripts/src/utils/utils.ts @@ -48,7 +48,7 @@ export const utils = { }; packages.push(pkg); } catch (err) { - utils.log(`Couldn't find a 'package.json' for ${subpackageName}. Skipping.`); + // Couldn't find a 'package.json' for package. Skipping. } } } -- cgit v1.2.3 From 1bbd7bf870730dfe2146819e3740522990eb83ca Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Tue, 21 Aug 2018 23:20:01 +0100 Subject: Add generated_docs dir to clean command --- packages/0x.js/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/ethereum-types/package.json | 2 +- packages/json-schemas/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sol-cov/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/web3-wrapper/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index f1170ae5e..5b1b49510 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -24,7 +24,7 @@ "rebuild_and_test": "run-s build test", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers", + "clean": "shx rm -rf _bundles lib test_temp src/generated_contract_wrappers generated_docs", "build:umd:prod": "NODE_ENV=production webpack", "build:commonjs": "tsc", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" diff --git a/packages/connect/package.json b/packages/connect/package.json index 4e61ed361..e627f3aee 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -17,7 +17,7 @@ "scripts": { "watch_without_deps": "tsc -w", "build": "tsc", - "clean": "shx rm -rf lib test_temp", + "clean": "shx rm -rf lib test_temp generated_docs", "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", "lint": "tslint --project .", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", 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" }, diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json index 98596929f..8ced7c1b6 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -10,7 +10,7 @@ "scripts": { "watch_without_deps": "tsc -w", "build": "tsc", - "clean": "shx rm -rf lib", + "clean": "shx rm -rf lib generated_docs", "lint": "tslint --project .", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index ec79d40cb..5ee46d371 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -16,7 +16,7 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test_temp", + "clean": "shx rm -rf lib test_temp generated_docs", "build": "tsc", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 576f4dbc1..fd55f3486 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -22,7 +22,7 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf lib lib/src/artifacts src/generated_contract_wrappers", + "clean": "shx rm -rf lib lib/src/artifacts src/generated_contract_wrappers generated_docs", "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" }, diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 4d719e575..073c25615 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -24,7 +24,7 @@ "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 test/artifacts src/generated_contract_wrappers", + "clean": "shx rm -rf _bundles lib test_temp test/artifacts src/generated_contract_wrappers 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" }, diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 498c171e0..af32b9c23 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -17,7 +17,7 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/*_test.js --bail --exit", "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "clean": "shx rm -rf lib", + "clean": "shx rm -rf lib generated_docs", "migrate": "npm run build; node lib/src/cli.js migrate", "lint": "tslint --project .", "test:circleci": "yarn test:coverage", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index f63f6fb93..dfeee4a81 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -18,7 +18,7 @@ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", "test:circleci": "yarn test:coverage", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit", - "clean": "shx rm -rf lib test/fixtures/artifacts src/artifacts", + "clean": "shx rm -rf lib test/fixtures/artifacts src/artifacts generated_docs", "copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib", "compile_test": "sol-compiler compile", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_FILES" diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 3eb3d381f..8b8c06c25 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -10,7 +10,7 @@ "scripts": { "watch_without_deps": "tsc -w", "build": "tsc", - "clean": "shx rm -rf lib", + "clean": "shx rm -rf lib generated_docs", "lint": "tslint --project .", "run_mocha_unit": "mocha --require source-map-support/register --require make-promises-safe lib/test/unit/**/*_test.js --timeout 10000 --bail --exit", "run_mocha_integration": "mocha --require source-map-support/register --require make-promises-safe lib/test/integration/**/*_test.js --timeout 10000 --bail --exit", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 06450cda1..f7278004d 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -10,7 +10,7 @@ "scripts": { "watch_without_deps": "tsc -w", "build": "tsc", - "clean": "shx rm -rf lib", + "clean": "shx rm -rf lib generated_docs", "lint": "tslint --project .", "test": "yarn run_mocha", "rebuild_and_test": "run-s clean build test", -- cgit v1.2.3 From 301cb296ec77e8af5c1722679e04cb983c848153 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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/0x.js/package.json | 1 - packages/0x.js/src/index.ts | 13 +- packages/contract-wrappers/package.json | 1 - packages/contract-wrappers/src/artifacts.ts | 2 +- .../src/contract_wrappers/contract_wrapper.ts | 2 +- packages/contract-wrappers/src/index.ts | 5 +- packages/contract_templates/contract.handlebars | 2 +- packages/contracts/package.json | 2 +- packages/contracts/test/utils/artifacts.ts | 2 +- packages/contracts/test/utils/log_decoder.ts | 2 +- packages/ethereum-types/CHANGELOG.json | 3 + packages/ethereum-types/src/index.ts | 161 +++++++++++++++++++++ packages/fill-scenarios/package.json | 1 - packages/fill-scenarios/src/artifacts.ts | 2 +- packages/metacoin/package.json | 2 +- packages/metacoin/test/metacoin_test.ts | 2 +- packages/migrations/package.json | 1 + packages/migrations/src/1.0.0/artifacts.ts | 2 +- .../migrations/src/2.0.0-beta-testnet/artifacts.ts | 2 +- packages/migrations/src/2.0.0/artifacts.ts | 2 +- packages/migrations/src/utils/artifact_writer.ts | 2 +- packages/order-utils/package.json | 1 - packages/order-utils/src/artifacts.ts | 2 +- packages/order-watcher/package.json | 1 - packages/sol-compiler/src/compiler.ts | 2 +- packages/sol-compiler/src/index.ts | 3 +- packages/sol-compiler/src/utils/compiler.ts | 2 +- packages/sol-compiler/src/utils/types.ts | 74 ---------- packages/sol-compiler/test/compiler_test.ts | 2 +- .../sol_compiler_artifact_adapter.ts | 2 +- 30 files changed, 190 insertions(+), 111 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 5b1b49510..5911125ed 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -79,7 +79,6 @@ "@0xproject/contract-wrappers": "^1.0.1-rc.3", "@0xproject/order-utils": "^1.0.1-rc.3", "@0xproject/order-watcher": "1.0.1-rc.3", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/subproviders": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", "@0xproject/typescript-typings": "^1.0.4", diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 748662c39..ec5581a5c 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -71,14 +71,6 @@ export { OrderRelevantState, } from '@0xproject/types'; -export { - ContractArtifact, - GeneratedCompilerOptions, - ContractNetworks, - ContractNetworkData, - Source, -} from '@0xproject/sol-compiler'; - export { BlockParamLiteral, ContractAbi, @@ -105,4 +97,9 @@ export { DataItem, ConstructorStateMutability, StateMutability, + ContractArtifact, + GeneratedCompilerOptions, + ContractNetworks, + ContractNetworkData, + Source, } from 'ethereum-types'; 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, diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 0810c4d90..7fd96f4e0 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -1,7 +1,7 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable import { BaseContract } from '@0xproject/base-contract'; -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, DataItem, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils, promisify } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 8bd808a27..3c3ce6792 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -51,6 +51,7 @@ "@0xproject/sol-cov": "^2.0.0", "@0xproject/subproviders": "^1.0.5", "@0xproject/tslint-config": "^1.0.5", + "@0xproject/sol-compiler": "^1.0.5", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", "@types/lodash": "4.14.104", @@ -74,7 +75,6 @@ "dependencies": { "@0xproject/base-contract": "^2.0.0-rc.1", "@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/contracts/test/utils/artifacts.ts b/packages/contracts/test/utils/artifacts.ts index e608ee174..1d5728cba 100644 --- a/packages/contracts/test/utils/artifacts.ts +++ b/packages/contracts/test/utils/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as AssetProxyOwner from '../../artifacts/AssetProxyOwner.json'; import * as DummyERC20Token from '../../artifacts/DummyERC20Token.json'; diff --git a/packages/contracts/test/utils/log_decoder.ts b/packages/contracts/test/utils/log_decoder.ts index 5a4801319..92e9185d8 100644 --- a/packages/contracts/test/utils/log_decoder.ts +++ b/packages/contracts/test/utils/log_decoder.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import { AbiDecoder, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json index e67d68648..b001f6af3 100644 --- a/packages/ethereum-types/CHANGELOG.json +++ b/packages/ethereum-types/CHANGELOG.json @@ -46,6 +46,9 @@ { "note": "Add `TransactionReceiptStatus` type", "pr": 812 + }, + { + "note": "Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField`" } ] }, diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index b2af028fb..5ace18452 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -287,3 +287,164 @@ export interface TraceParams { disableStack?: boolean; disableStorage?: boolean; } + +export type OutputField = + | '*' + | 'ast' + | 'legacyAST' + | 'abi' + | 'devdoc' + | 'userdoc' + | 'metadata' + | 'ir' + | 'evm.assembly' + | 'evm.legacyAssembly' + | 'evm.bytecode.object' + | 'evm.bytecode.opcodes' + | 'evm.bytecode.sourceMap' + | 'evm.bytecode.linkReferences' + | 'evm.deployedBytecode.object' + | 'evm.deployedBytecode.opcodes' + | 'evm.deployedBytecode.sourceMap' + | 'evm.deployedBytecode.linkReferences' + | 'evm.methodIdentifiers' + | 'evm.gasEstimates' + | 'ewasm.wast' + | 'ewasm.wasm'; + +export interface CompilerSettings { + remappings?: string[]; + optimizer?: { + enabled: boolean; + runs?: number; + }; + evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; + metadata?: { + useLiteralContent: true; + }; + libraries?: { + [fileName: string]: { + [libName: string]: string; + }; + }; + outputSelection: { + [fileName: string]: { + [contractName: string]: OutputField[]; + }; + }; +} + +export interface ContractNetworks { + [networkId: number]: ContractNetworkData; +} + +export interface ContractNetworkData { + address: string; + links: { + [linkName: string]: string; + }; + constructorArgs: string; +} + +export interface StandardContractOutput { + abi: ContractAbi; + evm: { + bytecode: { + object: string; + sourceMap: string; + }; + deployedBytecode: { + object: string; + sourceMap: string; + }; + }; +} + +export interface ContractVersionData { + compiler: { + name: 'solc'; + version: string; + settings: CompilerSettings; + }; + sources: { + [sourceName: string]: { + id: number; + }; + }; + sourceCodes: { + [sourceName: string]: string; + }; + sourceTreeHashHex: string; + compilerOutput: StandardContractOutput; +} + +/** + * This type defines the schema of the artifact.json file generated by Sol-compiler + * schemaVersion: The version of the artifact schema + * contractName: The contract name it represents + * networks: Network specific information by network (address, id, constructor args, etc...) + * compilerOutput: The Solidity compiler output generated from the specified compiler input + * description (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) + * compiler: The compiler settings used + * sourceCodes: The source code of the contract and all it's dependencies + * sources: A mapping from source filePath to sourceMap id + * sourceTreeHashHex: A unique hash generated from the contract source and that of it's dependencies. + * If any of the sources change, the hash would change notifying us that a re-compilation is necessary + */ +export interface ContractArtifact extends ContractVersionData { + schemaVersion: string; + contractName: string; + networks: ContractNetworks; +} + +export interface GeneratedCompilerOptions { + name: 'solc'; + version: string; + settings: CompilerSettings; +} + +// Copied from the solc.js library types +export interface CompilerSettings { + remappings?: string[]; + optimizer?: { + enabled: boolean; + runs?: number; + }; + evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; + metadata?: { + useLiteralContent: true; + }; + libraries?: { + [fileName: string]: { + [libName: string]: string; + }; + }; + outputSelection: { + [fileName: string]: { + [contractName: string]: OutputField[]; + }; + }; +} + +export interface Source { + id: number; +} + +/** + * Options you can specify (as flags or in a compiler.json file) when invoking sol-compiler + * contractsDir: Directory containing your project's Solidity contracts. Can contain nested directories. + * artifactsDir: Directory where you want the generated artifacts.json written to + * compilerSettings: Desired settings to pass to the Solidity compiler during compilation. + * (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) + * contracts: List of contract names you wish to compile, or alternatively ['*'] to compile all contracts in the + * specified directory. + * solcVersion: If you don't want to compile each contract with the Solidity version specified in-file, you can force all + * contracts to compile with the the version specified here. + */ +export interface CompilerOptions { + contractsDir?: string; + artifactsDir?: string; + compilerSettings?: CompilerSettings; + contracts?: string[] | '*'; + solcVersion?: string; +} diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 122499db6..767032e41 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -28,7 +28,6 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md", "devDependencies": { "@0xproject/abi-gen": "^1.0.5", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/tslint-config": "^1.0.5", "@types/lodash": "4.14.104", "copyfiles": "^2.0.0", diff --git a/packages/fill-scenarios/src/artifacts.ts b/packages/fill-scenarios/src/artifacts.ts index 7f68ae26a..b78ca0cc2 100644 --- a/packages/fill-scenarios/src/artifacts.ts +++ b/packages/fill-scenarios/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/metacoin/package.json b/packages/metacoin/package.json index 322708b50..3337570b6 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -31,7 +31,6 @@ "dependencies": { "@0xproject/abi-gen": "^1.0.5", "@0xproject/base-contract": "^2.0.0-rc.1", - "@0xproject/sol-compiler": "^1.0.5", "@0xproject/sol-cov": "^2.0.0", "@0xproject/subproviders": "^1.0.5", "@0xproject/tslint-config": "^1.0.5", @@ -48,6 +47,7 @@ }, "devDependencies": { "@0xproject/dev-utils": "^1.0.4", + "@0xproject/sol-compiler": "^1.0.5", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts index 803e5f786..f112ac060 100644 --- a/packages/metacoin/test/metacoin_test.ts +++ b/packages/metacoin/test/metacoin_test.ts @@ -1,5 +1,5 @@ import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils'; -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/migrations/package.json b/packages/migrations/package.json index f196ffad6..ae29cce4e 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -41,6 +41,7 @@ "@0xproject/dev-utils": "^1.0.4", "@0xproject/tslint-config": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", + "@0xproject/sol-compiler": "^1.0.5", "@types/yargs": "^10.0.0", "copyfiles": "^2.0.0", "make-promises-safe": "^1.1.0", diff --git a/packages/migrations/src/1.0.0/artifacts.ts b/packages/migrations/src/1.0.0/artifacts.ts index d0a9f735a..f5226e174 100644 --- a/packages/migrations/src/1.0.0/artifacts.ts +++ b/packages/migrations/src/1.0.0/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as DummyERC20Token from '../../artifacts/1.0.0/DummyERC20Token.json'; import * as Exchange from '../../artifacts/1.0.0/Exchange_v1.json'; diff --git a/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts b/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts index c9a341eb3..1c9ffd2d6 100644 --- a/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts +++ b/packages/migrations/src/2.0.0-beta-testnet/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as AssetProxyOwner from '../../artifacts/2.0.0-beta-testnet/AssetProxyOwner.json'; import * as ERC20Proxy from '../../artifacts/2.0.0-beta-testnet/ERC20Proxy.json'; diff --git a/packages/migrations/src/2.0.0/artifacts.ts b/packages/migrations/src/2.0.0/artifacts.ts index 8bbd1fcd9..8d66e3b63 100644 --- a/packages/migrations/src/2.0.0/artifacts.ts +++ b/packages/migrations/src/2.0.0/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as AssetProxyOwner from '../../artifacts/2.0.0/AssetProxyOwner.json'; import * as DummyERC20Token from '../../artifacts/2.0.0/DummyERC20Token.json'; diff --git a/packages/migrations/src/utils/artifact_writer.ts b/packages/migrations/src/utils/artifact_writer.ts index b7522df05..ea9c7952d 100644 --- a/packages/migrations/src/utils/artifact_writer.ts +++ b/packages/migrations/src/utils/artifact_writer.ts @@ -1,5 +1,5 @@ import { BaseContract } from '@0xproject/base-contract'; -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as fs from 'fs'; import * as path from 'path'; diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index fd55f3486..6e5007343 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -66,7 +66,6 @@ "@0xproject/assert": "^1.0.5", "@0xproject/base-contract": "^2.0.0-rc.1", "@0xproject/json-schemas": "^1.0.1-rc.4", - "@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/order-utils/src/artifacts.ts b/packages/order-utils/src/artifacts.ts index 3d2d1e953..735cc2403 100644 --- a/packages/order-utils/src/artifacts.ts +++ b/packages/order-utils/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 ERC20Proxy from './artifacts/ERC20Proxy.json'; diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 073c25615..1765d7cad 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -47,7 +47,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/tslint-config": "^1.0.5", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 2503f7315..eb4ff3be6 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -10,6 +10,7 @@ import { } from '@0xproject/sol-resolver'; import { fetchAsync, logUtils } from '@0xproject/utils'; import chalk from 'chalk'; +import { CompilerOptions, ContractArtifact, ContractVersionData } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; import * as fs from 'fs'; import * as _ from 'lodash'; @@ -29,7 +30,6 @@ import { } from './utils/compiler'; import { constants } from './utils/constants'; import { fsWrapper } from './utils/fs_wrapper'; -import { CompilerOptions, ContractArtifact, ContractVersionData } from './utils/types'; import { utils } from './utils/utils'; type TYPE_ALL_FILES_IDENTIFIER = '*'; diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index 570de931b..74c2b80d5 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,3 +1,2 @@ export { Compiler } from './compiler'; - -export { CompilerOptions } from './utils/types'; +export { ContractArtifact, CompilerOptions, ContractNetworks } from 'ethereum-types'; diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts index 968fcc5b2..c918ed1f3 100644 --- a/packages/sol-compiler/src/utils/compiler.ts +++ b/packages/sol-compiler/src/utils/compiler.ts @@ -1,10 +1,10 @@ import { ContractSource } from '@0xproject/sol-resolver'; import { logUtils } from '@0xproject/utils'; +import { ContractArtifact } from 'ethereum-types'; import * as _ from 'lodash'; import * as path from 'path'; import { fsWrapper } from './fs_wrapper'; -import { ContractArtifact } from './types'; /** * Gets contract data on network or returns if an artifact does not exist. diff --git a/packages/sol-compiler/src/utils/types.ts b/packages/sol-compiler/src/utils/types.ts index e2e7a4e53..b211cfcbc 100644 --- a/packages/sol-compiler/src/utils/types.ts +++ b/packages/sol-compiler/src/utils/types.ts @@ -1,5 +1,3 @@ -import * as solc from 'solc'; - export enum AbiType { Function = 'function', Constructor = 'constructor', @@ -7,82 +5,10 @@ export enum AbiType { Fallback = 'fallback', } -/** - * This type defines the schema of the artifact.json file generated by Sol-compiler - * schemaVersion: The version of the artifact schema - * contractName: The contract name it represents - * networks: Network specific information by network (address, id, constructor args, etc...) - * compilerOutput: The Solidity compiler output generated from the specified compiler input - * description (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) - * compiler: The compiler settings used - * sourceCodes: The source code of the contract and all it's dependencies - * sources: A mapping from source filePath to sourceMap id - * sourceTreeHashHex: A unique hash generated from the contract source and that of it's dependencies. - * If any of the sources change, the hash would change notifying us that a re-compilation is necessary - */ -export interface ContractArtifact extends ContractVersionData { - schemaVersion: string; - contractName: string; - networks: ContractNetworks; -} - -export interface GeneratedCompilerOptions { - name: 'solc'; - version: string; - settings: solc.CompilerSettings; -} - -export interface Source { - id: number; -} - -export interface ContractVersionData { - compiler: GeneratedCompilerOptions; - sources: { - [sourceName: string]: Source; - }; - sourceCodes: { - [sourceName: string]: string; - }; - sourceTreeHashHex: string; - compilerOutput: solc.StandardContractOutput; -} - -export interface ContractNetworks { - [networkId: number]: ContractNetworkData; -} - -export interface ContractNetworkData { - address: string; - links: { - [linkName: string]: string; - }; - constructorArgs: string; -} - export interface SolcErrors { [key: string]: boolean; } -/** - * Options you can specify (as flags or in a compiler.json file) when invoking sol-compiler - * contractsDir: Directory containing your project's Solidity contracts. Can contain nested directories. - * artifactsDir: Directory where you want the generated artifacts.json written to - * compilerSettings: Desired settings to pass to the Solidity compiler during compilation. - * (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description) - * contracts: List of contract names you wish to compile, or alternatively ['*'] to compile all contracts in the - * specified directory. - * solcVersion: If you don't want to compile each contract with the Solidity version specified in-file, you can force all - * contracts to compile with the the version specified here. - */ -export interface CompilerOptions { - contractsDir?: string; - artifactsDir?: string; - compilerSettings?: solc.CompilerSettings; - contracts?: string[] | '*'; - solcVersion?: string; -} - export interface ContractSourceData { [contractName: string]: ContractSpecificSourceData; } diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts index c9e141ee9..46853e882 100644 --- a/packages/sol-compiler/test/compiler_test.ts +++ b/packages/sol-compiler/test/compiler_test.ts @@ -1,10 +1,10 @@ import { DoneCallback } from '@0xproject/types'; import * as chai from 'chai'; +import { CompilerOptions, ContractArtifact } from 'ethereum-types'; import 'mocha'; import { Compiler } from '../src/compiler'; import { fsWrapper } from '../src/utils/fs_wrapper'; -import { CompilerOptions, ContractArtifact } from '../src/utils/types'; import { exchange_binary } from './fixtures/exchange_bin'; import { constants } from './util/constants'; diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts index 0601c5729..8a74022bf 100644 --- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts @@ -1,5 +1,5 @@ -import { CompilerOptions, ContractArtifact } from '@0xproject/sol-compiler'; import { logUtils } from '@0xproject/utils'; +import { CompilerOptions, ContractArtifact } from 'ethereum-types'; import * as fs from 'fs'; import * as glob from 'glob'; import * as _ from 'lodash'; -- cgit v1.2.3 From 22de88035c35731f0a93fc0acb87c185c1e2730c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 11:28:31 +0100 Subject: Fix index.ts given fix in doc generation --- packages/0x.js/src/index.ts | 9 +-------- packages/contract-wrappers/src/index.ts | 12 ------------ packages/sol-compiler/src/index.ts | 2 +- packages/sol-cov/src/index.ts | 19 +++++++++---------- 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index ec5581a5c..a37333bad 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -11,7 +11,6 @@ export { ForwarderWrapper, IndexedFilterValues, BlockRange, - ContractEventArgs, ContractWrappersConfig, MethodOpts, OrderTransactionOpts, @@ -38,11 +37,10 @@ export { ExchangeSignatureValidatorApprovalEventArgs, ExchangeFillEventArgs, ExchangeCancelEventArgs, - ExchangeEventArgs, ExchangeEvents, - ContractEvents, EventCallback, DecodedLogEvent, + ExchangeEventArgs, } from '@0xproject/contract-wrappers'; export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; @@ -97,9 +95,4 @@ export { DataItem, ConstructorStateMutability, StateMutability, - ContractArtifact, - GeneratedCompilerOptions, - ContractNetworks, - ContractNetworkData, - Source, } from 'ethereum-types'; 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 { diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index 74c2b80d5..b6b170508 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,2 +1,2 @@ export { Compiler } from './compiler'; -export { ContractArtifact, CompilerOptions, ContractNetworks } from 'ethereum-types'; +export { CompilerOptions, CompilerSettings, OutputField } from 'ethereum-types'; diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index cb9e108fb..15be86a9d 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -7,14 +7,13 @@ export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_a export { ProfilerSubprovider } from './profiler_subprovider'; export { RevertTraceSubprovider } from './revert_trace_subprovider'; -export { ContractData, TraceInfo, Subtrace, TraceInfoNewContract, TraceInfoExistingContract } from './types'; -export { - StructLog, - JSONRPCRequestPayload, - Provider, - JSONRPCErrorCallback, - OpCode, - JSONRPCResponsePayload, -} from 'ethereum-types'; +export { ContractData } from './types'; +export { JSONRPCRequestPayload, Provider, JSONRPCErrorCallback, JSONRPCResponsePayload } from 'ethereum-types'; -export { JSONRPCRequestPayloadWithMethod } from '@0xproject/subproviders'; +export { + JSONRPCRequestPayloadWithMethod, + NextCallback, + ErrorCallback, + OnNextCompleted, + Callback, +} from '@0xproject/subproviders'; -- cgit v1.2.3 From c12f0d04bb2f0d5ad73943d02a592a110423a423 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 11:30:24 +0100 Subject: Fix bugs in doc gen due to clone vs cloneDeep and pre-maturely removing placeholder undefined's in array iteration --- .../src/utils/doc_generate_and_upload_utils.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 9e5f437fa..bbc763a6b 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -213,8 +213,8 @@ export class DocGenerateAndUploadUtils { utils.log('GENERATE_UPLOAD_DOCS: Modifying Typedoc JSON to our custom format...'); const typedocOutputString = readFileSync(jsonFilePath).toString(); const typedocOutput = JSON.parse(typedocOutputString); - let modifiedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); - modifiedTypedocOutput = this._pruneTypedocOutput(modifiedTypedocOutput); + const standardizedTypedocOutput = this._standardizeTypedocOutputTopLevelChildNames(typedocOutput); + const modifiedTypedocOutput = this._pruneTypedocOutput(standardizedTypedocOutput); if (!_.includes(docGenConfigs.TYPES_ONLY_LIBRARIES, this._packageName)) { const propertyName = ''; // Root has no property name @@ -345,7 +345,7 @@ export class DocGenerateAndUploadUtils { * - it begins with an underscore (i.e is private) */ private _pruneTypedocOutput(typedocOutput: any): any { - const modifiedTypedocOutput = _.clone(typedocOutput); + const modifiedTypedocOutput = _.cloneDeep(typedocOutput); _.each(typedocOutput.children, (file, i) => { const exportPath = this._findExportPathGivenTypedocName(file.name); const exportItems = this._exportPathToExportedItems[exportPath]; @@ -365,11 +365,11 @@ export class DocGenerateAndUploadUtils { const isPrivate = _.startsWith(innerChild.name, '_'); if (isHiddenConstructor || isPrivate) { delete modifiedTypedocOutput.children[i].children[j].children[k]; - modifiedTypedocOutput.children[i].children[j].children = _.compact( - modifiedTypedocOutput.children[i].children[j].children, - ); } }); + modifiedTypedocOutput.children[i].children[j].children = _.compact( + modifiedTypedocOutput.children[i].children[j].children, + ); }); modifiedTypedocOutput.children[i].children = _.compact(modifiedTypedocOutput.children[i].children); }); @@ -382,7 +382,7 @@ export class DocGenerateAndUploadUtils { * them here when necessary. */ private _standardizeTypedocOutputTopLevelChildNames(typedocOutput: any): any { - const modifiedTypedocOutput = _.clone(typedocOutput); + const modifiedTypedocOutput = _.cloneDeep(typedocOutput); _.each(typedocOutput.children, (child, i) => { if (!_.includes(child.name, '/src/')) { const nameWithoutQuotes = child.name.replace(/"/g, ''); -- cgit v1.2.3 From d907b403788576c7d4fe51090a561f1e951126e2 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 13:12:42 +0100 Subject: Fix remaining merge issues --- packages/0x.js/src/index.ts | 1 + packages/contract-wrappers/src/index.ts | 2 + .../src/utils/transaction_encoder.ts | 6 +- .../test/transaction_encoder_test.ts | 4 +- packages/monorepo-scripts/src/doc_gen_configs.ts | 1 + packages/order-watcher/src/artifacts.ts | 2 +- yarn.lock | 66 ++++++++++------------ 7 files changed, 39 insertions(+), 43 deletions(-) diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index a37333bad..7058a898f 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -41,6 +41,7 @@ export { EventCallback, DecodedLogEvent, ExchangeEventArgs, + TransactionEncoder, } from '@0xproject/contract-wrappers'; export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; 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<void> => { const salt = generatePseudoRandomSalt(); const encodedTransaction = encoder.getTransactionHex(data, salt, signerAddress); - const signature = await ecSignOrderHashAsync( + const signature = await signatureUtils.ecSignOrderHashAsync( provider, encodedTransaction, signerAddress, diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index 52cbc4f59..fb6cc0886 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -33,6 +33,7 @@ export const docGenConfigs: DocGenConfigs = { 'EtherTokenWrapper', 'ExchangeWrapper', 'ForwarderWrapper', + 'TransactionEncoder', ], // Some types are not explicitly part of the public interface like params, return values, etc... But we still // want them exported. E.g error enum types that can be thrown by methods. These must be manually added to this diff --git a/packages/order-watcher/src/artifacts.ts b/packages/order-watcher/src/artifacts.ts index d47e619c2..520066a24 100644 --- a/packages/order-watcher/src/artifacts.ts +++ b/packages/order-watcher/src/artifacts.ts @@ -1,4 +1,4 @@ -import { ContractArtifact } from '@0xproject/sol-compiler'; +import { ContractArtifact } from 'ethereum-types'; import * as ERC20Token from './artifacts/ERC20Token.json'; import * as ERC721Token from './artifacts/ERC721Token.json'; diff --git a/yarn.lock b/yarn.lock index 191128696..ccfec78b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1354,9 +1354,9 @@ aes-js@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" -aes-js@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.1.tgz#89fd1f94ae51b4c72d62466adc1a7323ff52f072" +aes-js@^0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" ajv-keywords@^2.1.0: version "2.1.1" @@ -2414,6 +2414,10 @@ balanced-match@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" +base-x@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-1.1.0.tgz#42d3d717474f9ea02207f6d1aa1f426913eeb7ac" + base-x@^3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.4.tgz#94c1788736da065edb1d68808869e357c977fa77" @@ -2817,7 +2821,7 @@ browserslist@^2.1.2: caniuse-lite "^1.0.30000792" electron-to-chromium "^1.3.30" -bs58@=4.0.1, bs58@^4.0.0: +bs58@=4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" dependencies: @@ -2827,13 +2831,18 @@ bs58@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-2.0.1.tgz#55908d58f1982aba2008fa1bed8f91998a29bf8d" -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" +bs58@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-3.1.0.tgz#d4c26388bf4804cac714141b1945aa47e5eb248e" dependencies: - bs58 "^4.0.0" + base-x "^1.1.0" + +bs58check@^1.0.8: + version "1.3.4" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-1.3.4.tgz#c52540073749117714fa042c3047eb8f9151cbf8" + dependencies: + bs58 "^3.1.0" create-hash "^1.1.0" - safe-buffer "^5.1.2" btoa@1.1.2: version "1.1.2" @@ -5155,7 +5164,7 @@ ethereumjs-util@5.1.5, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumj safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0: +ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0: version "4.5.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" dependencies: @@ -5209,18 +5218,17 @@ ethereumjs-vm@^2.0.2, ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4: rustbn.js "~0.1.1" safe-buffer "^5.1.1" -ethereumjs-wallet@~0.6.0: - version "0.6.2" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.2.tgz#67244b6af3e8113b53d709124b25477b64aeccda" +ethereumjs-wallet@0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.0.tgz#82763b1697ee7a796be7155da9dfb49b2f98cfdb" dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereumjs-util "^5.2.0" - hdkey "^1.0.0" - safe-buffer "^5.1.2" + aes-js "^0.2.3" + bs58check "^1.0.8" + ethereumjs-util "^4.4.0" + hdkey "^0.7.0" scrypt.js "^0.2.0" - utf8 "^3.0.0" - uuid "^3.3.2" + utf8 "^2.1.1" + uuid "^2.0.1" ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22: version "3.0.18" @@ -6632,21 +6640,13 @@ hawk@~6.0.2: hoek "4.x.x" sntp "2.x.x" -hdkey@^0.7.1: +hdkey@^0.7.0, hdkey@^0.7.1: version "0.7.1" resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-0.7.1.tgz#caee4be81aa77921e909b8d228dd0f29acaee632" dependencies: coinstring "^2.0.0" secp256k1 "^3.0.1" -hdkey@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hdkey/-/hdkey-1.0.0.tgz#1d658dfe966aaa542c1d499586200b325e5c0cf4" - dependencies: - coinstring "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -13932,10 +13932,6 @@ utf8@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" -utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" @@ -13981,10 +13977,6 @@ uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" -uuid@^3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - uvm@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/uvm/-/uvm-1.7.0.tgz#685d3a149ec7118fb73a73dfdc158ab46b0f0634" -- cgit v1.2.3 From 27ba218ed75577982a6dc01cc6d992b92f27bba9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:07:31 +0100 Subject: Improve README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 647829336..110c6f19e 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ Dedicated documentation pages: Node version >= 6.12 is required. Most of the packages require additional typings for external dependencies. -You can include those by prepending @0xproject/typescript-typings package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config. +You can include those by prepending the `@0xproject/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config. ```json "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], -- cgit v1.2.3 From 4b8408179553de9bfaf125528b3eecd2ce6ce6ec Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:19:19 +0100 Subject: Check yarn info on CircleCi --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 844eb3b98..273b5573c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,8 @@ jobs: steps: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - run: yarn --version + - run: which yarn - restore_cache: name: Restore Yarn Package Cache keys: -- cgit v1.2.3 From 3b5c8a847b16dc75eac747ecf1ded3052375fbec Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:24:23 +0100 Subject: Run yarn twice on CI --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 273b5573c..df16fb09d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,8 +10,6 @@ jobs: steps: - checkout - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - run: yarn --version - - run: which yarn - restore_cache: name: Restore Yarn Package Cache keys: @@ -22,6 +20,9 @@ jobs: - run: name: yarn command: yarn --frozen-lockfile install + - run: + name: yarn + command: yarn --frozen-lockfile install - save_cache: name: Save Yarn Package Cache key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} -- cgit v1.2.3 From a39d79352d1233ee4da95dad063bd5753f6f50b1 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:27:24 +0100 Subject: Remove duplicate install cmd --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index df16fb09d..844eb3b98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,9 +20,6 @@ jobs: - run: name: yarn command: yarn --frozen-lockfile install - - run: - name: yarn - command: yarn --frozen-lockfile install - save_cache: name: Save Yarn Package Cache key: yarn-packages-{{ .Branch }}-{{ checksum "yarn.lock" }} -- cgit v1.2.3 From 00b7620af121e5c4f8f9d98adfd9238a8838b2c8 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:45:00 +0100 Subject: Add yarn cache clean --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 844eb3b98..2565e1d48 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,6 +17,7 @@ jobs: - yarn-packages-{{ .Branch }} - yarn-packages-master - yarn-packages- + - run: yarn cache clean - run: name: yarn command: yarn --frozen-lockfile install -- cgit v1.2.3 From 1fdd7466b232b43e97f44162338a7158c7324f1f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:49:05 +0100 Subject: Double install catching first ones error --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2565e1d48..4891bfc97 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -17,7 +17,9 @@ jobs: - yarn-packages-{{ .Branch }} - yarn-packages-master - yarn-packages- - - run: yarn cache clean + - run: + name: yarn + command: yarn --frozen-lockfile install; exit 0; - run: name: yarn command: yarn --frozen-lockfile install -- cgit v1.2.3 From 730226081c3880b203b8a74752176e9b1bfdd6fc Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 14:53:01 +0100 Subject: Ignore error of first yarn install --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4891bfc97..c4a7f1f6f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - yarn-packages- - run: name: yarn - command: yarn --frozen-lockfile install; exit 0; + command: yarn --frozen-lockfile install || true - run: name: yarn command: yarn --frozen-lockfile install -- cgit v1.2.3 From fb4fbc0e133c37c270c46d43fd84428a9423e896 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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(-) 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 <me@fabioberger.com> Date: Wed, 22 Aug 2018 15:10:32 +0100 Subject: Fix prettier --- packages/contract-wrappers/CHANGELOG.json | 10 ++++++---- packages/monorepo-scripts/src/doc_generate_and_upload.ts | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) 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", diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index 2a53628b5..c70ea5ba7 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -4,8 +4,7 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils const args = yargs .option('package', { - describe: - 'Monorepo sub-package for which to generate DocJSON', + describe: 'Monorepo sub-package for which to generate DocJSON', type: 'string', demandOption: true, }) -- cgit v1.2.3 From 40b202f8c0907cb729cc0d7d755a6810c8b1ff06 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 15:53:19 +0100 Subject: Update all CHANGELOGs --- packages/connect/CHANGELOG.json | 10 ++++++++++ packages/contract-wrappers/CHANGELOG.json | 4 ++-- packages/order-utils/CHANGELOG.json | 10 ++++++++++ packages/order-watcher/CHANGELOG.json | 14 ++++++++++++++ packages/sol-compiler/CHANGELOG.json | 8 ++++++++ packages/sol-cov/CHANGELOG.json | 10 ++++++++++ packages/subproviders/CHANGELOG.json | 11 +++++++++++ packages/web3-wrapper/CHANGELOG.json | 18 ++++++++++++++++++ 8 files changed, 83 insertions(+), 2 deletions(-) diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 8d6feaa2e..87fbcdd22 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "timestamp": 1534210131, + "version": "2.0.0", + "changes": [ + { + "note": "Stopped exporting `Order` type", + "pr": 924 + } + ] + }, { "timestamp": 1534210131, "version": "1.0.5", 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 }, { diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index 86f0da65a..cd2a742d2 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -14,6 +14,16 @@ "note": "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", "pr": 954 + }, + { + "note": + "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`", + "pr": 924 + }, + { + "note": + "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", + "pr": 924 } ] }, diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 6a365f314..ee6d5540a 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,4 +1,18 @@ [ + { + "version": "1.0.1-rc.4", + "changes": [ + { + "note": + "Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", + "pr": 924 + }, + { + "note": "Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order`", + "pr": 924 + } + ] + }, { "version": "1.0.1-rc.3", "changes": [ diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 34326e434..a723ea12e 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -6,6 +6,14 @@ "note": "Quicken compilation by sending multiple contracts to the same solcjs invocation, batching them together based on compiler version requirements.", "pr": 965 + }, + { + "note": "Stop exporting types: `ContractArtifact`, `ContractNetworks`", + "pr": 924 + }, + { + "note": "Export types: `CompilerSettings`, `OutputField`", + "pr": 924 } ] }, diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index 5f6b1685b..166bd9255 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "2.1.0", + "changes": [ + { + "note": + "Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback`", + "pr": 924 + } + ] + }, { "version": "2.0.0", "changes": [ diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index 93939066a..e474826e4 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -1,4 +1,15 @@ [ + { + "timestamp": 1534210131, + "version": "2.0.0", + "changes": [ + { + "note": + "Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback`", + "pr": 924 + } + ] + }, { "timestamp": 1534210131, "version": "1.0.5", diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 422059cc0..b9cde2f95 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,22 @@ [ + { + "version": "2.0.0", + "changes": [ + { + "note": + "Export types: `BlockParam`, `TxData`, `Provider`, `TransactionReceipt`, `Transaction`, `TraceParams`, `TransactionTrace``, BlockWithoutTransactionDat`a, `LogEntry`, `FilterObject`, `CallData`, `TransactionReceiptWithDecodedLogs`, `BlockWithTransactionData``, LogTopi`c, `JSONRPCRequestPayload`, `TransactionReceiptStatus`, `DecodedLogArgs`, `StructLog`, `JSONRPCErrorCallback``, BlockParamLitera`l, `ContractEventArg`, `DecodedLogEntry`, `LogEntryEvent`, `OpCode`, `TxDataPayable`, `JSONRPCResponsePayload``, RawLogEntr`y, `DecodedLogEntryEvent`, `LogWithDecodedArgs`, `AbiDefinition`, `RawLog`, `FunctionAbi`, `EventAbi`, `EventParameter``, MethodAb`i, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability` and `StateMutability`", + "pr": 924 + }, + { + "note": "Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC`", + "pr": 924 + }, + { + "note": "Export `AbiDecoder` class", + "pr": 924 + } + ] + }, { "version": "1.2.0", "changes": [ -- cgit v1.2.3 From 7c29cadb1722b7ac6df7db8c947cc5eaad24edaf Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 16:11:42 +0100 Subject: Use actual packageName for external example imports --- packages/react-docs/src/components/documentation.tsx | 2 +- packages/react-docs/src/docs_info.ts | 2 ++ packages/react-docs/src/types.ts | 2 ++ packages/website/ts/containers/connect_documentation.ts | 2 +- packages/website/ts/containers/contract_wrappers_documentation.ts | 1 + packages/website/ts/containers/ethereum_types_documentation.ts | 1 + packages/website/ts/containers/json_schemas_documentation.ts | 1 + packages/website/ts/containers/order_utils_documentation.ts | 1 + packages/website/ts/containers/order_watcher_documentation.ts | 1 + packages/website/ts/containers/smart_contracts_documentation.ts | 1 + packages/website/ts/containers/sol_compiler_documentation.ts | 1 + packages/website/ts/containers/sol_cov_documentation.ts | 1 + packages/website/ts/containers/subproviders_documentation.ts | 1 + packages/website/ts/containers/web3_wrapper_documentation.ts | 1 + packages/website/ts/containers/zero_ex_js_documentation.ts | 1 + 15 files changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 0adadb30b..9d9b5141a 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -322,7 +322,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta <a href={link} target="_blank" style={{ color: colors.lightBlueA700, textDecoration: 'none' }}> {exportName} </a> - {` } from '${this.props.docsInfo.displayName}'`} + {` } from '${this.props.docsInfo.packageName}'`} </code> </div> ); diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 9e990ffc5..f429a34cb 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -21,6 +21,7 @@ export class DocsInfo { public id: string; public type: SupportedDocJson; public displayName: string; + public packageName: string; public packageUrl: string; public menu: DocsMenu; public sections: SectionsMap; @@ -31,6 +32,7 @@ export class DocsInfo { this.type = config.type; this.menu = config.markdownMenu; this.displayName = config.displayName; + this.packageName = config.packageName; this.packageUrl = config.packageUrl; this.sections = config.markdownSections; this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 8352af876..7fd785e32 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -4,6 +4,7 @@ export interface SectionNameToMarkdownByVersion { export interface DocsInfoConfig { id: string; + packageName: string; type: SupportedDocJson; displayName: string; packageUrl: string; @@ -309,6 +310,7 @@ export interface Metadata { } export interface GeneratedDocJson { + version: string; metadata: Metadata; typedocJson: TypeDocNode; } diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index fffc60435..8b13081c6 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -6,7 +6,6 @@ import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentatio import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; import { DocPackages } from 'ts/types'; -import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -21,6 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Connect, + packageName: '@0xproject/connect', type: SupportedDocJson.TypeDoc, displayName: '0x Connect', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 68bb4b1f0..fd8599192 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ContractWrappers, + packageName: '@0xproject/contract-wrappers', type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 3e23899af..e0bf9a83e 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.EthereumTypes, + packageName: 'ethereum-types', type: SupportedDocJson.TypeDoc, displayName: 'Ethereum Types', packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/ethereum-types', diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 6b0089213..389c26687 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -25,6 +25,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.JSONSchemas, + packageName: '@0xproject/json-schemas', type: SupportedDocJson.TypeDoc, displayName: 'JSON Schemas', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 444ca5f2d..47ac35268 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderUtils, + packageName: '@0xproject/order-utils', type: SupportedDocJson.TypeDoc, displayName: 'Order utils', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 8a32fe595..2fa2a9d61 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -21,6 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderWatcher, + packageName: '@0xproject/order-watcher', type: SupportedDocJson.TypeDoc, displayName: 'OrderWatcher', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index a2b3545ae..4f4479c83 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -15,6 +15,7 @@ const IntroMarkdownV1 = require('md/docs/smart_contracts/1.0.0/introduction'); const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SmartContracts, + packageName: 'contracts', type: SupportedDocJson.Doxity, displayName: '0x Smart Contracts', packageUrl: 'https://github.com/0xProject/contracts', diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 48e5b1e1c..7cde68e5c 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCompiler, + packageName: '@0xproject/sol-compiler', type: SupportedDocJson.TypeDoc, displayName: 'Solidity Compiler', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 9e3c7489b..a457cbc1e 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -22,6 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCov, + packageName: '@0xproject/sol-cov', type: SupportedDocJson.TypeDoc, displayName: 'Sol-cov', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index cbbc89a2b..43f06b4ed 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -23,6 +23,7 @@ const docSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Subproviders, + packageName: '@0xproject/subproviders', type: SupportedDocJson.TypeDoc, displayName: 'Subproviders', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 0398e0493..13924fde8 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -21,6 +21,7 @@ const docSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Web3Wrapper, + packageName: '@0xproject/web3-wrapper', type: SupportedDocJson.TypeDoc, displayName: 'Web3Wrapper', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 90b70b8ed..367d3e064 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -31,6 +31,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ZeroExJs, + packageName: '0x.js', type: SupportedDocJson.TypeDoc, displayName: '0x.js', packageUrl: 'https://github.com/0xProject/0x-monorepo', -- cgit v1.2.3 From 3c2af2067f768bd3ffe233d9a7c2d0232db6868e Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 16:24:45 +0100 Subject: Remove monorepo-scripts from tslintconfig.json --- packages/tslint-config/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tslint-config/tsconfig.json b/packages/tslint-config/tsconfig.json index 3f349e100..1935fedc6 100644 --- a/packages/tslint-config/tsconfig.json +++ b/packages/tslint-config/tsconfig.json @@ -4,5 +4,5 @@ "typeRoots": ["../../node_modules/@types", "node_modules/@types"], "outDir": "lib" }, - "include": ["./rules/**/*", "./monorepo_scripts/**/*"] + "include": ["./rules/**/*"] } -- cgit v1.2.3 From b7c119b2aaaa2f3579ca4aeef198eca7f38f1216 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 18:52:17 +0100 Subject: Fix many linter errors that showed up upon upgrading tsutil --- packages/contract_templates/contract.handlebars | 7 ++-- .../contracts/test/exchange/signature_validator.ts | 2 +- packages/contracts/test/utils/erc20_wrapper.ts | 4 +-- packages/contracts/test/utils/log_decoder.ts | 2 +- packages/metacoin/test/metacoin_test.ts | 3 +- packages/monorepo-scripts/package.json | 4 ++- .../src/doc_generate_and_upload.ts | 3 +- .../monorepo-scripts/src/publish_release_notes.ts | 6 ++-- .../src/utils/doc_generate_and_upload_utils.ts | 20 ++++++------ .../src/utils/github_release_utils.ts | 18 +++++----- ...abstract_balance_and_proxy_allowance_fetcher.ts | 2 +- .../abstract_order_filled_cancelled_fetcher.ts | 2 +- packages/order-utils/src/market_utils.ts | 2 +- packages/react-docs/src/utils/typedoc_utils.ts | 20 ++++++------ packages/react-shared/src/utils/utils.ts | 2 +- packages/sol-compiler/test/compiler_test.ts | 2 +- packages/sra-report/src/index.ts | 3 +- .../subproviders/src/subproviders/subprovider.ts | 2 ++ packages/tslint-config/package.json | 4 +-- packages/tslint-config/tslint.json | 3 +- packages/types/src/index.ts | 9 ----- packages/website/ts/components/top_bar/top_bar.tsx | 17 ++++++---- packages/website/ts/redux/reducer.ts | 2 +- yarn.lock | 38 ++++++++-------------- 24 files changed, 83 insertions(+), 94 deletions(-) diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 7fd96f4e0..5c36a765d 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -1,9 +1,9 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable +// tslint:disable:no-unbound-method import { BaseContract } from '@0xproject/base-contract'; -import { ContractArtifact } from 'ethereum-types'; -import { BlockParam, BlockParamLiteral, CallData, ContractAbi, DataItem, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils, promisify } from '@0xproject/utils'; +import { BlockParam, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; +import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -85,3 +85,4 @@ export class {{contractName}}Contract extends BaseContract { classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); } } // tslint:disable:max-file-line-count +// tslint:enable:no-unbound-method diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index e95b70b62..cd4f3d6f3 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -1,5 +1,5 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { signatureUtils, assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; +import { assetDataUtils, orderHashUtils, signatureUtils } from '@0xproject/order-utils'; import { RevertReason, SignatureType, SignedOrder, SignerType } from '@0xproject/types'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/contracts/test/utils/erc20_wrapper.ts b/packages/contracts/test/utils/erc20_wrapper.ts index ec9e20a9b..526ffe9f8 100644 --- a/packages/contracts/test/utils/erc20_wrapper.ts +++ b/packages/contracts/test/utils/erc20_wrapper.ts @@ -23,8 +23,8 @@ export class ERC20Wrapper { /** * Instanitates an ERC20Wrapper * @param provider Web3 provider to use for all JSON RPC requests - * @param tokenOwnerAddresses - * @param contractOwnerAddress + * @param tokenOwnerAddresses Addresses that we want to endow as owners for dummy ERC20 tokens + * @param contractOwnerAddress Desired owner of the contract * Instance of ERC20Wrapper */ constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) { diff --git a/packages/contracts/test/utils/log_decoder.ts b/packages/contracts/test/utils/log_decoder.ts index 77211d357..144a18dd1 100644 --- a/packages/contracts/test/utils/log_decoder.ts +++ b/packages/contracts/test/utils/log_decoder.ts @@ -1,8 +1,8 @@ -import { ContractArtifact } from 'ethereum-types'; import { AbiDecoder, BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { AbiDefinition, + ContractArtifact, DecodedLogArgs, LogEntry, LogWithDecodedArgs, diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts index f112ac060..6c16a2d39 100644 --- a/packages/metacoin/test/metacoin_test.ts +++ b/packages/metacoin/test/metacoin_test.ts @@ -1,8 +1,7 @@ import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils'; -import { ContractArtifact } from 'ethereum-types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; -import { LogWithDecodedArgs } from 'ethereum-types'; +import { ContractArtifact, LogWithDecodedArgs } from 'ethereum-types'; import * as MetacoinArtifact from '../artifacts/Metacoin.json'; import { MetacoinContract, MetacoinTransferEventArgs } from '../src/contract_wrappers/metacoin'; diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 41a6e7c91..74be99550 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -38,6 +38,7 @@ "@types/opn": "^5.1.0", "@types/rimraf": "^2.0.2", "@types/semver": "5.5.0", + "@types/yargs": "^10.0.0", "depcheck": "^0.6.9", "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", @@ -64,7 +65,8 @@ "semver": "5.5.0", "semver-diff": "^2.1.0", "semver-sort": "0.0.4", - "typedoc": "0xProject/typedoc" + "typedoc": "0xProject/typedoc", + "yargs": "^10.0.3" }, "publishConfig": { "access": "public" diff --git a/packages/monorepo-scripts/src/doc_generate_and_upload.ts b/packages/monorepo-scripts/src/doc_generate_and_upload.ts index c70ea5ba7..4c4a72701 100644 --- a/packages/monorepo-scripts/src/doc_generate_and_upload.ts +++ b/packages/monorepo-scripts/src/doc_generate_and_upload.ts @@ -1,6 +1,7 @@ import * as yargs from 'yargs'; import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils'; +import { utils } from './utils/utils'; const args = yargs .option('package', { @@ -31,6 +32,6 @@ const args = yargs process.exit(0); })().catch(err => { - console.log(err); + utils.log(err); process.exit(1); }); diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 964f5b0bb..5afcc8775 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -1,9 +1,7 @@ -import * as promisify from 'es6-promisify'; -import * as publishRelease from 'publish-release'; - -import { utils } from './utils/utils'; import { publishReleaseNotesAsync } from './utils/github_release_utils'; +import { utils } from './utils/utils'; +// tslint:disable-next-line:no-floating-promises (async () => { const shouldIncludePrivate = false; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index bbc763a6b..1645ba0d6 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -11,15 +11,15 @@ import { ExportInfo, ExportNameToTypedocNames, ExportPathToExportedItems, Packag import { utils } from './utils'; export class DocGenerateAndUploadUtils { - private _isStaging: boolean; - private _shouldUploadDocs: boolean; - private _packageName: string; - private _omitExports: string[]; - private _packagePath: string; - private _exportPathToExportedItems: ExportPathToExportedItems; - private _exportPathOrder: string[]; - private _monoRepoPkgNameToPath: { [name: string]: string }; - private _packageJson: PackageJSON; + private readonly _isStaging: boolean; + private readonly _shouldUploadDocs: boolean; + private readonly _packageName: string; + private readonly _omitExports: string[]; + private readonly _packagePath: string; + private readonly _exportPathToExportedItems: ExportPathToExportedItems; + private readonly _exportPathOrder: string[]; + private readonly _monoRepoPkgNameToPath: { [name: string]: string }; + private readonly _packageJson: PackageJSON; /** * Recursively iterate over the TypeDoc JSON object and find all type names */ @@ -278,7 +278,7 @@ export class DocGenerateAndUploadUtils { } utils.log(`GENERATE_UPLOAD_DOCS: Doc generation done for ${this._packageName}`); } - private async _uploadDocsAsync(jsonFilePath: string, cwd: string) { + private async _uploadDocsAsync(jsonFilePath: string, cwd: string): Promise<void> { const fileName = `v${this._packageJson.version}.json`; utils.log(`GENERATE_UPLOAD_DOCS: Doc generation successful, uploading docs... as ${fileName}`); diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 1f4c4f1e9..28dce70ac 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -1,27 +1,29 @@ -import * as _ from 'lodash'; import * as promisify from 'es6-promisify'; +import { readFileSync } from 'fs'; +import * as _ from 'lodash'; +import * as path from 'path'; +import { exec as execAsync } from 'promisify-child-process'; import * as publishRelease from 'publish-release'; import { constants } from '../constants'; import { Package } from '../types'; -import { utils } from './utils'; -import { readFileSync } from 'fs'; -import * as path from 'path'; -import { exec as execAsync } from 'promisify-child-process'; +import { utils } from './utils'; const publishReleaseAsync = promisify(publishRelease); +// tslint:disable-next-line:completed-docs export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); const latestGitCommit = result.stdout; - const shortenedGitCommit = latestGitCommit.slice(0, 7); + const prefixLength = 7; + const shortenedGitCommit = latestGitCommit.slice(0, prefixLength); const tagName = `monorepo@${shortenedGitCommit}`; await execAsync(`git rev-parse ${tagName}`); - await execAsync('git tag ${tagName}'); + await execAsync(`git tag ${tagName}`); - await execAsync('git push origin ${tagName}'); + await execAsync(`git push origin ${tagName}`); const releaseName = `0x monorepo - ${shortenedGitCommit}`; let assets: string[] = []; diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts index 7cb859ca7..c7f06abad 100644 --- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts @@ -1,6 +1,6 @@ import { BigNumber } from '@0xproject/utils'; -/**l +/** * An abstract class to be implemented in order to use OrderStateUtils. The class that * implements this interface must be capable of fetching the balance and proxyAllowance * for an Ethereum address and assetData diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts index d2b01c359..fbc1c4718 100644 --- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts @@ -1,6 +1,6 @@ import { BigNumber } from '@0xproject/utils'; -/**l +/** * An abstract class to be implemented in order to use OrderStateUtils. The class that * implements this interface must be capable of fetching the amount filled of an order * and whether it's been cancelled. diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index b3f302dd2..441c50e5c 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -6,9 +6,9 @@ import * as _ from 'lodash'; import { assert } from './assert'; import { constants } from './constants'; import { + FeeOrdersAndRemainingFeeAmount, FindFeeOrdersThatCoverFeesForTargetOrdersOpts, FindOrdersThatCoverMakerAssetFillAmountOpts, - FeeOrdersAndRemainingFeeAmount, OrdersAndRemainingFillAmount, } from './types'; diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 0eaf5fd6e..76443ad81 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -26,12 +26,12 @@ import { import { constants } from './constants'; export class TypeDocUtils { - private _typeDocNameOrder: string[]; - private _externalTypeToLink: ExternalTypeToLink; - private _externalExportToLink: ExternalExportToLink; - private _docsInfo: DocsInfo; - private _typeDocJson: TypeDocNode; - private _classNames: string[]; + private readonly _typeDocNameOrder: string[]; + private readonly _externalTypeToLink: ExternalTypeToLink; + private readonly _externalExportToLink: ExternalExportToLink; + private readonly _docsInfo: DocsInfo; + private readonly _typeDocJson: TypeDocNode; + private readonly _classNames: string[]; constructor(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo) { this._docsInfo = docsInfo; const exportPathOrder = generatedDocJson.metadata.exportPathOrder; @@ -191,7 +191,7 @@ export class TypeDocUtils { case KindString.Function: if (entity.flags.isExported) { - const funcName = (entity as TypeDocNode).signatures[0].name; + const funcName = entity.signatures[0].name; if (!this.isUnderscorePrefixed(funcName)) { const func = this._convertFunction(entity, sectionName, isClassOrObjectLiteral); docSection.functions.push(func); @@ -262,7 +262,7 @@ export class TypeDocUtils { ? this._convertMethod(entity.declaration, isConstructor, sectionName) : undefined; const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature); - const indexSignature = entity.indexSignature as TypeDocNode; + const indexSignature = entity.indexSignature; const indexSignatureIfExists = doesIndexSignatureExist ? this._convertIndexSignature(indexSignature, sectionName) : undefined; @@ -379,7 +379,7 @@ export class TypeDocUtils { } return callPath; } - private _getLowercaseSectionName(sectionName: string) { + private _getLowercaseSectionName(sectionName: string): string { if (_.startsWith(sectionName, 'ERC')) { return `${sectionName.slice(0, 3).toLowerCase()}${sectionName.slice(3)}`; } @@ -461,7 +461,7 @@ export class TypeDocUtils { const doesIndexSignatureExist = !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); if (doesIndexSignatureExist) { - const indexSignature = entity.declaration.indexSignature as TypeDocNode; + const indexSignature = entity.declaration.indexSignature; indexSignatureIfExists = this._convertIndexSignature(indexSignature, sectionName); } else if (!_.isUndefined(entity.declaration)) { const isConstructor = false; diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index 0c0e7722c..d6b2a5cf5 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -37,7 +37,7 @@ export const utils = { const charArray = _.map(text, (char, i) => { const isNumber = !_.eq(_.parseInt(char), NaN); const isPrevNumber = i !== 0 && !_.eq(_.parseInt(text[i - 1]), NaN); - if (isNumber && (i == 0 || isPrevNumber)) { + if (isNumber && (i === 0 || isPrevNumber)) { return char; } if (char === char.toUpperCase() && i !== 0) { diff --git a/packages/sol-compiler/test/compiler_test.ts b/packages/sol-compiler/test/compiler_test.ts index e41a268f2..464aa8bb6 100644 --- a/packages/sol-compiler/test/compiler_test.ts +++ b/packages/sol-compiler/test/compiler_test.ts @@ -80,7 +80,7 @@ describe('#Compiler', function(): void { it('recompilation should update artifact when source has changed', async () => { // append some meaningless data to the contract, so that its hash // will change, so that the compiler will decide to recompile it. - fsWrapper.appendFileAsync(join(contractsDir, `${contract}.sol`), ' '); + await fsWrapper.appendFileAsync(join(contractsDir, `${contract}.sol`), ' '); await new Compiler(compilerOpts).compileAsync(); diff --git a/packages/sra-report/src/index.ts b/packages/sra-report/src/index.ts index faa904441..b23b6c8d2 100644 --- a/packages/sra-report/src/index.ts +++ b/packages/sra-report/src/index.ts @@ -107,4 +107,5 @@ const mainAsync = async () => { }; await utils.newmanRunAsync(newmanRunOptions); }; -mainAsync().catch(logUtils.log); + +mainAsync().catch(logUtils.log.bind(logUtils)); diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts index 53a3d07ea..dcf880c79 100644 --- a/packages/subproviders/src/subproviders/subprovider.ts +++ b/packages/subproviders/src/subproviders/subprovider.ts @@ -53,6 +53,8 @@ export abstract class Subprovider { */ public async emitPayloadAsync(payload: Partial<JSONRPCRequestPayloadWithMethod>): Promise<JSONRPCResponsePayload> { const finalPayload = Subprovider._createFinalPayload(payload); + // Promisify does the binding internally and `this` is supplied as a second argument + // tslint:disable-next-line:no-unbound-method const response = await promisify<JSONRPCResponsePayload>(this.engine.sendAsync, this.engine)(finalPayload); return response; } diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index a20cf5621..f6b18cde3 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -42,9 +42,9 @@ "dependencies": { "lodash": "^4.17.5", "tslint": "5.11.0", - "tslint-eslint-rules": "^4.1.1", + "tslint-eslint-rules": "5.4.0", "tslint-react": "^3.2.0", - "tsutils": "2.22.2" + "tsutils": "3.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json index 93403d36b..f207d0709 100644 --- a/packages/tslint-config/tslint.json +++ b/packages/tslint-config/tslint.json @@ -77,7 +77,6 @@ "no-unnecessary-class": true, "no-unnecessary-type-assertion": true, "no-unsafe-finally": true, - "no-unused-variable": [true, "check-parameters"], "number-literal-format": true, "object-literal-key-quotes": false, "object-literal-sort-keys": false, @@ -124,5 +123,5 @@ "check-preblock" ] }, - "rulesDirectory": "lib/rules" + "rulesDirectory": "lib" } diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index f080fba21..298fa77d4 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -152,15 +152,6 @@ export enum SignerType { Trezor = 'TREZOR', } -/** - * Elliptic Curve signature - */ -export interface ECSignature { - v: number; - r: string; - s: string; -} - export enum AssetProxyId { ERC20 = '0xf47261b0', ERC721 = '0x02571792', diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 41b01c57b..e27a1fae2 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,10 +1,10 @@ import { DocsInfo, DocsMenu } from '@0xproject/react-docs'; import { colors, + constants as sharedConstants, MenuSubsectionsBySection, NestedSidebarMenu, Styles, - constants as sharedConstants, } from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; @@ -378,13 +378,16 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { </Link> {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => { if (!this._doesUrlInclude(websitePath)) { - <Link to={websitePath} className="text-decoration-none"> - <MenuItem className="py2"> - {this.props.translate.get(key, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - </MenuItem> - </Link>; + return ( + <Link to={websitePath} className="text-decoration-none"> + <MenuItem className="py2"> + {this.props.translate.get(key, Deco.Cap)}{' '} + {this.props.translate.get(Key.Docs, Deco.Cap)} + </MenuItem> + </Link> + ); } + return null; })} {!this._isViewingPortal() && ( <Link to={`${WebsitePaths.Portal}`} className="text-decoration-none"> diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index 15f118813..1bc4611e0 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -14,9 +14,9 @@ import { SideToAssetToken, TokenByAddress, } from 'ts/types'; +import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; -import { constants } from 'ts/utils/constants'; // Instead of defaulting the docs version to an empty string, we pre-populate it with // a valid version value. This does not need to be updated however, since onLoad, it diff --git a/yarn.lock b/yarn.lock index ccfec78b9..41b25d495 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4475,7 +4475,7 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" -doctrine@^0.7.2: +doctrine@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523" dependencies: @@ -13414,7 +13414,7 @@ ts-node@^7.0.0: source-map-support "^0.5.6" yn "^2.0.0" -tslib@^1.0.0, tslib@^1.8.0, tslib@^1.8.1: +tslib@1.9.0, tslib@^1.8.0, tslib@^1.8.1: version "1.9.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8" @@ -13428,13 +13428,13 @@ tslint-config-0xproject@^0.0.2: dependencies: tslint-react "^3.0.0" -tslint-eslint-rules@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-4.1.1.tgz#7c30e7882f26bc276bff91d2384975c69daf88ba" +tslint-eslint-rules@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz#e488cc9181bf193fe5cd7bfca213a7695f1737b5" dependencies: - doctrine "^0.7.2" - tslib "^1.0.0" - tsutils "^1.4.0" + doctrine "0.7.2" + tslib "1.9.0" + tsutils "^3.0.0" tslint-react@^3.0.0, tslint-react@^3.2.0: version "3.5.1" @@ -13476,25 +13476,15 @@ tslint@^5.9.1: tslib "^1.8.0" tsutils "^2.12.1" -tsutils@2.22.2: - version "2.22.2" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.22.2.tgz#0b9f3d87aa3eb95bd32d26ce2b88aa329a657951" - dependencies: - tslib "^1.8.1" - -tsutils@^1.4.0: - version "1.9.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0" - -tsutils@^2.12.1, tsutils@^2.13.1: - version "2.26.1" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.26.1.tgz#9e4a0cb9ff173863f34c22a961969081270d1878" +tsutils@3.0.0, tsutils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.0.0.tgz#0c5070a17a0503e056da038c48b5a1870a50a9ad" dependencies: tslib "^1.8.1" -tsutils@^2.27.2: - version "2.27.2" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.27.2.tgz#60ba88a23d6f785ec4b89c6e8179cac9b431f1c7" +tsutils@^2.12.1, tsutils@^2.13.1, tsutils@^2.27.2: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" dependencies: tslib "^1.8.1" -- cgit v1.2.3 From 69b436babee4959a0bb6b5c78e3ea26e2a2f9720 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> 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/0x.js/package.json | 3 +- packages/connect/package.json | 3 +- packages/contract-wrappers/package.json | 3 +- packages/ethereum-types/package.json | 3 +- packages/json-schemas/package.json | 3 +- packages/monorepo-scripts/src/publish.ts | 53 ++++++++++++---------- .../src/utils/doc_generate_and_upload_utils.ts | 12 +---- packages/order-utils/package.json | 3 +- packages/order-watcher/package.json | 3 +- packages/sol-compiler/package.json | 3 +- packages/sol-cov/package.json | 3 +- packages/subproviders/package.json | 3 +- packages/web3-wrapper/package.json | 3 +- 13 files changed, 41 insertions(+), 57 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 5911125ed..af1e47cd8 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -34,8 +34,7 @@ "assets": [ "packages/0x.js/_bundles/index.js", "packages/0x.js/_bundles/index.min.js" - ], - "shouldPublishDocs": true + ] } }, "repository": { diff --git a/packages/connect/package.json b/packages/connect/package.json index e627f3aee..5de8dae13 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -30,8 +30,7 @@ }, "config": { "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "repository": { 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": { diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json index 8ced7c1b6..73325da4b 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -16,8 +16,7 @@ }, "config": { "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "license": "Apache-2.0", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 5ee46d371..3434c9eb1 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -23,8 +23,7 @@ "config": { "postpublish": { "assets": [], - "shouldPublishDocs": true, - "omitExports": ["schemas"] + "docOmitExports": ["schemas"] } }, "repository": { diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 7e91b9281..3b5070395 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -1,6 +1,7 @@ #!/usr/bin/env node import * as promisify from 'es6-promisify'; +import * as fs from 'fs'; import * as _ from 'lodash'; import * as moment from 'moment'; import opn = require('opn'); @@ -35,12 +36,13 @@ async function confirmAsync(message: string): Promise<void> { // Fetch public, updated Lerna packages const shouldIncludePrivate = true; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); + const packagesWithDocs = getPackagesWithDocs(allUpdatedPackages); if (!configs.IS_LOCAL_PUBLISH) { await confirmAsync( 'THIS IS NOT A TEST PUBLISH! You are about to publish one or more packages to npm. Are you sure you want to continue? (y/n)', ); - await confirmDocPagesRenderAsync(allUpdatedPackages); + await confirmDocPagesRenderAsync(packagesWithDocs); } // Update CHANGELOGs @@ -74,57 +76,60 @@ async function confirmAsync(message: string): Promise<void> { utils.log(`Calling 'lerna publish'...`); await lernaPublishAsync(packageToNextVersion); const isStaging = false; - await generateAndUploadDocJsonsAsync(updatedPublicPackages, isStaging); + await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging); await publishReleaseNotesAsync(updatedPublicPackages); })().catch(err => { utils.log(err); process.exit(1); }); -async function generateAndUploadDocJsonsAsync(updatedPublicPackages: Package[], isStaging: boolean): Promise<void> { - for (const pkg of updatedPublicPackages) { - const packageName = pkg.packageJson.name; - const nameWithoutPrefix = packageName.replace('@0xproject/', ''); +function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { + const rootPackageJsonPath = `${constants.monorepoRootPath}/package.json`; + const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonPath).toString()); + const packagesWithDocPagesStringIfExist = _.get(rootPackageJson, 'configs.packagesWithDocPages', undefined); + if (_.isUndefined(packagesWithDocPagesStringIfExist)) { + return []; // None to generate & publish + } + const packagesWithDocPages = packagesWithDocPagesStringIfExist.split(' '); + const updatedPackagesWithDocPages: Package[] = []; + _.each(allUpdatedPackages, pkg => { + const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); + if (_.includes(packagesWithDocPages, nameWithoutPrefix)) { + updatedPackagesWithDocPages.push(pkg); + } + }); + return updatedPackagesWithDocPages; +} + +async function generateAndUploadDocJsonsAsync(packagesWithDocs: Package[], isStaging: boolean): Promise<void> { + for (const pkg of packagesWithDocs) { + const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); const shouldUploadDocs = true; const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); } } -async function confirmDocPagesRenderAsync(packages: Package[]): Promise<void> { +async function confirmDocPagesRenderAsync(packagesWithDocs: Package[]): Promise<void> { // push docs to staging utils.log("Upload all docJson's to S3 staging..."); const isStaging = true; - await generateAndUploadDocJsonsAsync(packages, isStaging); + await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging); // deploy website to staging utils.log('Deploy website to staging...'); const pathToWebsite = `${constants.monorepoRootPath}/packages/website`; await execAsync(`yarn deploy_staging`, { cwd: pathToWebsite }); - const packagesWithDocs = _.filter(packages, pkg => { - const scriptsIfExists = pkg.packageJson.scripts; - if (_.isUndefined(scriptsIfExists)) { - throw new Error('Found a public package without any scripts in package.json'); - } - return !_.isUndefined(scriptsIfExists[DOC_GEN_COMMAND]); - }); _.each(packagesWithDocs, pkg => { const name = pkg.packageJson.name; const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0xproject/')[1] : name; - const docSegmentIfExists = nameWithoutPrefix; - if (_.isUndefined(docSegmentIfExists)) { - throw new Error( - `Found package '${name}' with doc commands but no corresponding docSegment in monorepo_scripts -package.ts. Please add an entry for it and try again.`, - ); - } - const link = `${constants.stagingWebsite}/docs/${docSegmentIfExists}`; + const link = `${constants.stagingWebsite}/docs/${nameWithoutPrefix}`; // tslint:disable-next-line:no-floating-promises opn(link); }); - await confirmAsync('Do all the doc pages render properly? (y/n)'); + await confirmAsync('Do all the doc pages render? (y/n)'); } async function pushChangelogsToGithubAsync(): Promise<void> { diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 1645ba0d6..5fee98b63 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -173,22 +173,12 @@ export class DocGenerateAndUploadUtils { throw new Error(`Couldn't find a package.json for ${packageName}`); } this._packageJson = pkg.packageJson; - this._omitExports = _.get(this._packageJson, 'config.postpublish.omitExports', []); + this._omitExports = _.get(this._packageJson, 'config.postpublish.docOmitExports', []); const indexPath = `${this._packagePath}/src/index.ts`; const exportInfo = DocGenerateAndUploadUtils._getExportPathToExportedItems(indexPath, this._omitExports); this._exportPathToExportedItems = exportInfo.exportPathToExportedItems; this._exportPathOrder = exportInfo.exportPathOrder; - - const shouldPublishDocs = !!_.get(this._packageJson, 'config.postpublish.shouldPublishDocs'); - if (!shouldPublishDocs) { - utils.log( - `GENERATE_UPLOAD_DOCS: ${ - this._packageJson.name - } packageJson.config.postpublish.shouldPublishDocs is false. Skipping doc JSON generation.`, - ); - return; - } } public async generateAndUploadDocsAsync(): Promise<void> { // For each dep that is another one of our monorepo packages, we fetch it's index.ts diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index dc6d8328d..dbccded86 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -27,8 +27,7 @@ "config": { "contracts_v2_beta": "IWallet IValidator Exchange ERC20Proxy ERC20Token DummyERC20Token", "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "license": "Apache-2.0", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 37a1c20e4..121f3f3f4 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -31,8 +31,7 @@ "config": { "contracts_v2_beta": "AssetProxyOwner ERC20Proxy ERC20Token ERC721Proxy ERC721Token Exchange Forwarder OrderValidator WETH9 ZRXToken", "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "repository": { diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index d5cb2509b..e13a28efa 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -25,8 +25,7 @@ }, "config": { "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "bin": { diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index dfeee4a81..a6c383b6f 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -26,8 +26,7 @@ "config": { "postpublish": { "assets": [], - "shouldPublishDocs": true, - "omitExports": ["ProfilerSubprovider", "RevertTraceSubprovider"] + "docOmitExports": ["ProfilerSubprovider", "RevertTraceSubprovider"] } }, "repository": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 8b8c06c25..38b99c976 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -25,8 +25,7 @@ }, "config": { "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "dependencies": { diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index f7278004d..d584db453 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -22,8 +22,7 @@ }, "config": { "postpublish": { - "assets": [], - "shouldPublishDocs": true + "assets": [] } }, "license": "Apache-2.0", -- cgit v1.2.3 From 167c4f851945e86eb08502b3f85fcb8befb2508e Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 23:24:54 +0100 Subject: Fix changelogs --- packages/contract-wrappers/CHANGELOG.json | 4 ++-- packages/ethereum-types/CHANGELOG.json | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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 }, { diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json index b001f6af3..64c6e6d27 100644 --- a/packages/ethereum-types/CHANGELOG.json +++ b/packages/ethereum-types/CHANGELOG.json @@ -48,7 +48,8 @@ "pr": 812 }, { - "note": "Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField`" + "note": "Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField`", + "pr": 924 } ] }, -- cgit v1.2.3 From a6cdc38d532b897442bac74bc3fd1735c85317ba Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 23:25:06 +0100 Subject: Add/improve comments --- .../contract-wrappers/src/contract_wrappers/exchange_wrapper.ts | 2 +- packages/ethereum-types/src/index.ts | 8 ++++---- packages/monorepo-scripts/src/doc_gen_configs.ts | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) 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. */ diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index 5ace18452..d21f69b79 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -20,7 +20,7 @@ export type ConstructorStateMutability = 'nonpayable' | 'payable'; export type StateMutability = 'pure' | 'view' | ConstructorStateMutability; export interface MethodAbi { - type: 'function'; + type: 'function'; // We hardcode this here b/c doc pages cannot render an enum value name: string; inputs: DataItem[]; outputs: DataItem[]; @@ -30,14 +30,14 @@ export interface MethodAbi { } export interface ConstructorAbi { - type: 'constructor'; + type: 'constructor'; // We hardcode this here b/c doc pages cannot render an enum value inputs: DataItem[]; payable: boolean; stateMutability: ConstructorStateMutability; } export interface FallbackAbi { - type: 'fallback'; + type: 'fallback'; // We hardcode this here b/c doc pages cannot render an enum value payable: boolean; } @@ -46,7 +46,7 @@ export interface EventParameter extends DataItem { } export interface EventAbi { - type: 'event'; + type: 'event'; // We hardcode this here b/c doc pages cannot render an enum value name: string; inputs: EventParameter[]; anonymous: boolean; diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index fb6cc0886..6d7560943 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -1,7 +1,10 @@ import { DocGenConfigs } from './types'; export const docGenConfigs: DocGenConfigs = { + // Versions our doc JSON format so we can handle breaking changes intelligently DOC_JSON_VERSION: '0.0.1', + // Some types that are exposed by our package's public interface are external types. As such, we won't + // be able to render their definitions. Instead we link to them using this lookup. EXTERNAL_TYPE_TO_LINK: { Array: 'https://developer.mozilla.org/pt-PT/docs/Web/JavaScript/Reference/Global_Objects/Array', BigNumber: 'http://mikemcl.github.io/bignumber.js', @@ -25,6 +28,9 @@ export const docGenConfigs: DocGenConfigs = { Schema: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/index.d.ts#L49', ValidatorResult: 'https://github.com/tdegrunt/jsonschema/blob/v1.2.4/lib/helpers.js#L31', }, + // Sometimes we want to hide a constructor from rendering in our docs. An example is when our library has a + // factory method which instantiates an instance of a class, but we don't want users instantiating it themselves + // and getting confused. Any class name in this list will not have it's constructor rendered in our docs. CLASSES_WITH_HIDDEN_CONSTRUCTORS: [ 'ERC20ProxyWrapper', 'ERC20TokenWrapper', -- cgit v1.2.3 From 27d329ff2559c643b54489d0796bb2c2fcda264f Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Wed, 22 Aug 2018 23:44:46 +0100 Subject: Replace complicated camelCase to spaces logic with change-case package --- packages/react-shared/package.json | 1 + packages/react-shared/src/utils/utils.ts | 21 +---- yarn.lock | 140 ++++++++++++++++++++++++++++++- 3 files changed, 140 insertions(+), 22 deletions(-) diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 5df4648ee..d73d6c162 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -41,6 +41,7 @@ "@types/react-dom": "*", "@types/react-scroll": "1.5.3", "basscss": "^8.0.3", + "change-case": "^3.0.2", "is-mobile": "^0.2.2", "lodash": "^4.17.5", "material-ui": "^0.17.1", diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index d6b2a5cf5..15c55c04b 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -1,3 +1,4 @@ +import changeCase = require('change-case'); import isMobile = require('is-mobile'); import * as _ from 'lodash'; import { scroller } from 'react-scroll'; @@ -34,25 +35,7 @@ export const utils = { return text.replace(/-/g, ' '); }, convertCamelCaseToSpaces(text: string): string { - const charArray = _.map(text, (char, i) => { - const isNumber = !_.eq(_.parseInt(char), NaN); - const isPrevNumber = i !== 0 && !_.eq(_.parseInt(text[i - 1]), NaN); - if (isNumber && (i === 0 || isPrevNumber)) { - return char; - } - if (char === char.toUpperCase() && i !== 0) { - return ` ${char}`; - } - return char; - }); - let finalText = charArray.join(''); - const exceptions = { 'EIP ': 'E I P', 'ZRX ': 'Z R X', 'ERC ': 'E R C', RPC: 'R P C' }; - _.each(exceptions, (spaced, normal) => { - if (_.includes(finalText, spaced)) { - finalText = finalText.replace(spaced, normal); - } - }); - return finalText; + return changeCase.snake(text).replace(/_/g, ' '); }, getEtherScanLinkIfExists( addressOrTxHash: string, diff --git a/yarn.lock b/yarn.lock index 41b25d495..63b90568d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3013,6 +3013,13 @@ callsites@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca" +camel-case@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.1" + camelcase-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" @@ -3151,6 +3158,29 @@ chalk@~0.4.0: has-color "~0.1.0" strip-ansi "~0.1.0" +change-case@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037" + dependencies: + camel-case "^3.0.0" + constant-case "^2.0.0" + dot-case "^2.1.0" + header-case "^1.0.0" + is-lower-case "^1.1.0" + is-upper-case "^1.1.0" + lower-case "^1.1.1" + lower-case-first "^1.0.0" + no-case "^2.3.2" + param-case "^2.1.0" + pascal-case "^2.0.0" + path-case "^2.1.0" + sentence-case "^2.1.0" + snake-case "^2.1.0" + swap-case "^1.1.0" + title-case "^2.1.0" + upper-case "^1.1.1" + upper-case-first "^1.1.0" + change-emitter@^0.1.2: version "0.1.6" resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515" @@ -3617,6 +3647,13 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +constant-case@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" + dependencies: + snake-case "^2.1.0" + upper-case "^1.1.1" + constants-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" @@ -4532,6 +4569,12 @@ domutils@^1.5.1: dom-serializer "0" domelementtype "1" +dot-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee" + dependencies: + no-case "^2.2.0" + dot-prop@^3.0.0: version "3.0.0" resolved "http://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177" @@ -5230,9 +5273,9 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22: - version "3.0.18" - resolved "https://codeload.github.com/0xproject/ethers.js/tar.gz/b91342bd200d142af0165d6befddf783c8ae8447" +ethers@3.0.22: + version "3.0.22" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" dependencies: aes-js "3.0.0" bn.js "^4.4.0" @@ -6651,6 +6694,13 @@ he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" +header-case@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d" + dependencies: + no-case "^2.2.0" + upper-case "^1.1.3" + heap@~0.2.6: version "0.2.6" resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" @@ -7291,6 +7341,12 @@ is-installed-globally@^0.1.0: global-dirs "^0.1.0" is-path-inside "^1.0.0" +is-lower-case@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393" + dependencies: + lower-case "^1.1.0" + is-mobile@0.2.2, is-mobile@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-0.2.2.tgz#0e2e006d99ed2c2155b761df80f2a3619ae2ad9f" @@ -7445,6 +7501,12 @@ is-unc-path@^1.0.0: dependencies: unc-path-regex "^0.1.2" +is-upper-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f" + dependencies: + upper-case "^1.1.0" + is-url@^1.1.0: version "1.2.4" resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" @@ -8467,6 +8529,16 @@ loud-rejection@^1.0.0: currently-unhandled "^0.4.1" signal-exit "^3.0.0" +lower-case-first@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1" + dependencies: + lower-case "^1.1.2" + +lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac" + lowercase-keys@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" @@ -9147,6 +9219,12 @@ nise@^1.2.0: path-to-regexp "^1.7.0" text-encoding "^0.6.4" +no-case@^2.2.0, no-case@^2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" + dependencies: + lower-case "^1.1.1" + nock@^9.2.3: version "9.2.5" resolved "https://registry.yarnpkg.com/nock/-/nock-9.2.5.tgz#c131fc8d3c4723f386be0269739638be84733f2f" @@ -9851,6 +9929,12 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" +param-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247" + dependencies: + no-case "^2.2.0" + parse-asn1@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8" @@ -9942,6 +10026,13 @@ parseurl@~1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" +pascal-case@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e" + dependencies: + camel-case "^3.0.0" + upper-case-first "^1.1.0" + pascalcase@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" @@ -9950,6 +10041,12 @@ path-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a" +path-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5" + dependencies: + no-case "^2.2.0" + path-dirname@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" @@ -12058,6 +12155,13 @@ send@0.16.2: range-parser "~1.2.0" statuses "~1.4.0" +sentence-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4" + dependencies: + no-case "^2.2.0" + upper-case-first "^1.1.2" + sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" @@ -12299,6 +12403,12 @@ slugify@^1.2.1: version "1.3.1" resolved "https://registry.npmjs.org/slugify/-/slugify-1.3.1.tgz#f572127e8535329fbc6c1edb74ab856b61ad7de2" +snake-case@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" + dependencies: + no-case "^2.2.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -12972,6 +13082,13 @@ swagger-schema-official@2.0.0-bab6bed: version "2.0.0-bab6bed" resolved "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd" +swap-case@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3" + dependencies: + lower-case "^1.1.1" + upper-case "^1.1.1" + swarm-js@0.1.37: version "0.1.37" resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.37.tgz#27d485317a340bbeec40292af783cc10acfa4663" @@ -13257,6 +13374,13 @@ tiny-queue@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/tiny-queue/-/tiny-queue-0.2.0.tgz#c49fcb5c87555be1b4a5df7eb87101d5b78bc9dc" +title-case@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa" + dependencies: + no-case "^2.2.0" + upper-case "^1.0.3" + tmp@0.0.31: version "0.0.31" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7" @@ -13842,6 +13966,16 @@ update-notifier@^2.3.0: semver-diff "^2.0.0" xdg-basedir "^3.0.0" +upper-case-first@^1.1.0, upper-case-first@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115" + dependencies: + upper-case "^1.1.1" + +upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598" + uri-js@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa" -- cgit v1.2.3 From 04e4fe251a4c791239ec893b94ae7f4a7f9d0b53 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 00:08:21 +0100 Subject: Prettier fix --- packages/react-shared/src/utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts index 15c55c04b..142aea85d 100644 --- a/packages/react-shared/src/utils/utils.ts +++ b/packages/react-shared/src/utils/utils.ts @@ -35,7 +35,7 @@ export const utils = { return text.replace(/-/g, ' '); }, convertCamelCaseToSpaces(text: string): string { - return changeCase.snake(text).replace(/_/g, ' '); + return changeCase.snake(text).replace(/_/g, ' '); }, getEtherScanLinkIfExists( addressOrTxHash: string, -- cgit v1.2.3 From 1417ee2ccb256f927ec0b9ef394d6ec2fdb2fccc Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 00:08:45 +0100 Subject: Break with -1 so that the exit code of the loop if hit is non-zero --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a71df691c..60bdb4dff 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "rebuild:no_website": "run-s clean build:no_website", "test": "wsrun test $PKG --fast-exit --serial --exclude-missing", "generate_doc": "node ./packages/monorepo-scripts/lib/doc_generate_and_upload.js", - "test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break; done;", + "test:generate_docs:circleci": "for i in ${npm_package_config_packagesWithDocPages}; do yarn generate_doc --package $i --shouldUpload false --isStaging true || break -1; done;", "lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing", "comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete." }, -- cgit v1.2.3 From 2cef8d3a3e16aa8f59ae944c9a29b1faef272609 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 00:23:19 +0100 Subject: Missing/superfluous type exports from connect --- packages/connect/src/index.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts index abc105891..0b9cad038 100644 --- a/packages/connect/src/index.ts +++ b/packages/connect/src/index.ts @@ -11,9 +11,13 @@ export { OrderbookResponse, OrdersRequestOpts, PagedRequestOpts, - AssetPairsItem, AssetPairsRequestOpts, - Asset, + RequestOpts, + AssetPairsResponse, + FeeRecipientsResponse, + APIOrder, + OrdersResponse, + PaginatedCollection, } from './types'; export { SignedOrder } from '@0xproject/types'; -- cgit v1.2.3 From 2a635929949c8d8c867b3a2e0297e74e0bd151a3 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 00:23:33 +0100 Subject: update yarn.lock --- yarn.lock | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 9972f67cd..8d5a8ad20 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5287,9 +5287,9 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethers@3.0.22: - version "3.0.22" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" +ethers@0xproject/ethers.js#eip-838-reasons, ethers@3.0.22: + version "3.0.18" + resolved "https://codeload.github.com/0xproject/ethers.js/tar.gz/b91342bd200d142af0165d6befddf783c8ae8447" dependencies: aes-js "3.0.0" bn.js "^4.4.0" @@ -14115,6 +14115,10 @@ uuid@^2.0.1: version "2.0.3" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" +uuid@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + uvm@1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/uvm/-/uvm-1.7.0.tgz#685d3a149ec7118fb73a73dfdc158ab46b0f0634" -- cgit v1.2.3 From 2b38163274de9621160d54a8d809284c0b353cc4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 13:56:40 +0100 Subject: Enable dry run of release publishing and handle git tags existing --- packages/monorepo-scripts/src/publish.ts | 12 ++++--- .../monorepo-scripts/src/publish_release_notes.ts | 13 ++++++- .../src/utils/github_release_utils.ts | 40 ++++++++++++++++------ 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 3b5070395..d27baf5f8 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -76,8 +76,10 @@ async function confirmAsync(message: string): Promise<void> { utils.log(`Calling 'lerna publish'...`); await lernaPublishAsync(packageToNextVersion); const isStaging = false; - await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging); - await publishReleaseNotesAsync(updatedPublicPackages); + const shouldUploadDocs = !configs.IS_LOCAL_PUBLISH; + await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs); + const isDryRun = configs.IS_LOCAL_PUBLISH; + await publishReleaseNotesAsync(updatedPublicPackages, isDryRun); })().catch(err => { utils.log(err); process.exit(1); @@ -101,10 +103,9 @@ function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { return updatedPackagesWithDocPages; } -async function generateAndUploadDocJsonsAsync(packagesWithDocs: Package[], isStaging: boolean): Promise<void> { +async function generateAndUploadDocJsonsAsync(packagesWithDocs: Package[], isStaging: boolean, shouldUploadDocs: boolean): Promise<void> { for (const pkg of packagesWithDocs) { const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); - const shouldUploadDocs = true; const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); } @@ -114,7 +115,8 @@ async function confirmDocPagesRenderAsync(packagesWithDocs: Package[]): Promise< // push docs to staging utils.log("Upload all docJson's to S3 staging..."); const isStaging = true; - await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging); + const shouldUploadDocs = true; + await generateAndUploadDocJsonsAsync(packagesWithDocs, isStaging, shouldUploadDocs); // deploy website to staging utils.log('Deploy website to staging...'); diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 5afcc8775..1a0ec59e5 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -1,10 +1,21 @@ +import * as yargs from 'yargs'; + import { publishReleaseNotesAsync } from './utils/github_release_utils'; import { utils } from './utils/utils'; +const args = yargs + .option('isDryRun', { + describe: 'Whether we wish to do a dry run, not committing anything to Github', + type: 'boolean', + demandOption: true, + }) + .example('$0 --isDryRun true', 'Full usage example').argv; + // tslint:disable-next-line:no-floating-promises (async () => { + const isDryRun = args.isDryRun; const shouldIncludePrivate = false; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); - await publishReleaseNotesAsync(allUpdatedPackages); + await publishReleaseNotesAsync(allUpdatedPackages, isDryRun); })(); diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 28dce70ac..43d0d9fc3 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -12,7 +12,7 @@ import { utils } from './utils'; const publishReleaseAsync = promisify(publishRelease); // tslint:disable-next-line:completed-docs -export async function publishReleaseNotesAsync(updatedPublishPackages: Package[]): Promise<void> { +export async function publishReleaseNotesAsync(updatedPublishPackages: Package[], isDryRun: boolean): Promise<void> { // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); const latestGitCommit = result.stdout; @@ -20,10 +20,22 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] const shortenedGitCommit = latestGitCommit.slice(0, prefixLength); const tagName = `monorepo@${shortenedGitCommit}`; - await execAsync(`git rev-parse ${tagName}`); - await execAsync(`git tag ${tagName}`); + if (!isDryRun) { + try { + await execAsync(`git tag ${tagName}`); + } catch (err) { + if (_.includes(err.message, 'already exists')) { + // Noop tag creation since already exists + } else { + throw err; + } + } + const {stdout} = await execAsync(`git ls-remote --tags origin refs/tags/${tagName}`); + if (_.isEmpty(stdout)) { + await execAsync(`git push origin ${tagName}`); + } + } - await execAsync(`git push origin ${tagName}`); const releaseName = `0x monorepo - ${shortenedGitCommit}`; let assets: string[] = []; @@ -42,11 +54,7 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] }); const finalAssets = adjustAssetPaths(assets); - utils.log('Publishing release notes ', releaseName, '...'); - // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded - // Ideally we would like to name the assets after the package they are from - // Source: https://github.com/remixz/publish-release/issues/39 - await publishReleaseAsync({ + const publishReleaseConfigs = { token: constants.githubPersonalAccessToken, owner: '0xProject', tag: tagName, @@ -58,7 +66,19 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] reuseRelease: true, reuseDraftOnly: false, assets: finalAssets, - }); + }; + + if (isDryRun) { + utils.log(`Dry run: stopping short of publishing release notes to github`); + utils.log(`Would publish with configs:\n${JSON.stringify(publishReleaseConfigs, null, '\t')}`); + return; + } + + utils.log('Publishing release notes ', releaseName, '...'); + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 + await publishReleaseAsync(publishReleaseConfigs); } // Asset paths should described from the monorepo root. This method prefixes -- cgit v1.2.3 From 15a34dca790dc2ef25b302c2b2d50524865d2954 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 13:58:49 +0100 Subject: Fix prettier issues --- packages/monorepo-scripts/src/publish.ts | 6 +++++- packages/monorepo-scripts/src/utils/github_release_utils.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index d27baf5f8..d9e09bdeb 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -103,7 +103,11 @@ function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { return updatedPackagesWithDocPages; } -async function generateAndUploadDocJsonsAsync(packagesWithDocs: Package[], isStaging: boolean, shouldUploadDocs: boolean): Promise<void> { +async function generateAndUploadDocJsonsAsync( + packagesWithDocs: Package[], + isStaging: boolean, + shouldUploadDocs: boolean, +): Promise<void> { for (const pkg of packagesWithDocs) { const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs); diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 43d0d9fc3..9b5b26d7e 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -24,13 +24,13 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] try { await execAsync(`git tag ${tagName}`); } catch (err) { - if (_.includes(err.message, 'already exists')) { + if (_.includes(err.message, 'already exists')) { // Noop tag creation since already exists } else { throw err; } } - const {stdout} = await execAsync(`git ls-remote --tags origin refs/tags/${tagName}`); + const { stdout } = await execAsync(`git ls-remote --tags origin refs/tags/${tagName}`); if (_.isEmpty(stdout)) { await execAsync(`git push origin ${tagName}`); } -- cgit v1.2.3 From 0577ab96b8056b05dca1024227af53dad4ef5322 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:29:22 +0100 Subject: Upgrade Typedoc to 0.12.0, which works with TS 3.x --- packages/0x.js/package.json | 2 +- packages/connect/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/json-schemas/package.json | 2 +- packages/monorepo-scripts/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sol-cov/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/web3-wrapper/package.json | 2 +- yarn.lock | 92 ++++++++++++++++----------------- 11 files changed, 56 insertions(+), 56 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index af1e47cd8..755de9e18 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -68,7 +68,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", "webpack": "^3.1.0" }, diff --git a/packages/connect/package.json b/packages/connect/package.json index 13326df9b..f5772cf4d 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -76,7 +76,7 @@ "nyc": "^11.0.1", "shx": "^0.2.2", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1" }, "publishConfig": { 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" }, diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 3434c9eb1..c67d15d6c 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -58,7 +58,7 @@ "nyc": "^11.0.1", "shx": "^0.2.2", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1" }, "publishConfig": { diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 74be99550..551695129 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -65,7 +65,7 @@ "semver": "5.5.0", "semver-diff": "^2.1.0", "semver-sort": "0.0.4", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "yargs": "^10.0.3" }, "publishConfig": { diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index dbccded86..0d82affef 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -55,7 +55,7 @@ "shx": "^0.2.2", "sinon": "^4.0.0", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1" }, "dependencies": { diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index e13a28efa..ee7dffe30 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -58,7 +58,7 @@ "nyc": "^11.0.1", "shx": "^0.2.2", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "types-bn": "^0.0.1", "typescript": "3.0.1", "web3-typescript-typings": "^0.10.2", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index a6c383b6f..2bf09e63a 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -76,7 +76,7 @@ "shx": "^0.2.2", "sinon": "^4.0.0", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1" }, "publishConfig": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 38b99c976..521785998 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -71,7 +71,7 @@ "shx": "^0.2.2", "sinon": "^4.0.0", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1", "webpack": "^3.1.0" }, diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index d584db453..3b347ac6f 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -49,7 +49,7 @@ "nyc": "^11.0.1", "shx": "^0.2.2", "tslint": "5.11.0", - "typedoc": "0xProject/typedoc", + "typedoc": "0.12.0", "typescript": "3.0.1" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index 8d5a8ad20..06be65d8a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -966,9 +966,9 @@ version "2.0.0" resolved "https://registry.yarnpkg.com/@types/find-versions/-/find-versions-2.0.0.tgz#a976ca032ab8dd1161116604eded0620d2b85df2" -"@types/fs-extra@5.0.0": - version "5.0.0" - resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.0.tgz#d3e225b35eb5c6d3a5a782c28219df365c781413" +"@types/fs-extra@^5.0.3": + version "5.0.4" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599" dependencies: "@types/node" "*" @@ -980,23 +980,23 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/handlebars@4.0.36": - version "4.0.36" - resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.36.tgz#ff57c77fa1ab6713bb446534ddc4d979707a3a79" - "@types/handlebars@^4.0.36": version "4.0.37" resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.37.tgz#a3bc3eba0c0f03f753cac00841a5b21e26a02c03" +"@types/handlebars@^4.0.38": + version "4.0.39" + resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.39.tgz#961fb54db68030890942e6aeffe9f93a957807bd" + "@types/hdkey@^0.7.0": version "0.7.0" resolved "https://registry.yarnpkg.com/@types/hdkey/-/hdkey-0.7.0.tgz#6734d138e3c597f241be8fae2e60c2949bc3af87" dependencies: "@types/node" "*" -"@types/highlight.js@9.12.2": - version "9.12.2" - resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.2.tgz#6ee7cd395effe5ec80b515d3ff1699068cd0cd1d" +"@types/highlight.js@^9.12.3": + version "9.12.3" + resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca" "@types/history@*": version "4.6.2" @@ -1040,17 +1040,17 @@ version "4.14.104" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80" -"@types/lodash@4.14.99": - version "4.14.99" - resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.99.tgz#e6e10c0a4cc16c7409b3181f1e66880d2fb7d4dc" +"@types/lodash@^4.14.110": + version "4.14.116" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9" "@types/loglevel@^1.5.3": version "1.5.3" resolved "https://registry.yarnpkg.com/@types/loglevel/-/loglevel-1.5.3.tgz#adfce55383edc5998a2170ad581b3e23d6adb5b8" -"@types/marked@0.3.0": - version "0.3.0" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.3.0.tgz#583c223dd33385a1dda01aaf77b0cd0411c4b524" +"@types/marked@^0.4.0": + version "0.4.0" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.0.tgz#057a6165703e7419217f8ffc6887747f980b6315" "@types/material-ui@0.18.0": version "0.18.0" @@ -1228,9 +1228,9 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" -"@types/shelljs@0.7.7": - version "0.7.7" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.7.tgz#1f7bfa28947661afea06365db9b1135bbc903ec4" +"@types/shelljs@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632" dependencies: "@types/glob" "*" "@types/node" "*" @@ -5935,6 +5935,14 @@ fs-extra@^5.0.0: jsonfile "^4.0.0" universalify "^0.1.0" +fs-extra@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.0.tgz#8cc3f47ce07ef7b3593a11b9fb245f7e34c041d6" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-minipass@^1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz#06c277218454ec288df77ada54a03b8702aacb9d" @@ -8658,9 +8666,9 @@ marked@0.3.18: version "0.3.18" resolved "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz#3ef058cd926101849b92a7a7c15db18c7fc76b2f" -marked@^0.3.12: - version "0.3.19" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.19.tgz#5d47f709c4c9fc3c216b6d46127280f40b39d790" +marked@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" material-ui@0.17.4, material-ui@^0.17.1: version "0.17.4" @@ -12325,7 +12333,7 @@ shelljs@^0.7.3: interpret "^1.0.0" rechoir "^0.6.2" -shelljs@^0.8.0: +shelljs@^0.8.0, shelljs@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.2.tgz#345b7df7763f4c2340d584abb532c5f752ca9e35" dependencies: @@ -12333,14 +12341,6 @@ shelljs@^0.8.0: interpret "^1.0.0" rechoir "^0.6.2" -shelljs@^0.8.1: - version "0.8.1" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shx@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/shx/-/shx-0.2.2.tgz#0a304d020b0edf1306ad81570e80f0346df58a39" @@ -13687,27 +13687,27 @@ typedoc-default-themes@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz#6dc2433e78ed8bea8e887a3acde2f31785bd6227" -typedoc@0xProject/typedoc: - version "0.10.0" - resolved "https://codeload.github.com/0xProject/typedoc/tar.gz/a9970a52f0924fec2df608abe30ff81153b3def2" +typedoc@0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.12.0.tgz#c5d606f52af29d841658e18d9faa1a72acf0e270" dependencies: - "@types/fs-extra" "5.0.0" - "@types/handlebars" "4.0.36" - "@types/highlight.js" "9.12.2" - "@types/lodash" "4.14.99" - "@types/marked" "0.3.0" + "@types/fs-extra" "^5.0.3" + "@types/handlebars" "^4.0.38" + "@types/highlight.js" "^9.12.3" + "@types/lodash" "^4.14.110" + "@types/marked" "^0.4.0" "@types/minimatch" "3.0.3" - "@types/shelljs" "0.7.7" - fs-extra "^5.0.0" + "@types/shelljs" "^0.8.0" + fs-extra "^7.0.0" handlebars "^4.0.6" highlight.js "^9.0.0" - lodash "^4.13.1" - marked "^0.3.12" + lodash "^4.17.10" + marked "^0.4.0" minimatch "^3.0.0" progress "^2.0.0" - shelljs "^0.8.1" + shelljs "^0.8.2" typedoc-default-themes "^0.5.0" - typescript "2.7.1" + typescript "3.0.x" types-bn@^0.0.1: version "0.0.1" @@ -13719,7 +13719,7 @@ typescript@2.7.1: version "2.7.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.7.1.tgz#bb3682c2c791ac90e7c6210b26478a8da085c359" -typescript@3.0.1: +typescript@3.0.1, typescript@3.0.x: version "3.0.1" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.0.1.tgz#43738f29585d3a87575520a4b93ab6026ef11fdb" -- cgit v1.2.3 From f0f4f873a9226d55da8d5339a4918b74f281b1b9 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:29:32 +0100 Subject: Fix double assignment --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 5fee98b63..0768b14b5 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -77,7 +77,7 @@ export class DocGenerateAndUploadUtils { ); }); } else if (_.isObject(nodeValue)) { - updatedReferenceNames = updatedReferenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( + updatedReferenceNames = DocGenerateAndUploadUtils._getAllReferenceNames( innerPropertyName, nodeValue, updatedReferenceNames, -- cgit v1.2.3 From aa9efd79dbf90bef4aa3d3ff069cd9772d16a460 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:52:52 +0100 Subject: Fix CHANGELOG entry --- packages/connect/CHANGELOG.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 514ebb039..1d0efac95 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -5,13 +5,7 @@ { "note": "Updated for SRA v2", "pr": 974 - } - ] - }, - { - "timestamp": 1534210131, - "version": "2.0.0", - "changes": [ + }, { "note": "Stopped exporting `Order` type", "pr": 924 -- cgit v1.2.3 From 6c7dca7d07d7076371e48935c79a05c0fd40ce96 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:53:04 +0100 Subject: Remove superfluous dep --- packages/migrations/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 8f2a94d96..f48b13adb 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -39,7 +39,6 @@ "@0xproject/dev-utils": "^1.0.4", "@0xproject/tslint-config": "^1.0.5", "@0xproject/types": "^1.0.1-rc.4", - "@0xproject/sol-compiler": "^1.0.5", "@types/yargs": "^10.0.0", "copyfiles": "^2.0.0", "make-promises-safe": "^1.1.0", -- cgit v1.2.3 From ae937cfcce0e751bc931a8f05df0b67b62962023 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:53:16 +0100 Subject: Add catch and exit with non-zero --- packages/monorepo-scripts/src/publish_release_notes.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 1a0ec59e5..13cf0d85d 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -11,11 +11,13 @@ const args = yargs }) .example('$0 --isDryRun true', 'Full usage example').argv; -// tslint:disable-next-line:no-floating-promises (async () => { const isDryRun = args.isDryRun; const shouldIncludePrivate = false; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); await publishReleaseNotesAsync(allUpdatedPackages, isDryRun); -})(); +})().catch(err => { + utils.log(err); + process.exit(1); +}); -- cgit v1.2.3 From 29a9e1fc4ec6bc902dc8e76a4af712f2dff4ffb6 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 14:53:32 +0100 Subject: Look for all TS mapped types --- packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 0768b14b5..de52b3a47 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -56,12 +56,12 @@ export class DocGenerateAndUploadUtils { // Some nodes of type reference are for subtypes, which we don't want to return. // We therefore filter them out. const SUB_TYPE_PROPERTY_NAMES = ['inheritedFrom', 'overwrites', 'extendedTypes', 'implementationOf']; + const TS_MAPPED_TYPES = ['Partial', 'Promise', 'Readonly', 'Pick', 'Record']; if ( !_.isUndefined(node.type) && _.isString(node.type) && node.type === 'reference' && - node.name !== 'Partial' && - node.name !== 'Promise' && + !_.includes(TS_MAPPED_TYPES, node.name) && !_.includes(SUB_TYPE_PROPERTY_NAMES, propertyName) ) { updatedReferenceNames = _.uniq([...referenceNames, node.name]); -- cgit v1.2.3 From 610caef73faf735a9b9f38863acee007280151be Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 15:08:02 +0100 Subject: Fix comments --- packages/monorepo-scripts/src/utils/github_release_utils.ts | 11 +++-------- packages/react-docs/src/utils/typedoc_utils.ts | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 9b5b26d7e..0f3485de0 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -65,6 +65,9 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] prerelease: false, reuseRelease: true, reuseDraftOnly: false, + // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded + // Ideally we would like to name the assets after the package they are from + // Source: https://github.com/remixz/publish-release/issues/39 assets: finalAssets, }; @@ -75,9 +78,6 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] } utils.log('Publishing release notes ', releaseName, '...'); - // TODO: Currently publish-release doesn't let you specify the labels for each asset uploaded - // Ideally we would like to name the assets after the package they are from - // Source: https://github.com/remixz/publish-release/issues/39 await publishReleaseAsync(publishReleaseConfigs); } @@ -107,11 +107,6 @@ function getReleaseNotesForPackage(packageName: string, version: string): string if (latestLog.changes.length === 1 && latestLog.changes[0].note === constants.dependenciesUpdatedMessage) { return ''; } - // We sanity check that the version for the changelog notes we are about to publish to Github - // correspond to the new version of the package. - // if (version !== latestLog.version) { - // throw new Error('Expected CHANGELOG.json latest entry version to coincide with published version.'); - // } let notes = ''; _.each(latestLog.changes, change => { notes += `* ${change.note}`; diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 76443ad81..b867b51b4 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -40,7 +40,6 @@ export class TypeDocUtils { this._externalExportToLink = generatedDocJson.metadata.externalExportToLink; this._typeDocJson = generatedDocJson.typedocJson; - // TODO: Extract the non typeDoc exports, and render them somehow this._typeDocNameOrder = _.compact( _.flatten( _.map(exportPathOrder, exportPath => { -- cgit v1.2.3 From ae154f43df9909dde734a36e274d2dc1b7039c31 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 15:08:12 +0100 Subject: Remove docs catch-all endpoint --- packages/website/ts/index.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 07f34782f..981c6f2cb 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -151,7 +151,6 @@ render( component={LazySolCompilerDocumentation} /> <Route path={WebsiteLegacyPaths.Jobs} component={Jobs as any} /> - <Route path={`${WebsitePaths.Docs}`} component={LazyZeroExJSDocumentation} /> <Route component={NotFound as any} /> </Switch> </div> -- cgit v1.2.3 From 52e2c603619338c6c963c1bca92a799383a2c4f4 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 15:12:34 +0100 Subject: Improve doc commebnt --- packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts index 17fe59368..6afd71422 100644 --- a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts @@ -15,9 +15,10 @@ export class EthLightwalletSubprovider extends BaseWalletSubprovider { private readonly _keystore: lightwallet.keystore; private readonly _pwDerivedKey: Uint8Array; /** - * + * Instantiate an EthLightwalletSubprovider * @param keystore The EthLightWallet keystore you wish to use * @param pwDerivedKey The password derived key to use + * @return EthLightwalletSubprovider instance */ constructor(keystore: lightwallet.keystore, pwDerivedKey: Uint8Array) { super(); -- cgit v1.2.3 From 1ca176e992d821f6cea366c3177c0e568c823e6c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 15:12:43 +0100 Subject: Remove excessive timestamp --- packages/subproviders/CHANGELOG.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index e474826e4..bdda74c27 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -1,6 +1,5 @@ [ { - "timestamp": 1534210131, "version": "2.0.0", "changes": [ { -- cgit v1.2.3 From 3563fabe8871f69799dd7c89b83ecea19951794c Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 16:15:47 +0100 Subject: Add missing keyu --- packages/website/ts/components/top_bar/top_bar.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index e27a1fae2..9ef8211a9 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -379,7 +379,11 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> { {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => { if (!this._doesUrlInclude(websitePath)) { return ( - <Link to={websitePath} className="text-decoration-none"> + <Link + key={`drawer-menu-item-${websitePath}`} + to={websitePath} + className="text-decoration-none" + > <MenuItem className="py2"> {this.props.translate.get(key, Deco.Cap)}{' '} {this.props.translate.get(Key.Docs, Deco.Cap)} -- cgit v1.2.3 From 28f077b16f5fc5f08f95bb2ad00724e6ea89dd00 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 16:55:41 +0100 Subject: Add support for rending the Tuple type --- packages/react-docs/src/components/type.tsx | 22 ++++++++++++++++++++++ packages/react-docs/src/types.ts | 8 ++++++++ packages/react-docs/src/utils/typedoc_utils.ts | 6 ++++++ 3 files changed, 36 insertions(+) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 145c797a3..5f7601ce1 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -167,6 +167,28 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { }); break; + case TypeDocTypes.Tuple: + const tupleTypes = _.map(type.tupleElements, t => { + return ( + <Type + key={`type-tuple-${t.name}-${t.typeDocType}`} + type={t} + sectionName={props.sectionName} + typeDefinitionByName={props.typeDefinitionByName} + docsInfo={props.docsInfo} + isInPopover={props.isInPopover} + /> + ); + }); + typeName = ( + <div> + [{_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => { + return [prev, ', ', curr]; + })}] + </div> + ); + break; + default: throw errorUtils.spawnSwitchErr('type.typeDocType', type.typeDocType); } diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 7fd785e32..f9cb5e26a 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -31,6 +31,12 @@ export interface TypeDocType { declaration: TypeDocNode; elementType?: TypeDocType; indexSignature?: TypeDocNode; + elements?: TupleElement[]; +} + +export interface TupleElement { + type: string; + name: string; } export interface TypeDocFlags { @@ -78,6 +84,7 @@ export enum TypeDocTypes { Union = 'union', TypeParameter = 'typeParameter', Intersection = 'intersection', + Tuple = 'tuple', Unknown = 'unknown', } @@ -157,6 +164,7 @@ export interface Type { method?: TypescriptMethod; indexSignature?: IndexSignature; externalLink?: string; + tupleElements?: Type[]; } export interface ElementType { diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index b867b51b4..67e37e82d 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -457,6 +457,7 @@ export class TypeDocUtils { let indexSignatureIfExists; let methodIfExists; + let tupleElementsIfExists; const doesIndexSignatureExist = !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature); if (doesIndexSignatureExist) { @@ -465,6 +466,10 @@ export class TypeDocUtils { } else if (!_.isUndefined(entity.declaration)) { const isConstructor = false; methodIfExists = this._convertMethod(entity.declaration, isConstructor, sectionName); + } else if (entity.type === TypeDocTypes.Tuple) { + tupleElementsIfExists = _.map(entity.elements, el => { + return { name: el.name, typeDocType: el.type as TypeDocTypes }; + }); } const elementTypeIfExists = !_.isUndefined(entity.elementType) @@ -484,6 +489,7 @@ export class TypeDocUtils { types, method: methodIfExists, indexSignature: indexSignatureIfExists, + tupleElements: tupleElementsIfExists, }; const externalLinkIfExists = this._externalTypeToLink[entity.name]; if (!_.isUndefined(externalLinkIfExists)) { -- cgit v1.2.3 From f9b222c12728ed004688521314932a2a0062f5bd Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 17:06:38 +0100 Subject: Remove duplicate type and remove nested interface --- packages/ethereum-types/src/index.ts | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index d21f69b79..2b878ca53 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -312,28 +312,6 @@ export type OutputField = | 'ewasm.wast' | 'ewasm.wasm'; -export interface CompilerSettings { - remappings?: string[]; - optimizer?: { - enabled: boolean; - runs?: number; - }; - evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; - metadata?: { - useLiteralContent: true; - }; - libraries?: { - [fileName: string]: { - [libName: string]: string; - }; - }; - outputSelection: { - [fileName: string]: { - [contractName: string]: OutputField[]; - }; - }; -} - export interface ContractNetworks { [networkId: number]: ContractNetworkData; } @@ -411,9 +389,7 @@ export interface CompilerSettings { runs?: number; }; evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; - metadata?: { - useLiteralContent: true; - }; + metadata?: CompilerSettingsMetadata; libraries?: { [fileName: string]: { [libName: string]: string; @@ -426,6 +402,10 @@ export interface CompilerSettings { }; } +export interface CompilerSettingsMetadata { + useLiteralContent: true; +} + export interface Source { id: number; } -- cgit v1.2.3 From c4c47d9665e7a4afef2adc7b717f29996fc96f59 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 17:28:27 +0100 Subject: Stop nesting interfaces and add necessary type exports --- packages/ethereum-types/src/index.ts | 43 ++++++++++++++++++++---------------- packages/sol-compiler/src/index.ts | 8 ++++++- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index 2b878ca53..3b6fdc77b 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -326,24 +326,21 @@ export interface ContractNetworkData { export interface StandardContractOutput { abi: ContractAbi; - evm: { - bytecode: { - object: string; - sourceMap: string; - }; - deployedBytecode: { - object: string; - sourceMap: string; - }; - }; + evm: EvmOutput; +} + +export interface EvmOutput { + bytecode: EvmBytecodeOutput; + deployedBytecode: EvmBytecodeOutput; +} + +export interface EvmBytecodeOutput { + object: string; + sourceMap: string; } export interface ContractVersionData { - compiler: { - name: 'solc'; - version: string; - settings: CompilerSettings; - }; + compiler: CompilerOpts; sources: { [sourceName: string]: { id: number; @@ -356,6 +353,12 @@ export interface ContractVersionData { compilerOutput: StandardContractOutput; } +export interface CompilerOpts { + name: 'solc'; + version: string; + settings: CompilerSettings; +} + /** * This type defines the schema of the artifact.json file generated by Sol-compiler * schemaVersion: The version of the artifact schema @@ -384,10 +387,7 @@ export interface GeneratedCompilerOptions { // Copied from the solc.js library types export interface CompilerSettings { remappings?: string[]; - optimizer?: { - enabled: boolean; - runs?: number; - }; + optimizer?: OptimizerSettings; evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; metadata?: CompilerSettingsMetadata; libraries?: { @@ -406,6 +406,11 @@ export interface CompilerSettingsMetadata { useLiteralContent: true; } +export interface OptimizerSettings { + enabled: boolean; + runs?: number; +} + export interface Source { id: number; } diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts index b6b170508..f8c2b577a 100644 --- a/packages/sol-compiler/src/index.ts +++ b/packages/sol-compiler/src/index.ts @@ -1,2 +1,8 @@ export { Compiler } from './compiler'; -export { CompilerOptions, CompilerSettings, OutputField } from 'ethereum-types'; +export { + CompilerOptions, + CompilerSettings, + OutputField, + CompilerSettingsMetadata, + OptimizerSettings, +} from 'ethereum-types'; -- cgit v1.2.3 From 0ca64e394b8070fde892f61a65a640c7443d5108 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 17:37:40 +0100 Subject: Fix linter --- packages/react-docs/src/utils/typedoc_utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 67e37e82d..f44945369 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -497,4 +497,4 @@ export class TypeDocUtils { } return type; } -} +} // tslint:disable:max-file-line-count -- cgit v1.2.3 From 8eb4b6f91791313dc02865a9dd3324cce646d537 Mon Sep 17 00:00:00 2001 From: Fabio Berger <me@fabioberger.com> Date: Thu, 23 Aug 2018 17:50:42 +0100 Subject: Remove trailing slash --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 110c6f19e..a8bd7413e 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This repository is a monorepo including the 0x protocol smart contracts and nume If you're developing on 0x now or are interested in using 0x infrastructure in the future, please join our [developer mailing list][dev-mailing-list-url] for updates. -[website-url]: https://0xproject.com/ +[website-url]: https://0xproject.com [whitepaper-url]: https://0xproject.com/pdfs/0x_white_paper.pdf [dev-mailing-list-url]: http://eepurl.com/dx4cPf -- cgit v1.2.3