merge development

This commit is contained in:
Fabio Berger
2019-01-11 17:12:55 +01:00
269 changed files with 2077 additions and 1874 deletions

View File

@@ -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 }}

View File

@@ -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']

2
.gitignore vendored
View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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 |

View File

@@ -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

View File

@@ -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",

View File

@@ -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",

View File

@@ -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

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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",

View File

@@ -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",

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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

View File

@@ -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",

View File

@@ -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

View File

@@ -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",

View File

@@ -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"

View File

@@ -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

View File

@@ -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": {

View File

@@ -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
}
],

View File

@@ -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
}
],

View File

@@ -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

View File

@@ -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
},
{

View File

@@ -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

View File

@@ -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`"
}
]
},

View File

@@ -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

View File

@@ -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
},
{

View File

@@ -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(

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
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
? `
${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;
`}

View File

@@ -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

View File

@@ -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)')};

View File

@@ -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 =>

View File

@@ -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>
);

View File

@@ -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 &&

View File

@@ -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}

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -14,8 +14,7 @@
},
"nonce": "0x0",
"timestamp": "0x5af1ffac",
"extraData":
"0x0000000000000000000000000000000000000000000000000000000000000000e8816898d851d5b61b7f950627d04d794c07ca370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000e8816898d851d5b61b7f950627d04d794c07ca370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0x4c4b400000",
"difficulty": "0x1",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",

View File

@@ -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
},
{

View File

@@ -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>
```

View File

@@ -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};

View File

@@ -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)}

View File

@@ -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,

View File

@@ -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;

View File

@@ -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';

View File

@@ -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')}

View File

@@ -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};

View File

@@ -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;
}
}
}
`;

View File

@@ -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;

View File

@@ -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};

View File

@@ -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',
};

View File

@@ -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);

View File

@@ -183,6 +183,7 @@ export enum ProviderType {
CoinbaseWallet = 'COINBASE_WALLET',
Cipher = 'CIPHER',
TrustWallet = 'TRUST_WALLET',
Opera = 'OPERA',
Fallback = 'FALLBACK',
}

View File

@@ -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);
},

View File

@@ -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;
},

View File

@@ -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
}
],

View File

@@ -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

View File

@@ -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",

View File

@@ -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';

View File

@@ -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';

View File

@@ -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
}
],

View File

@@ -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);

View File

@@ -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

View File

@@ -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
},
{

View File

@@ -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:

View File

@@ -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.

View File

@@ -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';
`);
}
}

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);
},
);

View File

@@ -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,

View File

@@ -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);

View File

@@ -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

View File

@@ -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

View File

@@ -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%',

View File

@@ -45,7 +45,8 @@ export const Interface: React.SFC<InterfaceProps> = (props: InterfaceProps): any
typeDefinitionByName={props.typeDefinitionByName}
isInPopover={props.isInPopover}
/>
)},
)}
,
</span>
);
});

View File

@@ -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' }}>

View File

@@ -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;

View File

@@ -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
}
],

View File

@@ -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> = {

View File

@@ -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
}
],

View File

@@ -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).

View File

@@ -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,

View File

@@ -1,6 +0,0 @@
{
"extends": ["@0x/tslint-config"],
"rules": {
"completed-docs": false
}
}

View File

@@ -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
}
]
}
]

Some files were not shown because too many files have changed in this diff Show More