aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-22 02:47:31 +0800
committerSteve Klebanoff <steve.klebanoff@gmail.com>2018-11-22 02:47:31 +0800
commit921d9d7ed5a549878b3a9130a99b9cbe2ae11903 (patch)
treeee20d3005850619160e7dc985736e47813c4af68
parentb2e1be5cfe373f7cdafd5bd9a0c3ec1ea1e5f1d5 (diff)
parent68c15de8908b1e8eb8f04d26301fec62ed2af1c1 (diff)
downloaddexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar.gz
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar.bz2
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar.lz
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar.xz
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.tar.zst
dexon-0x-contracts-921d9d7ed5a549878b3a9130a99b9cbe2ae11903.zip
Merge branch 'development' into feature/instant/rollbar-env
-rw-r--r--ISSUE_TEMPLATE.md12
-rw-r--r--README.md117
-rw-r--r--package.json2
-rw-r--r--packages/abi-gen-wrappers/CHANGELOG.json10
-rw-r--r--packages/abi-gen-wrappers/package.json1
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts3
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts3
-rw-r--r--packages/contract_templates/contract.handlebars3
-rw-r--r--packages/instant/.npmignore2
-rw-r--r--packages/instant/package.json7
-rw-r--r--packages/instant/src/assets/powered_by_0x.svg42
-rw-r--r--packages/instant/src/components/erc20_asset_amount_input.tsx12
-rw-r--r--packages/instant/src/components/zero_ex_instant_provider.tsx5
-rw-r--r--packages/instant/src/containers/selected_erc20_asset_amount_input.ts18
-rw-r--r--packages/instant/tsconfig.json11
-rw-r--r--packages/migrations/CHANGELOG.json10
-rw-r--r--packages/migrations/package.json9
-rw-r--r--packages/migrations/src/index.ts10
-rw-r--r--packages/migrations/src/migration.ts11
-rw-r--r--packages/migrations/typedoc-tsconfig.json7
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts2
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts1
-rw-r--r--packages/types/CHANGELOG.json10
-rw-r--r--packages/types/src/index.ts23
-rw-r--r--packages/website/md/docs/migrations/1/installation.md17
-rw-r--r--packages/website/md/docs/migrations/1/introduction.md1
-rw-r--r--packages/website/ts/containers/migrations_documentation.ts66
-rw-r--r--packages/website/ts/index.tsx7
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx1
-rw-r--r--packages/website/ts/pages/documentation/docs_home.tsx25
-rw-r--r--packages/website/ts/types.ts2
-rw-r--r--tsconfig.json1
44 files changed, 348 insertions, 139 deletions
diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md
index f814c4777..591bbdbfa 100644
--- a/ISSUE_TEMPLATE.md
+++ b/ISSUE_TEMPLATE.md
@@ -46,10 +46,14 @@
<!--- Include as many relevant details about the environment you experienced the bug in -->
-| Package | Version |
-| ------------------: | :------ |
-| `0x.js` | 0.25.0 |
-| `Exchange Contract` | v1 |
+| Package | Version |
+| ------: | :------ |
+
+
+<!-- For example:
+| `0x.js` | 2.0.4 |
+| `Exchange Contract` | v2 |
+-->
| Network |
| ------- |
diff --git a/README.md b/README.md
index 90810f089..421299371 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
---
-[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. A full description of the protocol may be found in our [whitepaper][whitepaper-url].
+[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. For more information on how it works, check out the [0x protocol specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
This repository is a monorepo including the 0x protocol smart contracts and numerous developer tools. Each public sub-package is independently published to NPM.
@@ -18,71 +18,72 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t
[![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
-### Published Packages
-
-#### TypeScript/JavaScript
-
-| Package | Version | Description |
-| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
-| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol |
-| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
-| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using @0x/abi-gen |
-| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
-| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether |
-| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
-| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | A Javascript library for interacting with the Standard Relayer API |
-| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | Used to get known addresses of deployed 0x contracts |
-| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts |
-| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | Smart TS wrappers for 0x smart contracts |
-| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x projects and packages |
-| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generation |
-| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related json schemas |
-| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | 0x smart contract migrations |
-| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders |
-| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity |
-| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON |
-| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components |
-| [`@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 thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties |
-| [`@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) | Solidity test coverage tool |
-| [`@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 |
-| [`@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/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the standard relayer API |
-| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Useful web3 subproviders (e.g. LedgerSubprovider) |
-| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom 0x development TSLint rules |
-| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
-| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
-| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
-| [`@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) | Web3 wrapper |
-
-#### Python
+## Packages
+
+Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below.
+
+### Python Packages
| Package | Version | Description |
| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [`0x-order-utils.py`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders |
-### Private Packages
-
-| Package | Description |
-| -------------------------------------------------------- | ---------------------------------------------------------------- |
-| [`@0x/contracts`](/packages/contracts) | 0x solidity smart contracts & tests |
-| [`@0x/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0x/react-docs` |
-| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
-| [`@0x/website`](/packages/website) | 0x website & Portal DApp |
+### Typescript/Javascript Packages
+
+#### 0x-specific packages
+
+| Package | Version | Description |
+| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
+| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | An aggregate package combining many smaller utility packages for interacting with the 0x protocol |
+| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | A tiny utility library for getting known deployed contract addresses for a particular network. |
+| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | JS/TS wrappers for interacting with the 0x smart contracts |
+| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders |
+| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related JSON schemas |
+| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity |
+| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | Migration tool for deploying 0x smart contracts on private testnets |
+| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts |
+| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using `@0x/abi-gen` |
+| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the Standard Relayer API |
+| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | An HTTP/WS client for interacting with the Standard Relayer API |
+| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether |
+
+#### Ethereum tooling
+
+| Package | Version | Description |
+| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [`@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-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 |
+
+#### Utilities
+
+| Package | Version | Description |
+| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs |
+| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom TSLint rules used by the 0x core team |
+| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations |
+| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages |
+| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities |
+| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & sol-doc generated JSON |
+| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components |
+| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages |
+| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts |
+| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages |
+| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generator |
+
+#### Private Packages
+
+| Package | Description |
+| -------------------------------------------------- | ---------------------------------------------------------------- |
+| [`@0x/contracts`](/packages/contracts) | 0x protocol solidity smart contracts & tests |
+| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether |
+| [`@0x/website`](/packages/website) | 0x website |
## Usage
-Dedicated documentation pages:
-
-* [0x.js Library](https://0xproject.com/docs/0xjs)
-* [0x Connect](https://0xproject.com/docs/connect)
-* [Smart contracts](https://0xproject.com/docs/contracts)
-* [Subproviders](https://0xproject.com/docs/subproviders)
-* [Sol Compiler](https://0xproject.com/docs/sol-compiler)
-* [Web3-wrapper](https://0xproject.com/docs/web3-wrapper)
-* [JSON-schemas](https://0xproject.com/docs/json-schemas)
-* [Sol-cov](https://0xproject.com/docs/sol-cov)
-* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md)
-
Node version >= 6.12 is required.
Most of the packages require additional typings for external dependencies.
diff --git a/package.json b/package.json
index 801657f5d..8b74aad67 100644
--- a/package.json
+++ b/package.json
@@ -40,7 +40,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"
+ "packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-cov ethereum-types asset-buyer migrations"
},
"bundlewatch": {
"files": [
diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json
index fff2bc41e..b55ee9867 100644
--- a/packages/abi-gen-wrappers/CHANGELOG.json
+++ b/packages/abi-gen-wrappers/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "1.1.0",
+ "changes": [
+ {
+ "note":
+ "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface",
+ "pr": 1298
+ }
+ ]
+ },
+ {
"timestamp": 1542208198,
"version": "1.0.5",
"changes": [
diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json
index 7236cf6ff..a86eb7ed1 100644
--- a/packages/abi-gen-wrappers/package.json
+++ b/packages/abi-gen-wrappers/package.json
@@ -32,6 +32,7 @@
"devDependencies": {
"@0x/abi-gen": "^1.0.16",
"@0x/tslint-config": "^1.0.10",
+ "@0x/types": "^1.2.1",
"@0x/utils": "^2.0.5",
"@0x/web3-wrapper": "^3.1.4",
"ethereum-types": "^1.1.2",
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
index 8ca70e026..27f108ebc 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -1800,7 +1801,7 @@ export class AssetProxyOwnerContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_owners: string[],
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts
index 1efeeed0a..3995c6d87 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -968,7 +969,7 @@ export class DummyERC20TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_name: string,
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts
index cc5f9679f..a7af2d158 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -1264,7 +1265,7 @@ export class DummyERC721TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_name: string,
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
index ab207b38e..474472e43 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -601,7 +602,7 @@ export class ERC20ProxyContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20ProxyContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
index 8ee563b7e..ab208cbf5 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -508,7 +509,7 @@ export class ERC20TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC20TokenContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
index 691c55578..f9730a072 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -601,7 +602,7 @@ export class ERC721ProxyContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721ProxyContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
index d1a2d5670..251dfa5f9 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -845,7 +846,7 @@ export class ERC721TokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ERC721TokenContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
index ffd498055..a04b6025e 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -3024,7 +3025,7 @@ export class ExchangeContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ExchangeContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
index 80bbc52c7..8a88431b3 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -661,7 +662,7 @@ export class ForwarderContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts
index 203a66b6d..5f38ffdac 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -60,7 +61,7 @@ export class IValidatorContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IValidatorContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts
index 99809a049..5fa6f1577 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -55,7 +56,7 @@ export class IWalletContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<IWalletContract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
index 38233af3f..ce47b76fc 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -295,7 +296,7 @@ export class OrderValidatorContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
_exchange: string,
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
index 86d1031db..12ec55ae9 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -787,7 +788,7 @@ export class WETH9Contract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<WETH9Contract> {
diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
index 98079e77b..877ffd12d 100644
--- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
+++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -598,7 +599,7 @@ export class ZRXTokenContract extends BaseContract {
},
};
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
): Promise<ZRXTokenContract> {
diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars
index 9c1952ed4..9b2a2b336 100644
--- a/packages/contract_templates/contract.handlebars
+++ b/packages/contract_templates/contract.handlebars
@@ -4,6 +4,7 @@
import { BaseContract } from '@0x/base-contract';
import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types';
import { BigNumber, classUtils, logUtils } from '@0x/utils';
+import { SimpleContractArtifact } from '@0x/types';
import { Web3Wrapper } from '@0x/web3-wrapper';
import * as ethers from 'ethers';
import * as _ from 'lodash';
@@ -40,7 +41,7 @@ export class {{contractName}}Contract extends BaseContract {
{{/this.constant}}
{{/each}}
public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact,
+ artifact: ContractArtifact | SimpleContractArtifact,
provider: Provider,
txDefaults: Partial<TxData>,
{{> typed_params inputs=ctor.inputs}}
diff --git a/packages/instant/.npmignore b/packages/instant/.npmignore
index 579d65af0..a4f7810c0 100644
--- a/packages/instant/.npmignore
+++ b/packages/instant/.npmignore
@@ -1,5 +1,5 @@
.*
*
*/
-!lib/src/**/*
+!lib/**/*
!umd/**/* \ No newline at end of file
diff --git a/packages/instant/package.json b/packages/instant/package.json
index e613e028c..e37ca1ea2 100644
--- a/packages/instant/package.json
+++ b/packages/instant/package.json
@@ -5,9 +5,8 @@
"node": ">=6.12"
},
"description": "0x Instant React Component",
- "private": true,
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
+ "main": "lib/index.js",
+ "types": "lib/index.d.ts",
"scripts": {
"build": "yarn build:all",
"build:all": "run-p build:umd:prod build:commonjs",
@@ -102,6 +101,6 @@
"webpack-dev-server": "^3.1.9"
},
"publishConfig": {
- "access": "private"
+ "access": "public"
}
}
diff --git a/packages/instant/src/assets/powered_by_0x.svg b/packages/instant/src/assets/powered_by_0x.svg
index f49238a3c..e3d007d0b 100644
--- a/packages/instant/src/assets/powered_by_0x.svg
+++ b/packages/instant/src/assets/powered_by_0x.svg
@@ -1,27 +1,17 @@
-<svg width="114" height="20" viewBox="0 0 114 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.17959 11.0032V14.5455H0V5.49716H3.29917C4.27807 5.49716 5.04398 5.74988 5.59692 6.25533C6.15395 6.76077 6.43246 7.42986 6.43246 8.26261C6.43246 9.14092 6.16009 9.8183 5.61535 10.2947C5.0747 10.767 4.29855 11.0032 3.28688 11.0032H1.17959ZM1.17959 10.0275H3.29917C3.92992 10.0275 4.41323 9.87837 4.74909 9.58008C5.08494 9.27764 5.25287 8.84263 5.25287 8.27504C5.25287 7.73645 5.08494 7.30558 4.74909 6.98242C4.41323 6.65927 3.95245 6.49148 3.36675 6.47905H1.17959V10.0275Z" fill="#777777"/>
-<path d="M7.37245 11.1213C7.37245 10.4625 7.49942 9.87009 7.75336 9.34393C8.01139 8.81777 8.36773 8.41175 8.82236 8.12589C9.28109 7.84002 9.80331 7.69709 10.389 7.69709C11.2942 7.69709 12.0253 8.01403 12.5823 8.6479C13.1434 9.28178 13.424 10.1249 13.424 11.1772V11.258C13.424 11.9126 13.2991 12.5009 13.0492 13.0229C12.8035 13.5408 12.4492 13.9447 11.9864 14.2347C11.5276 14.5247 10.9993 14.6697 10.4013 14.6697C9.50022 14.6697 8.76912 14.3528 8.20799 13.7189C7.65096 13.085 7.37245 12.2461 7.37245 11.2021V11.1213ZM8.51518 11.258C8.51518 12.0037 8.68515 12.6024 9.02511 13.054C9.36915 13.5056 9.82788 13.7314 10.4013 13.7314C10.9788 13.7314 11.4375 13.5035 11.7775 13.0478C12.1174 12.5879 12.2874 11.9457 12.2874 11.1213C12.2874 10.3838 12.1133 9.78723 11.7652 9.3315C11.4212 8.87163 10.9624 8.64169 10.389 8.64169C9.82788 8.64169 9.3753 8.86748 9.03125 9.31907C8.6872 9.77066 8.51518 10.417 8.51518 11.258Z" fill="#777777"/>
-<path d="M20.735 12.9608L22.0129 7.82138H23.1495L21.2142 14.5455H20.2927L18.6769 9.44957L17.1041 14.5455H16.1825L14.2534 7.82138H15.3838L16.6925 12.8551L18.2407 7.82138H19.1561L20.735 12.9608Z" fill="#777777"/>
-<path d="M27.0692 14.6697C26.1681 14.6697 25.4349 14.3714 24.8697 13.7749C24.3045 13.1741 24.0219 12.3725 24.0219 11.3699V11.1586C24.0219 10.4915 24.1468 9.89702 24.3967 9.375C24.6506 8.84884 25.0028 8.43868 25.4534 8.14453C25.908 7.84624 26.3995 7.69709 26.9279 7.69709C27.7921 7.69709 28.4638 7.98503 28.943 8.5609C29.4222 9.13678 29.6618 9.96123 29.6618 11.0343V11.5128H25.1585C25.1749 12.1757 25.3653 12.7122 25.7298 13.1223C26.0985 13.5283 26.5654 13.7314 27.1306 13.7314C27.532 13.7314 27.872 13.6485 28.1505 13.4828C28.429 13.3171 28.6727 13.0975 28.8816 12.824L29.5758 13.3709C29.0188 14.2368 28.1832 14.6697 27.0692 14.6697ZM26.9279 8.64169C26.4691 8.64169 26.0841 8.81155 25.7729 9.15128C25.4616 9.48686 25.2691 9.95916 25.1953 10.5682H28.5252V10.4812C28.4925 9.89702 28.3368 9.44543 28.0583 9.12642C27.7798 8.80327 27.403 8.64169 26.9279 8.64169Z" fill="#777777"/>
-<path d="M34.1959 8.85298C34.0238 8.82398 33.8375 8.80948 33.6368 8.80948C32.8914 8.80948 32.3855 9.13056 32.1193 9.77273V14.5455H30.9827V7.82138H32.0886L32.107 8.59819C32.4797 7.99746 33.0081 7.69709 33.6921 7.69709C33.9133 7.69709 34.0812 7.72609 34.1959 7.78409V8.85298Z" fill="#777777"/>
-<path d="M37.8821 14.6697C36.981 14.6697 36.2479 14.3714 35.6826 13.7749C35.1174 13.1741 34.8348 12.3725 34.8348 11.3699V11.1586C34.8348 10.4915 34.9597 9.89702 35.2096 9.375C35.4635 8.84884 35.8158 8.43868 36.2663 8.14453C36.7209 7.84624 37.2124 7.69709 37.7408 7.69709C38.605 7.69709 39.2767 7.98503 39.7559 8.5609C40.2351 9.13678 40.4747 9.96123 40.4747 11.0343V11.5128H35.9714C35.9878 12.1757 36.1782 12.7122 36.5428 13.1223C36.9114 13.5283 37.3783 13.7314 37.9435 13.7314C38.3449 13.7314 38.6849 13.6485 38.9634 13.4828C39.2419 13.3171 39.4856 13.0975 39.6945 12.824L40.3887 13.3709C39.8317 14.2368 38.9962 14.6697 37.8821 14.6697ZM37.7408 8.64169C37.2821 8.64169 36.8971 8.81155 36.5858 9.15128C36.2745 9.48686 36.082 9.95916 36.0083 10.5682H39.3382V10.4812C39.3054 9.89702 39.1497 9.44543 38.8712 9.12642C38.5927 8.80327 38.2159 8.64169 37.7408 8.64169Z" fill="#777777"/>
-<path d="M41.5192 11.1275C41.5192 10.0959 41.7608 9.26728 42.2441 8.64169C42.7274 8.01196 43.3602 7.69709 44.1425 7.69709C44.9207 7.69709 45.5372 7.96638 45.9918 8.50497V5H47.1284V14.5455H46.0839L46.0287 13.8246C45.574 14.388 44.9412 14.6697 44.1302 14.6697C43.3602 14.6697 42.7315 14.3507 42.2441 13.7127C41.7608 13.0747 41.5192 12.242 41.5192 11.2145V11.1275ZM42.6558 11.258C42.6558 12.0203 42.8114 12.6169 43.1227 13.0478C43.434 13.4786 43.864 13.6941 44.4129 13.6941C45.1337 13.6941 45.66 13.3668 45.9918 12.7122V9.62358C45.6518 8.9897 45.1296 8.67276 44.4251 8.67276C43.8681 8.67276 43.434 8.89027 43.1227 9.32528C42.8114 9.7603 42.6558 10.4045 42.6558 11.258Z" fill="#777777"/>
-<path d="M57.6464 11.258C57.6464 12.2855 57.4129 13.112 56.946 13.7376C56.4791 14.359 55.8524 14.6697 55.066 14.6697C54.2264 14.6697 53.5772 14.3694 53.1185 13.7686L53.0632 14.5455H52.0188V5H53.1553V8.5609C53.6141 7.98503 54.2469 7.69709 55.0538 7.69709C55.8606 7.69709 56.4934 8.00574 56.9522 8.62305C57.415 9.24035 57.6464 10.0855 57.6464 11.1586V11.258ZM56.5098 11.1275C56.5098 10.3445 56.3603 9.73958 56.0613 9.31285C55.7623 8.88613 55.3323 8.67276 54.7711 8.67276C54.0216 8.67276 53.483 9.02492 53.1553 9.72923V12.6376C53.5035 13.3419 54.0462 13.6941 54.7834 13.6941C55.3282 13.6941 55.7521 13.4807 56.0552 13.054C56.3583 12.6272 56.5098 11.9851 56.5098 11.1275Z" fill="#777777"/>
-<path d="M61.1852 12.8613L62.7334 7.82138H63.9498L61.2773 15.5833C60.8637 16.7019 60.2063 17.2612 59.3052 17.2612L59.0902 17.2425L58.6663 17.1618V16.2296L58.9734 16.2544C59.3584 16.2544 59.6574 16.1757 59.8704 16.0183C60.0875 15.8609 60.2657 15.5729 60.4049 15.1545L60.6568 14.4709L58.2853 7.82138H59.5264L61.1852 12.8613Z" fill="#777777"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M102.319 9.94708L98.7681 12.2635C98.8595 13.5364 99.4513 14.1727 100.544 14.1727C101.727 14.1727 102.319 13.414 102.319 11.8964V9.94708ZM98.7527 11.0088L102.304 8.69233C102.263 8.02927 102.097 7.53857 101.805 7.22035C101.513 6.90224 101.087 6.74304 100.528 6.74304C99.9338 6.74304 99.4892 6.92776 99.1947 7.29714C98.8999 7.66658 98.7527 8.23403 98.7527 8.99935V11.0088ZM104.149 11.6161C104.149 12.2437 104.066 12.7967 103.901 13.275C103.736 13.7535 103.498 14.154 103.188 14.4766C102.879 14.7993 102.5 15.043 102.053 15.2076C101.606 15.3722 101.103 15.4546 100.544 15.4546C99.9902 15.4546 99.4897 15.3722 99.0427 15.2076C98.5956 15.043 98.2158 14.7993 97.9034 14.4766C97.591 14.154 97.3496 13.7535 97.1794 13.275C97.0091 12.7967 96.9241 12.2437 96.9241 11.6161V9.293C96.9241 8.66551 97.0079 8.11262 97.1756 7.63416C97.3433 7.15582 97.5833 6.75525 97.8958 6.43253C98.2083 6.10992 98.5866 5.8663 99.0313 5.70156C99.4758 5.53699 99.975 5.45459 100.529 5.45459C101.088 5.45459 101.591 5.53699 102.038 5.70156C102.485 5.8663 102.865 6.10992 103.177 6.43253C103.489 6.75525 103.73 7.15582 103.897 7.63416C104.065 8.11262 104.149 8.66551 104.149 9.293V11.6161Z" fill="#777777"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M110.041 10.4915L111.947 7.95448H113.911L111.09 11.6491L114 15.4545H112.043L110.063 12.8274L108.091 15.4545H106.119L109.029 11.6491L106.207 7.95448H108.165L110.041 10.4915Z" fill="#777777"/>
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="76" y="13" width="13" height="7">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M76.666 20H88.9359V13.425H76.666V20Z" fill="white"/>
-</mask>
-<g mask="url(#mask0)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M76.666 18.644C77.9189 19.3997 79.3537 19.8757 80.8969 19.9789C83.0284 20.1214 85.0448 19.534 86.7198 18.4267C87.5526 17.8761 88.3005 17.1969 88.9359 16.4141C88.4089 15.6562 87.8483 14.8742 87.2561 14.0775L86.7722 13.425C86.1355 14.4641 85.2199 15.2969 84.1423 15.8178L82.4893 14.1447L76.666 18.644Z" fill="#777777"/>
-</g>
-<mask id="mask1" mask-type="alpha" maskUnits="userSpaceOnUse" x="71" y="5" width="8" height="13">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M71.7593 5.17493V17.8053H78.1152V5.17493L71.7593 5.17493Z" fill="white"/>
-</mask>
-<g mask="url(#mask1)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M73.0424 5.17493C72.3281 6.45818 71.8782 7.92349 71.7797 9.49804C71.6417 11.7039 72.211 13.7904 73.2841 15.523C73.815 16.3803 74.4695 17.1504 75.2234 17.8053C75.9567 17.2604 76.7136 16.6807 77.4848 16.0686L78.1153 15.5695C77.1119 14.9113 76.3077 13.9658 75.8044 12.853L77.4333 11.1274L73.0424 5.17493Z" fill="#777777"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M86.4377 1.38342C85.1877 0.612615 83.756 0.126653 82.2157 0.0214596C80.0888 -0.123789 78.0769 0.475348 76.4064 1.60452C75.5797 2.16325 74.8373 2.85192 74.2058 3.64528C74.7312 4.41698 75.2901 5.21342 75.8803 6.02502L76.3615 6.68845C76.9964 5.63221 77.9085 4.78555 78.982 4.25602L78.9832 4.25547L80.5359 5.8528L86.4377 1.38342Z" fill="#777777"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M90.0676 14.9203C90.769 13.6715 91.2122 12.2498 91.3097 10.722C91.4476 8.56117 90.8794 6.51701 89.8081 4.81903C89.2755 3.97475 88.6185 3.21662 87.8611 2.57239C87.128 3.10659 86.3715 3.67498 85.6007 4.27538L84.9695 4.76579C85.9764 5.41241 86.7834 6.3426 87.2872 7.43761L87.2969 7.46039L85.7288 9.10965L90.0676 14.9203Z" fill="#777777"/>
+<svg width="108" height="18" viewBox="0 0 108 18" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M1.17959 10.0032V13.5455H0V4.49716H3.29917C4.27807 4.49716 5.04398 4.74988 5.59692 5.25533C6.15395 5.76077 6.43246 6.42986 6.43246 7.26261C6.43246 8.14092 6.16009 8.8183 5.61535 9.29474C5.0747 9.76705 4.29855 10.0032 3.28688 10.0032H1.17959ZM1.17959 9.02752H3.29917C3.92992 9.02752 4.41323 8.87837 4.74909 8.58008C5.08494 8.27764 5.25287 7.84263 5.25287 7.27504C5.25287 6.73645 5.08494 6.30558 4.74909 5.98242C4.41323 5.65927 3.95245 5.49148 3.36675 5.47905H1.17959V9.02752Z" fill="#777777"/>
+<path d="M7.37245 10.1213C7.37245 9.46254 7.49942 8.87009 7.75336 8.34393C8.01139 7.81777 8.36773 7.41175 8.82236 7.12589C9.28109 6.84002 9.80331 6.69709 10.389 6.69709C11.2942 6.69709 12.0253 7.01403 12.5823 7.6479C13.1434 8.28178 13.424 9.12488 13.424 10.1772V10.258C13.424 10.9126 13.2991 11.5009 13.0492 12.0229C12.8035 12.5408 12.4492 12.9447 11.9864 13.2347C11.5276 13.5247 10.9993 13.6697 10.4013 13.6697C9.50022 13.6697 8.76912 13.3528 8.20799 12.7189C7.65096 12.085 7.37245 11.2461 7.37245 10.2021V10.1213ZM8.51518 10.258C8.51518 11.0037 8.68515 11.6024 9.02511 12.054C9.36915 12.5056 9.82788 12.7314 10.4013 12.7314C10.9788 12.7314 11.4375 12.5035 11.7775 12.0478C12.1174 11.5879 12.2874 10.9457 12.2874 10.1213C12.2874 9.38382 12.1133 8.78723 11.7652 8.3315C11.4212 7.87163 10.9624 7.64169 10.389 7.64169C9.82788 7.64169 9.3753 7.86748 9.03125 8.31907C8.6872 8.77066 8.51518 9.41696 8.51518 10.258Z" fill="#777777"/>
+<path d="M20.735 11.9608L22.0129 6.82138H23.1495L21.2142 13.5455H20.2927L18.6769 8.44957L17.1041 13.5455H16.1825L14.2534 6.82138H15.3838L16.6925 11.8551L18.2407 6.82138H19.1561L20.735 11.9608Z" fill="#777777"/>
+<path d="M27.0692 13.6697C26.1681 13.6697 25.4349 13.3714 24.8697 12.7749C24.3045 12.1741 24.0219 11.3725 24.0219 10.3699V10.1586C24.0219 9.49154 24.1468 8.89702 24.3967 8.375C24.6506 7.84884 25.0028 7.43868 25.4534 7.14453C25.908 6.84624 26.3995 6.69709 26.9279 6.69709C27.7921 6.69709 28.4638 6.98503 28.943 7.5609C29.4222 8.13678 29.6618 8.96123 29.6618 10.0343V10.5128H25.1585C25.1749 11.1757 25.3653 11.7122 25.7298 12.1223C26.0985 12.5283 26.5654 12.7314 27.1306 12.7314C27.532 12.7314 27.872 12.6485 28.1505 12.4828C28.429 12.3171 28.6727 12.0975 28.8816 11.824L29.5758 12.3709C29.0188 13.2368 28.1832 13.6697 27.0692 13.6697ZM26.9279 7.64169C26.4691 7.64169 26.0841 7.81155 25.7729 8.15128C25.4616 8.48686 25.2691 8.95916 25.1953 9.56818H28.5252V9.48118C28.4925 8.89702 28.3368 8.44543 28.0583 8.12642C27.7798 7.80327 27.403 7.64169 26.9279 7.64169Z" fill="#777777"/>
+<path d="M34.1959 7.85298C34.0238 7.82398 33.8375 7.80948 33.6368 7.80948C32.8914 7.80948 32.3855 8.13056 32.1193 8.77273V13.5455H30.9827V6.82138H32.0886L32.107 7.59819C32.4797 6.99746 33.0081 6.69709 33.6921 6.69709C33.9133 6.69709 34.0812 6.72609 34.1959 6.78409V7.85298Z" fill="#777777"/>
+<path d="M37.8821 13.6697C36.981 13.6697 36.2479 13.3714 35.6826 12.7749C35.1174 12.1741 34.8348 11.3725 34.8348 10.3699V10.1586C34.8348 9.49154 34.9597 8.89702 35.2096 8.375C35.4635 7.84884 35.8158 7.43868 36.2663 7.14453C36.7209 6.84624 37.2124 6.69709 37.7408 6.69709C38.605 6.69709 39.2767 6.98503 39.7559 7.5609C40.2351 8.13678 40.4747 8.96123 40.4747 10.0343V10.5128H35.9714C35.9878 11.1757 36.1782 11.7122 36.5428 12.1223C36.9114 12.5283 37.3783 12.7314 37.9435 12.7314C38.3449 12.7314 38.6849 12.6485 38.9634 12.4828C39.2419 12.3171 39.4856 12.0975 39.6945 11.824L40.3887 12.3709C39.8317 13.2368 38.9962 13.6697 37.8821 13.6697ZM37.7408 7.64169C37.2821 7.64169 36.8971 7.81155 36.5858 8.15128C36.2745 8.48686 36.082 8.95916 36.0083 9.56818H39.3382V9.48118C39.3054 8.89702 39.1497 8.44543 38.8712 8.12642C38.5927 7.80327 38.2159 7.64169 37.7408 7.64169Z" fill="#777777"/>
+<path d="M41.5192 10.1275C41.5192 9.09588 41.7608 8.26728 42.2441 7.64169C42.7274 7.01196 43.3602 6.69709 44.1425 6.69709C44.9207 6.69709 45.5372 6.96638 45.9918 7.50497V4H47.1284V13.5455H46.0839L46.0287 12.8246C45.574 13.388 44.9412 13.6697 44.1302 13.6697C43.3602 13.6697 42.7315 13.3507 42.2441 12.7127C41.7608 12.0747 41.5192 11.242 41.5192 10.2145V10.1275ZM42.6558 10.258C42.6558 11.0203 42.8114 11.6169 43.1227 12.0478C43.434 12.4786 43.864 12.6941 44.4129 12.6941C45.1337 12.6941 45.66 12.3668 45.9918 11.7122V8.62358C45.6518 7.9897 45.1296 7.67276 44.4251 7.67276C43.8681 7.67276 43.434 7.89027 43.1227 8.32528C42.8114 8.7603 42.6558 9.40453 42.6558 10.258Z" fill="#777777"/>
+<path d="M57.6464 10.258C57.6464 11.2855 57.4129 12.112 56.946 12.7376C56.4791 13.359 55.8524 13.6697 55.066 13.6697C54.2264 13.6697 53.5772 13.3694 53.1185 12.7686L53.0632 13.5455H52.0188V4H53.1553V7.5609C53.6141 6.98503 54.2469 6.69709 55.0538 6.69709C55.8606 6.69709 56.4934 7.00574 56.9522 7.62305C57.415 8.24035 57.6464 9.08552 57.6464 10.1586V10.258ZM56.5098 10.1275C56.5098 9.34446 56.3603 8.73958 56.0613 8.31285C55.7623 7.88613 55.3323 7.67276 54.7711 7.67276C54.0216 7.67276 53.483 8.02492 53.1553 8.72923V11.6376C53.5035 12.3419 54.0462 12.6941 54.7834 12.6941C55.3282 12.6941 55.7521 12.4807 56.0552 12.054C56.3583 11.6272 56.5098 10.9851 56.5098 10.1275Z" fill="#777777"/>
+<path d="M61.1852 11.8613L62.7334 6.82138H63.9498L61.2773 14.5833C60.8637 15.7019 60.2063 16.2612 59.3052 16.2612L59.0902 16.2425L58.6663 16.1618V15.2296L58.9734 15.2544C59.3584 15.2544 59.6574 15.1757 59.8704 15.0183C60.0875 14.8609 60.2657 14.5729 60.4049 14.1545L60.6568 13.4709L58.2853 6.82138H59.5264L61.1852 11.8613Z" fill="#777777"/>
+<path d="M72.7808 11.3763L74.178 9.93067L72.441 7.58664L70.2293 4.45722C69.448 5.79067 69 7.34287 69 9C69 11.7452 70.2293 14.203 72.1682 15.8537L74.9755 13.8697C74.0206 13.2748 73.2514 12.4087 72.7808 11.3763Z" fill="#777777"/>
+<path d="M75.6237 3.78081L77.0693 5.17803L79.4134 3.44099L82.5428 1.22933C81.2093 0.447982 79.6571 0 78 0C75.2548 0 72.797 1.22933 71.1463 3.16816L73.1303 5.97552C73.7252 5.02063 74.5913 4.25139 75.6237 3.78081Z" fill="#777777"/>
+<path d="M81.822 8.06933L83.559 10.4134L85.7707 13.5428C86.552 12.2093 87 10.6571 87 9C87 6.2548 85.7707 3.79695 83.8318 2.14628L81.0245 4.13031C81.9794 4.7252 82.7486 5.5913 83.2192 6.62368L81.822 8.06933Z" fill="#777777"/>
+<path d="M84.8537 14.8318L82.8697 12.0245C82.2748 12.9794 81.4087 13.7486 80.3763 14.2192L78.9307 12.822L76.5866 14.559L73.4572 16.7707C74.7907 17.552 76.3429 18 78 18C80.7452 18 83.203 16.7707 84.8537 14.8318Z" fill="#777777"/>
+<path d="M95.7487 3.89648C93.6141 3.89648 92.2419 5.54671 92.2419 8.8651C92.2419 12.1566 93.6231 13.8247 95.7487 13.8247C97.8742 13.8247 99.2733 12.1566 99.2733 8.8651C99.2733 5.57361 97.8742 3.89648 95.7487 3.89648ZM93.4348 8.87406C93.4348 6.41666 94.1971 4.97272 95.7397 4.97272C96.2061 4.97272 96.6097 5.10725 96.9594 5.38527L93.928 11.5826C93.6052 10.9279 93.4348 10.031 93.4348 8.87406ZM95.7487 12.7664C95.2823 12.7664 94.8877 12.6319 94.5469 12.3718L97.5783 6.18348C97.9101 6.85613 98.0715 7.74402 98.0715 8.87406C98.0715 11.3135 97.2913 12.7664 95.7487 12.7664Z" fill="#777777"/>
+<path d="M104.96 10.085L106.915 6.7666H105.704L104.09 9.50203H103.596L102.018 6.7666H100.78L102.708 10.1298L100.565 13.6545H101.838L103.587 10.7666H104.072L105.785 13.6545H107.094L104.96 10.085Z" fill="#777777"/>
</svg>
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx
index 520ac33d5..b825255c4 100644
--- a/packages/instant/src/components/erc20_asset_amount_input.tsx
+++ b/packages/instant/src/components/erc20_asset_amount_input.tsx
@@ -22,7 +22,8 @@ export interface ERC20AssetAmountInputProps {
onSelectAssetClick?: (asset?: ERC20Asset) => void;
startingFontSizePx: number;
fontColor?: ColorOption;
- isDisabled: boolean;
+ isInputDisabled: boolean;
+ canSelectOtherAsset: boolean;
numberOfAssetsAvailable?: number;
}
@@ -50,14 +51,15 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput
);
}
private readonly _renderContentForAsset = (asset: ERC20Asset): React.ReactNode => {
- const { onChange, ...rest } = this.props;
- const amountBorderBottom = this.props.isDisabled ? '' : `1px solid ${transparentWhite}`;
+ const { onChange, isInputDisabled, ...rest } = this.props;
+ const amountBorderBottom = isInputDisabled ? '' : `1px solid ${transparentWhite}`;
const onSymbolClick = this._generateSelectAssetClickHandler();
return (
<React.Fragment>
<Container borderBottom={amountBorderBottom} display="inline-block">
<ScalingAmountInput
{...rest}
+ isDisabled={isInputDisabled}
textLengthThreshold={this._textLengthThresholdForAsset(asset)}
maxFontSizePx={this.props.startingFontSizePx}
onAmountChange={this._handleChange}
@@ -74,11 +76,11 @@ export class ERC20AssetAmountInput extends React.Component<ERC20AssetAmountInput
fontSize={`${this.state.currentFontSizePx}px`}
fontColor={ColorOption.white}
textTransform="uppercase"
- onClick={onSymbolClick}
+ onClick={this.props.canSelectOtherAsset ? onSymbolClick : undefined}
>
{assetUtils.formattedSymbolForAsset(asset)}
</Text>
- {this._renderChevronIcon()}
+ {this.props.canSelectOtherAsset && this._renderChevronIcon()}
</Flex>
</Container>
</React.Fragment>
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx
index 00d3e95b2..1f53f2d96 100644
--- a/packages/instant/src/components/zero_ex_instant_provider.tsx
+++ b/packages/instant/src/components/zero_ex_instant_provider.tsx
@@ -21,9 +21,6 @@ import { Heartbeater } from '../util/heartbeater';
import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory';
import { providerStateFactory } from '../util/provider_state_factory';
-setupRollbar();
-fonts.include();
-
export type ZeroExInstantProviderProps = ZeroExInstantProviderRequiredProps &
Partial<ZeroExInstantProviderOptionalProps>;
@@ -90,6 +87,8 @@ export class ZeroExInstantProvider extends React.Component<ZeroExInstantProvider
}
constructor(props: ZeroExInstantProviderProps) {
super(props);
+ setupRollbar();
+ fonts.include();
const initialAppState = ZeroExInstantProvider._mergeDefaultStateWithProps(this.props);
this._store = store.create(initialAppState);
}
diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
index 2c2661e1a..a39bc46a2 100644
--- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
+++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
@@ -23,9 +23,10 @@ interface ConnectedState {
assetBuyer: AssetBuyer;
value?: BigNumber;
asset?: ERC20Asset;
- isDisabled: boolean;
+ isInputDisabled: boolean;
numberOfAssetsAvailable?: number;
affiliateInfo?: AffiliateInfo;
+ canSelectOtherAsset: boolean;
}
interface ConnectedDispatch {
@@ -43,21 +44,27 @@ type FinalProps = ConnectedProps & SelectedERC20AssetAmountInputProps;
const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputProps): ConnectedState => {
const processState = state.buyOrderState.processState;
- const isEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure;
- const isDisabled = !isEnabled;
+ const isInputEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure;
+ const isInputDisabled = !isInputEnabled;
const selectedAsset =
!_.isUndefined(state.selectedAsset) && state.selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20
? (state.selectedAsset as ERC20Asset)
: undefined;
const numberOfAssetsAvailable = _.isUndefined(state.availableAssets) ? undefined : state.availableAssets.length;
+ const canSelectOtherAsset =
+ numberOfAssetsAvailable && numberOfAssetsAvailable > 1
+ ? isInputEnabled || processState === OrderProcessState.Success
+ : false;
+
const assetBuyer = state.providerState.assetBuyer;
return {
assetBuyer,
value: state.selectedAssetUnitAmount,
asset: selectedAsset,
- isDisabled,
+ isInputDisabled,
numberOfAssetsAvailable,
affiliateInfo: state.affiliateInfo,
+ canSelectOtherAsset,
};
};
@@ -102,8 +109,9 @@ const mergeProps = (
onChange: (value, asset) => {
connectedDispatch.updateBuyQuote(connectedState.assetBuyer, value, asset, connectedState.affiliateInfo);
},
- isDisabled: connectedState.isDisabled,
+ isInputDisabled: connectedState.isInputDisabled,
numberOfAssetsAvailable: connectedState.numberOfAssetsAvailable,
+ canSelectOtherAsset: connectedState.canSelectOtherAsset,
};
};
diff --git a/packages/instant/tsconfig.json b/packages/instant/tsconfig.json
index 28a6190b8..14b0ad8f7 100644
--- a/packages/instant/tsconfig.json
+++ b/packages/instant/tsconfig.json
@@ -2,16 +2,11 @@
"extends": "../../tsconfig",
"compilerOptions": {
"outDir": "lib",
- "rootDir": ".",
+ "rootDir": "src",
"jsx": "react",
- "allowSyntheticDefaultImports": true,
"noImplicitAny": true,
- "module": "ESNext",
- "moduleResolution": "node",
- "lib": ["es2015", "dom"],
- "target": "es5",
- "sourceMap": true
+ "allowSyntheticDefaultImports": true
},
- "include": ["./src/**/*", "./test/**/*"],
+ "include": ["./src/**/*"],
"exclude": ["./src/index.umd.ts"]
}
diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json
index 5b0d58909..0056a3166 100644
--- a/packages/migrations/CHANGELOG.json
+++ b/packages/migrations/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "2.1.0",
+ "changes": [
+ {
+ "note":
+ "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping",
+ "pr": 1301
+ }
+ ]
+ },
+ {
"timestamp": 1542208198,
"version": "2.0.4",
"changes": [
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 8eaae96ba..04503c0b2 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -13,7 +13,13 @@
"clean": "shx rm -rf lib",
"lint": "tslint --format stylish --project .",
"migrate:v2": "run-s build script:migrate:v2",
- "script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0"
+ "script:migrate:v2": "node ./lib/migrate.js",
+ "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
+ },
+ "config": {
+ "postpublish": {
+ "assets": []
+ }
},
"license": "Apache-2.0",
"devDependencies": {
@@ -25,6 +31,7 @@
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.11.0",
+ "typedoc": "0.13.0",
"typescript": "3.0.1",
"yargs": "^10.0.3"
},
diff --git a/packages/migrations/src/index.ts b/packages/migrations/src/index.ts
index 8f629a24b..4f22c30b9 100644
--- a/packages/migrations/src/index.ts
+++ b/packages/migrations/src/index.ts
@@ -1 +1,11 @@
+export {
+ Provider,
+ TxData,
+ JSONRPCRequestPayload,
+ JSONRPCErrorCallback,
+ TxDataPayable,
+ JSONRPCResponsePayload,
+ JSONRPCResponseError,
+} from 'ethereum-types';
+export { ContractAddresses } from '@0x/contract-addresses';
export { runMigrationsAsync, runMigrationsOnceAsync } from './migration';
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
index 86c76a54b..61ac56938 100644
--- a/packages/migrations/src/migration.ts
+++ b/packages/migrations/src/migration.ts
@@ -11,10 +11,9 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
/**
* Creates and deploys all the contracts that are required for the latest
- * version of the 0x protocol. Custom migrations can be defined here. This will
- * be called with the CLI 'migrate:v2' command.
- * @param provider Web3 provider instance.
- * @param txDefaults Default transaction values to use when deploying contracts.
+ * version of the 0x protocol.
+ * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
+ * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
@@ -159,8 +158,8 @@ let _cachedContractAddresses: ContractAddresses;
* Exactly like runMigrationsAsync but will only run the migrations the first
* time it is called. Any subsequent calls will return the cached contract
* addresses.
- * @param provider Web3 provider instance.
- * @param txDefaults Default transaction values to use when deploying contracts.
+ * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
+ * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
* @returns The addresses of the contracts that were deployed.
*/
export async function runMigrationsOnceAsync(
diff --git a/packages/migrations/typedoc-tsconfig.json b/packages/migrations/typedoc-tsconfig.json
new file mode 100644
index 000000000..c9b0af1ae
--- /dev/null
+++ b/packages/migrations/typedoc-tsconfig.json
@@ -0,0 +1,7 @@
+{
+ "extends": "../../typedoc-tsconfig",
+ "compilerOptions": {
+ "outDir": "lib"
+ },
+ "include": ["./src/**/*", "./test/**/*"]
+}
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index c1e2b702f..5fe1aacf2 100644
--- a/packages/monorepo-scripts/src/prepublish_checks.ts
+++ b/packages/monorepo-scripts/src/prepublish_checks.ts
@@ -199,6 +199,6 @@ const checkRequiredEnvVariables = () => {
};
prepublishChecksAsync().catch(err => {
- utils.log(err.message);
+ utils.log(err);
process.exit(1);
});
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 44ff971e8..95b187cc2 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -91,6 +91,7 @@ export const utils = {
const changelog = changelogUtils.getChangelogOrCreateIfMissing(packageName, packageLocation);
if (_.isEmpty(changelog)) {
nextVersionIfValid = semver.inc(currentVersion, 'patch');
+ return nextVersionIfValid as string;
}
const lastEntry = changelog[0];
if (semver.gt(currentVersion, lastEntry.version)) {
diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json
index 6d9f83c57..ecab7e9d6 100644
--- a/packages/types/CHANGELOG.json
+++ b/packages/types/CHANGELOG.json
@@ -1,5 +1,15 @@
[
{
+ "version": "1.3.0",
+ "changes": [
+ {
+ "note":
+ "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package",
+ "pr": 1298
+ }
+ ]
+ },
+ {
"version": "1.2.1",
"changes": [
{
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 3c9b6bbc5..1a86f45e6 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -1,7 +1,7 @@
// tslint:disable:max-file-line-count
import { BigNumber } from 'bignumber.js';
-import { ContractAbi } from 'ethereum-types';
+import { ContractAbi, ContractNetworks, DevdocOutput } from 'ethereum-types';
// HACK: Rather then extending from OrderWithoutExchangeAddress
// we don't, because our docs don't expand inherited types, and it's unnecessarily
@@ -626,3 +626,24 @@ export interface EIP712TypedData {
export interface Stats {
orderCount: number;
}
+
+export interface SimpleContractArtifact {
+ schemaVersion: string;
+ contractName: string;
+ compilerOutput: SimpleStandardContractOutput;
+ networks: ContractNetworks;
+}
+
+export interface SimpleStandardContractOutput {
+ abi: ContractAbi;
+ evm: SimpleEvmOutput;
+ devdoc?: DevdocOutput;
+}
+
+export interface SimpleEvmOutput {
+ bytecode: SimpleEvmBytecodeOutput;
+}
+
+export interface SimpleEvmBytecodeOutput {
+ object: string;
+}
diff --git a/packages/website/md/docs/migrations/1/installation.md b/packages/website/md/docs/migrations/1/installation.md
new file mode 100644
index 000000000..78403037b
--- /dev/null
+++ b/packages/website/md/docs/migrations/1/installation.md
@@ -0,0 +1,17 @@
+**Install**
+
+```bash
+yarn add @0x/migrations
+```
+
+**Import**
+
+```javascript
+import { runMigrationsAsync } from '@0x/migrations';
+```
+
+or
+
+```javascript
+var runMigrationsAsync = require('@0x/migrations').runMigrationsAsync;
+```
diff --git a/packages/website/md/docs/migrations/1/introduction.md b/packages/website/md/docs/migrations/1/introduction.md
new file mode 100644
index 000000000..82ae3a0ab
--- /dev/null
+++ b/packages/website/md/docs/migrations/1/introduction.md
@@ -0,0 +1 @@
+Welcome to the [@0x/migrations](https://github.com/0xProject/0x-monorepo/tree/development/packages/migrations) documentation! This package is intended for developers who would like to deploy the 0x protocol system of smart contracts to a custom testnet. If you want to test against existing testnets, check out our pre-deployed [Ganache snapshot](https://0xproject.com/wiki#Ganache-Setup-Guide) or where 0x is already deployed on [popular testnets](https://0xproject.com/wiki#Deployed-Addresses).
diff --git a/packages/website/ts/containers/migrations_documentation.ts b/packages/website/ts/containers/migrations_documentation.ts
new file mode 100644
index 000000000..02919e06e
--- /dev/null
+++ b/packages/website/ts/containers/migrations_documentation.ts
@@ -0,0 +1,66 @@
+import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { Dispatch } from 'redux';
+import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
+import { Dispatcher } from 'ts/redux/dispatcher';
+import { State } from 'ts/redux/reducer';
+import { DocPackages, ScreenWidths } from 'ts/types';
+import { Translate } from 'ts/utils/translate';
+
+/* tslint:disable:no-var-requires */
+const IntroMarkdown1 = require('md/docs/migrations/1/introduction');
+const InstallationMarkdown1 = require('md/docs/migrations/1/installation');
+/* tslint:enable:no-var-requires */
+
+const markdownSections = {
+ introduction: 'introduction',
+ installation: 'installation',
+};
+
+const docsInfoConfig: DocsInfoConfig = {
+ id: DocPackages.Migrations,
+ packageName: '@0x/migrations',
+ type: SupportedDocJson.TypeDoc,
+ displayName: 'Migrations',
+ packageUrl: 'https://github.com/0xProject/0x-monorepo',
+ markdownMenu: {
+ 'getting-started': [markdownSections.introduction, markdownSections.installation],
+ },
+ sectionNameToMarkdownByVersion: {
+ '2.0.4': {
+ [markdownSections.introduction]: IntroMarkdown1,
+ [markdownSections.installation]: InstallationMarkdown1,
+ },
+ },
+ markdownSections,
+};
+const docsInfo = new DocsInfo(docsInfoConfig);
+
+interface ConnectedState {
+ docsVersion: string;
+ availableDocVersions: string[];
+ docsInfo: DocsInfo;
+ translate: Translate;
+ screenWidth: ScreenWidths;
+}
+
+interface ConnectedDispatch {
+ dispatcher: Dispatcher;
+}
+
+const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
+ docsVersion: state.docsVersion,
+ availableDocVersions: state.availableDocVersions,
+ translate: state.translate,
+ docsInfo,
+ screenWidth: state.screenWidth,
+});
+
+const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
+ dispatcher: new Dispatcher(dispatch),
+});
+
+export const Documentation: React.ComponentClass<DocPageProps> = connect(mapStateToProps, mapDispatchToProps)(
+ DocPageComponent,
+);
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index 96e7184f8..faf7d8c87 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -40,6 +40,9 @@ const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async ()
const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () =>
import(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'),
);
+const LazyMigrationsDocumentation = createLazyComponent('Documentation', async () =>
+ import(/* webpackChunkName: "migrationsDocs" */ 'ts/containers/migrations_documentation'),
+);
const LazyOrderWatcherDocumentation = createLazyComponent('Documentation', async () =>
import(/* webpackChunkName: "orderWatcherDocs" */ 'ts/containers/order_watcher_documentation'),
);
@@ -103,6 +106,10 @@ render(
component={LazyContractWrappersDocumentation}
/>
<Route
+ path={`${WebsitePaths.Migrations}/:version?`}
+ component={LazyMigrationsDocumentation}
+ />
+ <Route
path={`${WebsitePaths.OrderWatcher}/:version?`}
component={LazyOrderWatcherDocumentation}
/>
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
index adf2261b5..3ae071774 100644
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ b/packages/website/ts/pages/documentation/doc_page.tsx
@@ -39,6 +39,7 @@ const docIdToSubpackageName: { [id: string]: string } = {
[DocPackages.OrderWatcher]: 'order-watcher',
[DocPackages.EthereumTypes]: 'ethereum-types',
[DocPackages.AssetBuyer]: 'asset-buyer',
+ [DocPackages.Migrations]: 'migrations',
};
export interface DocPageProps {
diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx
index e3328f3fa..f68d2892f 100644
--- a/packages/website/ts/pages/documentation/docs_home.tsx
+++ b/packages/website/ts/pages/documentation/docs_home.tsx
@@ -109,6 +109,14 @@ const CATEGORY_TO_PACKAGES: ObjectMap<Package[]> = {
},
{
description:
+ "A package to deploy the 0x protocol's system of smart contracts to the testnet of your choice",
+ link: {
+ title: '@0x/migrations',
+ to: WebsitePaths.Migrations,
+ },
+ },
+ {
+ description:
'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)',
link: {
title: '@0x/json-schemas',
@@ -133,6 +141,23 @@ const CATEGORY_TO_PACKAGES: ObjectMap<Package[]> = {
},
{
description:
+ 'A tiny utility library for getting known deployed contract addresses for a particular network.',
+ link: {
+ title: '@0x/contract-addresses',
+ to: 'https://www.npmjs.com/package/@0x/contract-addresses',
+ shouldOpenInNewTab: true,
+ },
+ },
+ {
+ description: 'Smart contract compilation artifacts for the latest version of the 0x protocol.',
+ link: {
+ title: '@0x/contract-artifacts',
+ to: 'https://www.npmjs.com/package/@0x/contract-artifacts',
+ shouldOpenInNewTab: true,
+ },
+ },
+ {
+ description:
'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.',
link: {
title: '@0x/sra-spec',
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
index 444a8348d..89c477085 100644
--- a/packages/website/ts/types.ts
+++ b/packages/website/ts/types.ts
@@ -366,6 +366,7 @@ export enum WebsitePaths {
OrderUtils = '/docs/order-utils',
EthereumTypes = '/docs/ethereum-types',
AssetBuyer = '/docs/asset-buyer',
+ Migrations = '/docs/migrations',
Careers = '/careers',
}
@@ -383,6 +384,7 @@ export enum DocPackages {
ContractWrappers = 'CONTRACT_WRAPPERS',
OrderWatcher = 'ORDER_WATCHER',
AssetBuyer = 'ASSET_BUYER',
+ Migrations = 'MIGRATIONS',
}
export enum Key {
diff --git a/tsconfig.json b/tsconfig.json
index bbcb0a6d2..eaaca8e4e 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -34,6 +34,7 @@
{ "path": "./packages/dev-utils" },
{ "path": "./packages/ethereum-types" },
{ "path": "./packages/fill-scenarios" },
+ { "path": "./packages/instant" },
{ "path": "./packages/json-schemas" },
{ "path": "./packages/metacoin" },
{ "path": "./packages/migrations" },