diff options
author | Fabio Berger <me@fabioberger.com> | 2019-01-12 00:12:55 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2019-01-12 00:12:55 +0800 |
commit | 96ff5eef644b8c4d3f8fc4ec53270991fb51f121 (patch) | |
tree | 530f43b03d2b3aa09b5f6552d4285df92d45fed0 | |
parent | 7f5a2c972bb86df77c423fb7029e9a629ecc1ede (diff) | |
parent | 2cf57a48dd2857dd5cf2f31f4c60dd47ae4d34a5 (diff) | |
download | dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar.gz dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar.bz2 dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar.lz dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar.xz dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.tar.zst dexon-sol-tools-96ff5eef644b8c4d3f8fc4ec53270991fb51f121.zip |
merge development
269 files changed, 2078 insertions, 1875 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e82b8286..f64017b56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -16,7 +16,7 @@ jobs: command: sudo npm install --global yarn@1.9.4 - run: name: yarn - command: yarn --frozen-lockfile --ignore-engines install || yarn --frozen-lockfile --ignore-engines install + command: yarn --frozen-lockfile --ignore-engines install - run: yarn build:ci:no_website - run: yarn build:ts - save_cache: @@ -118,7 +118,7 @@ jobs: - run: yarn wsrun test:circleci @0x/order-utils - run: yarn wsrun test:circleci @0x/order-watcher - run: yarn wsrun test:circleci @0x/sol-compiler - - run: yarn wsrun test:circleci @0x/sol-cov + - run: yarn wsrun test:circleci @0x/sol-tracing-utils - run: yarn wsrun test:circleci @0x/sol-doc - run: yarn wsrun test:circleci @0x/subproviders - run: yarn wsrun test:circleci @0x/web3-wrapper @@ -169,9 +169,9 @@ jobs: paths: - ~/repo/packages/sol-compiler/coverage/lcov.info - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + key: coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }} paths: - - ~/repo/packages/sol-cov/coverage/lcov.info + - ~/repo/packages/sol-tracing-utils/coverage/lcov.info - save_cache: key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -335,7 +335,7 @@ jobs: - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - coverage-sol-tracing-utils-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} diff --git a/.github/autolabeler.yml b/.github/autolabeler.yml index 8284293d5..321ec18a4 100644 --- a/.github/autolabeler.yml +++ b/.github/autolabeler.yml @@ -13,7 +13,10 @@ instant: ['packages/instant'] abi-gen-templates: ['packages/abi-gen-templates'] abi-gen: ['packages/abi-gen'] website: ['packages/website'] -sol-cov: ['packages/sol-cov'] +sol-coverage: ['packages/sol-coverage'] +sol-profiler: ['packages/sol-profiler'] +sol-trace: ['packages/sol-trace'] +sol-tracing-utils: ['packages/sol-tracing-utils'] utils: ['packages/utils'] tslint-config: ['packages/tslint-config'] asset-buyer: ['packages/asset-buyer'] diff --git a/.gitignore b/.gitignore index 1d4410e25..0210edc4f 100644 --- a/.gitignore +++ b/.gitignore @@ -91,7 +91,7 @@ contracts/interfaces/generated-artifacts/ contracts/tokens/generated-artifacts/ contracts/examples/generated-artifacts/ contracts/extensions/generated-artifacts/ -packages/sol-cov/test/fixtures/artifacts/ +packages/sol-tracing-utils/test/fixtures/artifacts/ packages/metacoin/artifacts/ # generated contract wrappers diff --git a/.prettierignore b/.prettierignore index a5912fafd..a49091816 100644 --- a/.prettierignore +++ b/.prettierignore @@ -27,7 +27,7 @@ lib /packages/dev-tools-pages/ts/**/data.json package.json scripts/postpublish_utils.js -packages/sol-cov/test/fixtures/artifacts +packages/sol-coverage/test/fixtures/artifacts .pytest_cache .mypy_cache .tox diff --git a/CODEOWNERS b/CODEOWNERS index ca98ec19b..c73a206df 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -24,7 +24,10 @@ packages/metacoin/ @LogvinovLeon packages/monorepo-scripts/ @fabioberger packages/order-utils/ @fabioberger @LogvinovLeon packages/sol-compiler/ @LogvinovLeon -packages/sol-cov/ @LogvinovLeon +packages/sol-coverage/ @LogvinovLeon +packages/sol-profiler/ @LogvinovLeon +packages/sol-trace/ @LogvinovLeon +packages/sol-tracing-utils/ @LogvinovLeon packages/sol-resolver/ @LogvinovLeon packages/subproviders/ @fabioberger @dekz packages/verdaccio/ @albrow diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4b3ef1f07..609f6e642 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3e709b36f..aea2f10e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,26 +12,26 @@ We welcome contributions from anyone on the internet and are grateful for even t Before removing the `[WIP]` tag and submitting the PR for review, make sure: -* It passes our linter checks (`yarn lint`) -* It is properly formatted with Prettier (`yarn prettier`) -* It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks) -* You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries. -* Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes) +- It passes our linter checks (`yarn lint`) +- It is properly formatted with Prettier (`yarn prettier`) +- It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks) +- You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries. +- Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes) ### Branch structure We have two main branches: -* `master` represents the most recently released (published on npm) version of the codebase. -* `development` represents the current development state of the codebase. +- `master` represents the most recently released (published on npm) version of the codebase. +- `development` represents the current development state of the codebase. ALL PRs should be opened against `development`. Branch names should be prefixed with `fix`, `feature` or `refactor`. -* e.g `fix/broken-wiki-link` -* If the PR only edits a single package, add it's name too - * e.g `fix/website/broken-wiki-link` +- e.g `fix/broken-wiki-link` +- If the PR only edits a single package, add it's name too + - e.g `fix/website/broken-wiki-link` ### CHANGELOGs @@ -67,8 +67,8 @@ If you want to change a rule, or add a custom rule, please make these changes to Integrate it into your text editor: -* VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) -* Atom: [linter-tslint](https://atom.io/packages/linter-tslint) +- VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) +- Atom: [linter-tslint](https://atom.io/packages/linter-tslint) #### Auto-formatter @@ -76,8 +76,8 @@ We use [Prettier](https://prettier.io/) to auto-format our code. Be sure to eith If using the Atom text editor, we recommend you install the following packages: -* VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) -* Atom: [prettier-atom](https://atom.io/packages/prettier-atom) +- VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) +- Atom: [prettier-atom](https://atom.io/packages/prettier-atom) ## Unenforced coding conventions diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md index 70c5e8a9f..bfca7a576 100644 --- a/PULL_REQUEST_TEMPLATE.md +++ b/PULL_REQUEST_TEMPLATE.md @@ -20,7 +20,7 @@ <!--- The following points should be used to indicate the progress of your PR. Put an `x` in all the boxes that apply right now, and come back over time and check them off as you make progress. If you're unsure about any of these, don't hesitate to ask. We're here to help! --> -* [ ] Prefix PR title with `[WIP]` if necessary. -* [ ] Add tests to cover changes as needed. -* [ ] Update documentation as needed. -* [ ] Add new entries to the relevant CHANGELOG.jsons. +- [ ] Prefix PR title with `[WIP]` if necessary. +- [ ] Add tests to cover changes as needed. +- [ ] Update documentation as needed. +- [ ] Add new entries to the relevant CHANGELOG.jsons. @@ -57,7 +57,9 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | An Ethereum JSON RPC client | | [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. | -| [`@0x/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | A solidity test coverage tool | +| [`@0x/sol-coverage`](/packages/sol-coverage) | [![npm](https://img.shields.io/npm/v/@0x/sol-coverage.svg)](https://www.npmjs.com/package/@0x/sol-coverage) | A solidity test coverage tool | +| [`@0x/sol-profiler`](/packages/sol-profiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-profiler.svg)](https://www.npmjs.com/package/@0x/sol-profiler) | A solidity gas cost profiler | +| [`@0x/sol-trace`](/packages/sol-trace) | [![npm](https://img.shields.io/npm/v/@0x/sol-trace.svg)](https://www.npmjs.com/package/@0x/sol-trace) | A solidity stack trace tool | | [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies | | [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) | | [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator | diff --git a/contracts/TESTING.md b/contracts/TESTING.md index 750b3c62c..3e6888c04 100644 --- a/contracts/TESTING.md +++ b/contracts/TESTING.md @@ -20,7 +20,7 @@ TEST_PROVIDER=geth yarn test ## Code coverage -In order to see the Solidity code coverage output generated by `@0x/sol-cov`, run: +In order to see the Solidity code coverage output generated by `@0x/sol-coverage`, run: ``` yarn test:coverage diff --git a/contracts/examples/package.json b/contracts/examples/package.json index b556d72d8..d04b5fc44 100644 --- a/contracts/examples/package.json +++ b/contracts/examples/package.json @@ -37,7 +37,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/extensions/package.json b/contracts/extensions/package.json index 05c066fc8..99b5b35a8 100644 --- a/contracts/extensions/package.json +++ b/contracts/extensions/package.json @@ -49,7 +49,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/interfaces/README.md b/contracts/interfaces/README.md index b7d519abb..81dd4c3ac 100644 --- a/contracts/interfaces/README.md +++ b/contracts/interfaces/README.md @@ -6,8 +6,8 @@ Smart contract interfaces of the 0x protocol. Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [protocol](./contracts/protocol) - * This directory contains the contract interfaces that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). +- [protocol](./contracts/protocol) + - This directory contains the contract interfaces that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). ## Bug bounty diff --git a/contracts/libs/README.md b/contracts/libs/README.md index 66eedf6be..cfa631679 100644 --- a/contracts/libs/README.md +++ b/contracts/libs/README.md @@ -6,10 +6,10 @@ Smart contracts libs used in the 0x protocol. Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [libs](./contracts/protocol) - * This directory contains the libs. -* [test](./contracts/test) - * This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. +- [libs](./contracts/protocol) + - This directory contains the libs. +- [test](./contracts/test) + - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. ## Contributing diff --git a/contracts/libs/package.json b/contracts/libs/package.json index ed9d408ff..9d28cc038 100644 --- a/contracts/libs/package.json +++ b/contracts/libs/package.json @@ -48,7 +48,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/multisig/README.md b/contracts/multisig/README.md index 93db63b5b..e29f46251 100644 --- a/contracts/multisig/README.md +++ b/contracts/multisig/README.md @@ -6,10 +6,10 @@ MultiSig smart contracts Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [multisig](./contracts/multisig) - * This directory contains the [Gnosis MultiSigWallet](https://github.com/gnosis/MultiSigWallet) and a custom extension that adds a timelock to transactions within the MultiSigWallet. -* [test](./contracts/test) - * This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. +- [multisig](./contracts/multisig) + - This directory contains the [Gnosis MultiSigWallet](https://github.com/gnosis/MultiSigWallet) and a custom extension that adds a timelock to transactions within the MultiSigWallet. +- [test](./contracts/test) + - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. ## Contributing diff --git a/contracts/multisig/package.json b/contracts/multisig/package.json index 63b6de6f2..e0bbc001d 100644 --- a/contracts/multisig/package.json +++ b/contracts/multisig/package.json @@ -48,7 +48,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/protocol/README.md b/contracts/protocol/README.md index 5fc9c0a89..dc1f32c98 100644 --- a/contracts/protocol/README.md +++ b/contracts/protocol/README.md @@ -6,10 +6,10 @@ Smart contracts that implement the 0x protocol. Addresses of the deployed contra Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [protocol](./contracts/protocol) - * This directory contains the contracts that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). -* [test](./contracts/test) - * This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. +- [protocol](./contracts/protocol) + - This directory contains the contracts that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). +- [test](./contracts/test) + - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. ## Bug bounty diff --git a/contracts/protocol/package.json b/contracts/protocol/package.json index 02e1934d7..7d49dfbe8 100644 --- a/contracts/protocol/package.json +++ b/contracts/protocol/package.json @@ -47,7 +47,6 @@ "@0x/abi-gen": "^1.0.20", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json index 852985636..2653fc0e4 100644 --- a/contracts/test-utils/package.json +++ b/contracts/test-utils/package.json @@ -40,11 +40,13 @@ "typescript": "3.0.1" }, "dependencies": { + "@0x/sol-coverage": "^1.0.0", + "@0x/sol-profiler": "^1.0.0", + "@0x/sol-trace": "^1.0.0", "@0x/abi-gen": "^1.0.20", "@0x/dev-utils": "^1.0.22", "@0x/order-utils": "^3.1.0", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@0x/types": "^1.5.0", diff --git a/contracts/test-utils/src/coverage.ts b/contracts/test-utils/src/coverage.ts index 5becfa1b6..f82288eec 100644 --- a/contracts/test-utils/src/coverage.ts +++ b/contracts/test-utils/src/coverage.ts @@ -1,5 +1,5 @@ import { devConstants } from '@0x/dev-utils'; -import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; +import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-coverage'; import * as _ from 'lodash'; let coverageSubprovider: CoverageSubprovider; diff --git a/contracts/test-utils/src/profiler.ts b/contracts/test-utils/src/profiler.ts index 2c7c1d66c..7f51c384f 100644 --- a/contracts/test-utils/src/profiler.ts +++ b/contracts/test-utils/src/profiler.ts @@ -1,5 +1,5 @@ import { devConstants } from '@0x/dev-utils'; -import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; +import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-profiler'; import * as _ from 'lodash'; let profilerSubprovider: ProfilerSubprovider; diff --git a/contracts/test-utils/src/revert_trace.ts b/contracts/test-utils/src/revert_trace.ts index 3f74fd28b..3a5778859 100644 --- a/contracts/test-utils/src/revert_trace.ts +++ b/contracts/test-utils/src/revert_trace.ts @@ -1,5 +1,5 @@ import { devConstants } from '@0x/dev-utils'; -import { RevertTraceSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; +import { RevertTraceSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-trace'; import * as _ from 'lodash'; let revertTraceSubprovider: RevertTraceSubprovider; diff --git a/contracts/tokens/README.md b/contracts/tokens/README.md index 9c4106d41..2d1db92f0 100644 --- a/contracts/tokens/README.md +++ b/contracts/tokens/README.md @@ -6,10 +6,10 @@ Token smart contracts that are used in the 0x protocol. Addresses of the deploye Token contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [tokens](./contracts/tokens) - * This directory contains implementations of different tokens and token standards, including [wETH](https://weth.io/), ZRX, [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md), and [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md). -* [test](./contracts/test) - * This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. +- [tokens](./contracts/tokens) + - This directory contains implementations of different tokens and token standards, including [wETH](https://weth.io/), ZRX, [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md), and [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md). +- [test](./contracts/test) + - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. ## Bug bounty diff --git a/contracts/tokens/package.json b/contracts/tokens/package.json index 2fc5013a0..31bf8f7cc 100644 --- a/contracts/tokens/package.json +++ b/contracts/tokens/package.json @@ -48,7 +48,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/contracts/utils/README.md b/contracts/utils/README.md index e7c7b49ff..2f872ddb5 100644 --- a/contracts/utils/README.md +++ b/contracts/utils/README.md @@ -6,10 +6,10 @@ Smart contracts utils used in the 0x protocol. Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories: -* [utils](./contracts/utils) - * This directory contains libraries and utils. -* [test](./contracts/test) - * This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. +- [utils](./contracts/utils) + - This directory contains libraries and utils. +- [test](./contracts/test) + - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories. ## Contributing diff --git a/contracts/utils/package.json b/contracts/utils/package.json index 58a7b3a71..732556f34 100644 --- a/contracts/utils/package.json +++ b/contracts/utils/package.json @@ -48,7 +48,6 @@ "@0x/contracts-test-utils": "^1.0.3", "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", - "@0x/sol-cov": "^2.1.17", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@types/bn.js": "^4.11.0", diff --git a/package.json b/package.json index 16b7a10f9..27675ddd3 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ }, "config": { "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 asset-buyer migrations" + "packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-coverage sol-profiler sol-trace ethereum-types asset-buyer migrations" }, "bundlewatch": { "files": [ @@ -75,7 +75,7 @@ "lcov-result-merger": "^3.0.0", "lerna": "^3.0.0-beta.25", "npm-run-all": "^4.1.2", - "prettier": "^1.11.1", + "prettier": "^1.15.3", "source-map-support": "^0.5.6", "typescript": "3.0.1", "wsrun": "^2.2.0" diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 2f7320fea..f11293e6d 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -3,8 +3,7 @@ "version": "3.0.0", "changes": [ { - "note": - "Export `MultiAssetData`, `MultiAssetDataWithRecursiveDecoding`, `ObjectMap`, and `SingleAssetData` from types. No longer export `AssetData`.", + "note": "Export `MultiAssetData`, `MultiAssetDataWithRecursiveDecoding`, `ObjectMap`, and `SingleAssetData` from types. No longer export `AssetData`.", "pr": 1363 } ], @@ -90,18 +89,15 @@ "pr": 1102 }, { - "note": - "Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints.", + "note": "Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints.", "pr": 1102 }, { - "note": - "Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`.", + "note": "Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`.", "pr": 1102 }, { - "note": - "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", + "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", "pr": 1105 }, { @@ -200,8 +196,7 @@ "version": "1.0.1-rc.5", "changes": [ { - "note": - "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js" + "note": "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js" } ] }, @@ -209,8 +204,7 @@ "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`", + "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`", "pr": 963 } ], @@ -282,18 +276,15 @@ "pr": 863 }, { - "note": - "Refactored `ZeroEx.isValidSignature` to `zeroEx.isValidSignatureAsync`. It is now async so that it can verify contract-dependent signature types", + "note": "Refactored `ZeroEx.isValidSignature` to `zeroEx.isValidSignatureAsync`. It is now async so that it can verify contract-dependent signature types", "pr": 863 }, { - "note": - "Refactored `signOrderHashAsync` to `ecSignOrderHashAsync`. There are now many non-ECSignature ways to sign orders too.", + "note": "Refactored `signOrderHashAsync` to `ecSignOrderHashAsync`. There are now many non-ECSignature ways to sign orders too.", "pr": 863 }, { - "note": - "Removed `createOrderWatcherAsync` method. Will be added back once OrderWatcher is refactored for V2", + "note": "Removed `createOrderWatcherAsync` method. Will be added back once OrderWatcher is refactored for V2", "pr": 863 }, { @@ -368,8 +359,7 @@ "pr": 579 }, { - "note": - "Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage", + "note": "Renamed ZeroExError to ContractWrappersErrors since they now lives in the @0xproject/contract-wrappers subpackage", "pr": 579 } ], @@ -454,8 +444,7 @@ "pr": 501 }, { - "note": - "Add `zeroEx.exchange.getOrderStateAsync` to allow obtaining current OrderState for a signedOrder", + "note": "Add `zeroEx.exchange.getOrderStateAsync` to allow obtaining current OrderState for a signedOrder", "pr": 510 } ], @@ -465,8 +454,7 @@ "version": "0.35.0", "changes": [ { - "note": - "Removed `ZeroExError.TransactionMiningTimeout` and moved it to '@0xproject/web3-wrapper' `Web3WrapperErrors.TransactionMiningTimeout`", + "note": "Removed `ZeroExError.TransactionMiningTimeout` and moved it to '@0xproject/web3-wrapper' `Web3WrapperErrors.TransactionMiningTimeout`", "pr": 485 } ], @@ -476,8 +464,7 @@ "version": "0.34.0", "changes": [ { - "note": - "Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed", + "note": "Fix the bug causing `zeroEx.exchange.fillOrdersUpToAsync` validation to fail if there were some extra orders passed", "pr": 470 }, { @@ -489,8 +476,7 @@ "pr": 488 }, { - "note": - "Added `stateLayer` setting to `OrderStateWatcherConfig` so OrderStateWatcher can be set to monitor different blockchain state layers", + "note": "Added `stateLayer` setting to `OrderStateWatcherConfig` so OrderStateWatcher can be set to monitor different blockchain state layers", "pr": 488 } ], @@ -577,8 +563,7 @@ "pr": 350 }, { - "note": - "Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields", + "note": "Fixed the bug causing order watcher to throw if there is an event with the same signature but different indexed fields", "pr": 366 } ], @@ -598,8 +583,7 @@ "version": "0.31.0", "changes": [ { - "note": - "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added.", + "note": "Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the caller can decide on whether to add the personalMessage prefix before relaying the request to the signer. Parity Signer, Ledger and TestRPC add the prefix themselves, Metamask expects it to have already been added.", "pr": 349 } ], @@ -644,8 +628,7 @@ "pr": 312 }, { - "note": - "Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders", + "note": "Fix a bug in fillOrdersUpTo validation making it impossible to fill up to if user doesn't have enough balance to fully fill all the orders", "pr": 321 } ], @@ -679,13 +662,11 @@ "version": "0.28.0", "changes": [ { - "note": - "Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken`", + "note": "Add `etherTokenAddress` arg to `depositAsync` and `withdrawAsync` methods on `zeroEx.etherToken`", "pr": 267 }, { - "note": - "Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry`", + "note": "Removed accidentally included `unsubscribeAll` method from `zeroEx.proxy`, `zeroEx.etherToken` and `zeroEx.tokenRegistry`", "pr": 267 }, { @@ -697,8 +678,7 @@ "pr": 272 }, { - "note": - "Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll`", + "note": "Add `zeroEx.etherToken.subscribe`, `zeroEx.etherToken.unsubscribe`, `zeroEx.etherToken.unsubscribeAll`", "pr": 277 }, { @@ -706,8 +686,7 @@ "pr": 277 }, { - "note": - "Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs`", + "note": "Add new public types `BlockParamLiteral`, `EtherTokenEvents`, `EtherTokenContractEventArgs`, `DepositContractEventArgs`, `WithdrawalContractEventArgs`", "pr": 277 }, { @@ -742,8 +721,7 @@ "pr": 233 }, { - "note": - "Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync", + "note": "Make all `getContractAddress` functions, `zeroEx.exchange.subscribe`, `zeroEx.exchange.getZRXTokenAddress` sync", "pr": 233 }, { @@ -751,8 +729,7 @@ "pr": 233 }, { - "note": - "Make `DecodedLogEvent<A>` contain `LogWithDecodedArgs<A>` under log key instead of merging it in like web3 does", + "note": "Make `DecodedLogEvent<A>` contain `LogWithDecodedArgs<A>` under log key instead of merging it in like web3 does", "pr": 234 }, { @@ -768,8 +745,7 @@ "pr": 235 }, { - "note": - "Modify order validation methods to validate against the `latest` block, not against the `pending` block", + "note": "Modify order validation methods to validate against the `latest` block, not against the `pending` block", "pr": 236 } ], @@ -779,8 +755,7 @@ "version": "0.26.0", "changes": [ { - "note": - "Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers", + "note": "Add post-formatter for logs converting `blockNumber`, `logIndex`, `transactionIndex` from hexes to numbers", "pr": 231 }, { @@ -788,8 +763,7 @@ "pr": 222 }, { - "note": - "In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different", + "note": "In OrderWatcher subscribe to ZRX Token Transfer and Approval events when maker token is different", "pr": 225 } ], @@ -807,8 +781,7 @@ "pr": 205 }, { - "note": - "Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction.", + "note": "Normalized the transactionReceipt status to be `null|0|1`, 1 meaning transaction execution successful, 0 unsuccessful and `null` if it is a pre-byzantinium transaction.", "pr": 200 } ], @@ -879,8 +852,7 @@ "version": "0.22.0", "changes": [ { - "note": - "Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill`", + "note": "Started using `OrderFillRequest` interface instead of `OrderFillOrKillRequest` interface for `zeroEx.exchange.batchFillOrKill`", "pr": 187 }, { @@ -894,8 +866,7 @@ "version": "0.21.4", "changes": [ { - "note": - "Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type", + "note": "Made 0x.js more type-safe by making `getLogsAsync` and `subscribe/subscribeAsync` generics parametrized with arg type", "pr": 194 } ], @@ -942,8 +913,7 @@ "note": "Subscriptions no longer return historical logs. If you want them - use `getLogsAsync`" }, { - "note": - "Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood" + "note": "Subscriptions now use [ethereumjs-blockstream](https://github.com/ethereumjs/ethereumjs-blockstream) under the hood" }, { "note": "Subscriptions correctly handle block re-orgs (forks)" @@ -952,8 +922,7 @@ "note": "Subscriptions correctly backfill logs (connection problems)" }, { - "note": - "They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider" + "note": "They no longer setup filters on the underlying nodes, so you can use them with infura without a filter Subprovider" }, { "note": "Removed `ContractEventEmitter` and added `LogEvent`" @@ -1060,8 +1029,7 @@ "version": "0.15.0", "changes": [ { - "note": - "Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method", + "note": "Added the ability to specify a historical `blockNumber` at which to query the blockchain's state when calling a token or exchange method", "pr": 161 } ], @@ -1109,8 +1077,7 @@ "version": "0.13.0", "changes": [ { - "note": - "Made all the functions submitting transactions to the network to immediately return transaction hash", + "note": "Made all the functions submitting transactions to the network to immediately return transaction hash", "pr": 151 }, { @@ -1118,8 +1085,7 @@ "pr": 151 }, { - "note": - "Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types", + "note": "Added `TransactionReceiptWithDecodedLogs`, `LogWithDecodedArgs`, `DecodedLogArgs` to public types", "pr": 151 }, { @@ -1292,8 +1258,7 @@ "pr": 104 }, { - "note": - "Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded", + "note": "Fixed an issue with incorrect balance/allowance validation when ZRX is one of the tokens traded", "pr": 109 } ], @@ -1303,13 +1268,11 @@ "version": "0.8.0", "changes": [ { - "note": - "Added the ability to call methods on different authorized versions of the Exchange smart contract", + "note": "Added the ability to call methods on different authorized versions of the Exchange smart contract", "pr": 82 }, { - "note": - "Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)" + "note": "Updated contract artifacts to reflect latest changes to the smart contracts (0xproject/contracts#59)" }, { "note": "Added `zeroEx.proxy.isAuthorizedAsync` and `zeroEx.proxy.getAuthorizedAddressesAsync`", @@ -1345,8 +1308,7 @@ "version": "0.7.1", "changes": [ { - "note": - "Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync`", + "note": "Added the ability to convert Ether to wrapped Ether tokens and back via `zeroEx.etherToken.depostAsync` and `zeroEx.etherToken.withdrawAsync`", "pr": 81 } ], @@ -1368,8 +1330,7 @@ "pr": 72 }, { - "note": - "Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`" + "note": "Renamed type `LogCancelArgs` to `LogCancelContractEventArgs` and `LogFillArgs` to `LogFillContractEventArgs`" } ], "timestamp": 1498057200 @@ -1411,8 +1372,7 @@ "version": "0.5.2", "changes": [ { - "note": - "Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page" + "note": "Fixed the bug in `postpublish` script that caused that only unminified UMD bundle was uploaded to release page" } ], "timestamp": 1497452400 diff --git a/packages/abi-gen-templates/README.md b/packages/abi-gen-templates/README.md index c6cc3b1b3..06c2e19cd 100644 --- a/packages/abi-gen-templates/README.md +++ b/packages/abi-gen-templates/README.md @@ -2,9 +2,9 @@ These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo To successfully compile the generated TypeScript contract wrappers, you must: -* Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` -* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` -* Ensure that your TypeScript configuration includes the following: +- Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` +- Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` +- Ensure that your TypeScript configuration includes the following: ``` "compilerOptions": { diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index 404ba0f1b..e73fa92bb 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -41,8 +41,7 @@ "version": "1.1.0", "changes": [ { - "note": - "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", + "note": "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", "pr": 1298 } ], diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json index 19cceb509..4bbcdc897 100644 --- a/packages/abi-gen/CHANGELOG.json +++ b/packages/abi-gen/CHANGELOG.json @@ -312,13 +312,11 @@ "version": "0.2.4", "changes": [ { - "note": - "Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`", + "note": "Add a `backend` parameter that allows you to specify the Ethereum library you use in your templates (`web3` or `ethers`). Ethers auto-converts small ints to numbers whereas Web3 doesn't. Defaults to `web3`", "pr": 413 }, { - "note": - "Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)", + "note": "Add support for [tuple types](https://solidity.readthedocs.io/en/develop/abi-spec.html#handling-tuple-types)", "pr": 413 }, { @@ -346,8 +344,7 @@ "pr": 346 }, { - "note": - "Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts", + "note": "Added CLI option to specify networkId, adding support for the JSON artifact format found in @0xproject/contracts", "pr": 388 } ], diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index 275ec2e4e..0e89b408e 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -193,8 +193,7 @@ "version": "1.0.0", "changes": [ { - "note": - "Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values", + "note": "Fix bug in string enum assertion. We erroneously were checking against the enum keys, not values", "pr": 821 } ] @@ -339,8 +338,7 @@ "note": "Re-publish Assert previously published under NPM package @0xproject/0x-assert" }, { - "note": - "Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals." + "note": "Added assertion isValidBaseUnitAmount which checks both that the value is a valid bigNumber and that it does not contain decimals." } ], "timestamp": 1510585200 diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index a7f8d3418..19bee94fd 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -90,8 +90,7 @@ "pr": 1187 }, { - "note": - "the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init.", + "note": "the `OrderProvider` now requires a new method `getAvailableMakerAssetDatasAsync` and the `StandardRelayerAPIOrderProvider` requires the network id at init.", "pr": 1203 }, { @@ -99,13 +98,11 @@ "pr": 1197 }, { - "note": - "Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers", + "note": "Fix bug where `BuyQuoteInfo` objects could return `totalEthAmount` and `feeEthAmount` that were not whole numbers", "pr": 1207 }, { - "note": - "Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values", + "note": "Fix bug where default values for `AssetBuyer` public facing methods could get overriden by `undefined` values", "pr": 1207 }, { @@ -126,8 +123,7 @@ "pr": 1131 }, { - "note": - "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", + "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers", "pr": 1105 }, { diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index 1a6e3f845..bd54400d3 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -243,8 +243,7 @@ "version": "0.3.4", "changes": [ { - "note": - "Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201" + "note": "Update EthersJs to fix the `value.toLowerCase()` is not a function bug caused by `ethers.js` breaking patch version https://github.com/ethers-io/ethers.js/issues/201" } ], "timestamp": 1529397769 diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index fe32990e2..2f323f891 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -228,8 +228,7 @@ "version": "1.0.0", "changes": [ { - "note": - "Remove `WebSocketOrderbookChannel` from the public interface and replace with `orderbookChannelFactory`" + "note": "Remove `WebSocketOrderbookChannel` from the public interface and replace with `orderbookChannelFactory`" } ] }, diff --git a/packages/connect/README.md b/packages/connect/README.md index 6d3ee66a0..386b7bbbf 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -18,8 +18,8 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ## Usage -* [Docs](https://0xproject.com/docs/connect) -* [Tutorials](https://0xproject.com/wiki#connect) +- [Docs](https://0xproject.com/docs/connect) +- [Tutorials](https://0xproject.com/wiki#connect) ## Contributing diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index fd8dfa427..2ba6c9f10 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -52,8 +52,7 @@ "version": "4.1.0", "changes": [ { - "note": - "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount", + "note": "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount", "pr": 1292 } ], @@ -81,18 +80,15 @@ "version": "4.0.0", "changes": [ { - "note": - "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", + "note": "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", "pr": 1235 }, { - "note": - "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", + "note": "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", "pr": 1235 }, { - "note": - "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", + "note": "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", "pr": 1235 } ], @@ -123,28 +119,23 @@ "pr": 1105 }, { - "note": - "Default contract addresses are no longer stored in artifacts and are instead loaded from the `@0xproject/contract-addresses` package.", + "note": "Default contract addresses are no longer stored in artifacts and are instead loaded from the `@0xproject/contract-addresses` package.", "pr": 1105 }, { - "note": - "Most contract addresses are now defined at instantiation time and are available as properties (e.g., `exchangeWrapper.address`) instead of methods (e.g., `exchangeWrapper.getContractAddress()`).", + "note": "Most contract addresses are now defined at instantiation time and are available as properties (e.g., `exchangeWrapper.address`) instead of methods (e.g., `exchangeWrapper.getContractAddress()`).", "pr": 1105 }, { - "note": - "Removed `setProvider` method in top-level `ContractWrapper` class and added new `unsubscribeAll` method.", + "note": "Removed `setProvider` method in top-level `ContractWrapper` class and added new `unsubscribeAll` method.", "pr": 1105 }, { - "note": - "Some properties and methods have been renamed. For example, some methods that previously could throw no longer can, and so their names have been updated accordingly.", + "note": "Some properties and methods have been renamed. For example, some methods that previously could throw no longer can, and so their names have been updated accordingly.", "pr": 1105 }, { - "note": - "Removed ContractNotFound errors. Checking for this error was somewhat ineffecient. Relevant methods/functions now return the default error from web3-wrapper, which we feel provides enough information.", + "note": "Removed ContractNotFound errors. Checking for this error was somewhat ineffecient. Relevant methods/functions now return the default error from web3-wrapper, which we feel provides enough information.", "pr": 1105 }, { @@ -180,13 +171,11 @@ "version": "2.0.0", "changes": [ { - "note": - "Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.", + "note": "Fixes dropped events in subscriptions by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.", "pr": 1080 }, { - "note": - "Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it", + "note": "Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it", "pr": 1080 } ], @@ -235,18 +224,15 @@ "note": "Add `OrderValidatorWrapper`" }, { - "note": - "Fix bug where contracts not deployed on a network showed an `EXCHANGE_CONTRACT_DOES_NOT_EXIST` error instead of `CONTRACT_NOT_DEPLOYED_ON_NETWORK`", + "note": "Fix bug where contracts not deployed on a network showed an `EXCHANGE_CONTRACT_DOES_NOT_EXIST` error instead of `CONTRACT_NOT_DEPLOYED_ON_NETWORK`", "pr": 1044 }, { - "note": - "Export `AssetBalanceAndProxyAllowanceFetcher` and `OrderFilledCancelledFetcher` implementations", + "note": "Export `AssetBalanceAndProxyAllowanceFetcher` and `OrderFilledCancelledFetcher` implementations", "pr": 1054 }, { - "note": - "Add `validateOrderFillableOrThrowAsync` and `validateFillOrderThrowIfInvalidAsync` to ExchangeWrapper", + "note": "Add `validateOrderFillableOrThrowAsync` and `validateFillOrderThrowIfInvalidAsync` to ExchangeWrapper", "pr": 1054 } ], @@ -265,13 +251,11 @@ "version": "1.0.1-rc.4", "changes": [ { - "note": - "Export missing types: `TransactionEncoder`, `ContractAbi`, `JSONRPCRequestPayload`, `JSONRPCResponsePayload`, `JSONRPCErrorCallback`, `AbiDefinition`, `FunctionAbi`, `EventAbi`, `EventParameter`, `DecodedLogArgs`, `MethodAbi`, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability`, `StateMutability` & `ExchangeSignatureValidatorApprovalEventArgs`", + "note": "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: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", + "note": "Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs`", "pr": 924 }, { diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts index 3f02ed052..d30c6b29c 100644 --- a/packages/contract-wrappers/src/utils/assert.ts +++ b/packages/contract-wrappers/src/utils/assert.ts @@ -70,7 +70,7 @@ export const assert = { /* * Asserts that all the orders have the same value for the provided propertyName * If the value parameter is provided, this asserts that all orders have the prope - */ + */ ordersHaveAtMostOneUniqueValueForProperty(orders: Order[], propertyName: string, value?: any): void { const allValues = _.map(orders, order => _.get(order, propertyName)); sharedAssert.hasAtMostOneUniqueValue( diff --git a/packages/dev-tools-pages/README.md b/packages/dev-tools-pages/README.md index cbc459be7..47d7e5865 100644 --- a/packages/dev-tools-pages/README.md +++ b/packages/dev-tools-pages/README.md @@ -73,13 +73,13 @@ yarn prettier ##### Toolkit -* [Styled Components](https://www.styled-components.com/) -* [BassCSS](http://basscss.com/) +- [Styled Components](https://www.styled-components.com/) +- [BassCSS](http://basscss.com/) ##### Recommended Atom packages: -* [atom-typescript](https://atom.io/packages/atom-typescript) -* [linter-tslint](https://atom.io/packages/linter-tslint) +- [atom-typescript](https://atom.io/packages/atom-typescript) +- [linter-tslint](https://atom.io/packages/linter-tslint) ## Contributing diff --git a/packages/dev-tools-pages/ts/components/animations/index.tsx b/packages/dev-tools-pages/ts/components/animations/index.tsx index 8e5421f5c..106acf707 100644 --- a/packages/dev-tools-pages/ts/components/animations/index.tsx +++ b/packages/dev-tools-pages/ts/components/animations/index.tsx @@ -69,10 +69,7 @@ class BaseAnimation extends React.PureComponent<AnimationProps, AnimationState> } } -const Container = - styled.div < - AnimationProps > - ` +const Container = styled.div<AnimationProps>` width: 100%; height: ${props => props.height}px; position: absolute; diff --git a/packages/dev-tools-pages/ts/components/button.tsx b/packages/dev-tools-pages/ts/components/button.tsx index d3b36ebfd..ae032eb05 100644 --- a/packages/dev-tools-pages/ts/components/button.tsx +++ b/packages/dev-tools-pages/ts/components/button.tsx @@ -6,40 +6,37 @@ interface ButtonProps { large?: boolean; } -const Button = - styled.button < - ButtonProps > - ` - font-family: inherit; - line-height: 1; - font-weight: 500; - white-space: nowrap; - vertical-align: middle; - background-color: ${props => props.theme.colors.secondary}; - color: ${colors.black}; - border: 0; - border-radius: 5rem; - display: inline-flex; - justify-content: space-between; - align-items: center; - - ${props => - props.large - ? ` +const Button = styled.button<ButtonProps>` + font-family: inherit; + line-height: 1; + font-weight: 500; + white-space: nowrap; + vertical-align: middle; + background-color: ${props => props.theme.colors.secondary}; + color: ${colors.black}; + border: 0; + border-radius: 5rem; + display: inline-flex; + justify-content: space-between; + align-items: center; + + ${props => + props.large + ? ` font-size: 1rem; padding: 1.1875rem 2.375rem 1.0625rem; ` - : ` + : ` font-size: .875rem; padding: .5625rem 1.25rem; `} - :hover, :focus { - background-color: ${props => props.theme.colors.secondary_alt}; - outline: 0; - } + :hover, :focus { + background-color: ${props => props.theme.colors.secondary_alt}; + outline: 0; + } - ${media.small` + ${media.small` font-size: .875rem; padding: .5625rem 1.25rem; `} diff --git a/packages/dev-tools-pages/ts/components/code.tsx b/packages/dev-tools-pages/ts/components/code.tsx index 71d7a7752..c4f9cee24 100644 --- a/packages/dev-tools-pages/ts/components/code.tsx +++ b/packages/dev-tools-pages/ts/components/code.tsx @@ -45,11 +45,8 @@ const Container = styled.div` } `; -const Base = - styled.div < - CodeProps > - ` - font-size: .875rem; +const Base = styled.div<CodeProps>` + font-size: 0.875rem; color: ${props => (_.isUndefined(props.language) ? colors.white : 'inherit')}; background-color: ${props => props.isLight ? 'rgba(255,255,255,.15)' : _.isUndefined(props.language) ? colors.black : '#F1F4F5'}; @@ -110,10 +107,7 @@ const StyledCodeDiff = styled(CodeDiff)` } `; -const StyledPre = - styled.pre < - CodeProps > - ` +const StyledPre = styled.pre<CodeProps>` margin: 0; ${props => !props.isDiff diff --git a/packages/dev-tools-pages/ts/components/container.tsx b/packages/dev-tools-pages/ts/components/container.tsx index 1b9212ed2..192d82af8 100644 --- a/packages/dev-tools-pages/ts/components/container.tsx +++ b/packages/dev-tools-pages/ts/components/container.tsx @@ -4,10 +4,7 @@ interface ContainerProps { wide?: boolean; } -const Container = - styled.div < - ContainerProps > - ` +const Container = styled.div<ContainerProps>` max-width: 77.5rem; margin: 0 auto; width: ${props => (props.wide ? '100%' : 'calc(100% - 5rem)')}; diff --git a/packages/dev-tools-pages/ts/components/content.tsx b/packages/dev-tools-pages/ts/components/content.tsx index f74e09af7..b3c353f8a 100644 --- a/packages/dev-tools-pages/ts/components/content.tsx +++ b/packages/dev-tools-pages/ts/components/content.tsx @@ -3,10 +3,7 @@ import styled from 'styled-components'; import { Container } from './container'; -const StyledMain = - styled.div < - MainProps > - ` +const StyledMain = styled.div<MainProps>` padding-top: 6.25rem; padding-bottom: 6.25rem; ${props => diff --git a/packages/dev-tools-pages/ts/components/tabs.tsx b/packages/dev-tools-pages/ts/components/tabs.tsx index 1d26f2777..fa2145208 100644 --- a/packages/dev-tools-pages/ts/components/tabs.tsx +++ b/packages/dev-tools-pages/ts/components/tabs.tsx @@ -48,7 +48,9 @@ const Tabs: React.StatelessComponent<{}> = props => ( })} </StyledTabList> - {React.Children.map(props.children, child => <TabPanel>{child}</TabPanel>)} + {React.Children.map(props.children, child => ( + <TabPanel>{child}</TabPanel> + ))} </ReactTabs> </Breakout> ); diff --git a/packages/dev-tools-pages/ts/components/trace.tsx b/packages/dev-tools-pages/ts/components/trace.tsx index 108154648..f41dac9b7 100644 --- a/packages/dev-tools-pages/ts/components/trace.tsx +++ b/packages/dev-tools-pages/ts/components/trace.tsx @@ -108,10 +108,7 @@ interface TraceProps { background?: string; } -const StyledSection = - styled.section < - TraceProps > - ` +const StyledSection = styled.section<TraceProps>` max-width: 90rem; margin: 0 auto; background: linear-gradient(to right, ${colors.black} 50%, ${props => props.background} 50%); @@ -138,10 +135,7 @@ const Wrapper = styled(Container)` `}; `; -const Block = - styled.div < - TraceProps > - ` +const Block = styled.div<TraceProps>` width: 50%; background: ${props => (props.background ? props.background : colors.black)}; color: ${props => (props.background ? 'inherit' : colors.white)}; @@ -200,10 +194,7 @@ const Item = styled.li` } `; -const Copy = - styled.div < - { dark: boolean } > - ` +const Copy = styled.div<{ dark: boolean }>` margin-right: 5.875rem; ${props => props.dark && diff --git a/packages/dev-tools-pages/ts/globalStyles.tsx b/packages/dev-tools-pages/ts/globalStyles.tsx index a77fb4eef..507497dd4 100644 --- a/packages/dev-tools-pages/ts/globalStyles.tsx +++ b/packages/dev-tools-pages/ts/globalStyles.tsx @@ -5,10 +5,7 @@ import styledNormalize from 'styled-normalize'; import { ContextInterface } from 'ts/context'; import { media } from 'ts/variables'; -const GlobalStyles = - createGlobalStyle < - ContextInterface > - ` +const GlobalStyles = createGlobalStyle<ContextInterface>` ${styledNormalize} ${hljsStyles} diff --git a/packages/dev-tools-pages/ts/pages/cov.tsx b/packages/dev-tools-pages/ts/pages/cov.tsx index ff1ced27d..85487248a 100644 --- a/packages/dev-tools-pages/ts/pages/cov.tsx +++ b/packages/dev-tools-pages/ts/pages/cov.tsx @@ -78,7 +78,7 @@ const Cov: React.StatelessComponent<{}> = () => ( </ContentBlock> <ContentBlock title="Installation"> <Breakout> - <Code>npm install @0x/sol-cov --save</Code> + <Code>npm install @0x/sol-coverage --save</Code> </Breakout> <p> @@ -124,7 +124,7 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`} <Breakout> <Code language="javascript"> {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; -import { RevertTraceSubprovider } from '@0x/sol-cov'; +import { RevertTraceSubprovider } from '@0x/sol-coverage'; const defaultFromAddress = "..."; // Some ethereum address with test funds const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress); diff --git a/packages/dev-tools-pages/ts/pages/profiler.tsx b/packages/dev-tools-pages/ts/pages/profiler.tsx index 860e2c25e..16ac9088e 100644 --- a/packages/dev-tools-pages/ts/pages/profiler.tsx +++ b/packages/dev-tools-pages/ts/pages/profiler.tsx @@ -121,7 +121,7 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`} <Breakout> <Code language="javascript"> {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; -import { RevertTraceSubprovider } from '@0x/sol-cov'; +import { RevertTraceSubprovider } from '@0x/sol-coverage'; const defaultFromAddress = "..."; // Some ethereum address with test funds const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress); diff --git a/packages/dev-tools-pages/ts/pages/trace.tsx b/packages/dev-tools-pages/ts/pages/trace.tsx index a25d2eff8..cc34e0fbe 100644 --- a/packages/dev-tools-pages/ts/pages/trace.tsx +++ b/packages/dev-tools-pages/ts/pages/trace.tsx @@ -91,7 +91,7 @@ const artifactAdapter = new YourCustomArtifactsAdapter(...);`} <Breakout> <Code language="javascript"> {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine'; -import { RevertTraceSubprovider } from '@0x/sol-cov'; +import { RevertTraceSubprovider } from '@0x/sol-coverage'; const defaultFromAddress = "..."; // Some ethereum address with test funds const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress); diff --git a/packages/devnet/genesis.json b/packages/devnet/genesis.json index 90431c31c..073672dd9 100644 --- a/packages/devnet/genesis.json +++ b/packages/devnet/genesis.json @@ -14,8 +14,7 @@ }, "nonce": "0x0", "timestamp": "0x5af1ffac", - "extraData": - "0x0000000000000000000000000000000000000000000000000000000000000000e8816898d851d5b61b7f950627d04d794c07ca370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000e8816898d851d5b61b7f950627d04d794c07ca370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", "gasLimit": "0x4c4b400000", "difficulty": "0x1", "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index 125a62cdf..adf27655e 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -176,8 +176,7 @@ "version": "1.0.1-rc.3", "changes": [ { - "note": - "Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface", + "note": "Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface", "pr": 936 }, { diff --git a/packages/instant/README.md b/packages/instant/README.md index 32abf76e0..8832e562d 100644 --- a/packages/instant/README.md +++ b/packages/instant/README.md @@ -17,9 +17,12 @@ The package is available as a UMD module named `zeroExInstant` at https://instan <body> <div id="zeroExInstantContainer"></div> <script> - zeroExInstant.render({ - // Initialization options - }, '#zeroExInstantContainer'); + zeroExInstant.render( + { + // Initialization options + }, + '#zeroExInstantContainer', + ); </script> </body> ``` diff --git a/packages/instant/src/components/animations/full_rotation.tsx b/packages/instant/src/components/animations/full_rotation.tsx index 9adb565f9..1dff1b1fc 100644 --- a/packages/instant/src/components/animations/full_rotation.tsx +++ b/packages/instant/src/components/animations/full_rotation.tsx @@ -14,10 +14,7 @@ to { } `; -export const FullRotation = - styled.div < - FullRotationProps > - ` +export const FullRotation = styled.div<FullRotationProps>` animation: ${rotatingKeyframes} 2s linear infinite; height: ${props => props.height}; width: ${props => props.width}; diff --git a/packages/instant/src/components/animations/position_animation.tsx b/packages/instant/src/components/animations/position_animation.tsx index 8b3b294b7..4f8f25679 100644 --- a/packages/instant/src/components/animations/position_animation.tsx +++ b/packages/instant/src/components/animations/position_animation.tsx @@ -95,10 +95,7 @@ const animationForSize = ( return animationSettingsForSize && mediaFn`${generatePositionAnimationCss(animationSettingsForSize)}`; }; -export const PositionAnimation = - styled.div < - PositionAnimationProps > - ` +export const PositionAnimation = styled.div<PositionAnimationProps>` && { ${props => props.zIndex && stylesForMedia<number>('z-index', props.zIndex)} ${props => defaultAnimation(props.positionSettings)} diff --git a/packages/instant/src/components/css_reset.tsx b/packages/instant/src/components/css_reset.tsx index 0bef85389..d1b20f4c9 100644 --- a/packages/instant/src/components/css_reset.tsx +++ b/packages/instant/src/components/css_reset.tsx @@ -4,9 +4,9 @@ import { createGlobalStyle } from '../style/theme'; export interface CSSResetProps {} /* -* Derived from -* https://github.com/jtrost/Complete-CSS-Reset -*/ + * Derived from + * https://github.com/jtrost/Complete-CSS-Reset + */ export const CSSReset = createGlobalStyle` .${INJECTED_DIV_CLASS} { a, abbr, area, article, aside, audio, b, bdo, blockquote, body, button, diff --git a/packages/instant/src/components/timed_progress_bar.tsx b/packages/instant/src/components/timed_progress_bar.tsx index b1644b871..287269af7 100644 --- a/packages/instant/src/components/timed_progress_bar.tsx +++ b/packages/instant/src/components/timed_progress_bar.tsx @@ -68,10 +68,7 @@ interface ProgressProps { animationSettings?: WidthAnimationSettings; } -export const Progress = - styled.div < - ProgressProps > - ` +export const Progress = styled.div<ProgressProps>` && { background-color: ${props => props.theme[ColorOption.primaryColor]}; border-radius: 6px; diff --git a/packages/instant/src/components/ui/circle.tsx b/packages/instant/src/components/ui/circle.tsx index 4f9f56f12..e4f2c5260 100644 --- a/packages/instant/src/components/ui/circle.tsx +++ b/packages/instant/src/components/ui/circle.tsx @@ -8,16 +8,15 @@ export interface CircleProps { } export const Circle = withTheme( - styled.div < - CircleProps > - ` - && { - width: ${props => props.diameter}px; - height: ${props => props.diameter}px; - background-color: ${props => (props.rawColor ? props.rawColor : props.theme[props.color || ColorOption.white])}; - border-radius: 50%; - } -`, + styled.div<CircleProps>` + && { + width: ${props => props.diameter}px; + height: ${props => props.diameter}px; + background-color: ${props => + props.rawColor ? props.rawColor : props.theme[props.color || ColorOption.white]}; + border-radius: 50%; + } + `, ); Circle.displayName = 'Circle'; diff --git a/packages/instant/src/components/ui/container.tsx b/packages/instant/src/components/ui/container.tsx index 58d7d5871..59b733f3e 100644 --- a/packages/instant/src/components/ui/container.tsx +++ b/packages/instant/src/components/ui/container.tsx @@ -51,10 +51,7 @@ const getBackgroundColor = (theme: any, backgroundColor?: ColorOption, rawBackgr return 'none'; }; -export const Container = - styled.div < - ContainerProps > - ` +export const Container = styled.div<ContainerProps>` && { box-sizing: border-box; ${props => cssRuleIfExists(props, 'flex-grow')} diff --git a/packages/instant/src/components/ui/flex.tsx b/packages/instant/src/components/ui/flex.tsx index 274c46b9e..145e654f1 100644 --- a/packages/instant/src/components/ui/flex.tsx +++ b/packages/instant/src/components/ui/flex.tsx @@ -14,10 +14,7 @@ export interface FlexProps { flexGrow?: number | string; } -export const Flex = - styled.div < - FlexProps > - ` +export const Flex = styled.div<FlexProps>` && { display: ${props => (props.inline ? 'inline-flex' : 'flex')}; flex-direction: ${props => props.direction}; diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx index 53c43ea0b..024e81b15 100644 --- a/packages/instant/src/components/ui/input.tsx +++ b/packages/instant/src/components/ui/input.tsx @@ -14,10 +14,7 @@ export interface InputProps extends React.HTMLAttributes<HTMLInputElement> { onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void; } -export const Input = - styled.input < - InputProps > - ` +export const Input = styled.input<InputProps>` && { all: initial; font-size: ${props => props.fontSize}; @@ -32,10 +29,11 @@ export const Input = color: ${props => props.theme[props.fontColor || 'white']} !important; opacity: 0.5 !important; } - &::-webkit-outer-spin-button, &::-webkit-inner-spin-button { + &::-webkit-outer-spin-button, + &::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; - } + } } `; diff --git a/packages/instant/src/components/ui/overlay.tsx b/packages/instant/src/components/ui/overlay.tsx index 0b5eaf299..0b1be6a65 100644 --- a/packages/instant/src/components/ui/overlay.tsx +++ b/packages/instant/src/components/ui/overlay.tsx @@ -12,10 +12,7 @@ export interface OverlayProps { showMaxWidth?: ScreenWidths; } -export const Overlay = - styled.div < - OverlayProps > - ` +export const Overlay = styled.div<OverlayProps>` && { position: fixed; top: 0; diff --git a/packages/instant/src/components/ui/text.tsx b/packages/instant/src/components/ui/text.tsx index 282477758..ca120f3bd 100644 --- a/packages/instant/src/components/ui/text.tsx +++ b/packages/instant/src/components/ui/text.tsx @@ -31,10 +31,7 @@ export const Text: React.StatelessComponent<TextProps> = ({ href, onClick, ...re }; const opacityOnHoverAmount = 0.5; -export const StyledText = - styled.div < - TextProps > - ` +export const StyledText = styled.div<TextProps>` && { font-family: 'Inter UI', sans-serif; font-style: ${props => props.fontStyle}; diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 67558c84a..bfd9e9098 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -74,5 +74,6 @@ export const PROVIDER_TYPE_TO_NAME: { [key in ProviderType]: string } = { [ProviderType.CoinbaseWallet]: 'Coinbase Wallet', [ProviderType.Parity]: 'Parity', [ProviderType.TrustWallet]: 'Trust Wallet', + [ProviderType.Opera]: 'Opera Wallet', [ProviderType.Fallback]: 'Fallback', }; diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index 6da4558ef..57a2dbdc2 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -62,4 +62,7 @@ const mapDispatchToProps = (dispatch: Dispatch<Action>, _ownProps: LatestErrorPr }, }); -export const LatestError = connect(mapStateToProps, mapDispatchToProps)(LatestErrorComponent); +export const LatestError = connect( + mapStateToProps, + mapDispatchToProps, +)(LatestErrorComponent); diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index ae672c919..f07a407da 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -183,6 +183,7 @@ export enum ProviderType { CoinbaseWallet = 'COINBASE_WALLET', Cipher = 'CIPHER', TrustWallet = 'TRUST_WALLET', + Opera = 'OPERA', Fallback = 'FALLBACK', } diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts index b009a327f..709561dbc 100644 --- a/packages/instant/src/util/asset.ts +++ b/packages/instant/src/util/asset.ts @@ -104,9 +104,8 @@ export const assetUtils = { return assetDataGroupIfExists[Network.Mainnet]; }, getERC20AssetsFromAssets: (assets: Asset[]): ERC20Asset[] => { - const erc20sOrUndefined = _.map( - assets, - asset => (asset.metaData.assetProxyId === AssetProxyId.ERC20 ? (asset as ERC20Asset) : undefined), + const erc20sOrUndefined = _.map(assets, asset => + asset.metaData.assetProxyId === AssetProxyId.ERC20 ? (asset as ERC20Asset) : undefined, ); return _.compact(erc20sOrUndefined); }, diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index aedf4f5d6..7d4f836ff 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -42,18 +42,21 @@ export const envUtil = { } }, getProviderType(provider: Provider): ProviderType | undefined { + const anyProvider = provider as any; if (provider.constructor.name === 'EthereumProvider') { return ProviderType.Mist; - } else if ((provider as any).isTrust) { + } else if (anyProvider.isTrust) { return ProviderType.TrustWallet; - } else if ((provider as any).isParity) { + } else if (anyProvider.isParity) { return ProviderType.Parity; - } else if ((provider as any).isMetaMask) { + } else if (anyProvider.isMetaMask) { return ProviderType.MetaMask; } else if (!_.isUndefined(_.get(window, 'SOFA'))) { return ProviderType.CoinbaseWallet; } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { return ProviderType.Cipher; + } else if (envUtil.getBrowser() === Browser.Opera && !anyProvider.isMetaMask) { + return ProviderType.Opera; } return; }, diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 79435426b..8a9def75f 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -48,8 +48,7 @@ "version": "2.1.0", "changes": [ { - "note": - "Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts", + "note": "Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts", "pr": 1173 }, { @@ -63,8 +62,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages.", + "note": "Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages.", "pr": 1145 } ], @@ -255,8 +253,7 @@ "version": "0.8.0", "changes": [ { - "note": - "Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades", + "note": "Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades", "pr": 615 } ], diff --git a/packages/metacoin/README.md b/packages/metacoin/README.md index 4f9609dde..6f35dfc25 100644 --- a/packages/metacoin/README.md +++ b/packages/metacoin/README.md @@ -3,12 +3,12 @@ This is an example project that demonstrates how the many Ethereum dev tools developed by 0x can be used in any Solidity/TS project. It supports: -* Compiling & testing smart contracts -* Generating typed contract wrappers -* Solidity coverage -* Solidity gas profiling -* Running tests against Ganache -* Running tests against our fork of Geth (it supports snapshotting & time travel) +- Compiling & testing smart contracts +- Generating typed contract wrappers +- Solidity coverage +- Solidity gas profiling +- Running tests against Ganache +- Running tests against our fork of Geth (it supports snapshotting & time travel) ## Contributing diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 65232639b..6812ff823 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -32,7 +32,9 @@ "@0x/abi-gen": "^1.0.20", "@0x/abi-gen-templates": "^1.0.1", "@0x/base-contract": "^3.0.11", - "@0x/sol-cov": "^2.1.17", + "@0x/sol-coverage": "^1.0.0", + "@0x/sol-profiler": "^1.0.0", + "@0x/sol-trace": "^1.0.0", "@0x/subproviders": "^2.1.9", "@0x/tslint-config": "^2.0.0", "@0x/types": "^1.5.0", diff --git a/packages/metacoin/test/utils/coverage.ts b/packages/metacoin/test/utils/coverage.ts index 31275a163..1a06d8c3c 100644 --- a/packages/metacoin/test/utils/coverage.ts +++ b/packages/metacoin/test/utils/coverage.ts @@ -1,5 +1,5 @@ import { devConstants } from '@0x/dev-utils'; -import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; +import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-coverage'; import * as _ from 'lodash'; import { config } from './config'; diff --git a/packages/metacoin/test/utils/profiler.ts b/packages/metacoin/test/utils/profiler.ts index e7c373d20..6e6fc309f 100644 --- a/packages/metacoin/test/utils/profiler.ts +++ b/packages/metacoin/test/utils/profiler.ts @@ -1,5 +1,5 @@ import { devConstants } from '@0x/dev-utils'; -import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; +import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-profiler'; import * as _ from 'lodash'; import { config } from './config'; diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index e09106bcd..5e7c89290 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -49,8 +49,7 @@ "version": "2.1.0", "changes": [ { - "note": - "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping", + "note": "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping", "pr": 1301 } ], @@ -96,8 +95,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Contract artifacts have been moved to the new @0xproject/contract-artifacts package. v1 migrations have been removed. `runMigrationsAsync` returns the addresses of the contracts that were deployed.", + "note": "Contract artifacts have been moved to the new @0xproject/contract-artifacts package. v1 migrations have been removed. `runMigrationsAsync` returns the addresses of the contracts that were deployed.", "pr": 1105 } ], diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index 5ae13b198..822f48967 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -45,45 +45,50 @@ function logIfDefined(x: any): void { const IS_LOCAL_PUBLISH = process.env.IS_LOCAL_PUBLISH === 'true'; const registry = IS_LOCAL_PUBLISH ? 'http://localhost:4873/' : 'https://registry.npmjs.org/'; const monorepoRootPath = path.join(__dirname, '../../..'); - const packages = utils.getPackages(monorepoRootPath); + // We sort error messages according to package topology so that we can see + // them in a more intuitive order. E.g. if package A has an error and + // package B imports it, the tests for both package A and package B will + // fail. But package B only fails because of an error in package A. + // Since the error in package A is the root cause, we log it first. + const packages = utils.getTopologicallySortedPackages(monorepoRootPath); const installablePackages = _.filter( packages, pkg => !pkg.packageJson.private && !_.isUndefined(pkg.packageJson.main) && pkg.packageJson.main.endsWith('.js'), ); - utils.log('Testing packages:'); - _.map(installablePackages, pkg => utils.log(`* ${pkg.packageJson.name}`)); - // Run all package tests asynchronously and push promises into an array so - // we can wait for all of them to resolve. - const promises: Array<Promise<void>> = []; - const errors: PackageErr[] = []; - for (const installablePackage of installablePackages) { - const packagePromise = testInstallPackageAsync(monorepoRootPath, registry, installablePackage).catch(error => { - errors.push({ packageName: installablePackage.packageJson.name, error }); - }); - promises.push(packagePromise); - } - await Promise.all(promises); - if (errors.length > 0) { - // We sort error messages according to package topology so that we can - // them in a more intuitive order. E.g. if package A has an error and - // package B imports it, the tests for both package A and package B will - // fail. But package B only fails because of an error in package A. - // Since the error in package A is the root cause, we log it first. - const topologicallySortedPackages = utils.getTopologicallySortedPackages(monorepoRootPath); - const topologicallySortedErrors = _.sortBy(errors, packageErr => - findPackageIndex(topologicallySortedPackages, packageErr.packageName), - ); - _.forEach(topologicallySortedErrors, packageError => { - utils.log(`ERROR in package ${packageError.packageName}:`); - logIfDefined(packageError.error.message); - logIfDefined(packageError.error.stderr); - logIfDefined(packageError.error.stdout); - logIfDefined(packageError.error.stack); - }); - process.exit(1); - } else { - process.exit(0); + const CHUNK_SIZE = 15; + const chunkedInstallablePackages = _.chunk(installablePackages, CHUNK_SIZE); + utils.log(`Testing all packages in ${chunkedInstallablePackages.length} chunks`); + for (const installablePackagesChunk of chunkedInstallablePackages) { + utils.log('Testing packages:'); + _.map(installablePackagesChunk, pkg => utils.log(`* ${pkg.packageJson.name}`)); + // Run all package tests within that chunk asynchronously and push promises into an array so + // we can wait for all of them to resolve. + const promises: Array<Promise<void>> = []; + const errors: PackageErr[] = []; + for (const installablePackage of installablePackagesChunk) { + const packagePromise = testInstallPackageAsync(monorepoRootPath, registry, installablePackage).catch( + error => { + errors.push({ packageName: installablePackage.packageJson.name, error }); + }, + ); + promises.push(packagePromise); + } + await Promise.all(promises); + if (errors.length > 0) { + const topologicallySortedErrors = _.sortBy(errors, packageErr => + findPackageIndex(packages, packageErr.packageName), + ); + _.forEach(topologicallySortedErrors, packageError => { + utils.log(`ERROR in package ${packageError.packageName}:`); + logIfDefined(packageError.error.message); + logIfDefined(packageError.error.stderr); + logIfDefined(packageError.error.stdout); + logIfDefined(packageError.error.stack); + }); + process.exit(1); + } } + process.exit(0); })().catch(err => { utils.log(`Unexpected error: ${err.message}`); process.exit(1); diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index d3f15f092..6cda7a1e6 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -3,8 +3,7 @@ "version": "3.1.0", "changes": [ { - "note": - "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", + "note": "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", "pr": 1363 } ], @@ -78,23 +77,19 @@ "version": "3.0.0", "changes": [ { - "note": - "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", + "note": "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", "pr": 1235 }, { - "note": - "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", + "note": "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", "pr": 1235 }, { - "note": - "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", + "note": "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", "pr": 1235 }, { - "note": - "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", + "note": "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", "pr": 1235 } ], @@ -113,8 +108,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", + "note": "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", "pr": 1102 }, { @@ -145,8 +139,7 @@ "version": "1.0.6", "changes": [ { - "note": - "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", + "note": "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", "pr": 1096 } ], @@ -228,23 +221,19 @@ "pr": 953 }, { - "note": - "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", + "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`", + "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`", + "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 }, { - "note": - "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", + "note": "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", "pr": 997 }, { @@ -252,8 +241,7 @@ "pr": 997 }, { - "note": - "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", + "note": "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", "pr": 997 } ], @@ -264,12 +252,10 @@ "changes": [ { "pr": 914, - "note": - "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." + "note": "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." }, { - "note": - "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", + "note": "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", "pr": 936 }, { @@ -313,8 +299,7 @@ "version": "1.0.0-rc.2", "changes": [ { - "note": - "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" + "note": "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" } ], "timestamp": 1532357734 @@ -377,8 +362,7 @@ "version": "0.0.5", "changes": [ { - "note": - "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" + "note": "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" } ], "timestamp": 1527008794 diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index afd523f88..e98a36719 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -13,8 +13,7 @@ "version": "2.3.0", "changes": [ { - "note": - "Added a WebSocket interface to OrderWatcher so that it can be used by a client written in any language", + "note": "Added a WebSocket interface to OrderWatcher so that it can be used by a client written in any language", "pr": 1427 } ] @@ -59,8 +58,7 @@ "version": "2.2.4", "changes": [ { - "note": - "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX", + "note": "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX", "pr": 1259 } ], @@ -74,8 +72,7 @@ "pr": 1227 }, { - "note": - "Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event" + "note": "Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event" } ], "timestamp": 1542134075 @@ -106,8 +103,7 @@ "pr": 1118 }, { - "note": - "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter.", + "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter.", "pr": 1105 } ], @@ -136,18 +132,15 @@ "version": "2.0.0", "changes": [ { - "note": - "Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.", + "note": "Fixes dropped events issue by fetching logs by blockHash instead of blockNumber. Support for fetching by blockHash was added in Geth > v1.8.13 and Parity > v2.1.0. Infura works too.", "pr": 1080 }, { - "note": - "Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it", + "note": "Fix misunderstanding about blockstream interface callbacks and pass the raw JSON RPC responses to it", "pr": 1080 }, { - "note": - "Add `transactionHash` to `OrderState` emitted by `OrderWatcher` subscriptions if the order's state change originated from a transaction.", + "note": "Add `transactionHash` to `OrderState` emitted by `OrderWatcher` subscriptions if the order's state change originated from a transaction.", "pr": 1087 } ], @@ -211,8 +204,7 @@ "version": "1.0.1-rc.4", "changes": [ { - "note": - "Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", + "note": "Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", "pr": 924 }, { diff --git a/packages/order-watcher/README.md b/packages/order-watcher/README.md index 385fe4715..a841775b6 100644 --- a/packages/order-watcher/README.md +++ b/packages/order-watcher/README.md @@ -36,7 +36,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol **Environmental Variables** Several environmental variables can be set to configure the server: -* `ORDER_WATCHER_HTTP_PORT` specifies the port that the http server will listen on +- `ORDER_WATCHER_HTTP_PORT` specifies the port that the http server will listen on and accept connections from. When this is not set, we default to 8080. **Requests** @@ -58,10 +58,10 @@ wsClient = create_connection("ws://127.0.0.1:8080") With the connection established, you prepare the payload for your request. The payload is a json object with a format established by the [JSON RPC specification](https://www.jsonrpc.org/specification): -* `id`: All requests require you to specify a numerical `id`. When the server responds to the request, the response will have the same `id` as the one supplied with your request. -* `jsonrpc`: This is always the string `'2.0'`. -* `method`: This specifies the OrderWatcher method you want to call. I.e., `'ADD_ORDER'`, `'REMOVE_ORDER'` or `'GET_STATS'`. -* `params`: These contain the parameters needed by OrderWatcher to execute the method you called. For `ADD_ORDER`, provide `{ signedOrder: <your signedOrder> }`. For `REMOVE_ORDER`, provide `{ orderHash: <your orderHash> }`. For `GET_STATS`, no parameters are needed, so you may leave this empty. +- `id`: All requests require you to specify a numerical `id`. When the server responds to the request, the response will have the same `id` as the one supplied with your request. +- `jsonrpc`: This is always the string `'2.0'`. +- `method`: This specifies the OrderWatcher method you want to call. I.e., `'ADD_ORDER'`, `'REMOVE_ORDER'` or `'GET_STATS'`. +- `params`: These contain the parameters needed by OrderWatcher to execute the method you called. For `ADD_ORDER`, provide `{ signedOrder: <your signedOrder> }`. For `REMOVE_ORDER`, provide `{ orderHash: <your orderHash> }`. For `GET_STATS`, no parameters are needed, so you may leave this empty. Next, convert the payload to a string and send it through the connection. In Javascript: @@ -92,11 +92,11 @@ wsClient.send(json.dumps(remove_order_payload)); **Response** The server responds to all requests in a similar format. In the data field, you'll find another object containing the following fields: -* `id`: The id corresponding to the request that the server is responding to. `UPDATE` responses are not based on any requests so the `id` field is omitted`. -* `jsonrpc`: Always `'2.0'`. -* `method`: The method the server is responding to. Eg. `ADD_ORDER`. When order states change the server may also initiate a response. In this case, method will be listed as `UPDATE`. -* `result`: This field varies based on the method. `UPDATE` responses contain the new order state. `GET_STATS` responses contain the current order count. When there are errors, this field is omitted. -* `error`: When there is an error executing a request, the [JSON RPC](https://www.jsonrpc.org/specification) error object is listed here. When the server responds successfully, this field is omitted. +- `id`: The id corresponding to the request that the server is responding to. `UPDATE` responses are not based on any requests so the `id` field is omitted`. +- `jsonrpc`: Always `'2.0'`. +- `method`: The method the server is responding to. Eg. `ADD_ORDER`. When order states change the server may also initiate a response. In this case, method will be listed as `UPDATE`. +- `result`: This field varies based on the method. `UPDATE` responses contain the new order state. `GET_STATS` responses contain the current order count. When there are errors, this field is omitted. +- `error`: When there is an error executing a request, the [JSON RPC](https://www.jsonrpc.org/specification) error object is listed here. When the server responds successfully, this field is omitted. In Javascript, the responses can be parsed using the `onmessage` callback: diff --git a/packages/pipeline/README.md b/packages/pipeline/README.md index 794488cac..4fc8e0ff9 100644 --- a/packages/pipeline/README.md +++ b/packages/pipeline/README.md @@ -147,20 +147,38 @@ set the`ZEROEX_DATA_PIPELINE_DB_URL` environment variable to a valid starting from that block number. 7. Run the migrations and then run your new script locally and verify it works as expected. +8. After all tests pass and you can run the script locally, open a new PR to + the monorepo. Don't merge this yet! +9. If you added any new scripts or dependencies between scripts, you will need + to make changes to https://github.com/0xProject/0x-pipeline-orchestration + and make a separate PR there. Don't merge this yet! +10. After your PR passes code review, ask @feuGeneA or @xianny to deploy your + changes to the QA environment. Check the [QA Airflow dashboard](http://airflow-qa.0x.org:8080) + to make sure everything works correctly in the QA environment. +11. Merge your PR to 0x-monorepo (and + https://github.com/0xProject/0x-pipeline-orchestration if needed). Then ask + @feuGeneA or @xianny to deploy to production. +12. Monitor the [production Airflow dashboard](http://airflow.0x.org:8080) to + make sure everything still works. +13. Celebrate! :tada: #### Additional guidelines and tips: -* Table names should be plural and separated by underscores (e.g., +- Table names should be plural and separated by underscores (e.g., `exchange_fill_events`). -* Any table which contains data which comes directly from a third-party source +- Any table which contains data which comes directly from a third-party source should be namespaced in the `raw` PostgreSQL schema. -* Column names in the database should be separated by underscores (e.g., +- Column names in the database should be separated by underscores (e.g., `maker_asset_type`). -* Field names in entity classes (like any other fields in TypeScript) should +- Field names in entity classes (like any other fields in TypeScript) should be camel-cased (e.g., `makerAssetType`). -* All timestamps should be stored as milliseconds since the Unix Epoch. -* Use the `BigNumber` type for TypeScript code which deals with 256-bit +- All timestamps should be stored as milliseconds since the Unix Epoch. +- Use the `BigNumber` type for TypeScript code which deals with 256-bit numbers from smart contracts or for any case where we are dealing with large floating point numbers. -* [TypeORM documentation](http://typeorm.io/#/) is pretty robust and can be a +- [TypeORM documentation](http://typeorm.io/#/) is pretty robust and can be a helpful resource. + +* Scripts/parsers should perform minimum data transformation/normalization. + The idea here is to have a raw data feed that will be cleaned up and + synthesized in a separate step. diff --git a/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts b/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts new file mode 100644 index 000000000..957af4941 --- /dev/null +++ b/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts @@ -0,0 +1,21 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class UpdateDDexAPIToV31547153875669 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise<any> { + await queryRunner.query(` + UPDATE raw.token_orderbook_snapshots + SET quote_asset_symbol='WETH' + WHERE quote_asset_symbol='ETH' AND + source='ddex'; + `); + } + + public async down(queryRunner: QueryRunner): Promise<any> { + await queryRunner.query(` + UPDATE raw.token_orderbook_snapshots + SET quote_asset_symbol='ETH' + WHERE quote_asset_symbol='WETH' AND + source='ddex'; + `); + } +} diff --git a/packages/pipeline/src/data_sources/ddex/index.ts b/packages/pipeline/src/data_sources/ddex/index.ts index 2bbd8c29b..7ef92b90f 100644 --- a/packages/pipeline/src/data_sources/ddex/index.ts +++ b/packages/pipeline/src/data_sources/ddex/index.ts @@ -1,6 +1,6 @@ import { fetchAsync, logUtils } from '@0x/utils'; -const DDEX_BASE_URL = 'https://api.ddex.io/v2'; +const DDEX_BASE_URL = 'https://api.ddex.io/v3'; const ACTIVE_MARKETS_URL = `${DDEX_BASE_URL}/markets`; const NO_AGGREGATION_LEVEL = 3; // See https://docs.ddex.io/#get-orderbook const ORDERBOOK_ENDPOINT = `/orderbook?level=${NO_AGGREGATION_LEVEL}`; @@ -23,7 +23,6 @@ export interface DdexMarket { baseTokenDecimals: number; baseTokenAddress: string; minOrderSize: string; - maxOrderSize: string; pricePrecision: number; priceDecimals: number; amountDecimals: number; diff --git a/packages/pipeline/src/parsers/ddex_orders/index.ts b/packages/pipeline/src/parsers/ddex_orders/index.ts index eeb9c9d5b..562f894ab 100644 --- a/packages/pipeline/src/parsers/ddex_orders/index.ts +++ b/packages/pipeline/src/parsers/ddex_orders/index.ts @@ -58,14 +58,12 @@ export function parseDdexOrder( tokenOrder.orderType = orderType; tokenOrder.price = price; - // ddex currently confuses quote and base assets. - // We switch them here to maintain our internal consistency. - tokenOrder.baseAssetSymbol = ddexMarket.quoteToken; - tokenOrder.baseAssetAddress = ddexMarket.quoteTokenAddress; + tokenOrder.baseAssetSymbol = ddexMarket.baseToken; + tokenOrder.baseAssetAddress = ddexMarket.baseTokenAddress; tokenOrder.baseVolume = amount; - tokenOrder.quoteAssetSymbol = ddexMarket.baseToken; - tokenOrder.quoteAssetAddress = ddexMarket.baseTokenAddress; + tokenOrder.quoteAssetSymbol = ddexMarket.quoteToken; + tokenOrder.quoteAssetAddress = ddexMarket.quoteTokenAddress; tokenOrder.quoteVolume = price.times(amount); return tokenOrder; } diff --git a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts index 40bb6fc97..03fc764f2 100644 --- a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts +++ b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts @@ -29,18 +29,23 @@ async function getOrderbookAsync(): Promise<void> { console.log(`Got ${rawOrders.records.length} orders.`); console.log('Parsing orders...'); // Parse the sra orders, then add source url to each. - const orders = R.pipe(parseSraOrders, R.map(setSourceUrl(RADAR_RELAY_URL)))(rawOrders); + const orders = R.pipe( + parseSraOrders, + R.map(setSourceUrl(RADAR_RELAY_URL)), + )(rawOrders); // Save all the orders and update the observed time stamps in a single // transaction. console.log('Saving orders and updating timestamps...'); const observedTimestamp = Date.now(); - await connection.transaction(async (manager: EntityManager): Promise<void> => { - for (const order of orders) { - await manager.save(SraOrder, order); - const orderObservation = createObservedTimestampForOrder(order, observedTimestamp); - await manager.save(orderObservation); - } - }); + await connection.transaction( + async (manager: EntityManager): Promise<void> => { + for (const order of orders) { + await manager.save(SraOrder, order); + const orderObservation = createObservedTimestampForOrder(order, observedTimestamp); + await manager.save(orderObservation); + } + }, + ); } const sourceUrlProp = R.lensProp('sourceUrl'); @@ -49,6 +54,8 @@ const sourceUrlProp = R.lensProp('sourceUrl'); * Sets the source url for a single order. Returns a new order instead of * mutating the given one. */ -const setSourceUrl = R.curry((sourceURL: string, order: SraOrder): SraOrder => { - return R.set(sourceUrlProp, sourceURL, order); -}); +const setSourceUrl = R.curry( + (sourceURL: string, order: SraOrder): SraOrder => { + return R.set(sourceUrlProp, sourceURL, order); + }, +); diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json b/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json index 5223976f9..e7161085d 100644 --- a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json +++ b/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json @@ -305,8 +305,7 @@ "custom_fields": [ { "custom_field_definition_id": 100764, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" }, { "custom_field_definition_id": 103481, @@ -345,8 +344,7 @@ "custom_fields": [ { "custom_field_definition_id": 100764, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" }, { "custom_field_definition_id": 103481, @@ -385,13 +383,11 @@ "custom_fields": [ { "custom_field_definition_id": 100764, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" }, { "custom_field_definition_id": 103481, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" } ], "date_created": 1489791470, @@ -426,13 +422,11 @@ "custom_fields": [ { "custom_field_definition_id": 100764, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----" }, { "custom_field_definition_id": 103481, - "value": - "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" + "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------" } ], "date_created": 1489791672, diff --git a/packages/pipeline/test/parsers/ddex_orders/index_test.ts b/packages/pipeline/test/parsers/ddex_orders/index_test.ts index f30e86b02..d6f69e090 100644 --- a/packages/pipeline/test/parsers/ddex_orders/index_test.ts +++ b/packages/pipeline/test/parsers/ddex_orders/index_test.ts @@ -25,7 +25,6 @@ describe('ddex_orders', () => { baseTokenDecimals: 2, baseTokenAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81', minOrderSize: '0.1', - maxOrderSize: '1000', pricePrecision: 1, priceDecimals: 1, amountDecimals: 0, @@ -39,14 +38,12 @@ describe('ddex_orders', () => { expected.observedTimestamp = observedTimestamp; expected.orderType = OrderType.Bid; expected.price = new BigNumber(0.5); - // ddex currently confuses base and quote assets. - // Switch them to maintain our internal consistency. - expected.baseAssetSymbol = 'ABC'; - expected.baseAssetAddress = '0x0000000000000000000000000000000000000000'; - expected.baseVolume = new BigNumber(10); - expected.quoteAssetSymbol = 'DEF'; - expected.quoteAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81'; + expected.quoteAssetSymbol = 'ABC'; + expected.quoteAssetAddress = '0x0000000000000000000000000000000000000000'; expected.quoteVolume = new BigNumber(5); + expected.baseAssetSymbol = 'DEF'; + expected.baseAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81'; + expected.baseVolume = new BigNumber(10); const actual = parseDdexOrder(ddexMarket, observedTimestamp, orderType, source, ddexOrder); expect(actual).deep.equal(expected); diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 13109e613..02608f18d 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -337,18 +337,15 @@ "version": "0.0.5", "changes": [ { - "note": - "Handle `reflection` type rendering so that anonymous function type declarations render properly", + "note": "Handle `reflection` type rendering so that anonymous function type declarations render properly", "pr": 465 }, { - "note": - "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", + "note": "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.", "pr": 465 }, { - "note": - "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", + "note": "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.", "pr": 465 }, { @@ -362,8 +359,7 @@ "version": "0.0.3", "changes": [ { - "note": - "Move TS typings from devDependencies to dependencies since they are needed by the package user." + "note": "Move TS typings from devDependencies to dependencies since they are needed by the package user." } ], "timestamp": 1521298800 diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 19c092e4d..7b1f4f80a 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -11,15 +11,15 @@ A full-page React component for rendering beautiful documentation for Solidity a #### Features -* Mobile optimized -* Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments. -* Syntax highlighting support for TypeScript & Solidity -* Type declaration linking -* Type declaration popovers to avoid clicking through to the definition -* Section/method/type anchors for easily pointing others to a specific part of your docs. -* Version picker -* Customizable sidebar header -* Supports custom markdown sections so you can easily add an intro or installation instructions. +- Mobile optimized +- Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments. +- Syntax highlighting support for TypeScript & Solidity +- Type declaration linking +- Type declaration popovers to avoid clicking through to the definition +- Section/method/type anchors for easily pointing others to a specific part of your docs. +- Version picker +- Customizable sidebar header +- Supports custom markdown sections so you can easily add an intro or installation instructions. ## Installation @@ -45,9 +45,9 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol Feel free to contribute to these improvements! -* Allow user to pass in styling for all major elements similar to [Material-UI](http://www.material-ui.com/). -* Allow user to define an alternative font and have it change everywhere. -* Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc). +- Allow user to pass in styling for all major elements similar to [Material-UI](http://www.material-ui.com/). +- Allow user to define an alternative font and have it change everywhere. +- Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc). ## Contributing diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx index 85547576b..424fe9ecf 100644 --- a/packages/react-docs/src/components/doc_reference.tsx +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -194,21 +194,19 @@ export class DocReference extends React.Component<DocReferenceProps, DocReferenc <div>{functionDefs}</div> </div> )} - {!_.isUndefined(docSection.events) && - docSection.events.length > 0 && ( - <div> - <h2 style={headerStyle}>Events</h2> - <div>{eventDefs}</div> - </div> - )} + {!_.isUndefined(docSection.events) && docSection.events.length > 0 && ( + <div> + <h2 style={headerStyle}>Events</h2> + <div>{eventDefs}</div> + </div> + )} {!_.isUndefined(docSection.externalExportToLink) && this._renderExternalExports(docSection.externalExportToLink)} - {!_.isUndefined(typeDefs) && - typeDefs.length > 0 && ( - <div> - <div>{typeDefs}</div> - </div> - )} + {!_.isUndefined(typeDefs) && typeDefs.length > 0 && ( + <div> + <div>{typeDefs}</div> + </div> + )} <div style={{ width: '100%', diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index 0df44ca1c..06896159f 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -45,7 +45,8 @@ export const Interface: React.SFC<InterfaceProps> = (props: InterfaceProps): any typeDefinitionByName={props.typeDefinitionByName} isInPopover={props.isInPopover} /> - )}, + )} + , </span> ); }); diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 7cdf19bb0..3189d86cf 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -91,16 +91,14 @@ export class SignatureBlock extends React.Component<SignatureBlockProps, Signatu /> )} {method.comment && <Comment comment={method.comment} className="py2" />} - {method.parameters && - !_.isEmpty(method.parameters) && - hasExclusivelyNamedParams && ( - <div> - <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}> - ARGUMENTS - </h4> - {this._renderParameterDescriptions(method.parameters, method.name)} - </div> - )} + {method.parameters && !_.isEmpty(method.parameters) && hasExclusivelyNamedParams && ( + <div> + <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}> + ARGUMENTS + </h4> + {this._renderParameterDescriptions(method.parameters, method.name)} + </div> + )} {method.returnComment && ( <div className="pt1 comment"> <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}> diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index fa3b658b4..894c3f560 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -53,7 +53,8 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { typeDefinitionByName={props.typeDefinitionByName} docsInfo={props.docsInfo} isInPopover={props.isInPopover} - />[] + /> + [] </span> ); } else { @@ -181,9 +182,11 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => { }); typeName = ( <div> - [{_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => { + [ + {_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => { return [prev, ', ', curr]; - })}] + })} + ] </div> ); break; diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index aaf2485d1..23217137f 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -3,8 +3,7 @@ "version": "1.1.0", "changes": [ { - "note": - "Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop.", + "note": "Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop.", "pr": 1448 } ], diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index a9105e132..fccd56de7 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -32,18 +32,15 @@ interface AnchorIconProps { shouldShowAnchor: boolean; } -const AnchorIcon = - styled.i < - AnchorIconProps > - ` - opacity: ${props => (props.shouldShowAnchor ? 1 : 0)}; - &:hover { - opacity: ${props => (props.shouldShowAnchor ? 0.6 : 0)}; - } - font-size: 20px; - transform: rotate(45deg); - cursor: pointer; - `; +const AnchorIcon = styled.i<AnchorIconProps>` + opacity: ${props => (props.shouldShowAnchor ? 1 : 0)}; + &:hover { + opacity: ${props => (props.shouldShowAnchor ? 0.6 : 0)}; + } + font-size: 20px; + transform: rotate(45deg); + cursor: pointer; +`; export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleState> { public static defaultProps: Partial<AnchorTitleProps> = { diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 3c88bf4e9..246b298ab 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -166,8 +166,7 @@ "version": "1.1.0", "changes": [ { - "note": - "Quicken compilation by sending multiple contracts to the same solcjs invocation, batching them together based on compiler version requirements.", + "note": "Quicken compilation by sending multiple contracts to the same solcjs invocation, batching them together based on compiler version requirements.", "pr": 965 }, { @@ -381,8 +380,7 @@ "pr": 426 }, { - "note": - "Add `bytecode`, `runtime_bytecode`, `source_map`, `source_map_runtime` and `sources` fields to artifacts", + "note": "Add `bytecode`, `runtime_bytecode`, `source_map`, `source_map_runtime` and `sources` fields to artifacts", "pr": 426 }, { @@ -390,8 +388,7 @@ "pr": 426 }, { - "note": - "Allow deployer to accept a provider instead of port and host. This makes it possible to run it with in-process ganache-core", + "note": "Allow deployer to accept a provider instead of port and host. This makes it possible to run it with in-process ganache-core", "pr": 426 }, { @@ -412,8 +409,7 @@ "pr": 408 }, { - "note": - "Improve an error message for when deployer is supplied with an incorrect number of constructor arguments", + "note": "Improve an error message for when deployer is supplied with an incorrect number of constructor arguments", "pr": 419 } ], diff --git a/packages/sol-compiler/README.md b/packages/sol-compiler/README.md index 445aea315..412a5fc02 100644 --- a/packages/sol-compiler/README.md +++ b/packages/sol-compiler/README.md @@ -2,11 +2,11 @@ Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: -* Smart re-compilation: Only recompiles when smart contracts have changed -* Ability to compile an entire project instead of only individual `.sol` files -* Compilation using the Solidity version specified at the top of each individual `.sol` file -* Proper parsing of Solidity version ranges -* Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). +- Smart re-compilation: Only recompiles when smart contracts have changed +- Ability to compile an entire project instead of only individual `.sol` files +- Compilation using the Solidity version specified at the top of each individual `.sol` file +- Proper parsing of Solidity version ranges +- Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). ### Read the [Documentation](https://0xproject.com/docs/sol-compiler). diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts index 18cc68aaf..db0c09581 100644 --- a/packages/sol-compiler/src/cli.ts +++ b/packages/sol-compiler/src/cli.ts @@ -33,8 +33,8 @@ const SEPARATOR = ','; const contracts = _.isUndefined(argv.contracts) ? undefined : argv.contracts === DEFAULT_CONTRACTS_LIST - ? DEFAULT_CONTRACTS_LIST - : argv.contracts.split(SEPARATOR); + ? DEFAULT_CONTRACTS_LIST + : argv.contracts.split(SEPARATOR); const opts = { contractsDir: argv.contractsDir, artifactsDir: argv.artifactsDir, diff --git a/packages/sol-cov/tslint.json b/packages/sol-cov/tslint.json deleted file mode 100644 index 631f46bca..000000000 --- a/packages/sol-cov/tslint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": ["@0x/tslint-config"], - "rules": { - "completed-docs": false - } -} diff --git a/packages/sol-cov/.npmignore b/packages/sol-coverage/.npmignore index 037786e46..037786e46 100644 --- a/packages/sol-cov/.npmignore +++ b/packages/sol-coverage/.npmignore diff --git a/packages/sol-coverage/CHANGELOG.json b/packages/sol-coverage/CHANGELOG.json new file mode 100644 index 000000000..223400eae --- /dev/null +++ b/packages/sol-coverage/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils", + "pr": 1492 + } + ] + } +] diff --git a/packages/sol-cov/README.md b/packages/sol-coverage/README.md index 31d73dc63..f8cc62eb8 100644 --- a/packages/sol-cov/README.md +++ b/packages/sol-coverage/README.md @@ -1,25 +1,25 @@ -## @0x/sol-cov +## @0x/sol-coverage A Solidity code coverage tool. -### Read the [Documentation](https://0xproject.com/docs/sol-cov). +### Read the [Documentation](https://0xproject.com/docs/sol-coverage). ## Installation ```bash -yarn add @0x/sol-cov +yarn add @0x/sol-coverage ``` **Import** ```javascript -import { CoverageSubprovider } from '@0x/sol-cov'; +import { CoverageSubprovider } from '@0x/sol-coverage'; ``` or ```javascript -var CoverageSubprovider = require('@0x/sol-cov').CoverageSubprovider; +var CoverageSubprovider = require('@0x/sol-coverage').CoverageSubprovider; ``` ## Contributing @@ -47,13 +47,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0x/sol-cov yarn build +PKG=@0x/sol-coverage yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0x/sol-cov yarn watch +PKG=@0x/sol-coverage yarn watch ``` ### Clean diff --git a/packages/sol-coverage/package.json b/packages/sol-coverage/package.json new file mode 100644 index 000000000..7dc764efd --- /dev/null +++ b/packages/sol-coverage/package.json @@ -0,0 +1,52 @@ +{ + "name": "@0x/sol-coverage", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Generate coverage reports for Solidity code", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "build": "tsc -b", + "build:ci": "yarn build", + "lint": "tslint --format stylish --project .", + "clean": "shx rm -rf lib src/artifacts generated_docs", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" + }, + "config": { + "postpublish": { + "assets": [] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-coverage/README.md", + "dependencies": { + "@0x/subproviders": "^2.1.8", + "@0x/sol-tracing-utils": "^2.1.16", + "@0x/typescript-typings": "^3.0.6", + "ethereum-types": "^1.1.4", + "lodash": "^4.17.5" + }, + "devDependencies": { + "@0x/tslint-config": "^2.0.0", + "@types/node": "*", + "npm-run-all": "^4.1.2", + "nyc": "^11.0.1", + "shx": "^0.2.2", + "sinon": "^4.0.0", + "tslint": "5.11.0", + "typedoc": "0.13.0", + "typescript": "3.0.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/sol-cov/src/coverage_subprovider.ts b/packages/sol-coverage/src/coverage_subprovider.ts index 9667e891c..e6b546c4a 100644 --- a/packages/sol-cov/src/coverage_subprovider.ts +++ b/packages/sol-coverage/src/coverage_subprovider.ts @@ -1,22 +1,22 @@ -import * as _ from 'lodash'; - -import { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; -import { collectCoverageEntries } from './collect_coverage_entries'; -import { SingleFileSubtraceHandler, TraceCollector } from './trace_collector'; -import { TraceInfoSubprovider } from './trace_info_subprovider'; import { + AbstractArtifactAdapter, BranchCoverage, + collectCoverageEntries, ContractData, Coverage, FunctionCoverage, FunctionDescription, + SingleFileSubtraceHandler, SourceRange, StatementCoverage, StatementDescription, Subtrace, + TraceCollector, TraceInfo, -} from './types'; -import { utils } from './utils'; + TraceInfoSubprovider, + utils, +} from '@0x/sol-tracing-utils'; +import * as _ from 'lodash'; /** * This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface. diff --git a/packages/sol-cov/src/globals.d.ts b/packages/sol-coverage/src/globals.d.ts index e799b3529..e799b3529 100644 --- a/packages/sol-cov/src/globals.d.ts +++ b/packages/sol-coverage/src/globals.d.ts diff --git a/packages/sol-coverage/src/index.ts b/packages/sol-coverage/src/index.ts new file mode 100644 index 000000000..97b4ecee6 --- /dev/null +++ b/packages/sol-coverage/src/index.ts @@ -0,0 +1,23 @@ +export { CoverageSubprovider } from './coverage_subprovider'; +export { + SolCompilerArtifactAdapter, + TruffleArtifactAdapter, + AbstractArtifactAdapter, + ContractData, +} from '@0x/sol-tracing-utils'; + +export { + JSONRPCRequestPayload, + Provider, + JSONRPCErrorCallback, + JSONRPCResponsePayload, + JSONRPCResponseError, +} from 'ethereum-types'; + +export { + JSONRPCRequestPayloadWithMethod, + NextCallback, + ErrorCallback, + OnNextCompleted, + Callback, +} from '@0x/subproviders'; diff --git a/packages/sol-coverage/tsconfig.json b/packages/sol-coverage/tsconfig.json new file mode 100644 index 000000000..233008d61 --- /dev/null +++ b/packages/sol-coverage/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "." + }, + "include": ["./src/**/*"] +} diff --git a/packages/sol-coverage/tslint.json b/packages/sol-coverage/tslint.json new file mode 100644 index 000000000..dd9053357 --- /dev/null +++ b/packages/sol-coverage/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0x/tslint-config"] +} diff --git a/packages/sol-cov/typedoc-tsconfig.json b/packages/sol-coverage/typedoc-tsconfig.json index c9b0af1ae..c9b0af1ae 100644 --- a/packages/sol-cov/typedoc-tsconfig.json +++ b/packages/sol-coverage/typedoc-tsconfig.json diff --git a/packages/sol-doc/CHANGELOG.json b/packages/sol-doc/CHANGELOG.json index 1be3b2121..70a769541 100644 --- a/packages/sol-doc/CHANGELOG.json +++ b/packages/sol-doc/CHANGELOG.json @@ -111,8 +111,7 @@ "version": "1.0.0", "changes": [ { - "note": - "Utility to generate documentation for Solidity smart contracts, outputting a format compliant with @0xproject/types.DocAgnosticFormat", + "note": "Utility to generate documentation for Solidity smart contracts, outputting a format compliant with @0xproject/types.DocAgnosticFormat", "pr": 1004 } ] diff --git a/packages/sol-profiler/.npmignore b/packages/sol-profiler/.npmignore new file mode 100644 index 000000000..037786e46 --- /dev/null +++ b/packages/sol-profiler/.npmignore @@ -0,0 +1,6 @@ +.* +yarn-error.log +/src/ +/scripts/ +tsconfig.json +/lib/src/monorepo_scripts/ diff --git a/packages/sol-profiler/CHANGELOG.json b/packages/sol-profiler/CHANGELOG.json new file mode 100644 index 000000000..223400eae --- /dev/null +++ b/packages/sol-profiler/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils", + "pr": 1492 + } + ] + } +] diff --git a/packages/sol-profiler/README.md b/packages/sol-profiler/README.md new file mode 100644 index 000000000..44fa29e3f --- /dev/null +++ b/packages/sol-profiler/README.md @@ -0,0 +1,75 @@ +## @0x/sol-profiler + +Solidity line-by-line gas profiler. + +### Read the [Documentation](https://0xproject.com/docs/sol-profiler). + +## Installation + +```bash +yarn add @0x/sol-profiler +``` + +**Import** + +```javascript +import { ProfilerSubprovider } from '@0x/sol-profiler'; +``` + +or + +```javascript +var ProfilerSubprovider = require('@0x/sol-profiler').ProfilerSubprovider; +``` + +## Contributing + +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### 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 +``` + +### Build + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0x/sol-profiler yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0x/sol-profiler yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/sol-profiler/package.json b/packages/sol-profiler/package.json new file mode 100644 index 000000000..b85c82ed2 --- /dev/null +++ b/packages/sol-profiler/package.json @@ -0,0 +1,50 @@ +{ + "name": "@0x/sol-profiler", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Generate profiler reports for Solidity code", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "build": "tsc -b", + "build:ci": "yarn build", + "lint": "tslint --format stylish --project .", + "clean": "shx rm -rf lib src/artifacts generated_docs", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" + }, + "config": { + "postpublish": { + "assets": [] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-profiler/README.md", + "dependencies": { + "@0x/subproviders": "^2.1.8", + "@0x/typescript-typings": "^3.0.6", + "@0x/sol-tracing-utils": "^2.1.16", + "ethereum-types": "^1.1.4", + "lodash": "^4.17.5" + }, + "devDependencies": { + "@0x/tslint-config": "^2.0.0", + "@types/node": "*", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.11.0", + "typedoc": "0.13.0", + "typescript": "3.0.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/sol-profiler/src/globals.d.ts b/packages/sol-profiler/src/globals.d.ts new file mode 100644 index 000000000..e799b3529 --- /dev/null +++ b/packages/sol-profiler/src/globals.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:completed-docs +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} diff --git a/packages/sol-cov/src/index.ts b/packages/sol-profiler/src/index.ts index 348e0fc9b..5d4806be4 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-profiler/src/index.ts @@ -1,13 +1,13 @@ -export { CoverageSubprovider } from './coverage_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 { + AbstractArtifactAdapter, + SolCompilerArtifactAdapter, + TruffleArtifactAdapter, + ContractData, +} from '@0x/sol-tracing-utils'; // 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 } from './types'; export { JSONRPCRequestPayload, Provider, diff --git a/packages/sol-cov/src/profiler_subprovider.ts b/packages/sol-profiler/src/profiler_subprovider.ts index ae9351f17..c3ed13ea5 100644 --- a/packages/sol-cov/src/profiler_subprovider.ts +++ b/packages/sol-profiler/src/profiler_subprovider.ts @@ -1,11 +1,18 @@ import * as _ from 'lodash'; -import { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; -import { collectCoverageEntries } from './collect_coverage_entries'; -import { SingleFileSubtraceHandler, TraceCollector } from './trace_collector'; -import { TraceInfoSubprovider } from './trace_info_subprovider'; -import { ContractData, Coverage, SourceRange, Subtrace, TraceInfo } from './types'; -import { utils } from './utils'; +import { + AbstractArtifactAdapter, + collectCoverageEntries, + ContractData, + Coverage, + SingleFileSubtraceHandler, + SourceRange, + Subtrace, + TraceCollector, + TraceInfo, + TraceInfoSubprovider, + utils, +} from '@0x/sol-tracing-utils'; /** * This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface. diff --git a/packages/sol-profiler/tsconfig.json b/packages/sol-profiler/tsconfig.json new file mode 100644 index 000000000..233008d61 --- /dev/null +++ b/packages/sol-profiler/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "." + }, + "include": ["./src/**/*"] +} diff --git a/packages/sol-profiler/tslint.json b/packages/sol-profiler/tslint.json new file mode 100644 index 000000000..dd9053357 --- /dev/null +++ b/packages/sol-profiler/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0x/tslint-config"] +} diff --git a/packages/sol-profiler/typedoc-tsconfig.json b/packages/sol-profiler/typedoc-tsconfig.json new file mode 100644 index 000000000..a4c669cb6 --- /dev/null +++ b/packages/sol-profiler/typedoc-tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../typedoc-tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*"] +} diff --git a/packages/sol-trace/.npmignore b/packages/sol-trace/.npmignore new file mode 100644 index 000000000..037786e46 --- /dev/null +++ b/packages/sol-trace/.npmignore @@ -0,0 +1,6 @@ +.* +yarn-error.log +/src/ +/scripts/ +tsconfig.json +/lib/src/monorepo_scripts/ diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json new file mode 100644 index 000000000..223400eae --- /dev/null +++ b/packages/sol-trace/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils", + "pr": 1492 + } + ] + } +] diff --git a/packages/sol-trace/README.md b/packages/sol-trace/README.md new file mode 100644 index 000000000..86ca2cbd6 --- /dev/null +++ b/packages/sol-trace/README.md @@ -0,0 +1,75 @@ +## @0x/sol-trace + +Prints a stack trace when a revert is encountered. + +### Read the [Documentation](https://0xproject.com/docs/sol-trace). + +## Installation + +```bash +yarn add @0x/sol-trace +``` + +**Import** + +```javascript +import { RevertTraceSubprovider } from '@0x/sol-trace'; +``` + +or + +```javascript +var RevertTraceSubprovider = require('@0x/sol-trace').RevertTraceSubprovider; +``` + +## Contributing + +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### 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 +``` + +### Build + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0x/sol-trace yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0x/sol-trace yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/sol-trace/package.json b/packages/sol-trace/package.json new file mode 100644 index 000000000..3013be6f9 --- /dev/null +++ b/packages/sol-trace/package.json @@ -0,0 +1,52 @@ +{ + "name": "@0x/sol-trace", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Prints stack trace on Solidity revert", + "main": "lib/src/index.js", + "types": "lib/src/index.d.ts", + "scripts": { + "build": "tsc -b", + "build:ci": "yarn build", + "lint": "tslint --format stylish --project .", + "clean": "shx rm -rf lib src/artifacts generated_docs", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" + }, + "config": { + "postpublish": { + "assets": [] + } + }, + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-trace/README.md", + "dependencies": { + "@0x/subproviders": "^2.1.8", + "@0x/typescript-typings": "^3.0.6", + "@0x/sol-tracing-utils": "^2.1.16", + "ethereum-types": "^1.1.4", + "ethereumjs-util": "^5.1.1", + "lodash": "^4.17.5", + "loglevel": "^1.6.1" + }, + "devDependencies": { + "@0x/tslint-config": "^2.0.0", + "@types/loglevel": "^1.5.3", + "@types/node": "*", + "npm-run-all": "^4.1.2", + "shx": "^0.2.2", + "tslint": "5.11.0", + "typescript": "3.0.1" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/packages/sol-trace/src/globals.d.ts b/packages/sol-trace/src/globals.d.ts new file mode 100644 index 000000000..e799b3529 --- /dev/null +++ b/packages/sol-trace/src/globals.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:completed-docs +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} diff --git a/packages/sol-trace/src/index.ts b/packages/sol-trace/src/index.ts new file mode 100644 index 000000000..120c0d0a9 --- /dev/null +++ b/packages/sol-trace/src/index.ts @@ -0,0 +1,24 @@ +export { + AbstractArtifactAdapter, + TruffleArtifactAdapter, + SolCompilerArtifactAdapter, + ContractData, +} from '@0x/sol-tracing-utils'; + +export { RevertTraceSubprovider } from './revert_trace_subprovider'; + +export { + JSONRPCRequestPayload, + Provider, + JSONRPCErrorCallback, + JSONRPCResponsePayload, + JSONRPCResponseError, +} from 'ethereum-types'; + +export { + JSONRPCRequestPayloadWithMethod, + NextCallback, + ErrorCallback, + OnNextCompleted, + Callback, +} from '@0x/subproviders'; diff --git a/packages/sol-cov/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts index 6ccf59653..31067a402 100644 --- a/packages/sol-cov/src/revert_trace_subprovider.ts +++ b/packages/sol-trace/src/revert_trace_subprovider.ts @@ -1,16 +1,20 @@ +import { + AbstractArtifactAdapter, + constants, + ContractData, + EvmCallStack, + getRevertTrace, + getSourceRangeSnippet, + parseSourceMap, + SourceRange, + SourceSnippet, + TraceCollectionSubprovider, + utils, +} from '@0x/sol-tracing-utils'; import { stripHexPrefix } from 'ethereumjs-util'; import * as _ from 'lodash'; import { getLogger, levels, Logger } from 'loglevel'; -import { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter'; -import { constants } from './constants'; -import { getSourceRangeSnippet } from './get_source_range_snippet'; -import { getRevertTrace } from './revert_trace'; -import { parseSourceMap } from './source_maps'; -import { TraceCollectionSubprovider } from './trace_collection_subprovider'; -import { ContractData, EvmCallStack, SourceRange, SourceSnippet } from './types'; -import { utils } from './utils'; - /** * This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface. * It is used to report call stack traces whenever a revert occurs. @@ -35,7 +39,7 @@ export class RevertTraceSubprovider extends TraceCollectionSubprovider { }; super(defaultFromAddress, traceCollectionSubproviderConfig); this._artifactAdapter = artifactAdapter; - this._logger = getLogger('sol-cov'); + this._logger = getLogger('sol-trace'); this._logger.setLevel(isVerbose ? levels.TRACE : levels.ERROR); } // tslint:disable-next-line:no-unused-variable diff --git a/packages/sol-trace/tsconfig.json b/packages/sol-trace/tsconfig.json new file mode 100644 index 000000000..233008d61 --- /dev/null +++ b/packages/sol-trace/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig", + "compilerOptions": { + "outDir": "lib", + "rootDir": "." + }, + "include": ["./src/**/*"] +} diff --git a/packages/sol-trace/tslint.json b/packages/sol-trace/tslint.json new file mode 100644 index 000000000..dd9053357 --- /dev/null +++ b/packages/sol-trace/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0x/tslint-config"] +} diff --git a/packages/sol-trace/typedoc-tsconfig.json b/packages/sol-trace/typedoc-tsconfig.json new file mode 100644 index 000000000..a4c669cb6 --- /dev/null +++ b/packages/sol-trace/typedoc-tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../typedoc-tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*"] +} diff --git a/packages/sol-tracing-utils/.npmignore b/packages/sol-tracing-utils/.npmignore new file mode 100644 index 000000000..037786e46 --- /dev/null +++ b/packages/sol-tracing-utils/.npmignore @@ -0,0 +1,6 @@ +.* +yarn-error.log +/src/ +/scripts/ +tsconfig.json +/lib/src/monorepo_scripts/ diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-tracing-utils/CHANGELOG.json index 3781dd39e..9c0b73169 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-tracing-utils/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "3.0.0", + "changes": [ + { + "note": "Move out specific tools and leave just the shared parts of the codebase", + "pr": 1492 + } + ] + }, + { "timestamp": 1547040760, "version": "2.1.17", "changes": [ @@ -157,8 +166,7 @@ "version": "2.1.0", "changes": [ { - "note": - "Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback`", + "note": "Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback`", "pr": 924 } ], @@ -168,8 +176,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Fix a bug when eth_call coverage was not computed because of silent schema validation failures", + "note": "Fix a bug when eth_call coverage was not computed because of silent schema validation failures", "pr": 938 }, { @@ -177,13 +184,11 @@ "pr": 938 }, { - "note": - "Change the first param of `TruffleArtifactAdapter` to be the `projectRoot` instead of `sourcesDir`", + "note": "Change the first param of `TruffleArtifactAdapter` to be the `projectRoot` instead of `sourcesDir`", "pr": 938 }, { - "note": - "Throw a helpful error message if truffle artifacts were generated with a different solc version than the one passed in", + "note": "Throw a helpful error message if truffle artifacts were generated with a different solc version than the one passed in", "pr": 938 } ], @@ -221,8 +226,7 @@ "version": "1.0.0", "changes": [ { - "note": - "Add artifact adapter as a parameter for `CoverageSubprovider`. Export `AbstractArtifactAdapter`", + "note": "Add artifact adapter as a parameter for `CoverageSubprovider`. Export `AbstractArtifactAdapter`", "pr": 589 }, { @@ -278,8 +282,7 @@ "pr": 690 }, { - "note": - "Fix a bug when in `TruffleArtifactsAdapter` causing it to throw if `compiler.json` is not there", + "note": "Fix a bug when in `TruffleArtifactsAdapter` causing it to throw if `compiler.json` is not there", "pr": 690 }, { diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-tracing-utils/CHANGELOG.md index c2bc3cd01..c2bc3cd01 100644 --- a/packages/sol-cov/CHANGELOG.md +++ b/packages/sol-tracing-utils/CHANGELOG.md diff --git a/packages/sol-tracing-utils/README.md b/packages/sol-tracing-utils/README.md new file mode 100644 index 000000000..0a4749b8e --- /dev/null +++ b/packages/sol-tracing-utils/README.md @@ -0,0 +1,61 @@ +## @0x/sol-tracing-utils + +Common code for all solidity trace-based tools (sol-coverage, sol-profiler, sol-trace). + +## Installation + +```bash +yarn add @0x/sol-sol-tracing-utils +``` + +## Contributing + +We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. + +Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. + +### 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 +``` + +### Build + +To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: + +```bash +PKG=@0x/sol-tracing-utils yarn build +``` + +Or continuously rebuild on change: + +```bash +PKG=@0x/sol-tracing-utils yarn watch +``` + +### Clean + +```bash +yarn clean +``` + +### Lint + +```bash +yarn lint +``` + +### Run Tests + +```bash +yarn test +``` diff --git a/packages/sol-cov/compiler.json b/packages/sol-tracing-utils/compiler.json index a6a0c6d3a..a6a0c6d3a 100644 --- a/packages/sol-cov/compiler.json +++ b/packages/sol-tracing-utils/compiler.json diff --git a/packages/sol-cov/coverage/.gitkeep b/packages/sol-tracing-utils/coverage/.gitkeep index e69de29bb..e69de29bb 100644 --- a/packages/sol-cov/coverage/.gitkeep +++ b/packages/sol-tracing-utils/coverage/.gitkeep diff --git a/packages/sol-cov/package.json b/packages/sol-tracing-utils/package.json index 8542948b1..9486ab541 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-tracing-utils/package.json @@ -1,10 +1,10 @@ { - "name": "@0x/sol-cov", + "name": "@0x/sol-tracing-utils", "version": "2.1.17", "engines": { "node": ">=6.12" }, - "description": "Generate coverage reports for Solidity code", + "description": "Common part of trace based solidity tools (sol-coverage, sol-trace, sol-profiler)", "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { @@ -34,13 +34,13 @@ }, "repository": { "type": "git", - "url": "https://github.com/0xProject/0x.js.git" + "url": "https://github.com/0xProject/0x-monorepo.git" }, "license": "Apache-2.0", "bugs": { - "url": "https://github.com/0xProject/0x.js/issues" + "url": "https://github.com/0xProject/0x-monorepo/issues" }, - "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", + "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-tracing-utils/README.md", "dependencies": { "@0x/dev-utils": "^1.0.22", "@0x/sol-compiler": "^2.0.0", diff --git a/packages/sol-cov/src/artifact_adapters/abstract_artifact_adapter.ts b/packages/sol-tracing-utils/src/artifact_adapters/abstract_artifact_adapter.ts index fcc6562ad..fcc6562ad 100644 --- a/packages/sol-cov/src/artifact_adapters/abstract_artifact_adapter.ts +++ b/packages/sol-tracing-utils/src/artifact_adapters/abstract_artifact_adapter.ts diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts index 57391abbe..57391abbe 100644 --- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts +++ b/packages/sol-tracing-utils/src/artifact_adapters/sol_compiler_artifact_adapter.ts diff --git a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts index f064911d3..bb2b15153 100644 --- a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts +++ b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts @@ -80,7 +80,7 @@ export class TruffleArtifactAdapter extends AbstractArtifactAdapter { throw new Error( `${artifact.contractName} was compiled with solidity ${compilerVersion} but specified version is ${ this._solcVersion - } making it impossible for sol-cov to process traces`, + } making it impossible to process traces`, ); } } diff --git a/packages/sol-cov/src/ast_visitor.ts b/packages/sol-tracing-utils/src/ast_visitor.ts index e55cdf6ec..e55cdf6ec 100644 --- a/packages/sol-cov/src/ast_visitor.ts +++ b/packages/sol-tracing-utils/src/ast_visitor.ts diff --git a/packages/sol-cov/src/collect_coverage_entries.ts b/packages/sol-tracing-utils/src/collect_coverage_entries.ts index bdbcd613e..bdbcd613e 100644 --- a/packages/sol-cov/src/collect_coverage_entries.ts +++ b/packages/sol-tracing-utils/src/collect_coverage_entries.ts diff --git a/packages/sol-cov/src/constants.ts b/packages/sol-tracing-utils/src/constants.ts index 34d62b537..34d62b537 100644 --- a/packages/sol-cov/src/constants.ts +++ b/packages/sol-tracing-utils/src/constants.ts diff --git a/packages/sol-cov/src/get_source_range_snippet.ts b/packages/sol-tracing-utils/src/get_source_range_snippet.ts index bea17beae..f578675d3 100644 --- a/packages/sol-cov/src/get_source_range_snippet.ts +++ b/packages/sol-tracing-utils/src/get_source_range_snippet.ts @@ -15,6 +15,11 @@ interface ASTInfo { // Parsing source code for each transaction/code is slow and therefore we cache it const parsedSourceByHash: { [sourceHash: string]: Parser.ASTNode } = {}; +/** + * Gets the source range snippet by source range to be used by revert trace. + * @param sourceRange source range + * @param sourceCode source code + */ export function getSourceRangeSnippet(sourceRange: SourceRange, sourceCode: string): SourceSnippet | null { const sourceHash = ethUtil.sha3(sourceCode).toString('hex'); if (_.isUndefined(parsedSourceByHash[sourceHash])) { diff --git a/packages/sol-tracing-utils/src/globals.d.ts b/packages/sol-tracing-utils/src/globals.d.ts new file mode 100644 index 000000000..e799b3529 --- /dev/null +++ b/packages/sol-tracing-utils/src/globals.d.ts @@ -0,0 +1,7 @@ +// tslint:disable:completed-docs +declare module '*.json' { + const json: any; + /* tslint:disable */ + export default json; + /* tslint:enable */ +} diff --git a/packages/sol-tracing-utils/src/index.ts b/packages/sol-tracing-utils/src/index.ts new file mode 100644 index 000000000..413e5305e --- /dev/null +++ b/packages/sol-tracing-utils/src/index.ts @@ -0,0 +1,39 @@ +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, + EvmCallStack, + SourceRange, + SourceSnippet, + StatementCoverage, + StatementDescription, + BranchCoverage, + BranchDescription, + Subtrace, + TraceInfo, + Coverage, + LineColumn, + LineCoverage, + FunctionCoverage, + FunctionDescription, + SingleFileSourceRange, + BranchMap, + EvmCallStackEntry, + FnMap, + LocationByOffset, + StatementMap, + TraceInfoBase, + TraceInfoExistingContract, + TraceInfoNewContract, +} from './types'; +export { collectCoverageEntries } from './collect_coverage_entries'; +export { TraceCollector, SingleFileSubtraceHandler } from './trace_collector'; +export { TraceInfoSubprovider } from './trace_info_subprovider'; +export { utils } from './utils'; +export { constants } from './constants'; +export { parseSourceMap } from './source_maps'; +export { getSourceRangeSnippet } from './get_source_range_snippet'; +export { getRevertTrace } from './revert_trace'; +export { TraceCollectionSubprovider } from './trace_collection_subprovider'; diff --git a/packages/sol-cov/src/instructions.ts b/packages/sol-tracing-utils/src/instructions.ts index 40987dbe5..40987dbe5 100644 --- a/packages/sol-cov/src/instructions.ts +++ b/packages/sol-tracing-utils/src/instructions.ts diff --git a/packages/sol-cov/src/revert_trace.ts b/packages/sol-tracing-utils/src/revert_trace.ts index d60c6e7d9..4d474120c 100644 --- a/packages/sol-cov/src/revert_trace.ts +++ b/packages/sol-tracing-utils/src/revert_trace.ts @@ -6,6 +6,11 @@ import * as _ from 'lodash'; import { EvmCallStack } from './types'; import { utils } from './utils'; +/** + * Converts linear trace to a call stack by following calls and returns + * @param structLogs Linear trace + * @param startAddress The address of initial context + */ export function getRevertTrace(structLogs: StructLog[], startAddress: string): EvmCallStack { const evmCallStack: EvmCallStack = []; const addressStack = [startAddress]; @@ -55,7 +60,7 @@ export function getRevertTrace(structLogs: StructLog[], startAddress: string): E // TODO: Refactor this logic to fetch the sub-called contract bytecode before the selfdestruct is called // in order to handle this edge-case. logUtils.warn( - "Detected a selfdestruct. Sol-cov currently doesn't support that scenario. We'll just skip the trace part for a destructed contract", + "Detected a selfdestruct. We currently do not support that scenario. We'll just skip the trace part for a destructed contract", ); } } else if (structLog.op === OpCode.Revert) { @@ -67,7 +72,7 @@ export function getRevertTrace(structLogs: StructLog[], startAddress: string): E } else if (structLog.op === OpCode.Create) { // TODO: Extract the new contract address from the stack and handle that scenario logUtils.warn( - "Detected a contract created from within another contract. Sol-cov currently doesn't support that scenario. We'll just skip that trace", + "Detected a contract created from within another contract. We currently do not support that scenario. We'll just skip that trace", ); return []; } else { diff --git a/packages/sol-cov/src/source_maps.ts b/packages/sol-tracing-utils/src/source_maps.ts index 90b21dda1..af0fb4035 100644 --- a/packages/sol-cov/src/source_maps.ts +++ b/packages/sol-tracing-utils/src/source_maps.ts @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import { getPcToInstructionIndexMapping } from './instructions'; -import { LineColumn, LocationByOffset, SourceRange } from './types'; +import { LocationByOffset, SourceRange } from './types'; const RADIX = 10; @@ -11,6 +11,10 @@ export interface SourceLocation { fileIndex: number; } +/** + * Receives a string with newlines and returns a map of byte offset to LineColumn + * @param str A string to process + */ export function getLocationByOffset(str: string): LocationByOffset { const locationByOffset: LocationByOffset = { 0: { line: 1, column: 0 } }; let currentOffset = 0; @@ -26,8 +30,14 @@ export function getLocationByOffset(str: string): LocationByOffset { return locationByOffset; } -// Parses a sourcemap string -// The solidity sourcemap format is documented here: https://github.com/ethereum/solidity/blob/develop/docs/miscellaneous.rst#source-mappings +/** + * Parses a sourcemap string. + * The solidity sourcemap format is documented here: https://github.com/ethereum/solidity/blob/develop/docs/miscellaneous.rst#source-mappings + * @param sourceCodes sources contents + * @param srcMap source map string + * @param bytecodeHex contract bytecode + * @param sources sources file names + */ export function parseSourceMap( sourceCodes: string[], srcMap: string, diff --git a/packages/sol-cov/src/trace.ts b/packages/sol-tracing-utils/src/trace.ts index b38dbdce0..770080af3 100644 --- a/packages/sol-cov/src/trace.ts +++ b/packages/sol-tracing-utils/src/trace.ts @@ -8,6 +8,11 @@ export interface TraceByContractAddress { [contractAddress: string]: StructLog[]; } +/** + * Converts linear stack trace to `TraceByContractAddress`. + * @param structLogs stack trace + * @param startAddress initial context address + */ export function getTracesByContractAddress(structLogs: StructLog[], startAddress: string): TraceByContractAddress { const traceByContractAddress: TraceByContractAddress = {}; let currentTraceSegment = []; @@ -58,13 +63,13 @@ export function getTracesByContractAddress(structLogs: StructLog[], startAddress // TODO: Refactor this logic to fetch the sub-called contract bytecode before the selfdestruct is called // in order to handle this edge-case. logUtils.warn( - "Detected a selfdestruct. Sol-cov currently doesn't support that scenario. We'll just skip the trace part for a destructed contract", + "Detected a selfdestruct. We currently do not support that scenario. We'll just skip the trace part for a destructed contract", ); } } else if (structLog.op === OpCode.Create) { // TODO: Extract the new contract address from the stack and handle that scenario logUtils.warn( - "Detected a contract created from within another contract. Sol-cov currently doesn't support that scenario. We'll just skip that trace", + "Detected a contract created from within another contract. We currently do not support that scenario. We'll just skip that trace", ); return traceByContractAddress; } else { diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts index 25e38768d..25e38768d 100644 --- a/packages/sol-cov/src/trace_collection_subprovider.ts +++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts diff --git a/packages/sol-cov/src/trace_collector.ts b/packages/sol-tracing-utils/src/trace_collector.ts index 44cffc238..943e208cf 100644 --- a/packages/sol-cov/src/trace_collector.ts +++ b/packages/sol-tracing-utils/src/trace_collector.ts @@ -51,7 +51,7 @@ export class TraceCollector { singleFileSubtraceHandler: SingleFileSubtraceHandler, ) { this._artifactAdapter = artifactAdapter; - this._logger = getLogger('sol-cov'); + this._logger = getLogger('sol-tracing-utils'); this._logger.setLevel(isVerbose ? levels.TRACE : levels.ERROR); this._singleFileSubtraceHandler = singleFileSubtraceHandler; } diff --git a/packages/sol-cov/src/trace_info_subprovider.ts b/packages/sol-tracing-utils/src/trace_info_subprovider.ts index 635a68f58..635a68f58 100644 --- a/packages/sol-cov/src/trace_info_subprovider.ts +++ b/packages/sol-tracing-utils/src/trace_info_subprovider.ts diff --git a/packages/sol-cov/src/types.ts b/packages/sol-tracing-utils/src/types.ts index 54ade0400..54ade0400 100644 --- a/packages/sol-cov/src/types.ts +++ b/packages/sol-tracing-utils/src/types.ts diff --git a/packages/sol-cov/src/utils.ts b/packages/sol-tracing-utils/src/utils.ts index d8bc65e73..d8bc65e73 100644 --- a/packages/sol-cov/src/utils.ts +++ b/packages/sol-tracing-utils/src/utils.ts diff --git a/packages/sol-cov/test/collect_coverage_entries_test.ts b/packages/sol-tracing-utils/test/collect_coverage_entries_test.ts index 7832ec316..7832ec316 100644 --- a/packages/sol-cov/test/collect_coverage_entries_test.ts +++ b/packages/sol-tracing-utils/test/collect_coverage_entries_test.ts diff --git a/packages/sol-cov/test/fixtures/contracts/AllSolidityFeatures.sol b/packages/sol-tracing-utils/test/fixtures/contracts/AllSolidityFeatures.sol index 21137347e..21137347e 100644 --- a/packages/sol-cov/test/fixtures/contracts/AllSolidityFeatures.sol +++ b/packages/sol-tracing-utils/test/fixtures/contracts/AllSolidityFeatures.sol diff --git a/packages/sol-cov/test/fixtures/contracts/SimpleStorage.sol b/packages/sol-tracing-utils/test/fixtures/contracts/SimpleStorage.sol index e4b4ac246..e4b4ac246 100644 --- a/packages/sol-cov/test/fixtures/contracts/SimpleStorage.sol +++ b/packages/sol-tracing-utils/test/fixtures/contracts/SimpleStorage.sol diff --git a/packages/sol-cov/test/fixtures/contracts/Simplest.sol b/packages/sol-tracing-utils/test/fixtures/contracts/Simplest.sol index d71016e07..d71016e07 100644 --- a/packages/sol-cov/test/fixtures/contracts/Simplest.sol +++ b/packages/sol-tracing-utils/test/fixtures/contracts/Simplest.sol diff --git a/packages/sol-cov/test/fixtures/contracts/SolcovIgnore.sol b/packages/sol-tracing-utils/test/fixtures/contracts/SolcovIgnore.sol index a7977ffb4..a7977ffb4 100644 --- a/packages/sol-cov/test/fixtures/contracts/SolcovIgnore.sol +++ b/packages/sol-tracing-utils/test/fixtures/contracts/SolcovIgnore.sol diff --git a/packages/sol-cov/test/instructions_test.ts b/packages/sol-tracing-utils/test/instructions_test.ts index 058053cf9..058053cf9 100644 --- a/packages/sol-cov/test/instructions_test.ts +++ b/packages/sol-tracing-utils/test/instructions_test.ts diff --git a/packages/sol-cov/test/sol_compiler_artifact_adapter_test.ts b/packages/sol-tracing-utils/test/sol_compiler_artifact_adapter_test.ts index 9c58d2cef..9c58d2cef 100644 --- a/packages/sol-cov/test/sol_compiler_artifact_adapter_test.ts +++ b/packages/sol-tracing-utils/test/sol_compiler_artifact_adapter_test.ts diff --git a/packages/sol-cov/test/source_maps_test.ts b/packages/sol-tracing-utils/test/source_maps_test.ts index 5820bedd7..5820bedd7 100644 --- a/packages/sol-cov/test/source_maps_test.ts +++ b/packages/sol-tracing-utils/test/source_maps_test.ts diff --git a/packages/sol-cov/test/trace_test.ts b/packages/sol-tracing-utils/test/trace_test.ts index 7a034362c..7a034362c 100644 --- a/packages/sol-cov/test/trace_test.ts +++ b/packages/sol-tracing-utils/test/trace_test.ts diff --git a/packages/sol-cov/test/utils_test.ts b/packages/sol-tracing-utils/test/utils_test.ts index 6fc8fcfe1..6fc8fcfe1 100644 --- a/packages/sol-cov/test/utils_test.ts +++ b/packages/sol-tracing-utils/test/utils_test.ts diff --git a/packages/sol-cov/tsconfig.json b/packages/sol-tracing-utils/tsconfig.json index 2ee711adc..2ee711adc 100644 --- a/packages/sol-cov/tsconfig.json +++ b/packages/sol-tracing-utils/tsconfig.json diff --git a/packages/sol-tracing-utils/tslint.json b/packages/sol-tracing-utils/tslint.json new file mode 100644 index 000000000..dd9053357 --- /dev/null +++ b/packages/sol-tracing-utils/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0x/tslint-config"] +} diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index fe52a8111..7132d098f 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -130,8 +130,7 @@ "version": "1.0.1-rc.6", "changes": [ { - "note": - "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js" + "note": "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js" }, { "note": "Fix relative path to introduction MD file" diff --git a/packages/sra-spec/src/md/introduction.md b/packages/sra-spec/src/md/introduction.md index 824df8998..3f7431c51 100644 --- a/packages/sra-spec/src/md/introduction.md +++ b/packages/sra-spec/src/md/introduction.md @@ -1,12 +1,12 @@ # Schemas -The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas). Examples of each payload and response can be found in the library's [test suite](https://github.com/0xProject/0x.js/blob/development/packages/json-schemas/test/schema_test.ts#L1). +The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas). Examples of each payload and response can be found in the library's [test suite](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/test/schema_test.ts#L1). ```bash npm install @0xproject/json-schemas --save ``` -You can easily validate your API's payloads and responses using the [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas) package: +You can easily validate your API's payloads and responses using the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) package: ```js import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; @@ -204,7 +204,7 @@ A good example of such a field is `remainingTakerAssetAmount`, which is a conven # Misc. -* All requests and responses should be of **application/json** content type -* All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API). -* All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix. -* All parameters are to be written in `lowerCamelCase`. +- All requests and responses should be of **application/json** content type +- All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API). +- All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix. +- All parameters are to be written in `lowerCamelCase`. diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index cc0e0414a..c7763214f 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -165,8 +165,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback`", + "note": "Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback`", "pr": 924 } ], @@ -295,8 +294,7 @@ "version": "0.9.0", "changes": [ { - "note": - "Refactor RedundantRPCSubprovider into RedundantSubprovider where it now accepts an array of subproviders rather then an array of RPC endpoints", + "note": "Refactor RedundantRPCSubprovider into RedundantSubprovider where it now accepts an array of subproviders rather then an array of RPC endpoints", "pr": 500 }, { @@ -312,8 +310,7 @@ "pr": 507 }, { - "note": - "Refactors LedgerSubprovider such that explicitly setting the `pathIndex` is no longer required. Simply set the request `from` address as desired", + "note": "Refactors LedgerSubprovider such that explicitly setting the `pathIndex` is no longer required. Simply set the request `from` address as desired", "pr": 507 }, { @@ -371,8 +368,7 @@ "version": "0.7.0", "changes": [ { - "note": - "Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros.", + "note": "Updated legerco packages. Removed node-hid package as a dependency and make it an optional dependency. It is still used in integration tests but is causing problems for users on Linux distros.", "pr": 437 } ], @@ -420,8 +416,7 @@ "pr": 355 }, { - "note": - "InjectedWeb3Subprovider accepts a Provider in the constructor, previously it was a Web3 object", + "note": "InjectedWeb3Subprovider accepts a Provider in the constructor, previously it was a Web3 object", "pr": 363 } ], diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index 6f97d760e..b0d77284b 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -78,12 +78,12 @@ yarn run test:unit In order to run the integration tests, make sure you have a Ledger Nano S available. -* Setup your Ledger with the development mnemonic seed: `concert load couple harbor equip island argue ramp clarify fence smart topic` -* Plug it into your computer -* Unlock the device -* Open the on-device Ethereum app -* Make sure "browser support" and "contract data" are disabled -* Start [TestRPC](https://github.com/trufflesuite/ganache-cli) locally at port `8545` +- Setup your Ledger with the development mnemonic seed: `concert load couple harbor equip island argue ramp clarify fence smart topic` +- Plug it into your computer +- Unlock the device +- Open the on-device Ethereum app +- Make sure "browser support" and "contract data" are disabled +- Start [TestRPC](https://github.com/trufflesuite/ganache-cli) locally at port `8545` Then run: diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json index 0070a5b81..ccf87e354 100644 --- a/packages/tslint-config/CHANGELOG.json +++ b/packages/tslint-config/CHANGELOG.json @@ -213,8 +213,7 @@ "version": "0.4.7", "changes": [ { - "note": - "Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names", + "note": "Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names", "pr": 354 } ], @@ -224,12 +223,10 @@ "version": "0.4.0", "changes": [ { - "note": - "Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names" + "note": "Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names" }, { - "note": - "Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews." + "note": "Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews." } ], "timestamp": 1514386800 diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index 754cd29dc..dab7e6825 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -40,8 +40,7 @@ "version": "1.3.0", "changes": [ { - "note": - "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package", + "note": "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package", "pr": 1298 } ], @@ -268,8 +267,7 @@ "pr": 589 }, { - "note": - "Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js", + "note": "Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js", "pr": 579 } ], diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index fadf5ad14..eb92e773d 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -188,8 +188,7 @@ "note": "Add types for `react-popper`, remove types for `react-joyride`" }, { - "note": - "Remove types for blockies, bn.js, compare-versions, ethereumjs-abi, ethereumjs-tx, find-versions, hdkey, is-mobile, solidity-parser-antlr, xml-js as they were moved to DefinitelyTyped", + "note": "Remove types for blockies, bn.js, compare-versions, ethereumjs-abi, ethereumjs-tx, find-versions, hdkey, is-mobile, solidity-parser-antlr, xml-js as they were moved to DefinitelyTyped", "pr": 641 } ] diff --git a/packages/typescript-typings/types/chai-as-promised/index.d.ts b/packages/typescript-typings/types/chai-as-promised/index.d.ts index ba6dabdcc..6d5345755 100644 --- a/packages/typescript-typings/types/chai-as-promised/index.d.ts +++ b/packages/typescript-typings/types/chai-as-promised/index.d.ts @@ -5,9 +5,7 @@ declare module 'chai-as-promised' { function chaiAsPromised(chai: any, utils: any): void; - namespace chaiAsPromised { - - } + namespace chaiAsPromised {} export = chaiAsPromised; } diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index fb85c4174..6b4bc3e82 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,5 +1,14 @@ [ { + "version": "3.0.0", + "changes": [ + { + "note": "Make `promisify` resolve when the callback error is undefined.", + "pr": 1501 + } + ] + }, + { "version": "2.1.1", "changes": [ { @@ -31,8 +40,7 @@ "version": "2.0.7", "changes": [ { - "note": - "Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development." + "note": "Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development." } ], "timestamp": 1544570656 @@ -163,8 +171,7 @@ "pr": 807 }, { - "note": - "Store different ABIs for events with same function signature and different amount of indexed arguments", + "note": "Store different ABIs for events with same function signature and different amount of indexed arguments", "pr": 933 } ], @@ -331,8 +338,7 @@ "version": "0.4.3", "changes": [ { - "note": - "Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface." + "note": "Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface." } ], "timestamp": 1521298800 @@ -375,8 +381,7 @@ "version": "0.3.0", "changes": [ { - "note": - "Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes).", + "note": "Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes).", "pr": 366 } ], diff --git a/packages/utils/src/abi_encoder/evm_data_types/address.ts b/packages/utils/src/abi_encoder/evm_data_types/address.ts index 88846b1fa..2e3a206c6 100644 --- a/packages/utils/src/abi_encoder/evm_data_types/address.ts +++ b/packages/utils/src/abi_encoder/evm_data_types/address.ts @@ -10,8 +10,8 @@ import { constants } from '../utils/constants'; export class AddressDataType extends AbstractBlobDataType { private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true; private static readonly _ADDRESS_SIZE_IN_BYTES = 20; - private static readonly _DECODED_ADDRESS_OFFSET_IN_BYTES = constants.EVM_WORD_WIDTH_IN_BYTES - - AddressDataType._ADDRESS_SIZE_IN_BYTES; + private static readonly _DECODED_ADDRESS_OFFSET_IN_BYTES = + constants.EVM_WORD_WIDTH_IN_BYTES - AddressDataType._ADDRESS_SIZE_IN_BYTES; public static matchType(type: string): boolean { return type === SolidityTypes.Address; diff --git a/packages/utils/src/promisify.ts b/packages/utils/src/promisify.ts index 29d626b61..e82251a0f 100644 --- a/packages/utils/src/promisify.ts +++ b/packages/utils/src/promisify.ts @@ -10,7 +10,7 @@ export function promisify<T>(originalFn: (...args: any[]) => void, thisArg?: any const promisifiedFunction = async (...callArgs: any[]): Promise<T> => { return new Promise<T>((resolve, reject) => { const callback = (err: Error | null, data?: T) => { - _.isNull(err) ? resolve(data) : reject(err); + _.isNull(err) || _.isUndefined(err) ? resolve(data) : reject(err); }; originalFn.apply(thisArg, [...callArgs, callback]); }); diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 65f811028..648544761 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -82,8 +82,7 @@ "version": "3.1.1", "changes": [ { - "note": - "Fix bug in `getTransactionByHashAsync` which was causing the return value to have the wrong type (raw fields instead of unmarshalled fields).", + "note": "Fix bug in `getTransactionByHashAsync` which was causing the return value to have the wrong type (raw fields instead of unmarshalled fields).", "pr": 1177 } ], @@ -97,8 +96,7 @@ "pr": 1102 }, { - "note": - "Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned.", + "note": "Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned.", "pr": 1102 } ], @@ -135,13 +133,11 @@ "version": "3.0.0", "changes": [ { - "note": - "Rename `getBlockAsync` to `getBlockIfExistsAsync` and rather then throw if the requested block wasn't found, return undefined.", + "note": "Rename `getBlockAsync` to `getBlockIfExistsAsync` and rather then throw if the requested block wasn't found, return undefined.", "pr": 1082 }, { - "note": - "Expose `sendRawPayloadAsync` so one can easily extend `Web3Wrapper` with their own custom JSON RPC calls", + "note": "Expose `sendRawPayloadAsync` so one can easily extend `Web3Wrapper` with their own custom JSON RPC calls", "pr": 1080 } ], @@ -151,8 +147,7 @@ "version": "2.0.3", "changes": [ { - "note": - "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined.", + "note": "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined.", "pr": 1079 } ], @@ -180,8 +175,7 @@ "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`", + "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 }, { @@ -328,8 +322,7 @@ "pr": 622 }, { - "note": - "Improve performance of awaitTransactionMinedAsync by immediately checking if the transaction was already mined instead of waiting for the first interval.", + "note": "Improve performance of awaitTransactionMinedAsync by immediately checking if the transaction was already mined instead of waiting for the first interval.", "pr": 688 } ] @@ -392,8 +385,7 @@ "pr": 485 }, { - "note": - "Add a public field `abiDecoder: AbiDecoder` which allows you to add your ABIs that are later used to decode logs", + "note": "Add a public field `abiDecoder: AbiDecoder` which allows you to add your ABIs that are later used to decode logs", "pr": 485 }, { @@ -417,8 +409,7 @@ "version": "0.3.0", "changes": [ { - "note": - "Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync`", + "note": "Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync`", "pr": 426 }, { diff --git a/packages/website/README.md b/packages/website/README.md index a9145cb6c..432b7c335 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -59,11 +59,11 @@ yarn lint ##### Toolkit -* [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional) -* [BassCSS toolkit](http://basscss.com/) -* [Material-UI component library](http://www.material-ui.com/#/) +- [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional) +- [BassCSS toolkit](http://basscss.com/) +- [Material-UI component library](http://www.material-ui.com/#/) ##### Recommended Atom packages: -* [atom-typescript](https://atom.io/packages/atom-typescript) -* [linter-tslint](https://atom.io/packages/linter-tslint) +- [atom-typescript](https://atom.io/packages/atom-typescript) +- [linter-tslint](https://atom.io/packages/linter-tslint) diff --git a/packages/website/contracts/Mintable.json b/packages/website/contracts/Mintable.json index dc46dc829..895db73a2 100644 --- a/packages/website/contracts/Mintable.json +++ b/packages/website/contracts/Mintable.json @@ -182,8 +182,7 @@ "type": "event" } ], - "unlinked_binary": - "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029", + "unlinked_binary": "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029", "networks": {}, "schema_version": "0.0.5", "updated_at": 1503413048892 diff --git a/packages/website/md/docs/json_schemas/1/schemas.md b/packages/website/md/docs/json_schemas/1/schemas.md index fcf5d8df6..11f9df329 100644 --- a/packages/website/md/docs/json_schemas/1/schemas.md +++ b/packages/website/md/docs/json_schemas/1/schemas.md @@ -1,28 +1,28 @@ 0x Protocol Schemas -* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) -* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) +- [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) +- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) +- [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) +- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) 0x.js Schemas -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) -* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) +- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) +- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) +- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) +- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) +- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) +- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) +- [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) +- [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) Standard Relayer API Schemas -* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) -* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) -* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) -* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) -* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) -* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) -* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) +- [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) +- [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) +- [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) +- [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) +- [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) +- [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) +- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) +- [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/2/schemas.md b/packages/website/md/docs/json_schemas/2/schemas.md index 8ea6c8e85..78e6df372 100644 --- a/packages/website/md/docs/json_schemas/2/schemas.md +++ b/packages/website/md/docs/json_schemas/2/schemas.md @@ -1,40 +1,40 @@ Basic Schemas -* [Address type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/address_schema.json) -* [Number type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/number_schema.json) -* [Hex type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/hex_schema.json) -* [JS number](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/js_number.json) +- [Address type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/address_schema.json) +- [Number type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/number_schema.json) +- [Hex type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/hex_schema.json) +- [JS number](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/js_number.json) 0x Protocol Schemas -* [Order](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_schema.json) -* [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_order_schema.json) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_hash_schema.json) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/ec_signature_schema.json) +- [Order](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_schema.json) +- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_order_schema.json) +- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_hash_schema.json) +- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/ec_signature_schema.json) 0x.js Schemas -* [BlockParam](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_param_schema.json) -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_range_schema.json) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/index_filter_values_schema.json) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_requests_schema.json) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_cancel_schema.json) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_orders_schema.json) -* [Token](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/token_schema.json) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/tx_data_schema.json) +- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_param_schema.json) +- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_range_schema.json) +- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/index_filter_values_schema.json) +- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_requests_schema.json) +- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_cancel_schema.json) +- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) +- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_orders_schema.json) +- [Token](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/token_schema.json) +- [TxData](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/tx_data_schema.json) Standard Relayer API Schemas -* [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/paginated_collection_schema.json) -* [Error response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_error_response_schema.json) -* [Order config payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) -* [Order config response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) -* [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) -* [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) -* [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) -* [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) -* [Trade info](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) -* [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) -* [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) +- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/paginated_collection_schema.json) +- [Error response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_error_response_schema.json) +- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) +- [Order config response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) +- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) +- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) +- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) +- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) +- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) +- [Trade info](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) +- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) +- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/json_schemas/3/schemas.md b/packages/website/md/docs/json_schemas/3/schemas.md index 99aff7b5a..90fcfdffe 100644 --- a/packages/website/md/docs/json_schemas/3/schemas.md +++ b/packages/website/md/docs/json_schemas/3/schemas.md @@ -1,41 +1,41 @@ Basic Schemas -* [Address type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/address_schema.json) -* [Number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/number_schema.json) -* [Whole number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/whole_number_schema.json) -* [Hex type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/hex_schema.json) -* [JS number](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/js_number.json) +- [Address type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/address_schema.json) +- [Number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/number_schema.json) +- [Whole number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/whole_number_schema.json) +- [Hex type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/hex_schema.json) +- [JS number](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/js_number.json) 0x Protocol Schemas -* [Order](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_schema.json) -* [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_order_schema.json) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_hash_schema.json) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/ec_signature_schema.json) +- [Order](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_schema.json) +- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_order_schema.json) +- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_hash_schema.json) +- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/ec_signature_schema.json) 0x.js Schemas -* [BlockParam](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_param_schema.json) -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_range_schema.json) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/index_filter_values_schema.json) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_requests_schema.json) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_cancel_schema.json) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_orders_schema.json) -* [Token](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/token_schema.json) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/tx_data_schema.json) +- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_param_schema.json) +- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_range_schema.json) +- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/index_filter_values_schema.json) +- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_requests_schema.json) +- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_cancel_schema.json) +- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) +- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_orders_schema.json) +- [Token](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/token_schema.json) +- [TxData](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/tx_data_schema.json) Standard Relayer API Schemas -* [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/paginated_collection_schema.json) -* [Error response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_error_response_schema.json) -* [Order config payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) -* [Order config response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) -* [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) -* [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) -* [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) -* [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) -* [Trade info](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) -* [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) -* [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) +- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/paginated_collection_schema.json) +- [Error response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_error_response_schema.json) +- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) +- [Order config response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) +- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) +- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) +- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) +- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) +- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json) +- [Trade info](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json) +- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json) +- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/smart_contracts/2/introduction.md b/packages/website/md/docs/smart_contracts/2/introduction.md index 4a3a73027..b2c3d8f8d 100644 --- a/packages/website/md/docs/smart_contracts/2/introduction.md +++ b/packages/website/md/docs/smart_contracts/2/introduction.md @@ -2,5 +2,5 @@ Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tre ### Helpful wiki articles: -* [Deployed smart contract addresses](https://0x.org/wiki#Deployed-Addresses) -* [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md) +- [Deployed smart contract addresses](https://0x.org/wiki#Deployed-Addresses) +- [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md) diff --git a/packages/website/md/docs/sol-compiler/1/introduction.md b/packages/website/md/docs/sol-compiler/1/introduction.md index fcd80f47b..3b7332111 100644 --- a/packages/website/md/docs/sol-compiler/1/introduction.md +++ b/packages/website/md/docs/sol-compiler/1/introduction.md @@ -1,8 +1,8 @@ Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: -* Smart re-compilation: Only recompiles when smart contracts have changed -* Ability to compile an entire project instead of only individual `.sol` files -* Compilation using the Solidity version specified at the top of each individual `.sol` file -* Proper parsing of Solidity version ranges -* Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). -* Storage of constructor args, source maps and paths to all dependency source files. +- Smart re-compilation: Only recompiles when smart contracts have changed +- Ability to compile an entire project instead of only individual `.sol` files +- Compilation using the Solidity version specified at the top of each individual `.sol` file +- Proper parsing of Solidity version ranges +- Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). +- Storage of constructor args, source maps and paths to all dependency source files. diff --git a/packages/website/md/docs/sol_cov/1/installation.md b/packages/website/md/docs/sol_cov/1/installation.md deleted file mode 100644 index b9ce25a5f..000000000 --- a/packages/website/md/docs/sol_cov/1/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/sol-cov -``` - -**Import** - -```javascript -import { CoverageSubprovider } from '@0xproject/sol-cov'; -``` - -or - -```javascript -var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; -``` diff --git a/packages/website/md/docs/sol_cov/1/introduction.md b/packages/website/md/docs/sol_cov/1/introduction.md deleted file mode 100644 index 7064a3554..000000000 --- a/packages/website/md/docs/sol_cov/1/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/sol-cov](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov) documentation! Sol-cov is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_cov/2/installation.md b/packages/website/md/docs/sol_cov/2/installation.md deleted file mode 100644 index 1d4557cf5..000000000 --- a/packages/website/md/docs/sol_cov/2/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0x/sol-cov -``` - -**Import** - -```javascript -import { CoverageSubprovider } from '@0x/sol-cov'; -``` - -or - -```javascript -var CoverageSubprovider = require('@0x/sol-cov').CoverageSubprovider; -``` diff --git a/packages/website/md/docs/sol_cov/2/introduction.md b/packages/website/md/docs/sol_cov/2/introduction.md deleted file mode 100644 index ac3256845..000000000 --- a/packages/website/md/docs/sol_cov/2/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [sol-cov](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov) documentation! Sol-cov is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_coverage/installation.md b/packages/website/md/docs/sol_coverage/installation.md new file mode 100644 index 000000000..c7aaf07e9 --- /dev/null +++ b/packages/website/md/docs/sol_coverage/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/sol-coverage +``` + +**Import** + +```javascript +import { CoverageSubprovider } from '@0x/sol-coverage'; +``` + +or + +```javascript +var CoverageSubprovider = require('@0x/sol-coverage').CoverageSubprovider; +``` diff --git a/packages/website/md/docs/sol_coverage/introduction.md b/packages/website/md/docs/sol_coverage/introduction.md new file mode 100644 index 000000000..3214e93a9 --- /dev/null +++ b/packages/website/md/docs/sol_coverage/introduction.md @@ -0,0 +1 @@ +Welcome to the [sol-coverage](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-coverage) documentation! Sol-coverage is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_cov/2/usage.md b/packages/website/md/docs/sol_coverage/usage.md index 8e33f3bf5..dd3cdf597 100644 --- a/packages/website/md/docs/sol_cov/2/usage.md +++ b/packages/website/md/docs/sol_coverage/usage.md @@ -1,4 +1,4 @@ -Sol-cov uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. +Sol-coverage uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. @@ -11,7 +11,7 @@ In order to use `CoverageSubprovider` with your favorite framework you need to p If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. ```typescript -import { SolCompilerArtifactsAdapter } from '@0x/sol-cov'; +import { SolCompilerArtifactsAdapter } from '@0x/sol-coverage'; const artifactsPath = 'src/artifacts'; const contractsPath = 'src/contracts'; const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); @@ -22,7 +22,7 @@ const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contract If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. ```typescript -import { TruffleArtifactAdapter } from '@0x/sol-cov'; +import { TruffleArtifactAdapter } from '@0x/sol-coverage'; const contractsPath = 'src/contracts'; const artifactAdapter = new TruffleArtifactAdapter(contractsDir); ``` @@ -37,7 +37,7 @@ Look at the code of the two adapters above for examples. ### Usage ```typescript -import { CoverageSubprovider } from '@0x/sol-cov'; +import { CoverageSubprovider } from '@0x/sol-coverage'; import ProviderEngine = require('web3-provider-engine'); const provider = new ProviderEngine(); diff --git a/packages/website/md/docs/sol_profiler/installation.md b/packages/website/md/docs/sol_profiler/installation.md new file mode 100644 index 000000000..be9a365f5 --- /dev/null +++ b/packages/website/md/docs/sol_profiler/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/sol-profiler +``` + +**Import** + +```javascript +import { ProfilerSubprovider } from '@0x/sol-profiler'; +``` + +or + +```javascript +var ProfilerSubprovider = require('@0x/sol-profiler').ProfilerSubprovider; +``` diff --git a/packages/website/md/docs/sol_profiler/introduction.md b/packages/website/md/docs/sol_profiler/introduction.md new file mode 100644 index 000000000..bd53fb0fe --- /dev/null +++ b/packages/website/md/docs/sol_profiler/introduction.md @@ -0,0 +1 @@ +Welcome to the [sol-profiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-profiler) documentation! Sol-profiler is a Solidity profiler tool. diff --git a/packages/website/md/docs/sol_cov/1/usage.md b/packages/website/md/docs/sol_profiler/usage.md index c2b8404af..35ea140da 100644 --- a/packages/website/md/docs/sol_cov/1/usage.md +++ b/packages/website/md/docs/sol_profiler/usage.md @@ -1,17 +1,17 @@ -Sol-cov uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. +Sol-profiler uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `ProfilerSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. -The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. +The ProfilerSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. -Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. +Profiler subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. -In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. +In order to use `ProfilerSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. ### Sol-compiler -If you are generating your artifacts with [@0xproject/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. +If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. ```typescript -import { SolCompilerArtifactsAdapter } from '@0xproject/sol-cov'; +import { SolCompilerArtifactsAdapter } from '@0x/sol-profiler'; const artifactsPath = 'src/artifacts'; const contractsPath = 'src/contracts'; const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); @@ -22,7 +22,7 @@ const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contract If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. ```typescript -import { TruffleArtifactAdapter } from '@0xproject/sol-cov'; +import { TruffleArtifactAdapter } from '@0x/sol-profiler'; const contractsPath = 'src/contracts'; const artifactAdapter = new TruffleArtifactAdapter(contractsDir); ``` @@ -37,7 +37,7 @@ Look at the code of the two adapters above for examples. ### Usage ```typescript -import { CoverageSubprovider } from '@0xproject/sol-cov'; +import { ProfilerSubprovider } from '@0x/sol-profiler'; import ProviderEngine = require('web3-provider-engine'); const provider = new ProviderEngine(); @@ -48,15 +48,15 @@ const networkId = 50; // Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; const isVerbose = true; -const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); +const profilerSubprovider = new ProfilerSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); -provider.addProvider(coverageSubprovider); +provider.addProvider(profilerSubprovider); ``` After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: ```typescript -await coverageSubprovider.writeCoverageAsync(); +await profilerSubprovider.writeProfilerAsync(); ``` -This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters. +This will create a `profiler.json` file in a `profiler` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/profiler.json.md) - so you can use it with any of the existing Istanbul reporters. diff --git a/packages/website/md/docs/sol_trace/installation.md b/packages/website/md/docs/sol_trace/installation.md new file mode 100644 index 000000000..2f794b2f8 --- /dev/null +++ b/packages/website/md/docs/sol_trace/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/sol-trace +``` + +**Import** + +```javascript +import { TraceSubprovider } from '@0x/sol-trace'; +``` + +or + +```javascript +var TraceSubprovider = require('@0x/sol-trace').TraceSubprovider; +``` diff --git a/packages/website/md/docs/sol_trace/introduction.md b/packages/website/md/docs/sol_trace/introduction.md new file mode 100644 index 000000000..21fea764e --- /dev/null +++ b/packages/website/md/docs/sol_trace/introduction.md @@ -0,0 +1 @@ +Welcome to the [sol-trace](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-trace) documentation! Sol-trace is a Solidity trace tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_trace/usage.md b/packages/website/md/docs/sol_trace/usage.md new file mode 100644 index 000000000..f3aa6fc35 --- /dev/null +++ b/packages/website/md/docs/sol_trace/usage.md @@ -0,0 +1,62 @@ +Sol-trace uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `TraceSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article. + +The TraceSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. + +Trace subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. + +In order to use `TraceSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. + +### Sol-compiler + +If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. + +```typescript +import { SolCompilerArtifactsAdapter } from '@0x/sol-trace'; +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); +``` + +### Truffle + +If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. + +```typescript +import { TruffleArtifactAdapter } from '@0x/sol-trace'; +const contractsPath = 'src/contracts'; +const artifactAdapter = new TruffleArtifactAdapter(contractsDir); +``` + +Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. + +### Other framework/toolset + +You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. +Look at the code of the two adapters above for examples. + +### Usage + +```typescript +import { TraceSubprovider } from '@0x/sol-trace'; +import ProviderEngine = require('web3-provider-engine'); + +const provider = new ProviderEngine(); + +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const networkId = 50; +// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. +const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; +const isVerbose = true; +const traceSubprovider = new TraceSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); + +provider.addProvider(traceSubprovider); +``` + +After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: + +```typescript +await traceSubprovider.writeTraceAsync(); +``` + +This will create a `trace.json` file in a `trace` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/trace.json.md) - so you can use it with any of the existing Istanbul reporters. diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 88193a181..1af89ebfe 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -7,48 +7,37 @@ "FULL_LIST_PROMPT": "查看", "FULL_LIST_LINK": "完整列表", "TOKENIZED_SECTION_HEADER": "世界正走向代币化时代", - "TOKENIZED_SECTION_DESCRIPTION": - "以太坊区块链是一种开源的金融服务系统,全网无边界,统一使用加密代币充当各类资产。在未来,大多数数字资产和商品都将实现代币化。", + "TOKENIZED_SECTION_DESCRIPTION": "以太坊区块链是一种开源的金融服务系统,全网无边界,统一使用加密代币充当各类资产。在未来,大多数数字资产和商品都将实现代币化。", "CURRENCY": "货币", "TRADITIONAL_ASSETS": "传统资产", "DIGITAL_GOODS": "数字商品", "OFFCHAIN_ORDER_RELAY": "链下订单中继", "ONCHAIN_SETTLEMENT": "链上最终结算", - "OFFCHAIN_ONCHAIN_DESCRIPTION": - "在 0x 协议中,所有订单都通过链下传输,大幅削减了损耗成本,能够有效避免区块链膨胀。任何人都可以构建中继方,由中继方广播订单,每促成一笔交易,就可以收取一笔交易费。", + "OFFCHAIN_ONCHAIN_DESCRIPTION": "在 0x 协议中,所有订单都通过链下传输,大幅削减了损耗成本,能够有效避免区块链膨胀。任何人都可以构建中继方,由中继方广播订单,每促成一笔交易,就可以收取一笔交易费。", "RELAYERS_HEADER": "基于 0X 协议构建的中继方", "BENEFITS_HEADER": "0x 的好處", "BENEFIT_ONE_TITLE": "去信任化的交易机制", - "BENEFIT_ONE_DESCRIPTION": - "基于以太坊的分布式网络构建,去除中心体系单点故障,保证无间断运营,每笔交易都自动操作进行结算,完全解除交易对手风险。", + "BENEFIT_ONE_DESCRIPTION": "基于以太坊的分布式网络构建,去除中心体系单点故障,保证无间断运营,每笔交易都自动操作进行结算,完全解除交易对手风险。", "BENEFIT_TWO_TITLE": "共享流动性", - "BENEFIT_TWO_DESCRIPTION": - "通过共享标准 API,让中继方轻松聚集流动池,随着越来越多的中继方纷纷上线,将形成充裕的流动性,创造网络效应。", + "BENEFIT_TWO_DESCRIPTION": "通过共享标准 API,让中继方轻松聚集流动池,随着越来越多的中继方纷纷上线,将形成充裕的流动性,创造网络效应。", "BENEFIT_THREE_TITLE": "开源优势", - "BENEFIT_THREE_DESCRIPTION": - "0x 是一种开源协议,全网无边界,可供免费使用。用户可以直接联系已知的交易对象进行免费交易,还可以支付一定数额的 ZRX 代币,以访问中继方的流动池。", + "BENEFIT_THREE_DESCRIPTION": "0x 是一种开源协议,全网无边界,可供免费使用。用户可以直接联系已知的交易对象进行免费交易,还可以支付一定数额的 ZRX 代币,以访问中继方的流动池。", "BUILDING_BLOCK_SECTION_HEADER": "去中心化应用的构建块", - "BUILDING_BLOCK_SECTION_DESCRIPTION": - "0x 协议是需要交易功能的去中心化应用的可插构建块。如今许多开发人员都在使用 0x 协议构建 Web 应用程序和智能合约,赶快加入这一行列吧!", + "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x 协议是需要交易功能的去中心化应用的可插构建块。如今许多开发人员都在使用 0x 协议构建 Web 应用程序和智能合约,赶快加入这一行列吧!", "DEV_TOOLS_PROMPT": "了解具体的构建方法,请参见", "SMART_CONTRACT": "智能合约 的文档", "DOCS": "", "AND": "和", "DECENTRALIZED_GOVERNANCE": "去中心化的治理", - "DECENTRALIZED_GOVERNANCE_DESCRIPTION": - "去中心化组织使用代币代表所有权,指引其治理逻辑。去中心化组织利用 0x 协议,可以无缝安全地进行启动资金所有权的交易。", + "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "去中心化组织使用代币代表所有权,指引其治理逻辑。去中心化组织利用 0x 协议,可以无缝安全地进行启动资金所有权的交易。", "PREDICTION_MARKETS": "预测市场", - "PREDICTION_MARKETS_DESCRIPTION": - "去中心化预测市场平台会根据现实世界中发生的事件,按照其中包含的金融风险生成代币集合。使用 0x 协议,允许这些代币即刻交易。", + "PREDICTION_MARKETS_DESCRIPTION": "去中心化预测市场平台会根据现实世界中发生的事件,按照其中包含的金融风险生成代币集合。使用 0x 协议,允许这些代币即刻交易。", "STABLE_TOKENS": "稳定代币", - "STABLE_TOKENS_DESCRIPTION": - "StableCoins 等新型经济结构的成功建设有赖于高效的流动性市场的支持。0x 协议能有效促进底层经济机制,利于代币保持稳定。", + "STABLE_TOKENS_DESCRIPTION": "StableCoins 等新型经济结构的成功建设有赖于高效的流动性市场的支持。0x 协议能有效促进底层经济机制,利于代币保持稳定。", "DECENTRALIZED_LOANS": "去中心化的借贷模式", - "DECENTRALIZED_LOANS_DESCRIPTION": - "高效借贷需要流动性市场的支持,为投资者提供方便购买、转卖借贷商品的平台。使用 0x 协议能够为借款方搭建一个自组织的生态系统,高效地针对所有未偿贷款确定市场价格。", + "DECENTRALIZED_LOANS_DESCRIPTION": "高效借贷需要流动性市场的支持,为投资者提供方便购买、转卖借贷商品的平台。使用 0x 协议能够为借款方搭建一个自组织的生态系统,高效地针对所有未偿贷款确定市场价格。", "FUND_MANAGEMENT": "基金管理", - "FUND_MANAGEMENT_DESCRIPTION": - "去中心化基金管理通过划分需事先商定的资产类别,有效限制基金经理的投资行为。向基金管理智能合约中嵌入 0x 协议,可确保其遵守安全约束。", + "FUND_MANAGEMENT_DESCRIPTION": "去中心化基金管理通过划分需事先商定的资产类别,有效限制基金经理的投资行为。向基金管理智能合约中嵌入 0x 协议,可确保其遵守安全约束。", "FINAL_CALL_TO_ACTION": "开始构建去中心化的未来", "DOCUMENTATION": "文档", "COMMUNITY": "社区", @@ -93,8 +82,7 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "LIBRARIES_AND_TOOLS_DESCRIPTION": - "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "LAUNCH_KIT": "0x launch kit", "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.", @@ -110,6 +98,5 @@ "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace", "LEARN_MORE": "learn more", "START_BUILDING_ON_0X": "Start building on 0x", - "START_BUILDING_ON_0X_DESCRIPTION": - "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." + "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index a1d8ecc43..000cbefdf 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -1,56 +1,44 @@ { "TOP_HEADER": "powering decentralized exchange", - "TOP_TAGLINE": - "0x is an open, permissionless protocol allowing for ERC20 tokens to be traded on the Ethereum blockchain.", + "TOP_TAGLINE": "0x is an open, permissionless protocol allowing for ERC20 tokens to be traded on the Ethereum blockchain.", "BUILD_CALL_TO_ACTION": "build on 0x", "COMMUNITY_CALL_TO_ACTION": "join the community", "PROJECTS_HEADER": "projects building on 0x", "FULL_LIST_PROMPT": "view the", "FULL_LIST_LINK": "full list", "TOKENIZED_SECTION_HEADER": "the world's value is becoming tokenized", - "TOKENIZED_SECTION_DESCRIPTION": - "0x is the critical infrastructure layer in the emerging financial stack built on a foundation of Ethereum token standards. Developers needing exchange functionality for ERC 20 tokens, ERC 721 tokens, or any new asset type can easily integrate the 0x protocol into their application.", + "TOKENIZED_SECTION_DESCRIPTION": "0x is the critical infrastructure layer in the emerging financial stack built on a foundation of Ethereum token standards. Developers needing exchange functionality for ERC 20 tokens, ERC 721 tokens, or any new asset type can easily integrate the 0x protocol into their application.", "CURRENCY": "currency", "TRADITIONAL_ASSETS": "traditional assets", "DIGITAL_GOODS": "digital goods", "OFFCHAIN_ORDER_RELAY": "off-chain order relay", "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.", + "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", "BENEFITS_HEADER": "benefits of 0x", "USE_CASES_HEADER": "use cases of 0x", "BENEFIT_ONE_TITLE": "any asset", - "BENEFIT_ONE_DESCRIPTION": - "the 0x protocol facilitates the exchange of a growing number of Ethereum-based tokens including currencies, game items, and many more digital assets.", + "BENEFIT_ONE_DESCRIPTION": "the 0x protocol facilitates the exchange of a growing number of Ethereum-based tokens including currencies, game items, and many more digital assets.", "BENEFIT_TWO_TITLE": "networked liquidity", - "BENEFIT_TWO_DESCRIPTION": - "by sharing a standard API, relayers can easily aggregate liquidity pools, creating network effects around liquidity that compound as more relayers come online.", + "BENEFIT_TWO_DESCRIPTION": "by sharing a standard API, relayers can easily aggregate liquidity pools, creating network effects around liquidity that compound as more relayers come online.", "BENEFIT_THREE_TITLE": "exchange everywhere", - "BENEFIT_THREE_DESCRIPTION": - "0x allows trade functionality to fade into the background, enabling developers to focus on building while 0x handles the exchange.", + "BENEFIT_THREE_DESCRIPTION": "0x allows trade functionality to fade into the background, enabling developers to focus on building while 0x handles the exchange.", "BUILDING_BLOCK_SECTION_HEADER": "a building block for dApps", - "BUILDING_BLOCK_SECTION_DESCRIPTION": - "0x protocol is a pluggable building block for dApps that require exchange functionality. Join the many developers that are already using 0x in their web applications and smart contracts.", + "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x protocol is a pluggable building block for dApps that require exchange functionality. Join the many developers that are already using 0x in their web applications and smart contracts.", "DEV_TOOLS_PROMPT": "learn how in our", "SMART_CONTRACT": "smart contract", "DOCS": "docs", "AND": "and", "DECENTRALIZED_GOVERNANCE": "decentralized governance", - "DECENTRALIZED_GOVERNANCE_DESCRIPTION": - "Decentralized organizations use tokens to represent ownership and guide their governance logic. 0x allows decentralized organizations to seamlessly and safely trade ownership for startup capital.", + "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "Decentralized organizations use tokens to represent ownership and guide their governance logic. 0x allows decentralized organizations to seamlessly and safely trade ownership for startup capital.", "PREDICTION_MARKETS": "prediction markets", - "PREDICTION_MARKETS_DESCRIPTION": - "decentralized prediction market platforms generate sets of tokens that represent a financial stake in the outcomes of real-world events. 0x allows these tokens to be instantly tradable.", + "PREDICTION_MARKETS_DESCRIPTION": "decentralized prediction market platforms generate sets of tokens that represent a financial stake in the outcomes of real-world events. 0x allows these tokens to be instantly tradable.", "STABLE_TOKENS": "stable tokens", - "STABLE_TOKENS_DESCRIPTION": - "novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.", + "STABLE_TOKENS_DESCRIPTION": "novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.", "DECENTRALIZED_LOANS": "decentralized loans", - "DECENTRALIZED_LOANS_DESCRIPTION": - "efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.", + "DECENTRALIZED_LOANS_DESCRIPTION": "efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.", "FUND_MANAGEMENT": "fund management", - "FUND_MANAGEMENT_DESCRIPTION": - "Decentralized fund management limits fund managers to investing in pre-agreed upon asset classes. Embedding 0x into fund management smart contracts enables them to enforce these security constraints.", + "FUND_MANAGEMENT_DESCRIPTION": "Decentralized fund management limits fund managers to investing in pre-agreed upon asset classes. Embedding 0x into fund management smart contracts enables them to enforce these security constraints.", "FINAL_CALL_TO_ACTION": "get started on building the decentralized future", "DOCUMENTATION": "documentation", "COMMUNITY": "community", @@ -93,15 +81,13 @@ "USE_NETWORKED_LIQUIDITY": "use networked liquidity", "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", "INTEGRATE_0X_INSTANT": "add seamless purchasing of crypto assets to your website or app", - "INTEGRATE_0X_INSTANT_DESCRIPTION": - "learn how to use 0x Instant or AssetBuyer to give your users the power of purchasing crypto assets using 0x", + "INTEGRATE_0X_INSTANT_DESCRIPTION": "learn how to use 0x Instant or AssetBuyer to give your users the power of purchasing crypto assets using 0x", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "LIBRARIES_AND_TOOLS_DESCRIPTION": - "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "LAUNCH_KIT": "0x launch kit", "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.", @@ -118,12 +104,9 @@ "LEARN_MORE": "learn more", "OUR_MISSION_AND_VALUES": "our mission & values", "GAMING_AND_COLLECTABLES": "gaming & collectables", - "GAMING_AND_COLLECTABLES_DESCRIPTION": - "artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality to give access and the ability to build marketplaces for NFT trading.", + "GAMING_AND_COLLECTABLES_DESCRIPTION": "artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality to give access and the ability to build marketplaces for NFT trading.", "ORDER_BOOKS": "order books", - "ORDER_BOOKS_DESCRIPTION": - "there are thousands of decentralized apps that have native utility tokens. 0x provides market makers and professional exchanges an ability to host order books to facilitate the exchange of these assets.", + "ORDER_BOOKS_DESCRIPTION": "there are thousands of decentralized apps that have native utility tokens. 0x provides market makers and professional exchanges an ability to host order books to facilitate the exchange of these assets.", "START_BUILDING_ON_0X": "Start building on 0x", - "START_BUILDING_ON_0X_DESCRIPTION": - "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." + "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 539b81470..82f88a0c3 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -7,48 +7,37 @@ "FULL_LIST_PROMPT": "보기", "FULL_LIST_LINK": "전체 목록", "TOKENIZED_SECTION_HEADER": "전 세계의 가치가 토큰으로 변환되고 있음", - "TOKENIZED_SECTION_DESCRIPTION": - "이더리움 블록체인은 국경이 없는 개방형 결제 시스템으로, 다양한 자산을 암호화 토큰으로 나타내 줍니다. 앞으로는 디지털 자산과 상품 대부분이 토큰으로 바뀔 것입니다.", + "TOKENIZED_SECTION_DESCRIPTION": "이더리움 블록체인은 국경이 없는 개방형 결제 시스템으로, 다양한 자산을 암호화 토큰으로 나타내 줍니다. 앞으로는 디지털 자산과 상품 대부분이 토큰으로 바뀔 것입니다.", "CURRENCY": "통화", "TRADITIONAL_ASSETS": "전통적 자산", "DIGITAL_GOODS": "디지털 상품", "OFFCHAIN_ORDER_RELAY": "오프체인 주문 릴레이", "ONCHAIN_SETTLEMENT": "온체인 정산", - "OFFCHAIN_ONCHAIN_DESCRIPTION": - "0x 프로토콜에서 주문은 오프체인으로 전달되므로, 가스 비용이 대폭 줄고 블록체인이 불필요하게 커지지 않습니다. Relayer는 주문을 브로드캐스팅할 수 있게 해 주고, 주문에서 거래가 진행될 때마다 수수료를 받을 수 있습니다. 누구든지 Relayer를 생성할 수 있습니다.", + "OFFCHAIN_ONCHAIN_DESCRIPTION": "0x 프로토콜에서 주문은 오프체인으로 전달되므로, 가스 비용이 대폭 줄고 블록체인이 불필요하게 커지지 않습니다. Relayer는 주문을 브로드캐스팅할 수 있게 해 주고, 주문에서 거래가 진행될 때마다 수수료를 받을 수 있습니다. 누구든지 Relayer를 생성할 수 있습니다.", "RELAYERS_HEADER": "0x 기반 Relayer", "BENEFITS_HEADER": "모두 보기", "BENEFIT_ONE_TITLE": "신뢰할 수 없는 거래소", - "BENEFIT_ONE_DESCRIPTION": - "중앙화된 오류 지점과 중단 시간이 없는 이더리움의 분산 네트워크를 바탕으로 구축되므로, 각 거래가 개별 단위로 정산되며 거래 상대방으로 인한 위험도 없습니다.", + "BENEFIT_ONE_DESCRIPTION": "중앙화된 오류 지점과 중단 시간이 없는 이더리움의 분산 네트워크를 바탕으로 구축되므로, 각 거래가 개별 단위로 정산되며 거래 상대방으로 인한 위험도 없습니다.", "BENEFIT_TWO_TITLE": "공유 유동 자금", - "BENEFIT_TWO_DESCRIPTION": - "표준 API를 공유하므로 Relayer는 유동 자금 풀을 쉽게 취합할 수 있습니다. 따라서 더 많은 Relayer가 온라인 상태가 되면 유동 자금을 바탕으로 한 복합적인 네트워크 효과를 만들 수 있습니다.", + "BENEFIT_TWO_DESCRIPTION": "표준 API를 공유하므로 Relayer는 유동 자금 풀을 쉽게 취합할 수 있습니다. 따라서 더 많은 Relayer가 온라인 상태가 되면 유동 자금을 바탕으로 한 복합적인 네트워크 효과를 만들 수 있습니다.", "BENEFIT_THREE_TITLE": "오픈 소스", - "BENEFIT_THREE_DESCRIPTION": - "0x는 무허가형 오프 소스이며, 무료로 사용할 수 있습니다. 이미 알고 있는 상대방과 직접 무료로 거래하거나, Relayer에 약간의 ZRX 토큰을 지불하여 해당 유동 자금 풀에 액세스할 수 있습니다.", + "BENEFIT_THREE_DESCRIPTION": "0x는 무허가형 오프 소스이며, 무료로 사용할 수 있습니다. 이미 알고 있는 상대방과 직접 무료로 거래하거나, Relayer에 약간의 ZRX 토큰을 지불하여 해당 유동 자금 풀에 액세스할 수 있습니다.", "BUILDING_BLOCK_SECTION_HEADER": "dApp을 위한 기본 구성 요소", - "BUILDING_BLOCK_SECTION_DESCRIPTION": - "0x 프로토콜은 거래소 기능이 필요한 dApp을 위한 연결 가능한 기본 구성 요소입니다. 웹 애플리케이션과 스마트 계약에서 이미 0x를 사용하고 있는 여러 개발자 대열에 동참해 보세요.", + "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x 프로토콜은 거래소 기능이 필요한 dApp을 위한 연결 가능한 기본 구성 요소입니다. 웹 애플리케이션과 스마트 계약에서 이미 0x를 사용하고 있는 여러 개발자 대열에 동참해 보세요.", "DEV_TOOLS_PROMPT": "수행하는 방법 알아보기", "SMART_CONTRACT": "스마트 계약 문서에 ", "DOCS": "", "AND": "및", "DECENTRALIZED_GOVERNANCE": "탈중앙화된 거버넌스", - "DECENTRALIZED_GOVERNANCE_DESCRIPTION": - "탈중앙화된 조직은 토큰을 사용하여 소유권을 나타내며 거버넌스 로직의 방향을 정합니다. 0x를 사용하면 탈중앙화된 조직이 안전하고 원활하게 스타트업 자금의 소유권을 주고받을 수 있습니다.", + "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "탈중앙화된 조직은 토큰을 사용하여 소유권을 나타내며 거버넌스 로직의 방향을 정합니다. 0x를 사용하면 탈중앙화된 조직이 안전하고 원활하게 스타트업 자금의 소유권을 주고받을 수 있습니다.", "PREDICTION_MARKETS": "예측 시장", - "PREDICTION_MARKETS_DESCRIPTION": - "탈중앙화된 예측 시장 플랫폼은 실제 이벤트 결과에서의 금전적인 지분을 나타내는 토큰 세트를 생성합니다. 0x를 사용하면 이러한 토큰을 즉시 거래할 수 있습니다.", + "PREDICTION_MARKETS_DESCRIPTION": "탈중앙화된 예측 시장 플랫폼은 실제 이벤트 결과에서의 금전적인 지분을 나타내는 토큰 세트를 생성합니다. 0x를 사용하면 이러한 토큰을 즉시 거래할 수 있습니다.", "STABLE_TOKENS": "안정적인 토큰", - "STABLE_TOKENS_DESCRIPTION": - "안정적인 코인과 같은 새롭게 등장한 경제 개념은 효율성이 높은 유동 시장에 적용해야 성공할 수 있습니다. 0x는 이러한 토큰이 안정적인 상태를 유지할 수 있게 하는 기반 경제 메커니즘을 가능하게 합니다.", + "STABLE_TOKENS_DESCRIPTION": "안정적인 코인과 같은 새롭게 등장한 경제 개념은 효율성이 높은 유동 시장에 적용해야 성공할 수 있습니다. 0x는 이러한 토큰이 안정적인 상태를 유지할 수 있게 하는 기반 경제 메커니즘을 가능하게 합니다.", "DECENTRALIZED_LOANS": "탈중앙화된 대출", - "DECENTRALIZED_LOANS_DESCRIPTION": - "대출이 효율적으로 이루어지려면 투자자가 대출 상품을 사고 다시 파는 유동 시장이 있어야 합니다. 0x를 통해 전체 미상환 대출이 자체 구성되고 이러한 대출의 시장 가격을 효율적으로 결정할 수 있는 대출 기관 생태계가 가능해집니다.", + "DECENTRALIZED_LOANS_DESCRIPTION": "대출이 효율적으로 이루어지려면 투자자가 대출 상품을 사고 다시 파는 유동 시장이 있어야 합니다. 0x를 통해 전체 미상환 대출이 자체 구성되고 이러한 대출의 시장 가격을 효율적으로 결정할 수 있는 대출 기관 생태계가 가능해집니다.", "FUND_MANAGEMENT": "자금 관리", - "FUND_MANAGEMENT_DESCRIPTION": - "탈중앙화된 자금 관리로 자금 운용 관리자가 사전 합의된 자산 등급에 투자하는 것이 제한됩니다. 자금 관리 스마트 계약에 0x를 포함시키면 자금 운용 담당자가 보안 관련 제한 사항을 강화할 수 있습니다.", + "FUND_MANAGEMENT_DESCRIPTION": "탈중앙화된 자금 관리로 자금 운용 관리자가 사전 합의된 자산 등급에 투자하는 것이 제한됩니다. 자금 관리 스마트 계약에 0x를 포함시키면 자금 운용 담당자가 보안 관련 제한 사항을 강화할 수 있습니다.", "FINAL_CALL_TO_ACTION": "탈중앙화된 미래 구축하기", "DOCUMENTATION": "문서", "COMMUNITY": "커뮤니티", @@ -93,8 +82,7 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "LIBRARIES_AND_TOOLS_DESCRIPTION": - "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "LAUNCH_KIT": "0x launch kit", "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.", @@ -110,6 +98,5 @@ "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace", "LEARN_MORE": "learn more", "START_BUILDING_ON_0X": "Start building on 0x", - "START_BUILDING_ON_0X_DESCRIPTION": - "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." + "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index feb5df02e..acf78b507 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -7,48 +7,37 @@ "FULL_LIST_PROMPT": "Просмотреть", "FULL_LIST_LINK": "полный список", "TOKENIZED_SECTION_HEADER": "Сегодняшний мир движется к токенизации ценности", - "TOKENIZED_SECTION_DESCRIPTION": - "Блокчейн Ethereum — это открытая, безграничная финансовая система, большое количество активов которой представлено в виде криптографических токенов. В будущем большая часть цифровых активов и товаров будет токенизирована.", + "TOKENIZED_SECTION_DESCRIPTION": "Блокчейн Ethereum — это открытая, безграничная финансовая система, большое количество активов которой представлено в виде криптографических токенов. В будущем большая часть цифровых активов и товаров будет токенизирована.", "CURRENCY": "Валюта", "TRADITIONAL_ASSETS": "Традиционные активы", "DIGITAL_GOODS": "Цифровые товары", "OFFCHAIN_ORDER_RELAY": "Офчейн-ордер", "ONCHAIN_SETTLEMENT": "Ончейн-транзакция", - "OFFCHAIN_ONCHAIN_DESCRIPTION": - "При использовании протокола 0x ордера проводятся вне блокчейна, что сокращает расходы на газ (топливо) и предотвращает раздувание блокчейна. Релейеры помогают провести ордера и берут комиссию каждый раз, когда способствуют торгам. Любой может создать релейера.", + "OFFCHAIN_ONCHAIN_DESCRIPTION": "При использовании протокола 0x ордера проводятся вне блокчейна, что сокращает расходы на газ (топливо) и предотвращает раздувание блокчейна. Релейеры помогают провести ордера и берут комиссию каждый раз, когда способствуют торгам. Любой может создать релейера.", "RELAYERS_HEADER": "РЕЛЕЙЕРЫ, РАЗРАБОТАННЫЕ НА 0X", "BENEFITS_HEADER": "Просмотреть все", "BENEFIT_ONE_TITLE": "Обмен, не требующий доверия", - "BENEFIT_ONE_DESCRIPTION": - "Каждая сделка, основанная на распределенной сети Ethereum без единой точки отказа и с нулевым временем простоя, является атомарной операцией и проводится без риска для контрагента.", + "BENEFIT_ONE_DESCRIPTION": "Каждая сделка, основанная на распределенной сети Ethereum без единой точки отказа и с нулевым временем простоя, является атомарной операцией и проводится без риска для контрагента.", "BENEFIT_TWO_TITLE": "Общая ликвидность", - "BENEFIT_TWO_DESCRIPTION": - "При обмене стандартным API релейеры могут легко объединять пулы ликвидности, создавая сетевые эффекты вокруг ликвидности, которые усложняются с появлением новых релейеров в сети.", + "BENEFIT_TWO_DESCRIPTION": "При обмене стандартным API релейеры могут легко объединять пулы ликвидности, создавая сетевые эффекты вокруг ликвидности, которые усложняются с появлением новых релейеров в сети.", "BENEFIT_THREE_TITLE": "Открытый исходный код", - "BENEFIT_THREE_DESCRIPTION": - "0x — это бесплатный и доступный протокол с открытым кодом. Торгуйте напрямую с известными контрагентами бесплатно или заплатите релейеру несколько ZRX-токенов, чтобы получить доступ к его пулу ликвидности.", + "BENEFIT_THREE_DESCRIPTION": "0x — это бесплатный и доступный протокол с открытым кодом. Торгуйте напрямую с известными контрагентами бесплатно или заплатите релейеру несколько ZRX-токенов, чтобы получить доступ к его пулу ликвидности.", "BUILDING_BLOCK_SECTION_HEADER": "Строительный блок для dApp", - "BUILDING_BLOCK_SECTION_DESCRIPTION": - "Протокол 0x — это подключаемый строительный блок для dApp, нуждающихся в функционале обмена. Присоединяйтесь к разработчикам, которые уже используют 0x в своих веб-приложениях и смарт-контрактах.", + "BUILDING_BLOCK_SECTION_DESCRIPTION": "Протокол 0x — это подключаемый строительный блок для dApp, нуждающихся в функционале обмена. Присоединяйтесь к разработчикам, которые уже используют 0x в своих веб-приложениях и смарт-контрактах.", "DEV_TOOLS_PROMPT": "Узнайте как это сделать в документации к", "SMART_CONTRACT": "смарт-контрактам", "DOCS": "", "AND": "и", "DECENTRALIZED_GOVERNANCE": "Децентрализированное управление", - "DECENTRALIZED_GOVERNANCE_DESCRIPTION": - "Децентрализованные организации используют токены для представления собственности и внедрения своей логики управления. Протокол 0x позволяет децентрализованным организациям беспрепятственно и безопасно торговать собственностью для стартового капитала.", + "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "Децентрализованные организации используют токены для представления собственности и внедрения своей логики управления. Протокол 0x позволяет децентрализованным организациям беспрепятственно и безопасно торговать собственностью для стартового капитала.", "PREDICTION_MARKETS": "Рынки предсказаний", - "PREDICTION_MARKETS_DESCRIPTION": - "Платформы для децентрализованных рынков предсказаний генерируют множество токенов, которые представляют собой финансовую долю в результате реальных событий. Протокол 0x позволяет мгновенно торговать эти токены.", + "PREDICTION_MARKETS_DESCRIPTION": "Платформы для децентрализованных рынков предсказаний генерируют множество токенов, которые представляют собой финансовую долю в результате реальных событий. Протокол 0x позволяет мгновенно торговать эти токены.", "STABLE_TOKENS": "Стабильные токены", - "STABLE_TOKENS_DESCRIPTION": - "Новые экономические конструкции, например стабильные токены, требуют наличия успешных и эффективных ликвидных рынков. Протокол 0x призван облегчить основные экономические механизмы, которые позволят этим токенам оставаться стабильными.", + "STABLE_TOKENS_DESCRIPTION": "Новые экономические конструкции, например стабильные токены, требуют наличия успешных и эффективных ликвидных рынков. Протокол 0x призван облегчить основные экономические механизмы, которые позволят этим токенам оставаться стабильными.", "DECENTRALIZED_LOANS": "Децентрализированные займы", - "DECENTRALIZED_LOANS_DESCRIPTION": - "Эффективное кредитование требует наличия ликвидных рынков, где инвесторы могут купить и перепродать займы. Протокол 0x позволяет экосистеме кредиторов самоорганизовываться и эффективно определять рыночные цены для всех невыплаченных займов.", + "DECENTRALIZED_LOANS_DESCRIPTION": "Эффективное кредитование требует наличия ликвидных рынков, где инвесторы могут купить и перепродать займы. Протокол 0x позволяет экосистеме кредиторов самоорганизовываться и эффективно определять рыночные цены для всех невыплаченных займов.", "FUND_MANAGEMENT": "Управление средствами", - "FUND_MANAGEMENT_DESCRIPTION": - "Децентрализованное управление средствами ограничивает управляющих средствами путем определения предварительно согласованных классов активов для инвестиций. Встраивание протокола 0x в смарт-контракты для управления средствами позволяет им обеспечить исполнение этих ограничений безопасности.", + "FUND_MANAGEMENT_DESCRIPTION": "Децентрализованное управление средствами ограничивает управляющих средствами путем определения предварительно согласованных классов активов для инвестиций. Встраивание протокола 0x в смарт-контракты для управления средствами позволяет им обеспечить исполнение этих ограничений безопасности.", "FINAL_CALL_TO_ACTION": "Начните создавать децентрализованное будущее", "DOCUMENTATION": "Документация", "COMMUNITY": "Сообщество", @@ -93,8 +82,7 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "LIBRARIES_AND_TOOLS_DESCRIPTION": - "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "LAUNCH_KIT": "0x launch kit", "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.", @@ -110,6 +98,5 @@ "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace", "LEARN_MORE": "learn more", "START_BUILDING_ON_0X": "Start building on 0x", - "START_BUILDING_ON_0X_DESCRIPTION": - "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." + "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index f4762a67e..152b3ef22 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -1,55 +1,43 @@ { "TOP_HEADER": "potenciar el intercambio descentralizado", - "TOP_TAGLINE": - "0x es un protocolo abierto y sin restricciones que permite el intercambio de tokens ERC20 en la cadena de bloques Ethereum.", + "TOP_TAGLINE": "0x es un protocolo abierto y sin restricciones que permite el intercambio de tokens ERC20 en la cadena de bloques Ethereum.", "BUILD_CALL_TO_ACTION": "crear en 0x", "COMMUNITY_CALL_TO_ACTION": "unirse a la comunidad", "PROJECTS_HEADER": "proyectos creados en 0x", "FULL_LIST_PROMPT": "ver la", "FULL_LIST_LINK": "lista completa", "TOKENIZED_SECTION_HEADER": "el valor del mundo se está tokenizando", - "TOKENIZED_SECTION_DESCRIPTION": - "la cadena de bloques Ethereum es un sistema financiero abierto y sin fronteras que representa una amplia variedad de activos como tokens criptográficos. En el futuro, la mayoría de los activos y bienes digitales estarán tokenizados.", + "TOKENIZED_SECTION_DESCRIPTION": "la cadena de bloques Ethereum es un sistema financiero abierto y sin fronteras que representa una amplia variedad de activos como tokens criptográficos. En el futuro, la mayoría de los activos y bienes digitales estarán tokenizados.", "CURRENCY": "moneda", "TRADITIONAL_ASSETS": "activos tradicionales", "DIGITAL_GOODS": "bienes digitales", "OFFCHAIN_ORDER_RELAY": "orden retransmisión fuera de 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.", + "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", "BENEFITS_HEADER": "beneficios de 0x", "BENEFIT_ONE_TITLE": "intercambio confiable", - "BENEFIT_ONE_DESCRIPTION": - "creado en la red distribuida de Ethereum sin ningún punto de error centralizado y sin tiempo de inactividad; cada intercambio se concreta atómicamente y sin riesgos para la contraparte.", + "BENEFIT_ONE_DESCRIPTION": "creado en la red distribuida de Ethereum sin ningún punto de error centralizado y sin tiempo de inactividad; cada intercambio se concreta atómicamente y sin riesgos para la contraparte.", "BENEFIT_TWO_TITLE": "liquidez compartida", - "BENEFIT_TWO_DESCRIPTION": - "al compartir un API estándar, los transmisores pueden acumular fácilmente fondos de liquidez, lo que crea efectos de red en torno a la liquidez que se forma a medida que más transmisores se conectan.", + "BENEFIT_TWO_DESCRIPTION": "al compartir un API estándar, los transmisores pueden acumular fácilmente fondos de liquidez, lo que crea efectos de red en torno a la liquidez que se forma a medida que más transmisores se conectan.", "BENEFIT_THREE_TITLE": "código abierto", - "BENEFIT_THREE_DESCRIPTION": - "0x es código abierto, su uso es gratuito. Negocie directamente con una contraparte conocida sin costo o páguele a un transmisor con algunos para acceder a su fondo de liquidez.", + "BENEFIT_THREE_DESCRIPTION": "0x es código abierto, su uso es gratuito. Negocie directamente con una contraparte conocida sin costo o páguele a un transmisor con algunos para acceder a su fondo de liquidez.", "BUILDING_BLOCK_SECTION_HEADER": "un bloque de creación para dApps", - "BUILDING_BLOCK_SECTION_DESCRIPTION": - "el protocolo 0x es un bloque de creación acoplable para dApps que requiere una funcionalidad de intercambio. Únase a los numerosos desarrolladores que ya utilizan 0x en sus aplicaciones web y contratos inteligentes.", + "BUILDING_BLOCK_SECTION_DESCRIPTION": "el protocolo 0x es un bloque de creación acoplable para dApps que requiere una funcionalidad de intercambio. Únase a los numerosos desarrolladores que ya utilizan 0x en sus aplicaciones web y contratos inteligentes.", "DEV_TOOLS_PROMPT": "aprenda cómo hacerlo en nuestros documentos de", "SMART_CONTRACT": "contratos inteligentes", "DOCS": "", "AND": "y", "DECENTRALIZED_GOVERNANCE": "gobierno descentralizado", - "DECENTRALIZED_GOVERNANCE_DESCRIPTION": - "las organizaciones descentralizadas utilizan tokens para representar la titularidad y guiar su lógica de gobierno. 0x les permite a las organizaciones descentralizadas intercambiar titularidad por capital inicial sin problemas y de forma segura.", + "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "las organizaciones descentralizadas utilizan tokens para representar la titularidad y guiar su lógica de gobierno. 0x les permite a las organizaciones descentralizadas intercambiar titularidad por capital inicial sin problemas y de forma segura.", "PREDICTION_MARKETS": "mercados de predicción", - "PREDICTION_MARKETS_DESCRIPTION": - "las plataformas del mercado de predicción descentralizado generan conjuntos de tokens que representan un interés financiero en los resultados de los sucesos del mundo real. 0x permite que estos tokens se negocien de manera instantánea.", + "PREDICTION_MARKETS_DESCRIPTION": "las plataformas del mercado de predicción descentralizado generan conjuntos de tokens que representan un interés financiero en los resultados de los sucesos del mundo real. 0x permite que estos tokens se negocien de manera instantánea.", "STABLE_TOKENS": "tokens estables", - "STABLE_TOKENS_DESCRIPTION": - "las construcciones económicas novedosas, como las monedas estables, requieren mercados eficientes y con liquidez para tener éxito. 0x facilitará los mecanismos económicos subyacentes que permiten que estos tokens continúen siendo estables.", + "STABLE_TOKENS_DESCRIPTION": "las construcciones económicas novedosas, como las monedas estables, requieren mercados eficientes y con liquidez para tener éxito. 0x facilitará los mecanismos económicos subyacentes que permiten que estos tokens continúen siendo estables.", "DECENTRALIZED_LOANS": "préstamos descentralizados", - "DECENTRALIZED_LOANS_DESCRIPTION": - "los préstamos eficientes requieren mercados con liquidez donde los inversores pueden comprar y revender préstamos. 0x facilita un ecosistema de prestamistas que se organizan ellos mismos y determinan, de forma eficaz, los precios del mercado para todos los préstamos pendientes.", + "DECENTRALIZED_LOANS_DESCRIPTION": "los préstamos eficientes requieren mercados con liquidez donde los inversores pueden comprar y revender préstamos. 0x facilita un ecosistema de prestamistas que se organizan ellos mismos y determinan, de forma eficaz, los precios del mercado para todos los préstamos pendientes.", "FUND_MANAGEMENT": "administración de fondos", - "FUND_MANAGEMENT_DESCRIPTION": - "la administración descentralizada de fondos limita a los administradores de fondos a invertir en clases de activos preacordadas. Integrar 0x a los contratos inteligentes de la administración de fondos les permite imponer esas restricciones de seguridad.", + "FUND_MANAGEMENT_DESCRIPTION": "la administración descentralizada de fondos limita a los administradores de fondos a invertir en clases de activos preacordadas. Integrar 0x a los contratos inteligentes de la administración de fondos les permite imponer esas restricciones de seguridad.", "FINAL_CALL_TO_ACTION": "comience a crear el futuro descentralizado", "DOCUMENTATION": "documentación", "COMMUNITY": "comunidad", @@ -94,8 +82,7 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "LIBRARIES_AND_TOOLS_DESCRIPTION": - "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "LAUNCH_KIT": "0x launch kit", "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.", @@ -111,6 +98,5 @@ "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace", "LEARN_MORE": "learn more", "START_BUILDING_ON_0X": "Start building on 0x", - "START_BUILDING_ON_0X_DESCRIPTION": - "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." + "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/ts/components/aboutPageLayout.tsx b/packages/website/ts/components/aboutPageLayout.tsx index a2fd9dd72..51c1a661e 100644 --- a/packages/website/ts/components/aboutPageLayout.tsx +++ b/packages/website/ts/components/aboutPageLayout.tsx @@ -38,18 +38,17 @@ export const AboutPageLayout = (props: Props) => ( {props.description} </AnimatedParagraph> - {props.linkLabel && - (props.href || props.to) && ( - <AnimatedLink - to={props.to} - href={props.href} - target={!_.isUndefined(props.href) ? '_blank' : undefined} - isWithArrow={true} - isAccentColor={true} - > - {props.linkLabel} - </AnimatedLink> - )} + {props.linkLabel && (props.href || props.to) && ( + <AnimatedLink + to={props.to} + href={props.href} + target={!_.isUndefined(props.href) ? '_blank' : undefined} + isWithArrow={true} + isAccentColor={true} + > + {props.linkLabel} + </AnimatedLink> + )} </Column> </Column> </Section> diff --git a/packages/website/ts/components/animatedChatIcon.tsx b/packages/website/ts/components/animatedChatIcon.tsx index 9a86e244c..770536259 100644 --- a/packages/website/ts/components/animatedChatIcon.tsx +++ b/packages/website/ts/components/animatedChatIcon.tsx @@ -98,9 +98,6 @@ const Rays = styled.g` transform-origin: 50% 50%; `; -const Dot = - styled.circle < - { delay: number } > - ` +const Dot = styled.circle<{ delay: number }>` animation: ${fadeInOut} 4s ${props => `${props.delay}s`} infinite; `; diff --git a/packages/website/ts/components/banner.tsx b/packages/website/ts/components/banner.tsx index 76fc1d09e..ce3fd499a 100644 --- a/packages/website/ts/components/banner.tsx +++ b/packages/website/ts/components/banner.tsx @@ -123,10 +123,7 @@ const ButtonWrap = styled.div` // Note let's refactor this // is it absolutely necessary to have a stateless component // to pass props down into the styled icon? -const Border = - styled.div < - BorderProps > - ` +const Border = styled.div<BorderProps>` position: absolute; background-image: ${props => props.isBottom ? 'url(/images/banner/bottomofcta.png);' : 'url(/images/banner/topofcta.png);'}; diff --git a/packages/website/ts/components/button.tsx b/packages/website/ts/components/button.tsx index 569038ae0..31a74e599 100644 --- a/packages/website/ts/components/button.tsx +++ b/packages/website/ts/components/button.tsx @@ -58,10 +58,7 @@ Button.defaultProps = { borderColor: 'rgba(255, 255, 255, .4)', }; -const ButtonBase = - styled.button < - ButtonInterface > - ` +const ButtonBase = styled.button<ButtonInterface>` appearance: none; border: 1px solid transparent; display: inline-block; diff --git a/packages/website/ts/components/definition.tsx b/packages/website/ts/components/definition.tsx index 92fe54f38..bd7a40425 100644 --- a/packages/website/ts/components/definition.tsx +++ b/packages/website/ts/components/definition.tsx @@ -69,10 +69,7 @@ export const Definition = (props: Props) => ( </Wrap> ); -const Wrap = - styled.div < - Props > - ` +const Wrap = styled.div<Props>` max-width: ${props => props.isInline && '354px'}; & + & { @@ -97,10 +94,7 @@ const Wrap = } `; -const TextWrap = - styled.div < - Props > - ` +const TextWrap = styled.div<Props>` width: 100%; max-width: 560px; diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx index a0114d898..1c47903db 100644 --- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx +++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx @@ -148,15 +148,17 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp If you are using{' '} <a href={constants.URL_METAMASK_CHROME_STORE} target="_blank"> Metamask - </a>, you can switch networks in the top left corner of the extension popover. + </a> + , you can switch networks in the top left corner of the extension popover. </div> <h4>Parity Signer</h4> <div> If using the{' '} <a href={constants.URL_PARITY_CHROME_STORE} target="_blank"> Parity Signer Chrome extension - </a>, make sure to start your local Parity node with `parity ui` or `parity --chain Kovan ui` in - order to connect to mainnet \ or Kovan respectively. + </a> + , make sure to start your local Parity node with `parity ui` or `parity --chain Kovan ui` in order + to connect to mainnet \ or Kovan respectively. </div> </div> ); diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx index 9b9421f1a..5ca272b1a 100644 --- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx +++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx @@ -111,20 +111,19 @@ export class EthWethConversionDialog extends React.Component< )} <div className="pt1" style={{ fontSize: 12 }}> <div className="left">1 ETH = 1 WETH</div> - {this.props.direction === Side.Receive && - this.state.isEthTokenBalanceLoaded && ( - <div - className="right" - onClick={this._onMaxClick.bind(this)} - style={{ - color: colors.darkBlue, - textDecoration: 'underline', - cursor: 'pointer', - }} - > - Max - </div> - )} + {this.props.direction === Side.Receive && this.state.isEthTokenBalanceLoaded && ( + <div + className="right" + onClick={this._onMaxClick.bind(this)} + style={{ + color: colors.darkBlue, + textDecoration: 'underline', + cursor: 'pointer', + }} + > + Max + </div> + )} </div> </div> </div> diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 3d0203573..2fa2b94a0 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -173,15 +173,14 @@ export class FillOrder extends React.Component<FillOrderProps, FillOrderState> { private _renderOrderJsonNotices(): React.ReactNode { return ( <div> - {!_.isUndefined(this.props.initialOrder) && - !this.state.didOrderValidationRun && ( - <div className="pt2"> - <span className="pr1"> - <i className="zmdi zmdi-spinner zmdi-hc-spin" /> - </span> - <span>Validating order...</span> - </div> - )} + {!_.isUndefined(this.props.initialOrder) && !this.state.didOrderValidationRun && ( + <div className="pt2"> + <span className="pr1"> + <i className="zmdi zmdi-spinner zmdi-hc-spin" /> + </span> + <span>Validating order...</span> + </div> + )} {!_.isEmpty(this.state.orderJSONErrMsg) && ( <Alert type={AlertTypes.ERROR} message={this.state.orderJSONErrMsg} /> )} diff --git a/packages/website/ts/components/fill_warning_dialog.tsx b/packages/website/ts/components/fill_warning_dialog.tsx index feb72c2ee..5be09e6c2 100644 --- a/packages/website/ts/components/fill_warning_dialog.tsx +++ b/packages/website/ts/components/fill_warning_dialog.tsx @@ -37,7 +37,8 @@ export const FillWarningDialog = (props: FillWarningDialogProps) => { be counterfeit. It is your responsibility to verify the token addresses on Etherscan ( <a href="https://0x.org/wiki#Verifying-Custom-Tokens" target="_blank"> See this how-to guide - </a>) before filling an order. <b>This action may result in the loss of funds</b>. + </a> + ) before filling an order. <b>This action may result in the loss of funds</b>. </div> </div> </Dialog> diff --git a/packages/website/ts/components/hamburger.tsx b/packages/website/ts/components/hamburger.tsx index 435d206cd..34d4ccc46 100644 --- a/packages/website/ts/components/hamburger.tsx +++ b/packages/website/ts/components/hamburger.tsx @@ -16,10 +16,7 @@ export const Hamburger: React.FunctionComponent<Props> = (props: Props) => { ); }; -const StyledHamburger = - styled.button < - Props > - ` +const StyledHamburger = styled.button<Props>` background: none; border: 0; width: 22px; @@ -41,9 +38,8 @@ const StyledHamburger = height: 2px; margin-bottom: 5px; transform-origin: 4px 0px; - transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - background-color 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - opacity 0.55s ease; + transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), + background-color 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease; &:first-child { //transform-origin: 0% 0%; diff --git a/packages/website/ts/components/header.tsx b/packages/website/ts/components/header.tsx index 90e097070..088f41048 100644 --- a/packages/website/ts/components/header.tsx +++ b/packages/website/ts/components/header.tsx @@ -87,7 +87,9 @@ class HeaderBase extends React.Component<HeaderProps> { </Link> <NavLinks> - {_.map(navItems, (link, index) => <NavItem key={`navlink-${index}`} link={link} />)} + {_.map(navItems, (link, index) => ( + <NavItem key={`navlink-${index}`} link={link} /> + ))} </NavLinks> <MediaQuery minWidth={990}> @@ -130,10 +132,7 @@ const NavItem = (props: { link: NavItemProps; key: string }) => { ); }; -const StyledHeader = - styled.header < - HeaderProps > - ` +const StyledHeader = styled.header<HeaderProps>` padding: 30px; background-color: ${props => props.theme.bgColor}; `; @@ -200,10 +199,7 @@ const NavLinks = styled.ul` } `; -const DropdownWrap = - styled.div < - DropdownWrapInterface > - ` +const DropdownWrap = styled.div<DropdownWrapInterface>` width: ${props => props.width || 280}px; padding: 15px 0; border: 1px solid transparent; @@ -219,27 +215,28 @@ const DropdownWrap = transition: opacity 0.35s, transform 0.35s, visibility 0s 0.35s; z-index: 20; - &:after, &:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; + &:after, + &:before { + bottom: 100%; + left: 50%; + border: solid transparent; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; } &:after { - border-color: rgba(255, 255, 255, 0); - border-bottom-color: ${props => props.theme.dropdownBg}; - border-width: 10px; - margin-left: -10px; + border-color: rgba(255, 255, 255, 0); + border-bottom-color: ${props => props.theme.dropdownBg}; + border-width: 10px; + margin-left: -10px; } &:before { - border-color: rgba(255, 0, 0, 0); - border-bottom-color: ${props => props.theme.dropdownBorderColor}; - border-width: 11px; - margin-left: -11px; + border-color: rgba(255, 0, 0, 0); + border-bottom-color: ${props => props.theme.dropdownBorderColor}; + border-width: 11px; + margin-left: -11px; } @media (max-width: 768px) { diff --git a/packages/website/ts/components/hero.tsx b/packages/website/ts/components/hero.tsx index a662ee3a5..c326e0292 100644 --- a/packages/website/ts/components/hero.tsx +++ b/packages/website/ts/components/hero.tsx @@ -28,10 +28,7 @@ interface WrapProps { isFullWidth?: boolean; isCenteredMobile?: boolean; } -const Wrap = - styled.div < - WrapProps > - ` +const Wrap = styled.div<WrapProps>` width: calc(100% - 60px); margin: 0 auto; @@ -53,10 +50,7 @@ interface TitleProps { isLarge?: any; maxWidth?: string; } -const Title = - styled.h1 < - TitleProps > - ` +const Title = styled.h1<TitleProps>` font-size: ${props => (props.isLarge ? '80px' : '50px')}; font-weight: 300; line-height: 1.1; @@ -87,10 +81,7 @@ const Description = styled.p` } `; -const Content = - styled.div < - { width: string } > - ` +const Content = styled.div<{ width: string }>` width: 100%; @media (min-width: 768px) { diff --git a/packages/website/ts/components/icon.tsx b/packages/website/ts/components/icon.tsx index 165e999b9..60e4d04ee 100644 --- a/packages/website/ts/components/icon.tsx +++ b/packages/website/ts/components/icon.tsx @@ -32,10 +32,7 @@ export const Icon: React.FunctionComponent<IconProps> = (props: IconProps) => { return null; }; -export const InlineIconWrap = - styled.div < - PaddingInterface > - ` +export const InlineIconWrap = styled.div<PaddingInterface>` margin: ${props => getCSSPadding(props.margin)}; display: flex; align-items: center; @@ -54,10 +51,7 @@ const _getSize = (size: string | number = 'small'): string => { return `${size}px`; }; -const StyledIcon = - styled.figure < - IconProps > - ` +const StyledIcon = styled.figure<IconProps>` width: ${props => _getSize(props.size)}; height: ${props => _getSize(props.size)}; margin: ${props => getCSSPadding(props.margin)}; diff --git a/packages/website/ts/components/image.tsx b/packages/website/ts/components/image.tsx index 65b2a9705..0137cfc97 100644 --- a/packages/website/ts/components/image.tsx +++ b/packages/website/ts/components/image.tsx @@ -12,9 +12,6 @@ const ImageClass: React.FunctionComponent<Props> = (props: Props) => { return <img {...props} />; }; -export const Image = - styled(ImageClass) < - Props > - ` +export const Image = styled(ImageClass)<Props>` margin: ${props => props.isCentered && `0 auto`}; `; diff --git a/packages/website/ts/components/link.tsx b/packages/website/ts/components/link.tsx index 080a0abcc..a66985acc 100644 --- a/packages/website/ts/components/link.tsx +++ b/packages/website/ts/components/link.tsx @@ -44,10 +44,7 @@ export const LinkWrap = styled.div` } `; -const StyledLink = - styled(SmartLink) < - LinkInterface > - ` +const StyledLink = styled(SmartLink)<LinkInterface>` display: ${props => !props.isBlock && 'inline-flex'}; color: ${props => props.color || props.theme.linkColor}; text-align: center; diff --git a/packages/website/ts/components/logo.tsx b/packages/website/ts/components/logo.tsx index 19aeb901e..f89be0711 100644 --- a/packages/website/ts/components/logo.tsx +++ b/packages/website/ts/components/logo.tsx @@ -23,10 +23,7 @@ const StyledLogo = styled.div` } `; -const Icon = - styled(LogoIcon) < - LogoInterface > - ` +const Icon = styled(LogoIcon)<LogoInterface>` flex-shrink: 0; path { diff --git a/packages/website/ts/components/mobileNav.tsx b/packages/website/ts/components/mobileNav.tsx index 573d21596..d43bbe50e 100644 --- a/packages/website/ts/components/mobileNav.tsx +++ b/packages/website/ts/components/mobileNav.tsx @@ -55,10 +55,7 @@ export class MobileNav extends React.PureComponent<Props> { } } -const Wrap = - styled.nav < - { isToggled: boolean } > - ` +const Wrap = styled.nav<{ isToggled: boolean }>` width: 100%; height: 357px; background-color: ${props => props.theme.mobileNavBgUpper}; @@ -99,19 +96,13 @@ const Overlay = styled.div` interface SectionProps { isDark?: boolean; } -const Section = - styled.div < - SectionProps > - ` +const Section = styled.div<SectionProps>` width: 100%; padding: 15px 30px; background-color: ${props => (props.isDark ? props.theme.mobileNavBgLower : 'transparent')}; `; -const Grid = - styled(WrapGrid) < - WrapProps > - ` +const Grid = styled(WrapGrid)<WrapProps>` justify-content: flex-start; li { diff --git a/packages/website/ts/components/modals/input.tsx b/packages/website/ts/components/modals/input.tsx index 8cfcc9763..c72e53aa0 100644 --- a/packages/website/ts/components/modals/input.tsx +++ b/packages/website/ts/components/modals/input.tsx @@ -60,10 +60,7 @@ const StyledInput = styled.input` } `; -const InputWrapper = - styled.div < - InputProps > - ` +const InputWrapper = styled.div<InputProps>` position: relative; flex-grow: ${props => props.width === InputWidth.Full && 1}; width: ${props => props.width === InputWidth.Half && `calc(50% - 15px)`}; diff --git a/packages/website/ts/components/modals/modal_contact.tsx b/packages/website/ts/components/modals/modal_contact.tsx index 7414df7d9..62c1062a3 100644 --- a/packages/website/ts/components/modals/modal_contact.tsx +++ b/packages/website/ts/components/modals/modal_contact.tsx @@ -361,28 +361,22 @@ const StyledDialogContent = styled(DialogContent)` } `; -const Form = - styled.form < - FormProps > - ` +const Form = styled.form<FormProps>` position: relative; - transition: opacity 0.30s ease-in-out, visibility 0.30s ease-in-out; + transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; opacity: ${props => props.isSuccessful && `0`}; visibility: ${props => props.isSuccessful && `hidden`}; `; -const Confirmation = - styled.div < - FormProps > - ` +const Confirmation = styled.div<FormProps>` position: absolute; top: 50%; text-align: center; width: 100%; left: 0; - transition: opacity 0.30s ease-in-out, visibility 0.30s ease-in-out; - transition-delay: 0.40s; + transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; + transition-delay: 0.4s; padding: 60px 60px; transform: translateY(-50%); opacity: ${props => (props.isSuccessful ? `1` : `0`)}; diff --git a/packages/website/ts/components/nested_sidebar_menu.tsx b/packages/website/ts/components/nested_sidebar_menu.tsx index 4d4bc4617..56df880f3 100644 --- a/packages/website/ts/components/nested_sidebar_menu.tsx +++ b/packages/website/ts/components/nested_sidebar_menu.tsx @@ -77,8 +77,8 @@ export class MenuItem extends React.Component<MenuItemProps, MenuItemState> { isActive ? colors.lightLinkBlue : this.props.screenWidth === ScreenWidths.Sm - ? 'white' - : colors.grey100 + ? 'white' + : colors.grey100 } fontSize="14px" textAlign="left" diff --git a/packages/website/ts/components/newLayout.tsx b/packages/website/ts/components/newLayout.tsx index 28e7653c5..07691a02a 100644 --- a/packages/website/ts/components/newLayout.tsx +++ b/packages/website/ts/components/newLayout.tsx @@ -54,10 +54,7 @@ export const Section: React.FunctionComponent<SectionProps> = (props: SectionPro ); }; -export const Column = - styled.div < - ColumnProps > - ` +export const Column = styled.div<ColumnProps>` width: ${props => props.width}; max-width: ${props => props.maxWidth}; padding: ${props => props.padding}; @@ -71,10 +68,7 @@ export const Column = } `; -export const FlexWrap = - styled.div < - FlexProps > - ` +export const FlexWrap = styled.div<FlexProps>` max-width: 1500px; margin: 0 auto; padding: ${props => props.padding}; @@ -85,18 +79,12 @@ export const FlexWrap = } `; -export const WrapSticky = - styled.div < - WrapProps > - ` +export const WrapSticky = styled.div<WrapProps>` position: sticky; top: ${props => props.offsetTop || '60px'}; `; -const SectionBase = - styled.section < - SectionProps > - ` +const SectionBase = styled.section<SectionProps>` width: ${props => !props.isFullWidth && 'calc(100% - 60px)'}; max-width: 1500px; margin: 0 auto; @@ -110,10 +98,7 @@ const SectionBase = } `; -const Wrap = - styled(FlexWrap) < - WrapProps > - ` +const Wrap = styled(FlexWrap)<WrapProps>` width: ${props => props.wrapWidth || 'calc(100% - 60px)'}; width: ${props => props.bgColor && 'calc(100% - 60px)'}; max-width: ${props => !props.isFullWidth && (props.maxWidth || '895px')}; @@ -121,10 +106,7 @@ const Wrap = margin: 0 auto; `; -export const WrapGrid = - styled(Wrap) < - WrapProps > - ` +export const WrapGrid = styled(Wrap)<WrapProps>` display: flex; flex-wrap: ${props => props.isWrapped && `wrap`}; justify-content: ${props => (props.isCentered ? `center` : 'space-between')}; diff --git a/packages/website/ts/components/newsletter_form.tsx b/packages/website/ts/components/newsletter_form.tsx index bd61e3f4d..e5fd95646 100644 --- a/packages/website/ts/components/newsletter_form.tsx +++ b/packages/website/ts/components/newsletter_form.tsx @@ -117,10 +117,7 @@ const StyledForm = styled.form` margin-top: 27px; `; -const StyledInput = - styled.input < - InputProps > - ` +const StyledInput = styled.input<InputProps>` appearance: none; background-color: transparent; border: 0; @@ -132,7 +129,7 @@ const StyledInput = width: 100%; &::placeholder { - color: #B1B1B1; // #9D9D9D on light theme + color: #b1b1b1; // #9D9D9D on light theme } `; @@ -140,14 +137,11 @@ const InputWrapper = styled.div` position: relative; `; -const InnerInputWrapper = - styled.div < - ArrowProps > - ` +const InnerInputWrapper = styled.div<ArrowProps>` opacity: ${props => props.isSubmitted && 0}; visibility: ${props => props.isSubmitted && 'hidden'}; transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out; - transition-delay: 0.30s; + transition-delay: 0.3s; `; const SubmitButton = styled.button` @@ -174,11 +168,8 @@ const Text = styled.p` margin-top: 15px; `; -const SuccessText = - styled.p < - ArrowProps > - ` - color: #B1B1B1; +const SuccessText = styled.p<ArrowProps>` + color: #b1b1b1; font-size: 1rem; font-weight: 300; line-height: 1.2em; @@ -194,10 +185,7 @@ const SuccessText = transition-delay: 0.55s; `; -const Arrow = - styled.svg < - ArrowProps > - ` +const Arrow = styled.svg<ArrowProps>` transform: ${props => props.isSubmitted && `translateX(44px)`}; transition: transform 0.25s ease-in-out; `; diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index 94ab63ac6..6d7c90573 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -447,7 +447,8 @@ export class Portal extends React.Component<PortalProps, PortalState> { render={this._renderAccountManagementItem.bind(this, item)} /> ); - })}} + })} + } <Route render={this._renderNotFoundMessage.bind(this)} /> </Switch> <PortalDisclaimerDialog diff --git a/packages/website/ts/components/sections/landing/clients.tsx b/packages/website/ts/components/sections/landing/clients.tsx index 9a68fbf4c..4d83a1d2f 100644 --- a/packages/website/ts/components/sections/landing/clients.tsx +++ b/packages/website/ts/components/sections/landing/clients.tsx @@ -86,10 +86,7 @@ export const SectionLandingClients = () => ( </Section> ); -const StyledProject = - styled.div < - StyledProjectInterface > - ` +const StyledProject = styled.div<StyledProjectInterface>` flex-shrink: 0; img { @@ -99,7 +96,7 @@ const StyledProject = } @media (min-width: 768px) { - width: auto; + width: auto; height: 50px; margin: 30px; } diff --git a/packages/website/ts/components/siteWrap.tsx b/packages/website/ts/components/siteWrap.tsx index 316896dbb..1f0902105 100644 --- a/packages/website/ts/components/siteWrap.tsx +++ b/packages/website/ts/components/siteWrap.tsx @@ -140,10 +140,7 @@ export class SiteWrap extends React.Component<Props, State> { } } -const Main = - styled.main < - MainProps > - ` +const Main = styled.main<MainProps>` transition: transform 0.5s, opacity 0.5s; opacity: ${props => props.isNavToggled && '0.5'}; `; diff --git a/packages/website/ts/components/text.tsx b/packages/website/ts/components/text.tsx index 10f272e73..a47e61ef3 100644 --- a/packages/website/ts/components/text.tsx +++ b/packages/website/ts/components/text.tsx @@ -27,10 +27,7 @@ interface ParagraphProps extends BaseTextInterface { fontWeight?: string | number; } -const StyledHeading = - styled.h1 < - HeadingProps > - ` +const StyledHeading = styled.h1<HeadingProps>` max-width: ${props => props.maxWidth}; color: ${props => props.color || props.theme.textColor}; display: ${props => props.isFlex && `inline-flex`}; @@ -64,10 +61,7 @@ Heading.defaultProps = { // Note: this would be useful to be implemented the same way was "Heading" // and be more generic. e.g. <Text /> with a props asElement so we can use it // for literally anything = -export const Paragraph = - styled.p < - ParagraphProps > - ` +export const Paragraph = styled.p<ParagraphProps>` font-size: ${props => `var(--${props.size || 'default'}Paragraph)`}; font-weight: ${props => props.fontWeight || 300}; margin-bottom: ${props => !props.isNoMargin && (props.marginBottom || '30px')}; diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 92aecf046..2ed0229c8 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -354,12 +354,11 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala {tokenState.isLoaded ? ( <span> {this._renderAmount(tokenState.balance, token.decimals)} {token.symbol} - {this.state.isZRXSpinnerVisible && - token.symbol === ZRX_TOKEN_SYMBOL && ( - <span className="pl1"> - <i className="zmdi zmdi-spinner zmdi-hc-spin" /> - </span> - )} + {this.state.isZRXSpinnerVisible && token.symbol === ZRX_TOKEN_SYMBOL && ( + <span className="pl1"> + <i className="zmdi zmdi-spinner zmdi-hc-spin" /> + </span> + )} </span> ) : ( <i className="zmdi zmdi-spinner zmdi-hc-spin" /> diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx index f9e0967d4..a14b94d8a 100644 --- a/packages/website/ts/components/ui/party.tsx +++ b/packages/website/ts/components/ui/party.tsx @@ -94,14 +94,17 @@ export class Party extends React.Component<PartyProps, PartyState> { <ReactTooltip id={registeredTooltipId}> {isRegistered ? ( <div> - This token address was found in the token registry<br /> + This token address was found in the token registry + <br /> smart contract and is therefore believed to be a<br /> legitimate token. </div> ) : ( <div> - This token is not included in the token registry<br /> - smart contract. We cannot guarantee the legitimacy<br /> + This token is not included in the token registry + <br /> + smart contract. We cannot guarantee the legitimacy + <br /> of this token. Make sure to verify its address on Etherscan. </div> )} @@ -109,27 +112,28 @@ export class Party extends React.Component<PartyProps, PartyState> { </div> </div> )} - {!_.isUndefined(this.props.hasUniqueNameAndSymbol) && - !this.props.hasUniqueNameAndSymbol && ( - <div> - <div - data-tip={true} - data-for={uniqueNameAndSymbolTooltipId} - className="mx-auto" - style={{ fontSize: 13, width: 127 }} - > - <span style={{ color: colors.red500 }}> - <i className="zmdi zmdi-alert-octagon" /> - </span>{' '} - <span>Suspicious token</span> - <ReactTooltip id={uniqueNameAndSymbolTooltipId}> - This token shares it's name, symbol or both with<br /> - a token in the 0x Token Registry but it has a different<br /> - smart contract address. This is most likely a scam token! - </ReactTooltip> - </div> + {!_.isUndefined(this.props.hasUniqueNameAndSymbol) && !this.props.hasUniqueNameAndSymbol && ( + <div> + <div + data-tip={true} + data-for={uniqueNameAndSymbolTooltipId} + className="mx-auto" + style={{ fontSize: 13, width: 127 }} + > + <span style={{ color: colors.red500 }}> + <i className="zmdi zmdi-alert-octagon" /> + </span>{' '} + <span>Suspicious token</span> + <ReactTooltip id={uniqueNameAndSymbolTooltipId}> + This token shares it's name, symbol or both with + <br /> + a token in the 0x Token Registry but it has a different + <br /> + smart contract address. This is most likely a scam token! + </ReactTooltip> </div> - )} + </div> + )} </div> </div> ); diff --git a/packages/website/ts/constants/globalStyle.tsx b/packages/website/ts/constants/globalStyle.tsx index 5abb758c5..ef7ec9426 100644 --- a/packages/website/ts/constants/globalStyle.tsx +++ b/packages/website/ts/constants/globalStyle.tsx @@ -11,9 +11,7 @@ export interface GlobalStyle { } const GlobalStyles = withTheme( - createGlobalStyle < - GlobalStyle > - ` + createGlobalStyle<GlobalStyle>` ${cssReset}; html { diff --git a/packages/website/ts/containers/asset_buyer_documentation.ts b/packages/website/ts/containers/asset_buyer_documentation.ts index c93b9332d..a75c6d861 100644 --- a/packages/website/ts/containers/asset_buyer_documentation.ts +++ b/packages/website/ts/containers/asset_buyer_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown = require('md/docs/asset_buyer/introduction'); @@ -25,7 +23,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/asset-buyer', type: SupportedDocJson.TypeDoc, displayName: 'AssetBuyer', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/asset-buyer', markdownMenu: { introduction: [markdownSections.introduction], install: [markdownSections.installation], @@ -40,32 +38,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 0f11e0809..1cfc0702e 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/connect/1/introduction'); @@ -25,7 +23,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/connect', type: SupportedDocJson.TypeDoc, displayName: '0x Connect', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/connect', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -45,32 +43,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 4c05605e3..bbabce7a7 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/contract_wrappers/1/introduction'); @@ -24,7 +22,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/contract-wrappers', type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/contract-wrappers', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -40,32 +38,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - docsInfo, - translate: state.translate, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/docs_home.ts b/packages/website/ts/containers/docs_home.ts index e0ca439a6..2a6dac0e2 100644 --- a/packages/website/ts/containers/docs_home.ts +++ b/packages/website/ts/containers/docs_home.ts @@ -26,6 +26,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const DocsHome: React.ComponentClass<DocsHomeProps> = connect(mapStateToProps, mapDispatchToProps)( - DocsHomeComponent, -); +export const DocsHome: React.ComponentClass<DocsHomeProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocsHomeComponent); diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 9d1df1d1f..e6e4d4067 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -1,12 +1,10 @@ -import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { constants as docConstants, DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown = require('md/docs/ethereum_types/introduction'); @@ -36,32 +34,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/faq.ts b/packages/website/ts/containers/faq.ts index a2b5735f6..da5b71bdd 100644 --- a/packages/website/ts/containers/faq.ts +++ b/packages/website/ts/containers/faq.ts @@ -22,4 +22,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const FAQ: React.ComponentClass<FAQProps> = connect(mapStateToProps, mapDispatchToProps)(FAQComponent); +export const FAQ: React.ComponentClass<FAQProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(FAQComponent); diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 9c4bb8e26..1090265e7 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/json_schemas/1/introduction'); @@ -32,7 +30,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/json-schemas', type: SupportedDocJson.TypeDoc, displayName: 'JSON Schemas', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/json-schemas', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], schemas: [markdownSections.schemas], @@ -65,32 +63,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/migrations_documentation.ts b/packages/website/ts/containers/migrations_documentation.ts index 02919e06e..bae84dfea 100644 --- a/packages/website/ts/containers/migrations_documentation.ts +++ b/packages/website/ts/containers/migrations_documentation.ts @@ -23,7 +23,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/migrations', type: SupportedDocJson.TypeDoc, displayName: 'Migrations', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/migrations', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -61,6 +61,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/not_found.ts b/packages/website/ts/containers/not_found.ts index f384dab89..825c021ec 100644 --- a/packages/website/ts/containers/not_found.ts +++ b/packages/website/ts/containers/not_found.ts @@ -22,6 +22,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const NotFound: React.ComponentClass<NotFoundProps> = connect(mapStateToProps, mapDispatchToProps)( - NotFoundComponent, -); +export const NotFound: React.ComponentClass<NotFoundProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(NotFoundComponent); diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index f1d794988..8d83357ca 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/order_utils/1/introduction'); @@ -25,7 +23,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/order-utils', type: SupportedDocJson.TypeDoc, displayName: 'Order utils', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/order-utils', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -41,32 +39,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 683e1fe9f..149ffdd2a 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/order_watcher/1/introduction'); @@ -25,7 +23,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/order-watcher', type: SupportedDocJson.TypeDoc, displayName: 'Order Watcher', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/order-watcher', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -41,32 +39,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/portal.ts b/packages/website/ts/containers/portal.ts index 5661e0a97..db41a3ec3 100644 --- a/packages/website/ts/containers/portal.ts +++ b/packages/website/ts/containers/portal.ts @@ -87,6 +87,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Portal: React.ComponentClass<PortalComponentProps> = connect(mapStateToProps, mapDispatchToProps)( - PortalComponent, -); +export const Portal: React.ComponentClass<PortalComponentProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(PortalComponent); diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index 57c98fa3b..d94e285a7 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -1,13 +1,11 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import { Networks } from '@0x/react-shared'; 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, ScreenWidths, SmartContractDocSections as Sections } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages, SmartContractDocSections as Sections } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/smart_contracts/1/introduction'); @@ -91,32 +89,9 @@ const docsInfoConfig: DocsInfoConfig = { }, }, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; - docsInfo: DocsInfo; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), - docsInfo, -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index f3a793e80..31117372b 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/sol-compiler/1/introduction'); @@ -27,7 +25,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/sol-compiler', type: SupportedDocJson.TypeDoc, displayName: 'Solidity Compiler', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-compiler', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], }, @@ -45,32 +43,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts deleted file mode 100644 index 8944ec70a..000000000 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; - -/* tslint:disable:no-var-requires */ -const IntroMarkdown1 = require('md/docs/sol_cov/1/introduction'); -const InstallationMarkdown1 = require('md/docs/sol_cov/1/installation'); -const UsageMarkdown1 = require('md/docs/sol_cov/1/usage'); -const IntroMarkdown2 = require('md/docs/sol_cov/2/introduction'); -const InstallationMarkdown2 = require('md/docs/sol_cov/2/installation'); -const UsageMarkdown2 = require('md/docs/sol_cov/2/usage'); -/* tslint:enable:no-var-requires */ - -const markdownSections = { - introduction: 'introduction', - installation: 'installation', - usage: 'usage', -}; - -const docsInfoConfig: DocsInfoConfig = { - id: DocPackages.SolCov, - packageName: '@0x/sol-cov', - type: SupportedDocJson.TypeDoc, - displayName: 'Sol-cov', - packageUrl: 'https://github.com/0xProject/0x-monorepo', - markdownMenu: { - 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], - }, - sectionNameToMarkdownByVersion: { - '0.0.1': { - [markdownSections.introduction]: IntroMarkdown1, - [markdownSections.installation]: InstallationMarkdown1, - [markdownSections.usage]: UsageMarkdown1, - }, - '2.1.8': { - [markdownSections.introduction]: IntroMarkdown2, - [markdownSections.installation]: InstallationMarkdown2, - [markdownSections.usage]: UsageMarkdown2, - }, - }, - markdownSections, -}; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -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/containers/sol_coverage_documentation.ts b/packages/website/ts/containers/sol_coverage_documentation.ts new file mode 100644 index 000000000..a9073b720 --- /dev/null +++ b/packages/website/ts/containers/sol_coverage_documentation.ts @@ -0,0 +1,44 @@ +import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; + +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/sol_coverage/introduction'); +const InstallationMarkdown = require('md/docs/sol_coverage/installation'); +const UsageMarkdown = require('md/docs/sol_coverage/usage'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', + usage: 'usage', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.SolCoverage, + packageName: '@0x/sol-coverage', + type: SupportedDocJson.TypeDoc, + displayName: 'Sol-coverage', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-coverage', + markdownMenu: { + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], + }, + sectionNameToMarkdownByVersion: { + '1.0.0': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallationMarkdown, + [markdownSections.usage]: UsageMarkdown, + }, + }, + markdownSections, +}; +const mapStateToProps = getMapStateToProps(docsInfoConfig); + +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_profiler_documentation.ts b/packages/website/ts/containers/sol_profiler_documentation.ts new file mode 100644 index 000000000..2f3936cae --- /dev/null +++ b/packages/website/ts/containers/sol_profiler_documentation.ts @@ -0,0 +1,44 @@ +import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; + +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/sol_profiler/introduction'); +const InstallationMarkdown = require('md/docs/sol_profiler/installation'); +const UsageMarkdown = require('md/docs/sol_profiler/usage'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', + usage: 'usage', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.SolProfiler, + packageName: '@0x/sol-profiler', + type: SupportedDocJson.TypeDoc, + displayName: 'Sol-profiler', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-profiler', + markdownMenu: { + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], + }, + sectionNameToMarkdownByVersion: { + '1.0.0': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallationMarkdown, + [markdownSections.usage]: UsageMarkdown, + }, + }, + markdownSections, +}; +const mapStateToProps = getMapStateToProps(docsInfoConfig); + +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_trace_documentation.ts b/packages/website/ts/containers/sol_trace_documentation.ts new file mode 100644 index 000000000..9c2552438 --- /dev/null +++ b/packages/website/ts/containers/sol_trace_documentation.ts @@ -0,0 +1,44 @@ +import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; + +/* tslint:disable:no-var-requires */ +const IntroMarkdown = require('md/docs/sol_trace/introduction'); +const InstallationMarkdown = require('md/docs/sol_trace/installation'); +const UsageMarkdown = require('md/docs/sol_trace/usage'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', + usage: 'usage', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.SolTrace, + packageName: '@0x/sol-trace', + type: SupportedDocJson.TypeDoc, + displayName: 'Sol-trace', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-trace', + markdownMenu: { + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], + }, + sectionNameToMarkdownByVersion: { + '1.0.0': { + [markdownSections.introduction]: IntroMarkdown, + [markdownSections.installation]: InstallationMarkdown, + [markdownSections.usage]: UsageMarkdown, + }, + }, + markdownSections, +}; +const mapStateToProps = getMapStateToProps(docsInfoConfig); + +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 0e421777b..2ac0360ab 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/subproviders/1/introduction'); @@ -26,7 +24,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/subproviders', type: SupportedDocJson.TypeDoc, displayName: 'Subproviders', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/subproviders', markdownMenu: { 'getting-started': [docSections.introduction, docSections.installation, docSections.ledgerNodeHid], }, @@ -44,32 +42,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections: docSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 9c8c34621..73fea90ed 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdown1 = require('md/docs/web3_wrapper/1/introduction'); @@ -24,7 +22,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '@0x/web3-wrapper', type: SupportedDocJson.TypeDoc, displayName: 'Web3Wrapper', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/web3-wrapper', markdownMenu: { 'getting-started': [markdownSections.introduction, markdownSections.installation], }, @@ -40,32 +38,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - translate: state.translate, - docsInfo, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass<DocPageProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/wiki.ts b/packages/website/ts/containers/wiki.ts index 069b0ae54..f4f2f6ec6 100644 --- a/packages/website/ts/containers/wiki.ts +++ b/packages/website/ts/containers/wiki.ts @@ -25,4 +25,7 @@ const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Wiki: React.ComponentClass<WikiProps> = connect(mapStateToProps, mapDispatchToProps)(WikiComponent); +export const Wiki: React.ComponentClass<WikiProps> = connect( + mapStateToProps, + mapDispatchToProps, +)(WikiComponent); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index e0ea6e275..0e4765656 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -1,12 +1,10 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { DocsInfoConfig, SupportedDocJson } from '@0x/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, ScreenWidths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; +import { DocPackages } from 'ts/types'; + +import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container'; /* tslint:disable:no-var-requires */ const IntroMarkdownV0 = require('md/docs/0xjs/0.0.1/introduction'); @@ -37,7 +35,7 @@ const docsInfoConfig: DocsInfoConfig = { packageName: '0x.js', type: SupportedDocJson.TypeDoc, displayName: '0x.js', - packageUrl: 'https://github.com/0xProject/0x-monorepo', + packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/0x.js', markdownMenu: { 'getting-started': [ markdownSections.introduction, @@ -72,32 +70,9 @@ const docsInfoConfig: DocsInfoConfig = { }, markdownSections, }; -const docsInfo = new DocsInfo(docsInfoConfig); - -interface ConnectedState { - docsVersion: string; - availableDocVersions: string[]; - docsInfo: DocsInfo; - translate: Translate; - screenWidth: ScreenWidths; -} - -interface ConnectedDispatch { - dispatcher: Dispatcher; -} - -const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ - docsVersion: state.docsVersion, - availableDocVersions: state.availableDocVersions, - docsInfo, - translate: state.translate, - screenWidth: state.screenWidth, -}); - -const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ - dispatcher: new Dispatcher(dispatch), -}); +const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +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 45054772c..4ed66c572 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -69,8 +69,14 @@ const LazySolCompilerDocumentation = createLazyComponent('Documentation', async const LazyJSONSchemasDocumentation = createLazyComponent('Documentation', async () => import(/* webpackChunkName: "jsonSchemasDocs" */ 'ts/containers/json_schemas_documentation'), ); -const LazySolCovDocumentation = createLazyComponent('Documentation', async () => - import(/* webpackChunkName: "solCovDocs" */ 'ts/containers/sol_cov_documentation'), +const LazySolCoverageDocumentation = createLazyComponent('Documentation', async () => + import(/* webpackChunkName: "solCoverageDocs" */ 'ts/containers/sol_coverage_documentation'), +); +const LazySolTraceDocumentation = createLazyComponent('Documentation', async () => + import(/* webpackChunkName: "solTraceDocs" */ 'ts/containers/sol_trace_documentation'), +); +const LazySolProfilerDocumentation = createLazyComponent('Documentation', async () => + import(/* webpackChunkName: "solProfilerDocs" */ 'ts/containers/sol_profiler_documentation'), ); const LazySubprovidersDocumentation = createLazyComponent('Documentation', async () => import(/* webpackChunkName: "subproviderDocs" */ 'ts/containers/subproviders_documentation'), @@ -149,7 +155,18 @@ render( path={`${WebsitePaths.SolCompiler}/:version?`} component={LazySolCompilerDocumentation} /> - <Route path={`${WebsitePaths.SolCov}/:version?`} component={LazySolCovDocumentation} /> + <Route + path={`${WebsitePaths.SolCoverage}/:version?`} + component={LazySolCoverageDocumentation} + /> + <Route + path={`${WebsitePaths.SolTrace}/:version?`} + component={LazySolTraceDocumentation} + /> + <Route + path={`${WebsitePaths.SolProfiler}/:version?`} + component={LazySolProfilerDocumentation} + /> <Route path={`${WebsitePaths.JSONSchemas}/:version?`} component={LazyJSONSchemasDocumentation} diff --git a/packages/website/ts/pages/about/jobs.tsx b/packages/website/ts/pages/about/jobs.tsx index ee1aa6cef..85c25a75f 100644 --- a/packages/website/ts/pages/about/jobs.tsx +++ b/packages/website/ts/pages/about/jobs.tsx @@ -151,7 +151,9 @@ export class NextAboutJobs extends React.Component<NextAboutJobsProps, NextAbout <Section id={OPEN_POSITIONS_HASH} isFlex={true} maxWidth="1170px" wrapWidth="100%"> <Column> <Heading size="medium"> - Current<br />Openings + Current + <br /> + Openings </Heading> </Column> diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 78376a0f2..0b725c514 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -68,10 +68,7 @@ interface SidebarContainerProps { className?: string; } -const SidebarContainer = - styled.div < - SidebarContainerProps > - ` +const SidebarContainer = styled.div<SidebarContainerProps>` ${scrollableContainerStyles} padding-top: 27px; padding-left: ${SIDEBAR_PADDING}px; @@ -87,10 +84,7 @@ interface MainContentContainerProps { className?: string; } -const MainContentContainer = - styled.div < - MainContentContainerProps > - ` +const MainContentContainer = styled.div<MainContentContainerProps>` ${scrollableContainerStyles} padding-top: 0px; padding-left: 50px; diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 3ae071774..14bad7329 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -33,7 +33,9 @@ const docIdToSubpackageName: { [id: string]: string } = { [DocPackages.ContractWrappers]: 'contract-wrappers', [DocPackages.SolCompiler]: 'sol-compiler', [DocPackages.JSONSchemas]: 'json-schemas', - [DocPackages.SolCov]: 'sol-cov', + [DocPackages.SolCoverage]: 'sol-coverage', + [DocPackages.SolProfiler]: 'sol-profiler', + [DocPackages.SolTrace]: 'sol-trace', [DocPackages.Subproviders]: 'subproviders', [DocPackages.OrderUtils]: 'order-utils', [DocPackages.OrderWatcher]: 'order-watcher', diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index fd3932bfa..d11cf02fb 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -218,10 +218,26 @@ const CATEGORY_TO_PACKAGES: ObjectMap<Package[]> = { }, { description: - 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', + 'A Solidity code coverage tool. Sol-coverage uses transaction traces to figure out which lines of your code has been covered by your tests.', link: { - title: '@0x/sol-cov', - to: WebsitePaths.SolCov, + title: '@0x/sol-coverage', + to: WebsitePaths.SolCoverage, + }, + }, + { + description: + 'A Solidity profiler. Sol-profiler uses transaction traces to figure out line-by-line gas consumption.', + link: { + title: '@0x/sol-profiler', + to: WebsitePaths.SolProfiler, + }, + }, + { + description: + 'A Solidity revert trace tool. Sol-trace prints human-readable revert trace whenever the revert happens.', + link: { + title: '@0x/sol-trace', + to: WebsitePaths.SolTrace, }, }, { diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx index 8cde7224e..548db1d1d 100644 --- a/packages/website/ts/pages/faq/faq.tsx +++ b/packages/website/ts/pages/faq/faq.tsx @@ -36,17 +36,16 @@ const sections: FAQSection[] = [ <div> At its core, 0x is an open and non-rent seeking protocol that facilitates trustless, low friction exchange of Ethereum-based assets. Developers can use 0x as a platform to build - exchange applications on top of (<a - href={`${configs.BASE_URL}${WebsitePaths.ZeroExJs}#introduction`} - target="blank" - > + exchange applications on top of ( + <a href={`${configs.BASE_URL}${WebsitePaths.ZeroExJs}#introduction`} target="blank"> 0x.js </a>{' '} is a Javascript library for interacting with the 0x protocol). For end users, 0x will be the infrastructure of a wide variety of user-facing applications i.e.{' '} <a href={`${configs.BASE_URL}${WebsitePaths.Portal}`} target="blank"> 0x Portal - </a>, a decentralized application that facilitates trustless trading of Ethereum-based tokens + </a> + , a decentralized application that facilitates trustless trading of Ethereum-based tokens between known counterparties. </div> ), @@ -253,7 +252,8 @@ const sections: FAQSection[] = [ target="_blank" > development roadmap - </a>. + </a> + . </div> ), }, @@ -360,7 +360,8 @@ const sections: FAQSection[] = [ target="_blank" > here - </a>. + </a> + . </div> ), }, @@ -380,8 +381,9 @@ const sections: FAQSection[] = [ Join our{' '} <a href={constants.URL_ZEROEX_CHAT} target="_blank"> Discord - </a>! As an open source project, 0x will rely on a worldwide community of passionate developers - to contribute proposals, ideas and code. + </a> + ! As an open source project, 0x will rely on a worldwide community of passionate developers to + contribute proposals, ideas and code. </div> ), }, diff --git a/packages/website/ts/pages/instant.tsx b/packages/website/ts/pages/instant.tsx index b97bb35a4..586665d5b 100644 --- a/packages/website/ts/pages/instant.tsx +++ b/packages/website/ts/pages/instant.tsx @@ -100,7 +100,7 @@ export class Next0xInstant extends React.Component<Props> { <div> {[...Array(18)].map((item, index) => ( <Card key={`card-${index}`} index={index}> - <img src={`/images/0x-instant/widget-${index % 6 + 1}.png`} /> + <img src={`/images/0x-instant/widget-${(index % 6) + 1}.png`} /> </Card> ))} </div> @@ -189,13 +189,10 @@ const fadeUp = keyframes` } `; -const ConfiguratorSection = - styled(Section) < - SectionProps > - ` - @media (max-width: ${CONFIGURATOR_MIN_WIDTH_PX}px) { - display: none; - } +const ConfiguratorSection = styled(Section)<SectionProps>` + @media (max-width: ${CONFIGURATOR_MIN_WIDTH_PX}px) { + display: none; + } `; // width = 370 * 12 @@ -233,29 +230,26 @@ const MarqueeWrap = styled.div` } `; -const Card = - styled.div < - { index: number } > - ` - opacity: 0; - flex-shrink: 0; - transform: translateY(10px); - will-change: opacity, transform; - animation: ${fadeUp} 0.75s ${props => `${props.index * 0.05}s`} forwards; - - img { - height: auto; - } +const Card = styled.div<{ index: number }>` + opacity: 0; + flex-shrink: 0; + transform: translateY(10px); + will-change: opacity, transform; + animation: ${fadeUp} 0.75s ${props => `${props.index * 0.05}s`} forwards; - @media (min-width: 768px) { img { - width: 370px; + height: auto; } - } - @media (max-width: 768px) { - img { - width: 300px; + @media (min-width: 768px) { + img { + width: 370px; + } + } + + @media (max-width: 768px) { + img { + width: 300px; + } } - } `; diff --git a/packages/website/ts/pages/instant/config_generator.tsx b/packages/website/ts/pages/instant/config_generator.tsx index e43d47119..29fce85db 100644 --- a/packages/website/ts/pages/instant/config_generator.tsx +++ b/packages/website/ts/pages/instant/config_generator.tsx @@ -318,13 +318,10 @@ interface CheckboxTextProps { isSelected?: boolean; } -const CheckboxText = - styled.span < - CheckboxTextProps > - ` +const CheckboxText = styled.span<CheckboxTextProps>` font-size: 14px; line-height: 18px; - color: ${props => (props.isSelected ? colors.brandDark : '#666666')} + color: ${props => (props.isSelected ? colors.brandDark : '#666666')}; `; const OptionalAction = styled(OptionalText)` diff --git a/packages/website/ts/pages/why.tsx b/packages/website/ts/pages/why.tsx index 197ce5fc9..a0ed5f95a 100644 --- a/packages/website/ts/pages/why.tsx +++ b/packages/website/ts/pages/why.tsx @@ -229,10 +229,7 @@ interface SectionProps { isNotRelative?: boolean; } -const SectionWrap = - styled.div < - SectionProps > - ` +const SectionWrap = styled.div<SectionProps>` position: ${props => !props.isNotRelative && 'relative'}; & + & { @@ -258,10 +255,7 @@ const SectionWrap = interface SectionTitleProps { isNoBorder?: boolean; } -const SectionTitle = - styled(Heading) < - SectionTitleProps > - ` +const SectionTitle = styled(Heading)<SectionTitleProps>` position: relative; ${props => @@ -278,7 +272,6 @@ const SectionTitle = } `} - @media (max-width: 768px) { &:before { width: calc(100vw - 60px); diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 37bd73063..50114e2d6 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -370,7 +370,9 @@ export enum WebsitePaths { OrderWatcher = '/docs/order-watcher', SolCompiler = '/docs/sol-compiler', JSONSchemas = '/docs/json-schemas', - SolCov = '/docs/sol-cov', + SolCoverage = '/docs/sol-coverage', + SolProfiler = '/docs/sol-profiler', + SolTrace = '/docs/sol-trace', Subproviders = '/docs/subproviders', OrderUtils = '/docs/order-utils', EthereumTypes = '/docs/ethereum-types', @@ -386,7 +388,9 @@ export enum DocPackages { Web3Wrapper = 'WEB3_WRAPPER', SolCompiler = 'SOL_COMPILER', JSONSchemas = 'JSON_SCHEMAS', - SolCov = 'SOL_COV', + SolCoverage = 'SOL_COVERAGE', + SolTrace = 'SOL_TRACE', + SolProfiler = 'SOL_PROFILER', Subproviders = 'SUBPROVIDERS', OrderUtils = 'ORDER_UTILS', EthereumTypes = 'ETHEREUM_TYPES', diff --git a/packages/website/ts/utils/documentation_container.ts b/packages/website/ts/utils/documentation_container.ts new file mode 100644 index 000000000..54e8a2c1a --- /dev/null +++ b/packages/website/ts/utils/documentation_container.ts @@ -0,0 +1,35 @@ +import { DocsInfo, DocsInfoConfig } from '@0x/react-docs'; +import { Dispatch } from 'redux'; +import { DocPageProps } from 'ts/pages/documentation/doc_page'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { ScreenWidths } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; + +export interface ConnectedState { + docsVersion: string; + availableDocVersions: string[]; + docsInfo: DocsInfo; + translate: Translate; + screenWidth: ScreenWidths; +} + +export interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +export const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const getMapStateToProps = (docsInfoConfig: DocsInfoConfig) => { + const docsInfo = new DocsInfo(docsInfoConfig); + const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ + docsVersion: state.docsVersion, + availableDocVersions: state.availableDocVersions, + translate: state.translate, + docsInfo, + screenWidth: state.screenWidth, + }); + return mapStateToProps; +}; diff --git a/python-packages/sra_client/README.md b/python-packages/sra_client/README.md index 279fb41a4..a1a427bce 100644 --- a/python-packages/sra_client/README.md +++ b/python-packages/sra_client/README.md @@ -4,7 +4,7 @@ A Python client for interacting with servers conforming to [the Standard Relayer # Schemas -The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas). Examples of each payload and response can be found in the 0x.js library's [test suite](https://github.com/0xProject/0x.js/blob/development/packages/json-schemas/test/schema_test.ts#L1). +The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas). Examples of each payload and response can be found in the 0x.js library's [test suite](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/test/schema_test.ts#L1). ```bash pip install 0x-json-schemas @@ -219,16 +219,16 @@ A good example of such a field is `remainingTakerAssetAmount`, which is a conven # Misc. -* All requests and responses should be of **application/json** content type -* All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API). -* All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix. -* All parameters are to be written in `lowerCamelCase`. +- All requests and responses should be of **application/json** content type +- All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API). +- All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix. +- All parameters are to be written in `lowerCamelCase`. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: -* API version: 2.0.0 -* Package version: 1.0.0 -* Build package: org.openapitools.codegen.languages.PythonClientCodegen +- API version: 2.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. @@ -310,22 +310,22 @@ All URIs are relative to _http://localhost_ ## Documentation For Models -* [OrderSchema](docs/OrderSchema.md) -* [PaginatedCollectionSchema](docs/PaginatedCollectionSchema.md) -* [RelayerApiAssetDataPairsResponseSchema](docs/RelayerApiAssetDataPairsResponseSchema.md) -* [RelayerApiAssetDataTradeInfoSchema](docs/RelayerApiAssetDataTradeInfoSchema.md) -* [RelayerApiErrorResponseSchema](docs/RelayerApiErrorResponseSchema.md) -* [RelayerApiErrorResponseSchemaValidationErrors](docs/RelayerApiErrorResponseSchemaValidationErrors.md) -* [RelayerApiFeeRecipientsResponseSchema](docs/RelayerApiFeeRecipientsResponseSchema.md) -* [RelayerApiOrderConfigPayloadSchema](docs/RelayerApiOrderConfigPayloadSchema.md) -* [RelayerApiOrderConfigResponseSchema](docs/RelayerApiOrderConfigResponseSchema.md) -* [RelayerApiOrderSchema](docs/RelayerApiOrderSchema.md) -* [RelayerApiOrderbookResponseSchema](docs/RelayerApiOrderbookResponseSchema.md) -* [RelayerApiOrdersChannelSubscribePayloadSchema](docs/RelayerApiOrdersChannelSubscribePayloadSchema.md) -* [RelayerApiOrdersChannelSubscribeSchema](docs/RelayerApiOrdersChannelSubscribeSchema.md) -* [RelayerApiOrdersChannelUpdateSchema](docs/RelayerApiOrdersChannelUpdateSchema.md) -* [RelayerApiOrdersResponseSchema](docs/RelayerApiOrdersResponseSchema.md) -* [SignedOrderSchema](docs/SignedOrderSchema.md) +- [OrderSchema](docs/OrderSchema.md) +- [PaginatedCollectionSchema](docs/PaginatedCollectionSchema.md) +- [RelayerApiAssetDataPairsResponseSchema](docs/RelayerApiAssetDataPairsResponseSchema.md) +- [RelayerApiAssetDataTradeInfoSchema](docs/RelayerApiAssetDataTradeInfoSchema.md) +- [RelayerApiErrorResponseSchema](docs/RelayerApiErrorResponseSchema.md) +- [RelayerApiErrorResponseSchemaValidationErrors](docs/RelayerApiErrorResponseSchemaValidationErrors.md) +- [RelayerApiFeeRecipientsResponseSchema](docs/RelayerApiFeeRecipientsResponseSchema.md) +- [RelayerApiOrderConfigPayloadSchema](docs/RelayerApiOrderConfigPayloadSchema.md) +- [RelayerApiOrderConfigResponseSchema](docs/RelayerApiOrderConfigResponseSchema.md) +- [RelayerApiOrderSchema](docs/RelayerApiOrderSchema.md) +- [RelayerApiOrderbookResponseSchema](docs/RelayerApiOrderbookResponseSchema.md) +- [RelayerApiOrdersChannelSubscribePayloadSchema](docs/RelayerApiOrdersChannelSubscribePayloadSchema.md) +- [RelayerApiOrdersChannelSubscribeSchema](docs/RelayerApiOrdersChannelSubscribeSchema.md) +- [RelayerApiOrdersChannelUpdateSchema](docs/RelayerApiOrdersChannelUpdateSchema.md) +- [RelayerApiOrdersResponseSchema](docs/RelayerApiOrdersResponseSchema.md) +- [SignedOrderSchema](docs/SignedOrderSchema.md) ## Documentation For Authorization diff --git a/python-packages/sra_client/docs/DefaultApi.md b/python-packages/sra_client/docs/DefaultApi.md index 942188bc6..9e3f5f2ca 100644 --- a/python-packages/sra_client/docs/DefaultApi.md +++ b/python-packages/sra_client/docs/DefaultApi.md @@ -62,8 +62,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: Not defined -* **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -113,8 +113,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: Not defined -* **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -162,8 +162,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: Not defined -* **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -211,8 +211,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: application/json -* **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -266,8 +266,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: Not defined -* **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -343,8 +343,8 @@ No authorization required ### HTTP request headers -* **Content-Type**: Not defined -* **Accept**: application/json +- **Content-Type**: Not defined +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) @@ -391,7 +391,7 @@ No authorization required ### HTTP request headers -* **Content-Type**: application/json -* **Accept**: application/json +- **Content-Type**: application/json +- **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/tsconfig.json b/tsconfig.json index 751115554..a49483972 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -52,7 +52,10 @@ { "path": "./packages/react-docs" }, { "path": "./packages/react-shared" }, { "path": "./packages/sol-compiler" }, - { "path": "./packages/sol-cov" }, + { "path": "./packages/sol-coverage" }, + { "path": "./packages/sol-profiler" }, + { "path": "./packages/sol-trace" }, + { "path": "./packages/sol-tracing-utils" }, { "path": "./packages/sol-resolver" }, { "path": "./packages/sra-spec" }, { "path": "./packages/subproviders" }, @@ -12916,10 +12916,6 @@ prettier-plugin-solidity@^1.0.0-alpha.4: solidity-parser-antlr "^0.3.3" string-width "^3.0.0" -prettier@^1.11.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325" - prettier@^1.14.3, prettier@^1.15.3: version "1.15.3" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a" |