From e718123478fef5d7959936d0667b68ee7507755d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 27 Aug 2018 12:13:20 +0100 Subject: Add missing translations needed for dev dropdown --- packages/website/translations/chinese.json | 9 ++++++++- packages/website/translations/english.json | 9 ++++++++- packages/website/translations/korean.json | 9 ++++++++- packages/website/translations/russian.json | 9 ++++++++- packages/website/translations/spanish.json | 9 ++++++++- packages/website/ts/types.ts | 7 +++++++ 6 files changed, 47 insertions(+), 5 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index ed1a6044a..93e740a14 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -78,5 +78,12 @@ "WEBSITE": "网站", "DEVELOPERS": "首页", "HOME": "Rocket.chat", - "ROCKETCHAT": "开发人员" + "ROCKETCHAT": "开发人员", + "BUILD_A_RELAYER": "build a relayer", + "ETHEREUM_DEVELOPMENT": "ethereum development", + "INTRO_TUTORIAL": "intro tutorial", + "TRADING_TUTORIAL": "trading tutorial", + "VIEW_ALL_DOCUMENTATION": "view all documentation", + "SANDBOX": "0x.js sandbox", + "GITHUB": "github" } diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 541c29997..a75b73501 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -80,5 +80,12 @@ "DEVELOPERS": "developers", "HOME": "home", "ROCKETCHAT": "rocket.chat", - "TRADE_CALL_TO_ACTION": "trade on 0x" + "TRADE_CALL_TO_ACTION": "trade on 0x", + "BUILD_A_RELAYER": "build a relayer", + "ETHEREUM_DEVELOPMENT": "ethereum development", + "INTRO_TUTORIAL": "intro tutorial", + "TRADING_TUTORIAL": "trading tutorial", + "VIEW_ALL_DOCUMENTATION": "view all documentation", + "SANDBOX": "0x.js sandbox", + "GITHUB": "github" } diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 8892f2dee..e6fbcb4cc 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -78,5 +78,12 @@ "WEBSITE": "Website", "HOME": "홈", "ROCKETCHAT": "Rocket.chat", - "DEVELOPERS": "개발자" + "DEVELOPERS": "개발자", + "BUILD_A_RELAYER": "build a relayer", + "ETHEREUM_DEVELOPMENT": "ethereum development", + "INTRO_TUTORIAL": "intro tutorial", + "TRADING_TUTORIAL": "trading tutorial", + "VIEW_ALL_DOCUMENTATION": "view all documentation", + "SANDBOX": "0x.js sandbox", + "GITHUB": "github" } diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 41a7a990d..779bc8173 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -78,5 +78,12 @@ "WEBSITE": "Веб-сайт", "DEVELOPERS": "Домашняя страница", "HOME": "Rocket.chat", - "ROCKETCHAT": "Для разработчиков" + "ROCKETCHAT": "Для разработчиков", + "BUILD_A_RELAYER": "build a relayer", + "ETHEREUM_DEVELOPMENT": "ethereum development", + "INTRO_TUTORIAL": "intro tutorial", + "TRADING_TUTORIAL": "trading tutorial", + "VIEW_ALL_DOCUMENTATION": "view all documentation", + "SANDBOX": "0x.js sandbox", + "GITHUB": "github" } diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 7780190ac..54a463f98 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -79,5 +79,12 @@ "WEBSITE": "website", "DEVELOPERS": "inicio", "HOME": "rocket.chat", - "ROCKETCHAT": "desarrolladores" + "ROCKETCHAT": "desarrolladores", + "BUILD_A_RELAYER": "build a relayer", + "ETHEREUM_DEVELOPMENT": "ethereum development", + "INTRO_TUTORIAL": "intro tutorial", + "TRADING_TUTORIAL": "trading tutorial", + "VIEW_ALL_DOCUMENTATION": "view all documentation", + "SANDBOX": "0x.js sandbox", + "GITHUB": "github" } diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index c637171dd..2c94fe910 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -468,6 +468,13 @@ export enum Key { Home = 'HOME', RocketChat = 'ROCKETCHAT', TradeCallToAction = 'TRADE_CALL_TO_ACTION', + BuildARelayer = 'BUILD_A_RELAYER', + EthereumDevelopment = 'ETHEREUM_DEVELOPMENT', + IntroTutorial = 'INTRO_TUTORIAL', + TradingTutorial = 'TRADING_TUTORIAL', + ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION', + Sandbox = 'SANDBOX', + Github = 'GITHUB', } export enum SmartContractDocSections { -- cgit From e10561b4a5b06983ac8a3a2f0f923f7eeeaa9bb6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 27 Aug 2018 12:16:29 +0100 Subject: Fix translation capitalizations to not capitalize single letters with sentences (i.e 'a' in 'Build a Relayer') --- packages/website/ts/utils/translate.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/utils/translate.ts b/packages/website/ts/utils/translate.ts index 1ee1a59c5..5595e6e0f 100644 --- a/packages/website/ts/utils/translate.ts +++ b/packages/website/ts/utils/translate.ts @@ -80,7 +80,12 @@ export class Translate { case Deco.CapWords: const words = text.split(' '); - const capitalizedWords = _.map(words, w => this._capitalize(w)); + const capitalizedWords = _.map(words, (w: string, i: number) => { + if (w.length === 1) { + return w; + } + return this._capitalize(w); + }); text = capitalizedWords.join(' '); break; -- cgit From 791eae24c0c38368eecf3be4b9c1f162a29ca065 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 27 Aug 2018 12:16:58 +0100 Subject: Add ability to specify styling to popover container --- packages/website/ts/components/ui/drop_down.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx index 4d5caef08..1daaeb1c3 100644 --- a/packages/website/ts/components/ui/drop_down.tsx +++ b/packages/website/ts/components/ui/drop_down.tsx @@ -21,6 +21,7 @@ export interface DropDownProps { zDepth?: number; activateEvent?: DropdownMouseEvent; closeEvent?: DropdownMouseEvent; + popoverStyle?: React.CSSProperties; } interface DropDownState { @@ -34,6 +35,7 @@ export class DropDown extends React.Component { zDepth: 1, activateEvent: DropdownMouseEvent.Hover, closeEvent: DropdownMouseEvent.Hover, + popoverStyle: {}, }; private _isHovering: boolean; private _popoverCloseCheckIntervalId: number; @@ -77,6 +79,7 @@ export class DropDown extends React.Component { useLayerForClickAway={this.props.closeEvent === DropdownMouseEvent.Click} animated={false} zDepth={this.props.zDepth} + style={this.props.popoverStyle} >
Date: Mon, 27 Aug 2018 12:17:23 +0100 Subject: Implement Developers dropdown --- .../components/dropdowns/developers_drop_down.tsx | 180 +++++++++++++++++++++ packages/website/ts/utils/constants.ts | 1 + 2 files changed, 181 insertions(+) create mode 100644 packages/website/ts/components/dropdowns/developers_drop_down.tsx diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx new file mode 100644 index 000000000..3ab8af2b3 --- /dev/null +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -0,0 +1,180 @@ +import { colors } from '@0xproject/react-shared'; +import * as _ from 'lodash'; +import * as React from 'react'; +import { Link } from 'react-router-dom'; +import { DropDown } from 'ts/components/ui/drop_down'; +import { Deco, Key, WebsitePaths } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +interface KeyToLinkInfo { + [key: string]: LinkInfo; +} + +interface LinkInfo { + link: string; + shouldOpenNewTab: boolean; +} + +const gettingStartedKeyToLinkInfo1: KeyToLinkInfo = { + [Key.BuildARelayer]: { + link: `${WebsitePaths.Wiki}#Build-A-Relayer`, + shouldOpenNewTab: false, + }, + [Key.IntroTutorial]: { + link: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + shouldOpenNewTab: false, + }, +}; +const gettingStartedKeyToLinkInfo2: KeyToLinkInfo = { + [Key.TradingTutorial]: { + link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + shouldOpenNewTab: false, + }, + [Key.EthereumDevelopment]: { + link: `${WebsitePaths.Wiki}#Ethereum-Development`, + shouldOpenNewTab: false, + }, +}; +const popularDocsToLinkInfos: KeyToLinkInfo = { + [Key.ZeroExJs]: { + link: WebsitePaths.ZeroExJs, + shouldOpenNewTab: false, + }, + [Key.Connect]: { + link: WebsitePaths.Connect, + shouldOpenNewTab: false, + }, + [Key.SmartContract]: { + link: WebsitePaths.SmartContracts, + shouldOpenNewTab: false, + }, +}; +const usefulLinksToLinkInfo: KeyToLinkInfo = { + [Key.Github]: { + link: constants.URL_GITHUB_ORG, + shouldOpenNewTab: true, + }, + [Key.Whitepaper]: { + link: WebsitePaths.Whitepaper, + shouldOpenNewTab: true, + }, + [Key.Sandbox]: { + link: constants.URL_SANDBOX, + shouldOpenNewTab: true, + }, +}; + +interface DevelopersDropDownProps { + translate: Translate; + menuItemStyles: React.CSSProperties; + menuIconStyle: React.CSSProperties; +} + +interface DevelopersDropDownState {} + +export class DevelopersDropDown extends React.Component { + public render(): React.ReactNode { + const activeNode = ( +
+
{this.props.translate.get(Key.Developers, Deco.Cap)}
+
+ ); + return ( + + ); + } + private _renderDropdownMenu(): React.ReactNode { + const dropdownMenu = ( +
+
+ {this._renderTitle('Getting started')} +
+
{this._renderLinkSection(gettingStartedKeyToLinkInfo1)}
+
{this._renderLinkSection(gettingStartedKeyToLinkInfo2)}
+
+
+
+
+
+
{this._renderTitle('Popular docs')}
+
{this._renderLinkSection(popularDocsToLinkInfos)}
+
+
+
{this._renderTitle('Useful links')}
+
{this._renderLinkSection(usefulLinksToLinkInfo)}
+
+
+
+ + VIEW ALL DOCUMENTATION + +
+
+ ); + return dropdownMenu; + } + private _renderTitle(title: string): React.ReactNode { + return ( +
+ {title.toUpperCase()} +
+ ); + } + private _renderLinkSection(keyToLinkInfo: KeyToLinkInfo): React.ReactNode { + const linkStyle: React.CSSProperties = { + color: colors.lightBlueA700, + fontFamily: 'Roboto, Roboto Mono', + }; + const numLinks = _.size(keyToLinkInfo); + let i = 0; + const links = _.map(keyToLinkInfo, (linkInfo: LinkInfo, key: string) => { + i++; + const isLast = i === numLinks; + const linkText = this.props.translate.get(key as Key, Deco.CapWords); + return ( +
+ {linkInfo.shouldOpenNewTab ? ( + + {linkText} + + ) : ( + + {linkText} + + )} +
+ ); + }); + return
{links}
; + } +} diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index 005d17823..2b4aa5209 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -83,6 +83,7 @@ export const constants = { URL_PARITY_CHROME_STORE: 'https://chrome.google.com/webstore/detail/parity-ethereum-integrati/himekenlppkgeaoeddcliojfddemadig', URL_REDDIT: 'https://reddit.com/r/0xproject', + URL_SANDBOX: 'https://codesandbox.io/s/1qmjyp7p5j', URL_STANDARD_RELAYER_API_GITHUB: 'https://github.com/0xProject/standard-relayer-api/blob/master/README.md', URL_TWITTER: 'https://twitter.com/0xproject', URL_WETH_IO: 'https://weth.io/', -- cgit From 925d5aa09b8855bfc5c0293feda14a77b1357299 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 27 Aug 2018 12:17:33 +0100 Subject: Add developers dropdown to topBar --- packages/website/ts/components/top_bar/top_bar.tsx | 129 +-------------------- 1 file changed, 6 insertions(+), 123 deletions(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 9ef8211a9..8f1137b44 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -8,18 +8,17 @@ import { } from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; -import Menu from 'material-ui/Menu'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; import { Link } from 'react-router-dom'; import { Blockchain } from 'ts/blockchain'; +import { DevelopersDropDown } from 'ts/components/dropdowns/developers_drop_down'; import { DrawerMenu } from 'ts/components/portal/drawer_menu'; import { ProviderDisplay } from 'ts/components/top_bar/provider_display'; import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; import { Container } from 'ts/components/ui/container'; -import { DropDown } from 'ts/components/ui/drop_down'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, ProviderType, WebsiteLegacyPaths, WebsitePaths } from 'ts/types'; +import { Deco, Key, ProviderType, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -129,111 +128,6 @@ export class TopBar extends React.Component { ? 'flex mx-auto items-center max-width-4' : 'flex mx-auto items-center'; const height = isExpandedDisplayType ? EXPANDED_HEIGHT : DEFAULT_HEIGHT; - const developerSectionMenuItems = [ - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - - - , - ]; const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {}; const fullWidthClasses = isExpandedDisplayType ? 'pr4' : ''; const logoUrl = isNightVersion ? '/images/protocol_logo_white.png' : '/images/protocol_logo_black.png'; @@ -245,15 +139,6 @@ export class TopBar extends React.Component { color: isNightVersion ? 'white' : 'black', cursor: 'pointer', }; - const activeNode = ( -
-
{this.props.translate.get(Key.Developers, Deco.Cap)}
-
- -
-
- ); - const popoverContent = {developerSectionMenuItems}; return (
{ {!this._isViewingPortal() && (
- Date: Mon, 27 Aug 2018 12:30:30 +0100 Subject: Move colors to colors module --- packages/react-shared/src/utils/colors.ts | 2 ++ .../ts/components/dropdowns/developers_drop_down.tsx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts index 7d047a50e..5a20eeaa1 100644 --- a/packages/react-shared/src/utils/colors.ts +++ b/packages/react-shared/src/utils/colors.ts @@ -8,6 +8,7 @@ const baseColors = { greyishPink: '#E6E5E5', grey300: '#E0E0E0', beigeWhite: '#E4E4E4', + lightBgGrey: '#EDEDED', grey350: '#cacaca', grey400: '#BDBDBD', lightGrey: '#BBBBBB', @@ -15,6 +16,7 @@ const baseColors = { grey: '#A5A5A5', darkGrey: '#818181', landingLinkGrey: '#919191', + linkSectionGrey: '#999999', grey700: '#616161', grey750: '#515151', grey800: '#424242', diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 3ab8af2b3..68f9a2f67 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -87,7 +87,7 @@ export class DevelopersDropDown extends React.Component ); } @@ -122,7 +122,7 @@ export class DevelopersDropDown extends React.Component +
{title.toUpperCase()}
); -- cgit From cc2000e776b1abf0f545f361c0d0b28b76b6c310 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 11:19:01 +0100 Subject: Use generatic ObjectMap type --- .../ts/components/dropdowns/developers_drop_down.tsx | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 68f9a2f67..c4eae0c31 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -3,20 +3,16 @@ import * as _ from 'lodash'; import * as React from 'react'; import { Link } from 'react-router-dom'; import { DropDown } from 'ts/components/ui/drop_down'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -interface KeyToLinkInfo { - [key: string]: LinkInfo; -} - interface LinkInfo { link: string; shouldOpenNewTab: boolean; } -const gettingStartedKeyToLinkInfo1: KeyToLinkInfo = { +const gettingStartedKeyToLinkInfo1: ObjectMap = { [Key.BuildARelayer]: { link: `${WebsitePaths.Wiki}#Build-A-Relayer`, shouldOpenNewTab: false, @@ -26,7 +22,7 @@ const gettingStartedKeyToLinkInfo1: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const gettingStartedKeyToLinkInfo2: KeyToLinkInfo = { +const gettingStartedKeyToLinkInfo2: ObjectMap = { [Key.TradingTutorial]: { link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, shouldOpenNewTab: false, @@ -36,7 +32,7 @@ const gettingStartedKeyToLinkInfo2: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const popularDocsToLinkInfos: KeyToLinkInfo = { +const popularDocsToLinkInfos: ObjectMap = { [Key.ZeroExJs]: { link: WebsitePaths.ZeroExJs, shouldOpenNewTab: false, @@ -50,7 +46,7 @@ const popularDocsToLinkInfos: KeyToLinkInfo = { shouldOpenNewTab: false, }, }; -const usefulLinksToLinkInfo: KeyToLinkInfo = { +const usefulLinksToLinkInfo: ObjectMap = { [Key.Github]: { link: constants.URL_GITHUB_ORG, shouldOpenNewTab: true, @@ -76,6 +72,9 @@ interface DevelopersDropDownState {} export class DevelopersDropDown extends React.Component { public render(): React.ReactNode { const activeNode = ( +
{this.props.translate.get(Key.Developers, Deco.Cap)}
@@ -158,7 +157,7 @@ export class DevelopersDropDown extends React.Component ); } - private _renderLinkSection(keyToLinkInfo: KeyToLinkInfo): React.ReactNode { + private _renderLinkSection(keyToLinkInfo: ObjectMap): React.ReactNode { const linkStyle: React.CSSProperties = { color: colors.lightBlueA700, fontFamily: 'Roboto, Roboto Mono', -- cgit From 2997ba208fbbbcc70785b0a759753851de3e2ca5 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 11:19:12 +0100 Subject: Use translation helper --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index c4eae0c31..c2daec475 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -135,7 +135,7 @@ export class DevelopersDropDown extends React.Component - VIEW ALL DOCUMENTATION + {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)}
-- cgit From 9fd46c790097a64c29df816abf83a05cb6acccee Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 15:52:41 +0100 Subject: Update to latest react-shared --- packages/website/package.json | 2 +- .../components/dropdowns/developers_drop_down.tsx | 3 - yarn.lock | 106 +-------------------- 3 files changed, 5 insertions(+), 106 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index 9b6a0ba36..0a223bcb2 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -21,7 +21,7 @@ "@0xproject/contract-wrappers": "^0.0.5", "@0xproject/order-utils": "^0.0.9", "@0xproject/react-docs": "^1.0.7", - "@0xproject/react-shared": "^0.2.3", + "@0xproject/react-shared": "^1.0.8", "@0xproject/subproviders": "^2.0.1", "@0xproject/types": "^0.8.1", "@0xproject/typescript-typings": "^0.4.3", diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index c2daec475..97e9d1989 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -72,9 +72,6 @@ interface DevelopersDropDownState {} export class DevelopersDropDown extends React.Component { public render(): React.ReactNode { const activeNode = ( -
{this.props.translate.get(Key.Developers, Deco.Cap)}
diff --git a/yarn.lock b/yarn.lock index bc67345ca..ef39aebf1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -704,27 +704,6 @@ ethers "3.0.22" lodash "4.17.10" -"@0xproject/react-shared@^0.2.3": - version "0.2.3" - resolved "https://registry.yarnpkg.com/@0xproject/react-shared/-/react-shared-0.2.3.tgz#f0403b9b7f1cfbe2853b53cc983ebb13ee8753a5" - dependencies: - "@types/lodash" "4.14.104" - "@types/material-ui" "0.18.0" - "@types/node" "9.6.0" - "@types/react" "16.3.13" - "@types/react-dom" "16.0.4" - "@types/react-scroll" "0.0.31" - basscss "8.0.4" - is-mobile "0.2.2" - lodash "4.17.10" - material-ui "0.17.4" - react "15.6.1" - react-dom "15.6.1" - react-highlight "0xproject/react-highlight" - react-markdown "3.2.2" - react-scroll "1.7.7" - react-tap-event-plugin "2.0.1" - "@0xproject/sol-compiler@^0.5.3", "@0xproject/sol-compiler@^0.5.4": version "0.5.4" resolved "https://registry.yarnpkg.com/@0xproject/sol-compiler/-/sol-compiler-0.5.4.tgz#3e0b04b0c02c5ec046ebb962b5ed20978c6b4cdd" @@ -1158,13 +1137,6 @@ "@types/node" "*" "@types/react" "*" -"@types/react-dom@16.0.4": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.4.tgz#2e8fd45f5443780ed49bf2cdd9809e6091177a7d" - dependencies: - "@types/node" "*" - "@types/react" "*" - "@types/react-dom@^16.0.3": version "16.0.5" resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.5.tgz#a757457662e3819409229e8f86795ff37b371f96" @@ -1200,12 +1172,6 @@ "@types/history" "*" "@types/react" "*" -"@types/react-scroll@0.0.31": - version "0.0.31" - resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-0.0.31.tgz#1bb26bfd9f595da6403c2f13c2f9a3ed4d2929fa" - dependencies: - "@types/react" "*" - "@types/react-scroll@1.5.3": version "1.5.3" resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-1.5.3.tgz#cc4e94db3d7d5b1cd244bfee24091c335d3e2598" @@ -2539,7 +2505,7 @@ basscss-typography@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/basscss-typography/-/basscss-typography-3.0.4.tgz#ec946a2bad8dd1af97be9ea108ad4bb7be932464" -basscss@8.0.4, basscss@^8.0.3: +basscss@^8.0.3: version "8.0.4" resolved "https://registry.yarnpkg.com/basscss/-/basscss-8.0.4.tgz#b371a2ce25aeb9b322302f37f4e425753dd29ae1" dependencies: @@ -7438,7 +7404,7 @@ is-lower-case@^1.1.0: dependencies: lower-case "^1.1.0" -is-mobile@0.2.2, is-mobile@^0.2.2: +is-mobile@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-0.2.2.tgz#0e2e006d99ed2c2155b761df80f2a3619ae2ad9f" @@ -8759,7 +8725,7 @@ marked@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66" -material-ui@0.17.4, material-ui@^0.17.1: +material-ui@^0.17.1: version "0.17.4" resolved "https://registry.yarnpkg.com/material-ui/-/material-ui-0.17.4.tgz#193999ecb49c3ec15ae0abb4e90fdf9a7bd343e0" dependencies: @@ -10110,17 +10076,6 @@ parse-asn1@^5.0.0: evp_bytestokey "^1.0.0" pbkdf2 "^3.0.3" -parse-entities@^1.0.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.2.tgz#9eaf719b29dc3bd62246b4332009072e01527777" - dependencies: - character-entities "^1.0.0" - character-entities-legacy "^1.0.0" - character-reference-invalid "^1.0.0" - is-alphanumerical "^1.0.0" - is-decimal "^1.0.0" - is-hexadecimal "^1.0.0" - parse-entities@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.1.tgz#8112d88471319f27abae4d64964b122fe4e1b890" @@ -11280,16 +11235,6 @@ react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" -react-markdown@3.2.2: - version "3.2.2" - resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.2.2.tgz#439774c14f25eb25d1b96c126f28ca1486fb0a24" - dependencies: - prop-types "^15.6.0" - remark-parse "^4.0.0" - unified "^6.1.5" - unist-util-visit "^1.1.3" - xtend "^4.0.1" - react-markdown@^3.2.2: version "3.3.0" resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e" @@ -11352,13 +11297,6 @@ react-scroll@0xproject/react-scroll#similar-to-pr-330: lodash.throttle "^4.1.1" prop-types "^15.5.8" -react-scroll@1.7.7: - version "1.7.7" - resolved "https://registry.yarnpkg.com/react-scroll/-/react-scroll-1.7.7.tgz#948c40c9a189b62bf4a53ee0fd50e5d89d37260a" - dependencies: - lodash.throttle "^4.1.1" - prop-types "^15.5.8" - react-side-effect@^1.0.2, react-side-effect@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d" @@ -11373,7 +11311,7 @@ react-tabs@^2.0.0: classnames "^2.2.0" prop-types "^15.5.0" -react-tap-event-plugin@2.0.1, react-tap-event-plugin@^2.0.1: +react-tap-event-plugin@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/react-tap-event-plugin/-/react-tap-event-plugin-2.0.1.tgz#316beb3bc6556e29ec869a7293e89c826a9074d2" dependencies: @@ -11761,26 +11699,6 @@ regjsparser@^0.1.4: dependencies: jsesc "~0.5.0" -remark-parse@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-4.0.0.tgz#99f1f049afac80382366e2e0d0bd55429dd45d8b" - dependencies: - collapse-white-space "^1.0.2" - is-alphabetical "^1.0.0" - is-decimal "^1.0.0" - is-whitespace-character "^1.0.0" - is-word-character "^1.0.0" - markdown-escapes "^1.0.0" - parse-entities "^1.0.2" - repeat-string "^1.5.4" - state-toggle "^1.0.0" - trim "0.0.1" - trim-trailing-lines "^1.0.0" - unherit "^1.0.4" - unist-util-remove-position "^1.0.0" - vfile-location "^2.0.0" - xtend "^4.0.1" - remark-parse@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-5.0.0.tgz#4c077f9e499044d1d5c13f80d7a98cf7b9285d95" @@ -14128,10 +14046,6 @@ unist-util-is@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.1.tgz#0c312629e3f960c66e931e812d3d80e77010947b" -unist-util-is@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.2.tgz#1193fa8f2bfbbb82150633f3a8d2eb9a1c1d55db" - unist-util-remove-position@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz#5a85c1555fc1ba0c101b86707d15e50fa4c871bb" @@ -14142,24 +14056,12 @@ unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz#3ccbdc53679eed6ecf3777dd7f5e3229c1b6aa3c" -unist-util-visit-parents@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-2.0.1.tgz#63fffc8929027bee04bfef7d2cce474f71cb6217" - dependencies: - unist-util-is "^2.1.2" - unist-util-visit@^1.1.0, unist-util-visit@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.0.tgz#41ca7c82981fd1ce6c762aac397fc24e35711444" dependencies: unist-util-is "^2.1.1" -unist-util-visit@^1.1.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.4.0.tgz#1cb763647186dc26f5e1df5db6bd1e48b3cc2fb1" - dependencies: - unist-util-visit-parents "^2.0.0" - universalify@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7" -- cgit From ca0567ad0911657b0241844cd2f34d78b697de8c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 16:03:18 +0100 Subject: Begin implementing doc home page --- packages/website/public/images/docs_logo.svg | 24 +++++ packages/website/translations/chinese.json | 3 +- packages/website/translations/english.json | 3 +- packages/website/translations/korean.json | 3 +- packages/website/translations/russian.json | 3 +- packages/website/translations/spanish.json | 3 +- .../documentation/docs_content_top_bar.tsx | 110 +++++++++++++++++++++ .../ts/components/documentation/docs_logo.tsx | 13 +++ packages/website/ts/containers/docs_home.ts | 15 +++ packages/website/ts/index.tsx | 2 + packages/website/ts/pages/documentation/home.tsx | 55 +++++++++++ packages/website/ts/types.ts | 1 + packages/website/ts/utils/constants.ts | 1 + 13 files changed, 231 insertions(+), 5 deletions(-) create mode 100644 packages/website/public/images/docs_logo.svg create mode 100644 packages/website/ts/components/documentation/docs_content_top_bar.tsx create mode 100644 packages/website/ts/components/documentation/docs_logo.tsx create mode 100644 packages/website/ts/containers/docs_home.ts create mode 100644 packages/website/ts/pages/documentation/home.tsx diff --git a/packages/website/public/images/docs_logo.svg b/packages/website/public/images/docs_logo.svg new file mode 100644 index 000000000..e3c4b628b --- /dev/null +++ b/packages/website/public/images/docs_logo.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 93e740a14..7c3872cee 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -85,5 +85,6 @@ "TRADING_TUTORIAL": "trading tutorial", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", - "GITHUB": "github" + "GITHUB": "github", + "LIVE_CHAT": "live chat" } diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index a75b73501..52e4eeb50 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -87,5 +87,6 @@ "TRADING_TUTORIAL": "trading tutorial", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", - "GITHUB": "github" + "GITHUB": "github", + "LIVE_CHAT": "live chat" } diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index e6fbcb4cc..81fbea6e3 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -85,5 +85,6 @@ "TRADING_TUTORIAL": "trading tutorial", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", - "GITHUB": "github" + "GITHUB": "github", + "LIVE_CHAT": "live chat" } diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 779bc8173..4cc7aab91 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -85,5 +85,6 @@ "TRADING_TUTORIAL": "trading tutorial", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", - "GITHUB": "github" + "GITHUB": "github", + "LIVE_CHAT": "live chat" } diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 54a463f98..f906de984 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -86,5 +86,6 @@ "TRADING_TUTORIAL": "trading tutorial", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", - "GITHUB": "github" + "GITHUB": "github", + "LIVE_CHAT": "live chat" } diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx new file mode 100644 index 000000000..c9bdca61b --- /dev/null +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -0,0 +1,110 @@ +import { colors, Styles } from '@0xproject/react-shared'; +import * as _ from 'lodash'; +import Drawer from 'material-ui/Drawer'; +import * as React from 'react'; +import { Link } from 'react-router-dom'; +import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; +import { Container } from 'ts/components/ui/container'; +import { Deco, Key, WebsitePaths } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +export interface DocsContentTopBarProps { + location: Location; + translate: Translate; +} + +interface DocsContentTopBarState { + isDrawerOpen: boolean; +} + +const styles: Styles = { + menuItem: { + fontSize: 14, + color: colors.darkestGrey, + paddingTop: 6, + paddingBottom: 6, + cursor: 'pointer', + fontWeight: 400, + }, +}; + +export class DocsContentTopBar extends React.Component { + constructor(props: DocsContentTopBarProps) { + super(props); + this.state = { + isDrawerOpen: false, + }; + } + public componentWillReceiveProps(nextProps: DocsContentTopBarProps): void { + if (nextProps.location.pathname !== this.props.location.pathname) { + this.setState({ + isDrawerOpen: false, + }); + } + } + public render(): React.ReactNode { + const menuIconStyle = { + fontSize: 25, + color: 'black', + cursor: 'pointer', + }; + return ( +
+ +
+ 0xproject.com +
+
+
+ + + +
+
+
+
+ +
+
+
+ {this._renderDrawer()} +
+ ); + } + private _renderDrawer(): React.ReactNode { + return ( + +
TODO
+
+ ); + } + private _onMenuButtonClick(): void { + this.setState({ + isDrawerOpen: !this.state.isDrawerOpen, + }); + } +} diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx new file mode 100644 index 000000000..b65a27fd9 --- /dev/null +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -0,0 +1,13 @@ +import * as React from 'react'; +import { Link } from 'react-router-dom'; +import { WebsitePaths } from 'ts/types'; + +export const DocsLogo = () => { + return ( +
+ + + +
+ ); +}; diff --git a/packages/website/ts/containers/docs_home.ts b/packages/website/ts/containers/docs_home.ts new file mode 100644 index 000000000..79bf68618 --- /dev/null +++ b/packages/website/ts/containers/docs_home.ts @@ -0,0 +1,15 @@ +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Home as HomeComponent, HomeProps } from 'ts/pages/documentation/home'; +import { State } from 'ts/redux/reducer'; +import { Translate } from 'ts/utils/translate'; + +interface ConnectedState { + translate: Translate; +} + +const mapStateToProps = (state: State, _ownProps: HomeProps): ConnectedState => ({ + translate: state.translate, +}); + +export const DocsHome: React.ComponentClass = connect(mapStateToProps, undefined)(HomeComponent); diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 981c6f2cb..8ed40e69a 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -6,6 +6,7 @@ import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-d import * as injectTapEventPlugin from 'react-tap-event-plugin'; import { MetaTags } from 'ts/components/meta_tags'; import { About } from 'ts/containers/about'; +import { DocsHome } from 'ts/containers/docs_home'; import { FAQ } from 'ts/containers/faq'; import { Jobs } from 'ts/containers/jobs'; import { Landing } from 'ts/containers/landing'; @@ -91,6 +92,7 @@ render( + { + public render(): React.ReactNode { + return ( +
+ +
+
+ +
+
+ +
+
+
+ ); + } +} diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 2c94fe910..c208ce90f 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -475,6 +475,7 @@ export enum Key { ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION', Sandbox = 'SANDBOX', Github = 'GITHUB', + LiveChat = 'LIVE_CHAT', } export enum SmartContractDocSections { diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index 2b4aa5209..24d4101f4 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -73,6 +73,7 @@ export const constants = { URL_TESTNET_FAUCET: 'https://faucet.0xproject.com', URL_GITHUB_ORG: 'https://github.com/0xProject', URL_GITHUB_WIKI: 'https://github.com/0xProject/wiki', + URL_FORUM: 'https://forum.0xproject.com', URL_METAMASK_CHROME_STORE: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn', URL_METAMASK_FIREFOX_STORE: 'https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/', URL_TOSHI_IOS_APP_STORE: 'https://itunes.apple.com/us/app/toshi-ethereum-wallet/id1278383455?mt=8', -- cgit From ee1e50a7225882bb0c97408100c85a199611fadb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 16:03:27 +0100 Subject: Swap out link --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 68f9a2f67..bf89775f7 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -128,7 +128,7 @@ export class DevelopersDropDown extends React.Component Date: Tue, 28 Aug 2018 17:13:29 +0100 Subject: Fix prettier --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 97e9d1989..7debd26a7 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -124,7 +124,7 @@ export class DevelopersDropDown extends React.Component Date: Tue, 28 Aug 2018 17:18:40 +0100 Subject: Implement dev topbar --- .../website/public/images/developers/chat_icon.svg | 5 ++ .../public/images/developers/forum_icon.svg | 5 ++ .../public/images/developers/github_icon.svg | 4 + .../documentation/docs_content_top_bar.tsx | 98 ++++++++++++++++------ .../ts/components/documentation/docs_logo.tsx | 2 +- 5 files changed, 87 insertions(+), 27 deletions(-) create mode 100644 packages/website/public/images/developers/chat_icon.svg create mode 100644 packages/website/public/images/developers/forum_icon.svg create mode 100644 packages/website/public/images/developers/github_icon.svg diff --git a/packages/website/public/images/developers/chat_icon.svg b/packages/website/public/images/developers/chat_icon.svg new file mode 100644 index 000000000..c48881454 --- /dev/null +++ b/packages/website/public/images/developers/chat_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/website/public/images/developers/forum_icon.svg b/packages/website/public/images/developers/forum_icon.svg new file mode 100644 index 000000000..8fb659475 --- /dev/null +++ b/packages/website/public/images/developers/forum_icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/website/public/images/developers/github_icon.svg b/packages/website/public/images/developers/github_icon.svg new file mode 100644 index 000000000..bf10cb221 --- /dev/null +++ b/packages/website/public/images/developers/github_icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index c9bdca61b..c2bbfc417 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -3,9 +3,8 @@ import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { Link } from 'react-router-dom'; -import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; import { Container } from 'ts/components/ui/container'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -29,6 +28,13 @@ const styles: Styles = { }, }; +interface MenuItemInfo { + title: string; + url: string; + iconUrl: string; + textStyle: React.CSSProperties; +} + export class DocsContentTopBar extends React.Component { constructor(props: DocsContentTopBarProps) { super(props); @@ -49,35 +55,44 @@ export class DocsContentTopBar extends React.Component - +
+
- 0xproject.com + + +
+ 0xproject.com +
+
- - - + {this._renderMenuItems(menuItemInfos)}
@@ -86,10 +101,41 @@ export class DocsContentTopBar extends React.Component
+
{this._renderDrawer()}
); } + private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { + const menuItems = _.map(menuItemInfos, menuItemInfo => { + return ( + +
+ +
+ {menuItemInfo.title} +
+
+
+ ); + }); + return menuItems; + } private _renderDrawer(): React.ReactNode { return ( { return (
- +
); -- cgit From 60ef45722cd20fe243f58f5eaf8717081cbc39f1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 28 Aug 2018 17:18:48 +0100 Subject: Remove temporary borders --- packages/website/ts/pages/documentation/home.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index eabad4def..003212279 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -31,7 +31,6 @@ export class Home extends React.Component { paddingRight: 22, backgroundColor: '#f5f5f5', height: '100vh', - border: '1px black dotted', }} > @@ -43,7 +42,6 @@ export class Home extends React.Component { paddingRight: 50, backgroundColor: '#ffffff', height: '100vh', - border: '1px black dotted', }} > -- cgit From e6511c9c053e1c0e1aeefc64861b5c2918c176cc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 29 Aug 2018 17:45:51 +0100 Subject: Fix linter --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 7debd26a7..42a81ee88 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -124,7 +124,7 @@ export class DevelopersDropDown extends React.Component Date: Mon, 17 Sep 2018 15:09:31 +0100 Subject: Use Container instead of div --- .../ts/components/dropdowns/developers_drop_down.tsx | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 42a81ee88..d66e75722 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -2,7 +2,9 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Link } from 'react-router-dom'; +import { Container } from 'ts/components/ui/container'; import { DropDown } from 'ts/components/ui/drop_down'; +import { Text } from 'ts/components/ui/text'; import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -72,9 +74,11 @@ interface DevelopersDropDownState {} export class DevelopersDropDown extends React.Component { public render(): React.ReactNode { const activeNode = ( -
-
{this.props.translate.get(Key.Developers, Deco.Cap)}
-
+ + + {this.props.translate.get(Key.Developers, Deco.Cap)} + + ); return ( -
+ {this._renderTitle('Getting started')}
{this._renderLinkSection(gettingStartedKeyToLinkInfo1)}
{this._renderLinkSection(gettingStartedKeyToLinkInfo2)}
-
+
Date: Mon, 17 Sep 2018 16:55:22 +0100 Subject: Implement new responsive, dev section header and home scaffolding --- .../documentation/docs_content_top_bar.tsx | 47 +++++++------ .../ts/components/documentation/docs_logo.tsx | 15 ++++- packages/website/ts/components/ui/container.tsx | 1 + packages/website/ts/containers/docs_home.ts | 15 ++++- packages/website/ts/pages/documentation/home.tsx | 78 +++++++++++++++------- 5 files changed, 103 insertions(+), 53 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index c2bbfc417..148f2f7cb 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -3,6 +3,7 @@ import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { Link } from 'react-router-dom'; +import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; @@ -17,17 +18,6 @@ interface DocsContentTopBarState { isDrawerOpen: boolean; } -const styles: Styles = { - menuItem: { - fontSize: 14, - color: colors.darkestGrey, - paddingTop: 6, - paddingBottom: 6, - cursor: 'pointer', - fontWeight: 400, - }, -}; - interface MenuItemInfo { title: string; url: string; @@ -50,11 +40,6 @@ export class DocsContentTopBar extends React.Component - -
+ + +
-
+
+
{this._renderMenuItems(menuItemInfos)}
-
-
- +
+ +
+
+
+
@@ -110,7 +109,7 @@ export class DocsContentTopBar extends React.Component {this._renderDrawer()} -
+ ); } private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 2a539c84b..9daf84ad0 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -2,12 +2,21 @@ import * as React from 'react'; import { Link } from 'react-router-dom'; import { WebsitePaths } from 'ts/types'; -export const DocsLogo = () => { +export interface DocsLogoProps { + height: number; + containerStyle?: React.CSSProperties; +} + +export const DocsLogo: React.StatelessComponent = props => { return ( -
+
- +
); }; + +DocsLogo.defaultProps = { + containerStyle: {}, +}; diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx index f2ae68b70..1e0bfd959 100644 --- a/packages/website/ts/components/ui/container.tsx +++ b/packages/website/ts/components/ui/container.tsx @@ -15,6 +15,7 @@ export interface ContainerProps { paddingRight?: StringOrNum; paddingLeft?: StringOrNum; backgroundColor?: string; + background?: string; borderRadius?: StringOrNum; maxWidth?: StringOrNum; maxHeight?: StringOrNum; diff --git a/packages/website/ts/containers/docs_home.ts b/packages/website/ts/containers/docs_home.ts index 79bf68618..9c7b70a6f 100644 --- a/packages/website/ts/containers/docs_home.ts +++ b/packages/website/ts/containers/docs_home.ts @@ -1,15 +1,28 @@ import * as React from 'react'; import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; import { Home as HomeComponent, HomeProps } from 'ts/pages/documentation/home'; +import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; +import { ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; interface ConnectedState { translate: Translate; + screenWidth: ScreenWidths; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; } const mapStateToProps = (state: State, _ownProps: HomeProps): ConnectedState => ({ translate: state.translate, + screenWidth: state.screenWidth, +}); + +const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), }); -export const DocsHome: React.ComponentClass = connect(mapStateToProps, undefined)(HomeComponent); +export const DocsHome: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)(HomeComponent); diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 003212279..a065efc80 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -1,53 +1,81 @@ +import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_bar'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; +import { Container } from 'ts/components/ui/container'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; +import { utils } from 'ts/utils/utils'; + +const THROTTLE_TIMEOUT = 100; export interface HomeProps { location: Location; translate: Translate; + screenWidth: ScreenWidths; + dispatcher: Dispatcher; } export interface HomeState {} export class Home extends React.Component { + private readonly _throttledScreenWidthUpdate: () => void; + constructor(props: HomeProps) { + super(props); + this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); + } + public componentDidMount(): void { + window.addEventListener('resize', this._throttledScreenWidthUpdate); + window.scrollTo(0, 0); + } + public componentWillUnmount(): void { + window.removeEventListener('resize', this._throttledScreenWidthUpdate); + } public render(): React.ReactNode { + const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; + const mainContentPadding = isSmallScreen ? 0 : 50; return ( -
-
- -
-
+ + -
+
+

Start building on 0x

+
+
-
+ ); } + private _updateScreenWidth(): void { + const newScreenWidth = utils.getScreenWidth(); + this.props.dispatcher.updateScreenWidth(newScreenWidth); + } } -- cgit From 3504e875ccd201f623fa8f54f359b67b29b13d6f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 26 Sep 2018 13:35:41 +0100 Subject: Move /docs endpoint before longer ones so doesn't overtake other doc endpoints --- packages/website/ts/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 8ed40e69a..e81b1bf07 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -92,7 +92,6 @@ render( - + {/* Legacy endpoints */} Date: Wed, 26 Sep 2018 13:37:25 +0100 Subject: Create a link ui component that abstracts away interval vs. internal links --- packages/website/ts/components/ui/link.tsx | 42 ++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 packages/website/ts/components/ui/link.tsx diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx new file mode 100644 index 000000000..252199457 --- /dev/null +++ b/packages/website/ts/components/ui/link.tsx @@ -0,0 +1,42 @@ +import * as React from 'react'; +import { Link as ReactRounterLink } from 'react-router-dom'; + +export interface LinkProps { + to: string; + isExternal?: boolean; + shouldOpenInNewTab?: boolean; + style?: React.CSSProperties; + className?: string; +} + +export const Link: React.StatelessComponent = ({ + style, + className, + isExternal, + to, + shouldOpenInNewTab, + children, +}) => { + if (isExternal) { + return ( + + {children} + + ); + } else { + return ( + + {children} + + ); + } +}; + +Link.defaultProps = { + isExternal: false, + shouldOpenInNewTab: false, + style: {}, + className: '', +}; + +Link.displayName = 'Link'; -- cgit From ac1005b5a81136fa61834fc4b117ad64e3757238 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 26 Sep 2018 13:37:46 +0100 Subject: Use new link component in Developer dropdown --- .../components/dropdowns/developers_drop_down.tsx | 35 +++++++++------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 7a0aea182..bfd7287de 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -1,63 +1,56 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link } from 'react-router-dom'; import { DropDown } from 'ts/components/ui/drop_down'; +import { Link } from 'ts/components/ui/link'; import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; interface LinkInfo { link: string; - shouldOpenNewTab: boolean; + shouldOpenInNewTab?: boolean; } const gettingStartedKeyToLinkInfo1: ObjectMap = { [Key.BuildARelayer]: { link: `${WebsitePaths.Wiki}#Build-A-Relayer`, - shouldOpenNewTab: false, }, [Key.IntroTutorial]: { link: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, - shouldOpenNewTab: false, }, }; const gettingStartedKeyToLinkInfo2: ObjectMap = { [Key.TradingTutorial]: { link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, - shouldOpenNewTab: false, }, [Key.EthereumDevelopment]: { link: `${WebsitePaths.Wiki}#Ethereum-Development`, - shouldOpenNewTab: false, }, }; const popularDocsToLinkInfos: ObjectMap = { [Key.ZeroExJs]: { link: WebsitePaths.ZeroExJs, - shouldOpenNewTab: false, }, [Key.Connect]: { link: WebsitePaths.Connect, - shouldOpenNewTab: false, }, [Key.SmartContract]: { link: WebsitePaths.SmartContracts, - shouldOpenNewTab: false, }, }; const usefulLinksToLinkInfo: ObjectMap = { [Key.Github]: { link: constants.URL_GITHUB_ORG, - shouldOpenNewTab: true, + shouldOpenInNewTab: true, }, [Key.Whitepaper]: { link: WebsitePaths.Whitepaper, - shouldOpenNewTab: true, + shouldOpenInNewTab: true, }, [Key.Sandbox]: { link: constants.URL_SANDBOX, - shouldOpenNewTab: true, + shouldOpenInNewTab: true, }, }; @@ -167,15 +160,15 @@ export class DevelopersDropDown extends React.Component - {linkInfo.shouldOpenNewTab ? ( - - {linkText} - - ) : ( - - {linkText} - - )} + + {linkText} +
); }); -- cgit From a8d8f90d23660d8b214554b442f81f5ff55aef59 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 26 Sep 2018 13:37:58 +0100 Subject: Fix logo to link to docs home --- packages/website/ts/components/documentation/docs_logo.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 9daf84ad0..570a81bca 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -10,7 +10,7 @@ export interface DocsLogoProps { export const DocsLogo: React.StatelessComponent = props => { return (
- +
-- cgit From d8c68b000b977ce940eb95c234f0ecb435c697d6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 26 Sep 2018 13:38:22 +0100 Subject: Implement dev home --- packages/react-shared/src/utils/colors.ts | 3 +- .../developers/tutorials/0x_order_basics.svg | 1 + .../developers/tutorials/build_a_relayer.svg | 3 + .../developers/tutorials/build_a_trading_bot.svg | 6 + .../developers/tutorials/develop_on_ethereum.svg | 4 + .../developers/tutorials/use_shared_liquidity.svg | 3 + packages/website/translations/chinese.json | 4 +- packages/website/translations/english.json | 4 +- packages/website/translations/korean.json | 4 +- packages/website/translations/russian.json | 4 +- packages/website/translations/spanish.json | 4 +- .../documentation/docs_content_top_bar.tsx | 10 +- .../components/documentation/tutorial_button.tsx | 73 +++++ packages/website/ts/pages/documentation/home.tsx | 356 ++++++++++++++++++++- packages/website/ts/types.ts | 9 + 15 files changed, 473 insertions(+), 15 deletions(-) create mode 100644 packages/website/public/images/developers/tutorials/0x_order_basics.svg create mode 100644 packages/website/public/images/developers/tutorials/build_a_relayer.svg create mode 100644 packages/website/public/images/developers/tutorials/build_a_trading_bot.svg create mode 100644 packages/website/public/images/developers/tutorials/develop_on_ethereum.svg create mode 100644 packages/website/public/images/developers/tutorials/use_shared_liquidity.svg create mode 100644 packages/website/ts/components/documentation/tutorial_button.tsx diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts index 5a20eeaa1..778a5bc20 100644 --- a/packages/react-shared/src/utils/colors.ts +++ b/packages/react-shared/src/utils/colors.ts @@ -26,8 +26,9 @@ const baseColors = { darkestGrey: '#272727', lightBlue: '#60A4F4', lightBlueA700: '#0091EA', - linkBlue: '#1D5CDE', + lightLinkBlue: '#3289F1', mediumBlue: '#488AEA', + linkBlue: '#1D5CDE', darkBlue: '#4D5481', lightTurquois: '#aefcdc', turquois: '#058789', diff --git a/packages/website/public/images/developers/tutorials/0x_order_basics.svg b/packages/website/public/images/developers/tutorials/0x_order_basics.svg new file mode 100644 index 000000000..57b04dfa5 --- /dev/null +++ b/packages/website/public/images/developers/tutorials/0x_order_basics.svg @@ -0,0 +1 @@ +Artboard 1 \ No newline at end of file diff --git a/packages/website/public/images/developers/tutorials/build_a_relayer.svg b/packages/website/public/images/developers/tutorials/build_a_relayer.svg new file mode 100644 index 000000000..afda40d88 --- /dev/null +++ b/packages/website/public/images/developers/tutorials/build_a_relayer.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg b/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg new file mode 100644 index 000000000..960616bfe --- /dev/null +++ b/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg b/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg new file mode 100644 index 000000000..e2c492ecd --- /dev/null +++ b/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg b/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg new file mode 100644 index 000000000..c402964aa --- /dev/null +++ b/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 7c3872cee..11b31b20b 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -86,5 +86,7 @@ "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", - "LIVE_CHAT": "live chat" + "LIVE_CHAT": "live chat", + "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "MORE": "more" } diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 52e4eeb50..e9bc53aa7 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -88,5 +88,7 @@ "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", - "LIVE_CHAT": "live chat" + "LIVE_CHAT": "live chat", + "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "MORE": "more" } diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 81fbea6e3..934f28eb6 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -86,5 +86,7 @@ "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", - "LIVE_CHAT": "live chat" + "LIVE_CHAT": "live chat", + "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "MORE": "more" } diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 4cc7aab91..6ee1eb1d7 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -86,5 +86,7 @@ "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", - "LIVE_CHAT": "live chat" + "LIVE_CHAT": "live chat", + "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "MORE": "more" } diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index f906de984..036cd3500 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -87,5 +87,7 @@ "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", - "LIVE_CHAT": "live chat" + "LIVE_CHAT": "live chat", + "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "MORE": "more" } diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index 148f2f7cb..dede6f636 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,11 +1,11 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; -import { Link } from 'react-router-dom'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; -import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; +import { Link } from 'ts/components/ui/link'; +import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -57,11 +57,11 @@ export class DocsContentTopBar extends React.Component +
{ + constructor(props: TutorialButtonProps) { + super(props); + this.state = { + isHovering: false, + }; + } + public render(): React.ReactNode { + return ( + +
+
+ +
+
+ + {this.props.tutorialInfo.title} + + + {this.props.tutorialInfo.description} + +
+
+ +
+
+ + ); + } + private _onHover(_event: React.FormEvent): void { + this.setState({ + isHovering: true, + }); + } + private _onHoverOff(): void { + this.setState({ + isHovering: false, + }); + } +} diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index a065efc80..ab29b7f07 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -4,13 +4,261 @@ import * as React from 'react'; import DocumentTitle = require('react-document-title'); import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_bar'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; +import { TutorialButton } from 'ts/components/documentation/tutorial_button'; import { Container } from 'ts/components/ui/container'; +import { Link } from 'ts/components/ui/link'; +import { Text } from 'ts/components/ui/text'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { ScreenWidths } from 'ts/types'; +import { Deco, Key, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; +interface Package { + name: string; + description: string; + to: string; + isExternal?: boolean; + shouldOpenInNewTab?: boolean; +} + const THROTTLE_TIMEOUT = 100; +const TUTORIALS: TutorialInfo[] = [ + { + title: 'Develop on Ethereum', + iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg', + description: 'Learn more about building applications ontop of the Ethereum blockchain', + location: `${WebsitePaths.Wiki}#Ethereum-Development`, + }, + { + title: 'Build a relayer', + iconUrl: '/images/developers/tutorials/build_a_relayer.svg', + description: 'Learn how to build your own 0x relayer from scratch', + location: `${WebsitePaths.Wiki}#Build-A-Relayer`, + }, + { + title: 'Learn the 0x order basics', + iconUrl: '/images/developers/tutorials/0x_order_basics.svg', + description: 'Tutorial on how to create, validate and fill an order over 0x protocol', + location: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + }, + { + title: 'Tap into shared liquidity', + iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg', + description: 'Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API', + location: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + }, +]; +const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { + '0x Protocol': [ + { + name: '0x.js', + description: + 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as `order-utils` and `contract-wrappers`.', + to: WebsitePaths.ZeroExJs, + }, + { + name: '0x starter project', + description: + 'A Typescript starter project that will walk you through the basics of how to interact with 0x Protocol and trade of an SRA relayer', + to: 'https://github.com/0xProject/0x-starter-project', + isExternal: true, + shouldOpenInNewTab: true, + }, + { + name: '@0xproject/connect', + description: + 'An http & websocket client for interacting with relayers that have implemented the Standard Relayer API', + to: WebsitePaths.Connect, + }, + { + name: '@0xproject/contract-wrappers', + description: + 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in the contracts.', + to: WebsitePaths.ContractWrappers, + }, + { + name: '@0xproject/json-schemas', + description: + 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', + to: WebsitePaths.JSONSchemas, + }, + { + name: '@0xproject/order-utils', + description: + 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.', + to: WebsitePaths.OrderUtils, + }, + { + name: '@0xproject/order-watcher', + description: + "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.", + to: WebsitePaths.OrderWatcher, + }, + { + name: '@0xproject/sra-spec', + description: + 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', + isExternal: true, + shouldOpenInNewTab: true, + }, + ], + Ethereum: [ + { + name: 'abi-gen', + description: + "This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by Geth abigen but takes a different approach. You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.", + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', + isExternal: true, + shouldOpenInNewTab: true, + }, + { + name: 'ethereum-types', + description: + 'A collection of Typescript types that are useful when working on an Ethereum-based project (e.g RawLog, Transaction, TxData, SolidityTypes, etc...).', + to: WebsitePaths.EthereumTypes, + }, + { + name: '@0xproject/sol-compiler', + description: + '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.', + to: WebsitePaths.SolCompiler, + }, + { + name: '@0xproject/sol-cov', + description: + 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', + to: WebsitePaths.SolCov, + }, + { + name: '@0xproject/subproviders', + description: + 'A collection of subproviders to use with `web3-provider-engine` (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', + to: WebsitePaths.Subproviders, + }, + { + name: '@0xproject/web3-wrapper', + description: + 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...', + to: WebsitePaths.Web3Wrapper, + }, + ], + 'Community Maintained': [ + { + name: '0x Event Extractor', + description: + 'NodeJS worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', + to: 'https://github.com/0xTracker/0x-event-extractor', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: '0x Tracker Worker', + description: + 'NodeJS worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', + to: 'https://github.com/0xTracker/0x-tracker-worker', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'Aquaduct', + description: + "ERCdex's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", + to: 'https://www.npmjs.com/package/aqueduct', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'Aquaduct Server SDK', + description: + 'SDKs for automation using Aqueduct & ERC dEX. Aqueduct Server is a lightweight, portable and secure server that runs locally on any workstation. The server exposes a small number of foundational endpoints that enable working with the decentralized Aqueduct liquidity pool from any context or programming language.', + to: 'https://github.com/ERCdEX/aqueduct-server-sdk', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'DDEX Node.js SDK', + description: 'A node.js SDK for trading on the DDEX relayer', + to: 'https://www.npmjs.com/package/ddex-api', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'ERCdex Widget', + description: "The ERC dEX Trade Widget let's any website provide token liquidity to it's users", + to: 'https://github.com/ERCdEX/widget', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'ERCdex Java SDK', + description: "ERCdex's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", + to: 'https://github.com/ERCdEX/java', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'ERCdex Python SDK', + description: "ERCdex's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", + to: 'https://github.com/ERCdEX/python', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'Massive', + description: + 'A set of command-line tools for creating command-line scripts for interacting with the Ethereum blockchain in general, and 0x in particular', + to: 'https://github.com/NoteGio/massive', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'OpenRelay', + description: 'An open-source API-only Relayer written in Go', + to: 'https://github.com/NoteGio/openrelay', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'OpenRelay.js', + description: + 'A JavaScript Library for Interacting with OpenRelay.xyz and other 0x Standard Relayer API Implementations', + to: 'https://github.com/NoteGio/openrelay.js', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'Radar SDK', + description: + 'The Radar Relay SDK is a software development kit that simplifies the interactions with Radar Relay’s APIs', + to: 'https://github.com/RadarRelay/sdk', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'The Ocean Javascript SDK', + description: + 'The Ocean provides a simple REST API, WebSockets API, and JavaScript library to help you integrate decentralized trading into your existing trading strategy.', + to: 'https://github.com/TheOceanTrade/theoceanx-javascript', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'Tokenlon Javascript SDK', + description: "Tokenlon SDK provides APIs for developers to trade of imToken's relayer", + to: 'https://www.npmjs.com/package/tokenlon-sdk', + shouldOpenInNewTab: true, + isExternal: true, + }, + { + name: 'AssetData decoder library in Java', + description: 'A small library that implements the 0x order assetData encoding/decoding in Java', + to: 'https://github.com/wildnothing/asset-data-decoder', + shouldOpenInNewTab: true, + isExternal: true, + }, + ], +}; export interface HomeProps { location: Location; @@ -54,26 +302,126 @@ export class Home extends React.Component { paddingRight={22} paddingTop={2} backgroundColor={colors.grey100} - height="100vh" >
-

Start building on 0x

+ {this._renderSectionTitle('Start building on 0x')} + + {this._renderSectionDescription( + 'Follow one of our "Getting started" guides to learn more about building ontop of 0x.', + )} + + {_.map(TUTORIALS, tutorialInfo => ( + + ))} + + +
+
+ {this._renderSectionTitle(this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords))} + + {this._renderSectionDescription( + 'A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum', + )} + + {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => + this._renderPackageCategory(category, pkgs), + )} + +
); } + private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { + return ( +
+ {category} +
{_.map(pkgs, pkg => this._renderPackage(pkg))}
+
+ ); + } + private _renderPackage(pkg: Package): React.ReactNode { + return ( +
+
+
+
+ + + {pkg.name} + + +
+
+ + {pkg.description} + +
+
+ +
+
{this.props.translate.get(Key.More, Deco.Cap)}
+ + + +
+ +
+
+
+ ); + } + private _renderSectionTitle(text: string): React.ReactNode { + return ( + + {text} + + ); + } + private _renderSectionDescription(text: string): React.ReactNode { + return ( + + {text} + + ); + } private _updateScreenWidth(): void { const newScreenWidth = utils.getScreenWidth(); this.props.dispatcher.updateScreenWidth(newScreenWidth); diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index c208ce90f..106287178 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -476,6 +476,8 @@ export enum Key { Sandbox = 'SANDBOX', Github = 'GITHUB', LiveChat = 'LIVE_CHAT', + LibrariesAndTools = 'LIBRARIES_AND_TOOLS', + More = 'MORE', } export enum SmartContractDocSections { @@ -622,4 +624,11 @@ export interface InjectedWeb3 { getNetwork(cd: (err: Error, networkId: string) => void): void; }; } + +export interface TutorialInfo { + title: string; + iconUrl: string; + description: string; + location: string; +} // tslint:disable:max-file-line-count -- cgit From f3ad64aa1c2930affbfd074316b5f407580b7523 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 26 Sep 2018 14:52:58 +0100 Subject: Move more text over to translation files --- packages/website/translations/chinese.json | 11 ++++++++--- packages/website/translations/english.json | 11 ++++++++--- packages/website/translations/korean.json | 11 ++++++++--- packages/website/translations/russian.json | 11 ++++++++--- packages/website/translations/spanish.json | 11 ++++++++--- .../ts/components/documentation/tutorial_button.tsx | 9 +++++---- .../ts/components/dropdowns/developers_drop_down.tsx | 12 ++++++------ packages/website/ts/pages/documentation/home.tsx | 19 ++++++++++--------- packages/website/ts/types.ts | 10 +++++++--- 9 files changed, 68 insertions(+), 37 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 11b31b20b..0da27e2c4 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -80,9 +80,14 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "开发人员", "BUILD_A_RELAYER": "build a relayer", - "ETHEREUM_DEVELOPMENT": "ethereum development", - "INTRO_TUTORIAL": "intro tutorial", - "TRADING_TUTORIAL": "trading tutorial", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "DEVELOP_ON_ETHEREUM": "develop on Ethereum", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "ORDER_BASICS": "0x order basics", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "USE_SHARED_LIQUIDITY": "use shared liquidity", + "USE_SHARED_LIQUIDITY_DESCRIPTION": + "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index e9bc53aa7..6cb3dc103 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -82,9 +82,14 @@ "ROCKETCHAT": "rocket.chat", "TRADE_CALL_TO_ACTION": "trade on 0x", "BUILD_A_RELAYER": "build a relayer", - "ETHEREUM_DEVELOPMENT": "ethereum development", - "INTRO_TUTORIAL": "intro tutorial", - "TRADING_TUTORIAL": "trading tutorial", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "DEVELOP_ON_ETHEREUM": "develop on Ethereum", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "ORDER_BASICS": "0x order basics", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "USE_SHARED_LIQUIDITY": "use shared liquidity", + "USE_SHARED_LIQUIDITY_DESCRIPTION": + "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 934f28eb6..19b3fbe81 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -80,9 +80,14 @@ "ROCKETCHAT": "Rocket.chat", "DEVELOPERS": "개발자", "BUILD_A_RELAYER": "build a relayer", - "ETHEREUM_DEVELOPMENT": "ethereum development", - "INTRO_TUTORIAL": "intro tutorial", - "TRADING_TUTORIAL": "trading tutorial", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "DEVELOP_ON_ETHEREUM": "develop on Ethereum", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "ORDER_BASICS": "0x order basics", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "USE_SHARED_LIQUIDITY": "use shared liquidity", + "USE_SHARED_LIQUIDITY_DESCRIPTION": + "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 6ee1eb1d7..038eb72f8 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -80,9 +80,14 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "Для разработчиков", "BUILD_A_RELAYER": "build a relayer", - "ETHEREUM_DEVELOPMENT": "ethereum development", - "INTRO_TUTORIAL": "intro tutorial", - "TRADING_TUTORIAL": "trading tutorial", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "DEVELOP_ON_ETHEREUM": "develop on Ethereum", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "ORDER_BASICS": "0x order basics", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "USE_SHARED_LIQUIDITY": "use shared liquidity", + "USE_SHARED_LIQUIDITY_DESCRIPTION": + "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 036cd3500..42a1dc7d1 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -81,9 +81,14 @@ "HOME": "rocket.chat", "ROCKETCHAT": "desarrolladores", "BUILD_A_RELAYER": "build a relayer", - "ETHEREUM_DEVELOPMENT": "ethereum development", - "INTRO_TUTORIAL": "intro tutorial", - "TRADING_TUTORIAL": "trading tutorial", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "DEVELOP_ON_ETHEREUM": "develop on Ethereum", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "ORDER_BASICS": "0x order basics", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "USE_SHARED_LIQUIDITY": "use shared liquidity", + "USE_SHARED_LIQUIDITY_DESCRIPTION": + "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index b83fd82c2..0cb7d9de5 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -2,11 +2,12 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Link } from 'react-router-dom'; -import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; -import { TutorialInfo } from 'ts/types'; +import { Deco, Key, TutorialInfo } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; export interface TutorialButtonProps { + translate: Translate; tutorialInfo: TutorialInfo; } @@ -44,10 +45,10 @@ export class TutorialButton extends React.Component
- {this.props.tutorialInfo.title} + {this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} - {this.props.tutorialInfo.description} + {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)}
diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index bfd7287de..0af211bc1 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -16,17 +16,17 @@ const gettingStartedKeyToLinkInfo1: ObjectMap = { [Key.BuildARelayer]: { link: `${WebsitePaths.Wiki}#Build-A-Relayer`, }, - [Key.IntroTutorial]: { + [Key.OrderBasics]: { link: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, }, }; const gettingStartedKeyToLinkInfo2: ObjectMap = { - [Key.TradingTutorial]: { - link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, - }, - [Key.EthereumDevelopment]: { + [Key.DevelopOnEthereum]: { link: `${WebsitePaths.Wiki}#Ethereum-Development`, }, + [Key.UseSharedLiquidity]: { + link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + }, }; const popularDocsToLinkInfos: ObjectMap = { [Key.ZeroExJs]: { @@ -157,7 +157,7 @@ export class DevelopersDropDown extends React.Component { i++; const isLast = i === numLinks; - const linkText = this.props.translate.get(key as Key, Deco.CapWords); + const linkText = this.props.translate.get(key as Key, Deco.Cap); return (
{ {_.map(TUTORIALS, tutorialInfo => ( diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 106287178..a1325d9bc 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -469,9 +469,13 @@ export enum Key { RocketChat = 'ROCKETCHAT', TradeCallToAction = 'TRADE_CALL_TO_ACTION', BuildARelayer = 'BUILD_A_RELAYER', - EthereumDevelopment = 'ETHEREUM_DEVELOPMENT', - IntroTutorial = 'INTRO_TUTORIAL', - TradingTutorial = 'TRADING_TUTORIAL', + BuildARelayerDescription = 'BUILD_A_RELAYER_DESCRIPTION', + DevelopOnEthereum = 'DEVELOP_ON_ETHEREUM', + DevelopOnEthereumDescription = 'DEVELOP_ON_ETHEREUM_DESCRIPTION', + OrderBasics = 'ORDER_BASICS', + OrderBasicsDescription = 'ORDER_BASICS_DESCRIPTION', + UseSharedLiquidity = 'USE_SHARED_LIQUIDITY', + UseSharedLiquidityDescription = 'USE_SHARED_LIQUIDITY_DESCRIPTION', ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION', Sandbox = 'SANDBOX', Github = 'GITHUB', -- cgit From e66476889000d78b1d22b07294361d0edc342a40 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 13:32:04 +0100 Subject: Import ObjectMap from types now that it's moved --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 0af211bc1..f03bc6623 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -1,9 +1,10 @@ import { colors } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import * as React from 'react'; import { DropDown } from 'ts/components/ui/drop_down'; import { Link } from 'ts/components/ui/link'; -import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; +import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -- cgit From 10bd255e9d05d8fec5787535953ba656f8263015 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 14:27:12 +0100 Subject: Shorten tutorial descriptions --- packages/website/translations/chinese.json | 5 ++--- packages/website/translations/english.json | 5 ++--- packages/website/translations/korean.json | 5 ++--- packages/website/translations/russian.json | 5 ++--- packages/website/translations/spanish.json | 5 ++--- 5 files changed, 10 insertions(+), 15 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 0da27e2c4..5390b5484 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -80,14 +80,13 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "开发人员", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": - "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index a8b63d6ea..5d999e2d7 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -83,14 +83,13 @@ "ROCKETCHAT": "rocket.chat", "TRADE_CALL_TO_ACTION": "trade on 0x", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": - "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 19b3fbe81..87bad68af 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -80,14 +80,13 @@ "ROCKETCHAT": "Rocket.chat", "DEVELOPERS": "개발자", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": - "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 038eb72f8..8e352c234 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -80,14 +80,13 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "Для разработчиков", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": - "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 42a1dc7d1..10123b88c 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -81,14 +81,13 @@ "HOME": "rocket.chat", "ROCKETCHAT": "desarrolladores", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of the Ethereum blockchain", + "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": - "Learn how to tap into the 0x shared liquidity pool using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", -- cgit From 12cfa6b45063b40e39a2f2e6c169fc2102843a16 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 14:28:06 +0100 Subject: Make sidebar menu item formatting optional so package names (with hyphens) render properly --- .../src/components/nested_sidebar_menu.tsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index c8bddb59a..3c61fb0b1 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -19,6 +19,7 @@ export interface NestedSidebarMenuProps { selectedVersion?: string; versions?: string[]; onVersionSelected?: (semver: string) => void; + shouldReformatMenuItemNames?: boolean; } export interface NestedSidebarMenuState {} @@ -42,16 +43,16 @@ export class NestedSidebarMenu extends React.Component = { shouldDisplaySectionHeaders: true, onMenuItemClick: _.noop.bind(_), + shouldReformatMenuItemNames: true, }; public render(): React.ReactNode { const navigation = _.map(this.props.topLevelMenu, (menuItems: string[], sectionName: string) => { const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); if (this.props.shouldDisplaySectionHeaders) { // tslint:disable-next-line:no-unused-variable - const id = utils.getIdFromName(sectionName); return ( -
-
+
+
{finalSectionName.toUpperCase()}
{this._renderMenuItems(menuItems)} @@ -86,7 +87,9 @@ export class NestedSidebarMenu extends React.Component { - const finalMenuItemName = utils.convertDashesToSpaces(menuItemName); + const finalMenuItemName = this.props.shouldReformatMenuItemNames + ? utils.convertDashesToSpaces(menuItemName) + : menuItemName; const id = utils.getIdFromName(menuItemName); return (
@@ -99,7 +102,13 @@ export class NestedSidebarMenu extends React.Component - {finalMenuItemName} + + {finalMenuItemName} + {this._renderMenuItemSubsections(menuItemName)} -- cgit From 155a4a8f067e36912c3eb6bc279ca58ce90a53c0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 14:28:39 +0100 Subject: Add sidebar menu, proper scrolling and mobile-optimize --- .../documentation/docs_content_top_bar.tsx | 2 +- .../components/documentation/tutorial_button.tsx | 16 +- packages/website/ts/pages/documentation/home.tsx | 276 ++++++++++++++------- 3 files changed, 203 insertions(+), 91 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index dede6f636..1db9e794a 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -61,7 +61,7 @@ export class DocsContentTopBar extends React.Component +
-
+
-
+
{this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} @@ -51,11 +51,13 @@ export class TutorialButton extends React.Component
-
- +
+
+ +
diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index cf2ba0eec..338230358 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -1,7 +1,14 @@ -import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; +import { + colors, + constants, + constants as sharedConstants, + NestedSidebarMenu, + utils as sharedUtils, +} from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); +import { Element as ScrollElement } from 'react-scroll'; import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_bar'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { TutorialButton } from 'ts/components/documentation/tutorial_button'; @@ -22,6 +29,8 @@ interface Package { } const THROTTLE_TIMEOUT = 100; +const TOP_BAR_HEIGHT = 80; +const SCROLLER_WIDTH = 4; const TUTORIALS: TutorialInfo[] = [ { title: Key.DevelopOnEthereum, @@ -48,8 +57,13 @@ const TUTORIALS: TutorialInfo[] = [ location: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, }, ]; +enum Categories { + ZeroExProtocol = '0x Protocol', + Ethereum = 'Ethereum', + CommunityMaintained = 'Community Maintained', +} const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { - '0x Protocol': [ + [Categories.ZeroExProtocol]: [ { name: '0x.js', description: @@ -103,7 +117,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { shouldOpenInNewTab: true, }, ], - Ethereum: [ + [Categories.Ethereum]: [ { name: 'abi-gen', description: @@ -143,7 +157,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: WebsitePaths.Web3Wrapper, }, ], - 'Community Maintained': [ + [Categories.CommunityMaintained]: [ { name: '0x Event Extractor', description: @@ -267,13 +281,20 @@ export interface HomeProps { dispatcher: Dispatcher; } -export interface HomeState {} +export interface HomeState { + isHoveringSidebar: boolean; + isHoveringMainContent: boolean; +} export class Home extends React.Component { private readonly _throttledScreenWidthUpdate: () => void; constructor(props: HomeProps) { super(props); this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); + this.state = { + isHoveringSidebar: false, + isHoveringMainContent: false, + }; } public componentDidMount(): void { window.addEventListener('resize', this._throttledScreenWidthUpdate); @@ -283,8 +304,33 @@ export class Home extends React.Component { window.removeEventListener('resize', this._throttledScreenWidthUpdate); } public render(): React.ReactNode { + const mainContainerStyle: React.CSSProperties = { + position: 'absolute', + top: 80, + left: 0, + bottom: 0, + right: 0, + overflowX: 'hidden', + overflowY: 'scroll', + minHeight: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, + WebkitOverflowScrolling: 'touch', + }; const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; - const mainContentPadding = isSmallScreen ? 0 : 50; + const mainContentPadding = isSmallScreen ? 20 : 50; + const topLevelMenu = { + 'Starter guides': _.map(TUTORIALS, tutorialInfo => + this.props.translate.get(tutorialInfo.title as Key, Deco.Cap), + ), + [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.name), + [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.name), + [Categories.CommunityMaintained]: _.map( + CATEGORY_TO_PACKAGES[Categories.CommunityMaintained], + pkg => pkg.name, + ), + }; + _.each(TUTORIALS, tutorialInfo => { + const id = sharedUtils.getIdFromName(this.props.translate.get(tutorialInfo.title as Key, Deco.Cap)); + }); return ( { } 50%, ${colors.white} 100%)`} > -
+
- + +
+ +
- -
- {this._renderSectionTitle('Start building on 0x')} - - {this._renderSectionDescription( - 'Follow one of our "Getting started" guides to learn more about building ontop of 0x.', - )} - - {_.map(TUTORIALS, tutorialInfo => ( - - ))} + + + +
+
+ {this._renderSectionTitle('Start building on 0x')} + + {this._renderSectionDescription( + 'Follow one of our "Getting started" guides to learn more about building ontop of 0x.', + )} + + {_.map(TUTORIALS, tutorialInfo => ( + + + + ))} + - -
-
- {this._renderSectionTitle(this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords))} - - {this._renderSectionDescription( - 'A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum', +
+
+ {this._renderSectionTitle( + this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords), )} - - {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => - this._renderPackageCategory(category, pkgs), + + {this._renderSectionDescription( + 'A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum', )} + + {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => + this._renderPackageCategory(category, pkgs), + )} + - +
@@ -357,56 +444,59 @@ export class Home extends React.Component { ); } private _renderPackage(pkg: Package): React.ReactNode { + const id = sharedUtils.getIdFromName(pkg.name); return ( -
-
-
-
- - - {pkg.name} + +
+
+
+
+ + + {pkg.name} + + +
+
+ + {pkg.description} - -
-
- - {pkg.description} - -
-
- -
-
{this.props.translate.get(Key.More, Deco.Cap)}
- - - -
- +
+
+ +
+
{this.props.translate.get(Key.More, Deco.Cap)}
+ + + +
+ +
-
+
); } private _renderSectionTitle(text: string): React.ReactNode { @@ -427,4 +517,24 @@ export class Home extends React.Component { const newScreenWidth = utils.getScreenWidth(); this.props.dispatcher.updateScreenWidth(newScreenWidth); } + private _onSidebarHover(_event: React.FormEvent): void { + this.setState({ + isHoveringSidebar: true, + }); + } + private _onSidebarHoverOff(): void { + this.setState({ + isHoveringSidebar: false, + }); + } + private _onMainContentHover(_event: React.FormEvent): void { + this.setState({ + isHoveringMainContent: true, + }); + } + private _onMainContentHoverOff(): void { + this.setState({ + isHoveringMainContent: false, + }); + } } -- cgit From 54f535b37547fe02e5c832fff9c9e82458d76649 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 15:16:17 +0100 Subject: Add back ability to listen for menu click events from the sidebar --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 3c61fb0b1..14b233cd6 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -101,7 +101,11 @@ export class NestedSidebarMenu extends React.Component - + {entityName} @@ -155,4 +160,9 @@ export class NestedSidebarMenu extends React.Component ); } + private _onMenuItemClick(): void { + if (!_.isUndefined(this.props.onMenuItemClick)) { + this.props.onMenuItemClick(); + } + } } -- cgit From 4d23cf85b9834422c1c59d8952cd95fdda888a9f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 28 Sep 2018 15:17:28 +0100 Subject: Add mobile menu to overview page --- .../documentation/docs_content_top_bar.tsx | 20 ++++++++++++++++++-- packages/website/ts/pages/documentation/home.tsx | 6 +++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index 1db9e794a..9b86c7296 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,4 +1,11 @@ -import { colors } from '@0xproject/react-shared'; +import { DocsInfo, DocsMenu } from '@0xproject/react-docs'; +import { + colors, + constants as sharedConstants, + MenuSubsectionsBySection, + NestedSidebarMenu, + Styles, +} from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; @@ -12,6 +19,7 @@ import { Translate } from 'ts/utils/translate'; export interface DocsContentTopBarProps { location: Location; translate: Translate; + menu?: DocsMenu; } interface DocsContentTopBarState { @@ -143,7 +151,15 @@ export class DocsContentTopBar extends React.Component -
TODO
+
+ +
); } diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 338230358..009048838 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -374,7 +374,11 @@ export class Home extends React.Component { backgroundColor={colors.white} > - +
Date: Fri, 28 Sep 2018 15:28:29 +0100 Subject: Fix minor scrolling issue --- packages/website/ts/pages/documentation/home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 009048838..5c537aaa7 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -333,7 +333,7 @@ export class Home extends React.Component { }); return ( Date: Fri, 28 Sep 2018 15:48:16 +0100 Subject: Convert package descriptions to markdown and linkify them --- packages/website/ts/pages/documentation/home.tsx | 27 ++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 5c537aaa7..d257534f9 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -2,12 +2,14 @@ import { colors, constants, constants as sharedConstants, + MarkdownLinkBlock, NestedSidebarMenu, utils as sharedUtils, } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); +import * as ReactMarkdown from 'react-markdown'; import { Element as ScrollElement } from 'react-scroll'; import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_bar'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; @@ -67,7 +69,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '0x.js', description: - 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as `order-utils` and `contract-wrappers`.', + 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as [order-utils](https://0xproject.com/docs/order-utils) and [contract-wrappers](https://0xproject.com/docs/contract-wrappers).', to: WebsitePaths.ZeroExJs, }, { @@ -81,13 +83,13 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '@0xproject/connect', description: - 'An http & websocket client for interacting with relayers that have implemented the Standard Relayer API', + 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)', to: WebsitePaths.Connect, }, { name: '@0xproject/contract-wrappers', description: - 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in the contracts.', + 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.', to: WebsitePaths.ContractWrappers, }, { @@ -135,7 +137,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '@0xproject/sol-compiler', description: - '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.', + 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.', to: WebsitePaths.SolCompiler, }, { @@ -147,7 +149,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '@0xproject/subproviders', description: - 'A collection of subproviders to use with `web3-provider-engine` (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', + 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', to: WebsitePaths.Subproviders, }, { @@ -161,7 +163,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '0x Event Extractor', description: - 'NodeJS worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', + 'Node.js worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', to: 'https://github.com/0xTracker/0x-event-extractor', shouldOpenInNewTab: true, isExternal: true, @@ -169,7 +171,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { { name: '0x Tracker Worker', description: - 'NodeJS worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', + 'Node.js worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', to: 'https://github.com/0xTracker/0x-tracker-worker', shouldOpenInNewTab: true, isExternal: true, @@ -474,10 +476,13 @@ export class Home extends React.Component {
-
- - {pkg.description} - +
+
Date: Fri, 28 Sep 2018 18:44:34 +0100 Subject: Rename website `yarn watch_without_deps` to `yarn dev` --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/package.json b/packages/website/package.json index 6adbbede0..12dc701e4 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -10,7 +10,7 @@ "build": "NODE_ENV=production node --max_old_space_size=8192 ../../node_modules/.bin/webpack", "clean": "shx rm -f public/bundle*", "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", - "watch_without_deps": "webpack-dev-server --content-base public --https", + "dev": "webpack-dev-server --content-base public --https", "deploy_dogfood": "npm run build; aws s3 sync ./public/. s3://dogfood.0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_live": "DEPLOY_ROLLBAR_SOURCEMAPS=true npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --exclude *.map.js" -- cgit From d4089a179404d20745991e5ab9fea0ae1cb6c1c6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 12:53:31 +0100 Subject: Update react-scroll to include fix of using `history.replaceState` instead of `history.pushState` --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 8ba879315..9b9a04519 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11414,7 +11414,7 @@ react-router@^4.2.0: react-scroll@0xproject/react-scroll#similar-to-pr-330: version "1.7.10" - resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/f28a6c51800152fde11e7362383992aa60a15703" + resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/0f625b270d7e966313cac8b811c0ae807b37e170" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" -- cgit From 7fdde15a5d6a0a1a8b6cd7c5e702de7ddb1426f2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 13:28:33 +0100 Subject: Revert command name --- packages/website/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/package.json b/packages/website/package.json index d139d7d4a..ab8835248 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -10,7 +10,7 @@ "build": "NODE_ENV=production node --max_old_space_size=8192 ../../node_modules/.bin/webpack", "clean": "shx rm -f public/bundle*", "lint": "tslint --project . 'ts/**/*.ts' 'ts/**/*.tsx'", - "dev": "webpack-dev-server --content-base public --https", + "watch_without_deps": "webpack-dev-server --content-base public --https", "deploy_dogfood": "npm run build; aws s3 sync ./public/. s3://dogfood.0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_staging": "npm run build; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers", "deploy_live": "DEPLOY_ROLLBAR_SOURCEMAPS=true npm run build; aws s3 sync ./public/. s3://0xproject.com --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --exclude *.map.js" -- cgit From c7371cc0489f1db98c704ddeab216fd6d1c63dc1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 13:31:07 +0100 Subject: Hide .svg file contents from PR review diff --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 52031de51..bc1ff2453 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,2 @@ *.sol linguist-language=Solidity +*.svg linguist-generated \ No newline at end of file -- cgit From 3d1c2cb29619bd503131204beca8e7a59d3130a6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 13:49:43 +0100 Subject: Fix incorrect merge errors --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- packages/website/ts/types.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 7d310df72..88522b665 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -6,7 +6,7 @@ import { Container } from 'ts/components/ui/container'; import { DropDown } from 'ts/components/ui/drop_down'; import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; -import { Deco, Key, ObjectMap, WebsitePaths } from 'ts/types'; +import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 31a33bb76..ece036858 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -472,7 +472,6 @@ export enum Key { LiveChat = 'LIVE_CHAT', LibrariesAndTools = 'LIBRARIES_AND_TOOLS', More = 'MORE', - OurMissionAndValues = 'OUR_MISSION_AND_VALUES', } export enum SmartContractDocSections { -- cgit From 733bb28c1c7349dca535169b8113c4984ed41117 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 14:45:28 +0100 Subject: Fix bug where main content scrollbar wasn't showing up after navigating back in browser history via keyboard shortcut --- packages/website/ts/pages/documentation/home.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index d257534f9..568564873 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -395,6 +395,7 @@ export class Home extends React.Component { overflow: this.state.isHoveringMainContent ? 'auto' : 'hidden', }} onMouseEnter={this._onMainContentHover.bind(this)} + onMouseOver={this._onMainContentHover.bind(this)} onMouseLeave={this._onMainContentHoverOff.bind(this)} >
@@ -537,9 +538,11 @@ export class Home extends React.Component { }); } private _onMainContentHover(_event: React.FormEvent): void { - this.setState({ - isHoveringMainContent: true, - }); + if (!this.state.isHoveringMainContent) { + this.setState({ + isHoveringMainContent: true, + }); + } } private _onMainContentHoverOff(): void { this.setState({ -- cgit From 011cadc1ff2f7989fc866c149171ed2c592ace3c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 16:21:51 +0100 Subject: Disable max file size tslint rule for types file --- packages/ethereum-types/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts index 916661638..2f3140a58 100644 --- a/packages/ethereum-types/src/index.ts +++ b/packages/ethereum-types/src/index.ts @@ -497,4 +497,4 @@ export interface CompilerOptions { compilerSettings?: CompilerSettings; contracts?: string[] | '*'; solcVersion?: string; -} +} // tslint:disable:max-file-line-count -- cgit From 0febb085c5dbac3d125aab917ee2ba454869ff58 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 16:29:29 +0100 Subject: Fix linter --- .../ts/components/documentation/docs_content_top_bar.tsx | 10 ++-------- packages/website/ts/pages/documentation/home.tsx | 6 +----- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index 9b86c7296..74c9022fe 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,11 +1,5 @@ -import { DocsInfo, DocsMenu } from '@0xproject/react-docs'; -import { - colors, - constants as sharedConstants, - MenuSubsectionsBySection, - NestedSidebarMenu, - Styles, -} from '@0xproject/react-shared'; +import { DocsMenu } from '@0xproject/react-docs'; +import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 568564873..b7fa8462b 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -1,6 +1,5 @@ import { colors, - constants, constants as sharedConstants, MarkdownLinkBlock, NestedSidebarMenu, @@ -330,9 +329,6 @@ export class Home extends React.Component { pkg => pkg.name, ), }; - _.each(TUTORIALS, tutorialInfo => { - const id = sharedUtils.getIdFromName(this.props.translate.get(tutorialInfo.title as Key, Deco.Cap)); - }); return ( { isHoveringMainContent: false, }); } -} +} // tslint:disable:max-file-line-count -- cgit From 6a33c4685ea64e2e96d7d91429f7e0d687b576bd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:02:57 +0100 Subject: Further shorten description --- packages/website/translations/chinese.json | 4 ++-- packages/website/translations/english.json | 2 +- packages/website/translations/korean.json | 2 +- packages/website/translations/russian.json | 2 +- packages/website/translations/spanish.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 5390b5484..3ca98cee1 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -84,9 +84,9 @@ "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", - "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", + "USE_SHARED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 5d999e2d7..eee79356e 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -87,7 +87,7 @@ "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", - "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_SHARED_LIQUIDITY": "use shared liquidity", "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 87bad68af..fabb2f80d 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -84,7 +84,7 @@ "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", - "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_SHARED_LIQUIDITY": "use shared liquidity", "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index 8e352c234..b703cdafb 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -84,7 +84,7 @@ "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", - "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_SHARED_LIQUIDITY": "use shared liquidity", "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index 10123b88c..c80f69622 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -85,7 +85,7 @@ "DEVELOP_ON_ETHEREUM": "develop on Ethereum", "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", - "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order over 0x protocol", + "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_SHARED_LIQUIDITY": "use shared liquidity", "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", -- cgit From 8daf2df6e6739239b3f00032f784a7136819dd82 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:03:23 +0100 Subject: Prefer basscss over style --- packages/website/ts/components/documentation/tutorial_button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 22480888e..e0839bbf2 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -26,7 +26,7 @@ export class TutorialButton extends React.Component -- cgit From 42f68428446dfaa5c336c94f94e6c92325e470da Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:04:06 +0100 Subject: Fix bug where button wouldn't be highlighted after hitting browser back button despite the cursor resting above it --- packages/website/ts/components/documentation/tutorial_button.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index e0839bbf2..aee094b86 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -28,6 +28,7 @@ export class TutorialButton extends React.Component
): void { + if (this.state.isHovering) { + return; + } this.setState({ isHovering: true, }); -- cgit From 136ef3827700005b50df0e99b2ee67923d80c206 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:04:21 +0100 Subject: Move colors to colors.ts file --- packages/react-shared/src/utils/colors.ts | 4 +++- packages/website/ts/components/documentation/tutorial_button.tsx | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts index 778a5bc20..596c17e83 100644 --- a/packages/react-shared/src/utils/colors.ts +++ b/packages/react-shared/src/utils/colors.ts @@ -9,7 +9,8 @@ const baseColors = { grey300: '#E0E0E0', beigeWhite: '#E4E4E4', lightBgGrey: '#EDEDED', - grey350: '#cacaca', + grey325: '#dfdfdf', + grey350: '#CACACA', grey400: '#BDBDBD', lightGrey: '#BBBBBB', grey500: '#9E9E9E', @@ -24,6 +25,7 @@ const baseColors = { heroGrey: '#404040', projectsGrey: '#343333', darkestGrey: '#272727', + lightestBlue: '#E7F1FD', lightBlue: '#60A4F4', lightBlueA700: '#0091EA', lightLinkBlue: '#3289F1', diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index aee094b86..b4056753c 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -35,10 +35,10 @@ export class TutorialButton extends React.Component
@@ -48,7 +48,7 @@ export class TutorialButton extends React.Component {this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} - + {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)}
-- cgit From 67a2359014d933561425258ae774f7005ef52b15 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:07:03 +0100 Subject: Add comment about link component --- packages/website/ts/components/ui/link.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx index 252199457..f7bca370b 100644 --- a/packages/website/ts/components/ui/link.tsx +++ b/packages/website/ts/components/ui/link.tsx @@ -9,6 +9,11 @@ export interface LinkProps { className?: string; } +/** + * A generic link component which let's the developer render internal & external links, and their associated + * behaviors with a single link component. Many times we want a menu including both internal & external links + * and this abstracts away the differences of rendering both types of links. + */ export const Link: React.StatelessComponent = ({ style, className, -- cgit From 457ed57d70c1b34b243a151f16fd3d41bfa12bb3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:08:59 +0100 Subject: Move constants before configs and add TODO comment --- packages/website/ts/pages/documentation/home.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index b7fa8462b..e202ff1bc 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -21,14 +21,6 @@ import { Deco, Key, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; -interface Package { - name: string; - description: string; - to: string; - isExternal?: boolean; - shouldOpenInNewTab?: boolean; -} - const THROTTLE_TIMEOUT = 100; const TOP_BAR_HEIGHT = 80; const SCROLLER_WIDTH = 4; @@ -63,6 +55,7 @@ enum Categories { Ethereum = 'Ethereum', CommunityMaintained = 'Community Maintained', } +// TODO(fabio): Move this to it's own file const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { [Categories.ZeroExProtocol]: [ { @@ -275,6 +268,14 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { ], }; +interface Package { + name: string; + description: string; + to: string; + isExternal?: boolean; + shouldOpenInNewTab?: boolean; +} + export interface HomeProps { location: Location; translate: Translate; -- cgit From 0d57ed6c933a8332253cf673a521dddcae601872 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:25:45 +0100 Subject: Rename for clarity --- packages/website/ts/pages/documentation/home.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index e202ff1bc..ee118ab1e 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -306,7 +306,7 @@ export class Home extends React.Component { window.removeEventListener('resize', this._throttledScreenWidthUpdate); } public render(): React.ReactNode { - const mainContainerStyle: React.CSSProperties = { + const scrollableContainerStyles: React.CSSProperties = { position: 'absolute', top: 80, left: 0, @@ -351,7 +351,7 @@ export class Home extends React.Component {
{ id={sharedConstants.SCROLL_CONTAINER_ID} className="absolute" style={{ - ...mainContainerStyle, + ...scrollableContainerStyles, paddingTop: 30, paddingLeft: mainContentPadding, paddingRight: this.state.isHoveringMainContent -- cgit From 3a9791e7943c5572d24b257217bfe1558beff5fc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 1 Oct 2018 22:26:06 +0100 Subject: Make menuSubsectionsBySection optional --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 8 ++++++-- .../website/ts/components/documentation/docs_content_top_bar.tsx | 1 - packages/website/ts/pages/documentation/home.tsx | 1 - 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 14b233cd6..9933f3b38 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -12,7 +12,7 @@ import { VersionDropDown } from './version_drop_down'; export interface NestedSidebarMenuProps { topLevelMenu: { [topLevel: string]: string[] }; - menuSubsectionsBySection: MenuSubsectionsBySection; + menuSubsectionsBySection?: MenuSubsectionsBySection; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; onMenuItemClick?: () => void; @@ -44,6 +44,7 @@ export class NestedSidebarMenu extends React.Component { @@ -122,7 +123,10 @@ export class NestedSidebarMenu extends React.Component { > -- cgit From c42b340042b8ff5ca9537e5e162776e513e63f2a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 09:07:53 +0100 Subject: Move more copy to translation files --- packages/website/translations/chinese.json | 7 ++++++- packages/website/translations/english.json | 7 ++++++- packages/website/translations/korean.json | 7 ++++++- packages/website/translations/russian.json | 7 ++++++- packages/website/translations/spanish.json | 7 ++++++- packages/website/ts/pages/documentation/home.tsx | 6 +++--- packages/website/ts/types.ts | 3 +++ 7 files changed, 36 insertions(+), 8 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 3ca98cee1..2d3ad6974 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -92,5 +92,10 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "MORE": "more" + "LIBRARIES_AND_TOOLS_DESCRIPTION": + "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "MORE": "more", + "START_BUILDING_ON_0X": "Start building on 0x", + "START_BUILDING_ON_0X_DESCRIPTION": + "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index eee79356e..6ee780c78 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -95,6 +95,8 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", + "LIBRARIES_AND_TOOLS_DESCRIPTION": + "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", "MORE": "more", "OUR_MISSION_AND_VALUES": "our mission & values", "GAMING_AND_COLLECTABLES": "gaming & collectables", @@ -102,5 +104,8 @@ "artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality to give access and the ability to build marketplaces for NFT trading.", "ORDER_BOOKS": "order books", "ORDER_BOOKS_DESCRIPTION": - "there are thousands of decentralized apps that have native utility tokens. 0x provides market makers and professional exchanges an ability to host order books to facilitate the exchange of these assets." + "there are thousands of decentralized apps that have native utility tokens. 0x provides market makers and professional exchanges an ability to host order books to facilitate the exchange of these assets.", + "START_BUILDING_ON_0X": "Start building on 0x", + "START_BUILDING_ON_0X_DESCRIPTION": + "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index fabb2f80d..8470bf9a0 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -92,5 +92,10 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "MORE": "more" + "LIBRARIES_AND_TOOLS_DESCRIPTION": + "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "MORE": "more", + "START_BUILDING_ON_0X": "Start building on 0x", + "START_BUILDING_ON_0X_DESCRIPTION": + "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index b703cdafb..b2bc151ab 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -92,5 +92,10 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "MORE": "more" + "LIBRARIES_AND_TOOLS_DESCRIPTION": + "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "MORE": "more", + "START_BUILDING_ON_0X": "Start building on 0x", + "START_BUILDING_ON_0X_DESCRIPTION": + "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index c80f69622..fefb92447 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -93,5 +93,10 @@ "GITHUB": "github", "LIVE_CHAT": "live chat", "LIBRARIES_AND_TOOLS": "Libraries & Tools", - "MORE": "more" + "LIBRARIES_AND_TOOLS_DESCRIPTION": + "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum", + "MORE": "more", + "START_BUILDING_ON_0X": "Start building on 0x", + "START_BUILDING_ON_0X_DESCRIPTION": + "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x." } diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 9356c504b..7f833cc1f 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -395,10 +395,10 @@ export class Home extends React.Component { onMouseLeave={this._onMainContentHoverOff.bind(this)} >
- {this._renderSectionTitle('Start building on 0x')} + {this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))} {this._renderSectionDescription( - 'Follow one of our "Getting started" guides to learn more about building ontop of 0x.', + this.props.translate.get(Key.StartBuildOn0xDescription, Deco.Cap), )} {_.map(TUTORIALS, tutorialInfo => ( @@ -423,7 +423,7 @@ export class Home extends React.Component { )} {this._renderSectionDescription( - 'A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum', + this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap), )} {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index ece036858..f93d998b6 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -471,7 +471,10 @@ export enum Key { Github = 'GITHUB', LiveChat = 'LIVE_CHAT', LibrariesAndTools = 'LIBRARIES_AND_TOOLS', + LibrariesAndToolsDescription = 'LIBRARIES_AND_TOOLS_DESCRIPTION', More = 'MORE', + StartBuildOn0x = 'START_BUILDING_ON_0X', + StartBuildOn0xDescription = 'START_BUILDING_ON_0X_DESCRIPTION', } export enum SmartContractDocSections { -- cgit From d435341f9b2577008fd6746c198305374a1b7994 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 09:11:50 +0100 Subject: Use container instead of div --- packages/website/ts/pages/documentation/home.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 7f833cc1f..a2405a9d2 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -451,14 +451,7 @@ export class Home extends React.Component { return (
-
+
Date: Tue, 2 Oct 2018 09:15:33 +0100 Subject: Use colors module --- packages/website/ts/pages/documentation/home.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index a2405a9d2..311470d2c 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -500,14 +500,14 @@ export class Home extends React.Component { } private _renderSectionTitle(text: string): React.ReactNode { return ( - + {text} ); } private _renderSectionDescription(text: string): React.ReactNode { return ( - + {text} ); -- cgit From b79e3eaec62e073d86fdd5b83e7516da81046951 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 09:15:41 +0100 Subject: Simplify helper methods --- packages/website/ts/pages/documentation/home.tsx | 36 +++++++++--------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 311470d2c..57de52de2 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -355,8 +355,8 @@ export class Home extends React.Component { paddingTop: 35, overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden', }} - onMouseEnter={this._onSidebarHover.bind(this)} - onMouseLeave={this._onSidebarHoverOff.bind(this)} + onMouseEnter={this._onSidebarHover.bind(this, true)} + onMouseLeave={this._onSidebarHover.bind(this, false)} > { : mainContentPadding, overflow: this.state.isHoveringMainContent ? 'auto' : 'hidden', }} - onMouseEnter={this._onMainContentHover.bind(this)} - onMouseOver={this._onMainContentHover.bind(this)} - onMouseLeave={this._onMainContentHoverOff.bind(this)} + onMouseEnter={this._onMainContentHover.bind(this, true)} + onMouseOver={this._onMainContentHover.bind(this, true)} + onMouseLeave={this._onMainContentHover.bind(this, false)} >
{this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))} @@ -512,30 +512,20 @@ export class Home extends React.Component { ); } - private _updateScreenWidth(): void { - const newScreenWidth = utils.getScreenWidth(); - this.props.dispatcher.updateScreenWidth(newScreenWidth); - } - private _onSidebarHover(_event: React.FormEvent): void { - this.setState({ - isHoveringSidebar: true, - }); - } - private _onSidebarHoverOff(): void { + private _onSidebarHover(_event: React.FormEvent, isHovering: boolean): void { this.setState({ - isHoveringSidebar: false, + isHoveringSidebar: isHovering, }); } - private _onMainContentHover(_event: React.FormEvent): void { - if (!this.state.isHoveringMainContent) { + private _onMainContentHover(_event: React.FormEvent, isHovering: boolean): void { + if (isHovering !== this.state.isHoveringMainContent) { this.setState({ - isHoveringMainContent: true, + isHoveringMainContent: isHovering, }); } } - private _onMainContentHoverOff(): void { - this.setState({ - isHoveringMainContent: false, - }); + private _updateScreenWidth(): void { + const newScreenWidth = utils.getScreenWidth(); + this.props.dispatcher.updateScreenWidth(newScreenWidth); } } // tslint:disable:max-file-line-count -- cgit From 91afc37d2a9fd15dc34d3c0911fb19ec7dd3493b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 10:30:44 +0100 Subject: Fix hovering --- packages/website/ts/pages/documentation/home.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 57de52de2..6bb30b368 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -512,12 +512,12 @@ export class Home extends React.Component { ); } - private _onSidebarHover(_event: React.FormEvent, isHovering: boolean): void { + private _onSidebarHover(isHovering: boolean, _event: React.FormEvent): void { this.setState({ isHoveringSidebar: isHovering, }); } - private _onMainContentHover(_event: React.FormEvent, isHovering: boolean): void { + private _onMainContentHover(isHovering: boolean, _event: React.FormEvent): void { if (isHovering !== this.state.isHoveringMainContent) { this.setState({ isHoveringMainContent: isHovering, -- cgit From 0c996803969e7ff3f62c023651f64468b3f76bd3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 10:51:41 +0100 Subject: Improve mobile padding --- packages/website/ts/components/documentation/tutorial_button.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index b4056753c..094bc3d92 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -44,7 +44,7 @@ export class TutorialButton extends React.Component
-
+
{this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} -- cgit From c07412a992284b2f3045be1c620ea2e0a351139a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 2 Oct 2018 20:10:59 +0100 Subject: Use new Link UI component everywhere, and add complementary ALink type --- .../documentation/docs_content_top_bar.tsx | 11 +- .../ts/components/documentation/docs_logo.tsx | 2 +- .../components/documentation/tutorial_button.tsx | 5 +- .../components/dropdowns/developers_drop_down.tsx | 98 +++--- packages/website/ts/components/fill_order.tsx | 2 +- packages/website/ts/components/footer.tsx | 95 +++--- .../ts/components/inputs/token_amount_input.tsx | 4 +- .../website/ts/components/portal/back_button.tsx | 4 +- .../website/ts/components/portal/drawer_menu.tsx | 2 +- packages/website/ts/components/portal/menu.tsx | 6 +- packages/website/ts/components/portal/portal.tsx | 9 +- packages/website/ts/components/top_bar/top_bar.tsx | 46 ++- .../ts/components/top_bar/top_bar_menu_item.tsx | 22 +- .../website/ts/components/ui/custom_menu_item.tsx | 51 +++ packages/website/ts/components/ui/link.tsx | 43 ++- packages/website/ts/components/ui/menu_item.tsx | 51 --- packages/website/ts/components/ui/simple_menu.tsx | 4 +- packages/website/ts/pages/about/about.tsx | 4 +- packages/website/ts/pages/documentation/home.tsx | 373 +++++++++++++-------- packages/website/ts/pages/landing/landing.tsx | 11 +- packages/website/ts/types.ts | 16 +- 21 files changed, 468 insertions(+), 391 deletions(-) create mode 100644 packages/website/ts/components/ui/custom_menu_item.tsx delete mode 100644 packages/website/ts/components/ui/menu_item.tsx diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index b5f51e1aa..7edb51587 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,19 +1,19 @@ -import { DocsMenu } from '@0xproject/react-docs'; import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Link } from 'ts/components/ui/link'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { ALink, Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; export interface DocsContentTopBarProps { location: Location; translate: Translate; - menu?: DocsMenu; + sectionNameToLinks?: ObjectMap; } interface DocsContentTopBarState { @@ -146,12 +146,13 @@ export class DocsContentTopBar extends React.Component
- + /> */}
); diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 570a81bca..9bd742749 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -10,7 +10,7 @@ export interface DocsLogoProps { export const DocsLogo: React.StatelessComponent = props => { return (
- +
diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 094bc3d92..7ed9c6e4e 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -25,8 +25,7 @@ export class TutorialButton extends React.Component
- {this.props.translate.get(this.props.tutorialInfo.title as Key, Deco.Cap)} + {this.props.translate.get(this.props.tutorialInfo.link.title as Key, Deco.Cap)} {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)} diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 88522b665..675357f41 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -1,61 +1,68 @@ import { colors } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; import { DropDown } from 'ts/components/ui/drop_down'; import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { ALink, Deco, Key, LinkType, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -interface LinkInfo { - link: string; - shouldOpenInNewTab?: boolean; -} - -const gettingStartedKeyToLinkInfo1: ObjectMap = { - [Key.BuildARelayer]: { - link: `${WebsitePaths.Wiki}#Build-A-Relayer`, +const gettingStartedKeyToLinkInfo1: ALink[] = [ + { + title: Key.BuildARelayer, + to: `${WebsitePaths.Wiki}#Build-A-Relayer`, }, - [Key.OrderBasics]: { - link: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + { + title: Key.OrderBasics, + to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, }, -}; -const gettingStartedKeyToLinkInfo2: ObjectMap = { - [Key.DevelopOnEthereum]: { - link: `${WebsitePaths.Wiki}#Ethereum-Development`, +]; +const gettingStartedKeyToLinkInfo2: ALink[] = [ + { + title: Key.DevelopOnEthereum, + to: `${WebsitePaths.Wiki}#Ethereum-Development`, }, - [Key.UseSharedLiquidity]: { - link: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + { + title: Key.UseSharedLiquidity, + to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, }, -}; -const popularDocsToLinkInfos: ObjectMap = { - [Key.ZeroExJs]: { - link: WebsitePaths.ZeroExJs, +]; +const popularDocsToLinkInfos: ALink[] = [ + { + title: Key.ZeroExJs, + to: WebsitePaths.ZeroExJs, }, - [Key.Connect]: { - link: WebsitePaths.Connect, + { + title: Key.Connect, + to: WebsitePaths.Connect, }, - [Key.SmartContract]: { - link: WebsitePaths.SmartContracts, + { + title: Key.SmartContract, + to: WebsitePaths.SmartContracts, }, -}; -const usefulLinksToLinkInfo: ObjectMap = { - [Key.Github]: { - link: constants.URL_GITHUB_ORG, +]; +const usefulLinksToLinkInfo: ALink[] = [ + { + title: Key.Github, + to: constants.URL_GITHUB_ORG, + type: LinkType.External, shouldOpenInNewTab: true, }, - [Key.Whitepaper]: { - link: WebsitePaths.Whitepaper, + { + title: Key.Whitepaper, + to: WebsitePaths.Whitepaper, + type: LinkType.External, shouldOpenInNewTab: true, }, - [Key.Sandbox]: { - link: constants.URL_SANDBOX, + { + title: Key.Sandbox, + to: constants.URL_SANDBOX, + type: LinkType.External, shouldOpenInNewTab: true, }, -}; +]; interface DevelopersDropDownProps { translate: Translate; @@ -123,7 +130,6 @@ export class DevelopersDropDown extends React.Component ); } - private _renderLinkSection(keyToLinkInfo: ObjectMap): React.ReactNode { + private _renderLinkSection(links: ALink[]): React.ReactNode { const linkStyle: React.CSSProperties = { color: colors.lightBlueA700, fontFamily: 'Roboto, Roboto Mono', }; - const numLinks = _.size(keyToLinkInfo); + const numLinks = links.length; let i = 0; - const links = _.map(keyToLinkInfo, (linkInfo: LinkInfo, key: string) => { + const renderLinks = _.map(links, (link: ALink) => { i++; const isLast = i === numLinks; - const linkText = this.props.translate.get(key as Key, Deco.Cap); + const linkText = this.props.translate.get(link.title as Key, Deco.Cap); return ( -
- +
+ {linkText}
); }); - return
{links}
; + return
{renderLinks}
; } } diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 3c3155349..ec1d698f3 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -8,7 +8,6 @@ import { Card, CardHeader, CardText } from 'material-ui/Card'; import Divider from 'material-ui/Divider'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; -import { Link } from 'react-router-dom'; import { Blockchain } from 'ts/blockchain'; import { TrackTokenConfirmationDialog } from 'ts/components/dialogs/track_token_confirmation_dialog'; import { FillOrderJSON } from 'ts/components/fill_order_json'; @@ -17,6 +16,7 @@ import { TokenAmountInput } from 'ts/components/inputs/token_amount_input'; import { Alert } from 'ts/components/ui/alert'; import { EthereumAddress } from 'ts/components/ui/ethereum_address'; import { Identicon } from 'ts/components/ui/identicon'; +import { Link } from 'ts/components/ui/link'; import { VisualOrder } from 'ts/components/visual_order'; import { Dispatcher } from 'ts/redux/dispatcher'; import { portalOrderSchema } from 'ts/schemas/portal_order_schema'; diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index 6dcb5a0e9..bec3c17f7 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -1,24 +1,16 @@ import { colors } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; + import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, Language, WebsitePaths } from 'ts/types'; +import { ALink, Deco, Key, Language, LinkType, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; -interface MenuItemsBySection { - [sectionName: string]: FooterMenuItem[]; -} - -interface FooterMenuItem { - title: string; - path?: string; - isExternal?: boolean; -} - const ICON_DIMENSION = 16; const linkStyle = { @@ -51,76 +43,74 @@ export class Footer extends React.Component { }; } public render(): React.ReactNode { - const menuItemsBySection: MenuItemsBySection = { + const sectionNameToLinks: ObjectMap = { [Key.Documentation]: [ { title: '0x.js', - path: WebsitePaths.ZeroExJs, + to: WebsitePaths.ZeroExJs, }, { title: this.props.translate.get(Key.SmartContracts, Deco.Cap), - path: WebsitePaths.SmartContracts, + to: WebsitePaths.SmartContracts, }, { title: this.props.translate.get(Key.Connect, Deco.Cap), - path: WebsitePaths.Connect, + to: WebsitePaths.Connect, }, { title: this.props.translate.get(Key.Whitepaper, Deco.Cap), - path: WebsitePaths.Whitepaper, - isExternal: true, + to: WebsitePaths.Whitepaper, + type: LinkType.External, }, { title: this.props.translate.get(Key.Wiki, Deco.Cap), - path: WebsitePaths.Wiki, + to: WebsitePaths.Wiki, }, { title: this.props.translate.get(Key.Faq, Deco.Cap), - path: WebsitePaths.FAQ, + to: WebsitePaths.FAQ, }, ], [Key.Community]: [ { title: this.props.translate.get(Key.RocketChat, Deco.Cap), - isExternal: true, - path: constants.URL_ZEROEX_CHAT, + type: LinkType.External, + to: constants.URL_ZEROEX_CHAT, }, { title: this.props.translate.get(Key.Blog, Deco.Cap), - isExternal: true, - path: constants.URL_BLOG, + type: LinkType.External, + to: constants.URL_BLOG, }, { title: 'Twitter', - isExternal: true, - path: constants.URL_TWITTER, + type: LinkType.External, + to: constants.URL_TWITTER, }, { title: 'Reddit', - isExternal: true, - path: constants.URL_REDDIT, + type: LinkType.External, + to: constants.URL_REDDIT, }, { title: this.props.translate.get(Key.Forum, Deco.Cap), - isExternal: true, - path: constants.URL_DISCOURSE_FORUM, + type: LinkType.External, + to: constants.URL_DISCOURSE_FORUM, }, ], [Key.Organization]: [ { title: this.props.translate.get(Key.About, Deco.Cap), - isExternal: false, - path: WebsitePaths.About, + to: WebsitePaths.About, }, { title: this.props.translate.get(Key.Careers, Deco.Cap), - isExternal: false, - path: WebsitePaths.Careers, + to: WebsitePaths.Careers, }, { title: this.props.translate.get(Key.Contact, Deco.Cap), - isExternal: true, - path: 'mailto:team@0xproject.com', + type: LinkType.External, + to: 'mailto:team@0xproject.com', }, ], }; @@ -160,19 +150,19 @@ export class Footer extends React.Component {
{this._renderHeader(Key.Documentation)} - {_.map(menuItemsBySection[Key.Documentation], this._renderMenuItem.bind(this))} + {_.map(sectionNameToLinks[Key.Documentation], this._renderMenuItem.bind(this))}
{this._renderHeader(Key.Community)} - {_.map(menuItemsBySection[Key.Community], this._renderMenuItem.bind(this))} + {_.map(sectionNameToLinks[Key.Community], this._renderMenuItem.bind(this))}
{this._renderHeader(Key.Organization)} - {_.map(menuItemsBySection[Key.Organization], this._renderMenuItem.bind(this))} + {_.map(sectionNameToLinks[Key.Organization], this._renderMenuItem.bind(this))}
@@ -187,7 +177,7 @@ export class Footer extends React.Component {
); } - private _renderMenuItem(item: FooterMenuItem): React.ReactNode { + private _renderMenuItem(link: ALink): React.ReactNode { const titleToIcon: { [title: string]: string } = { [this.props.translate.get(Key.RocketChat, Deco.Cap)]: 'rocketchat.png', [this.props.translate.get(Key.Blog, Deco.Cap)]: 'medium.png', @@ -195,30 +185,21 @@ export class Footer extends React.Component { Reddit: 'reddit.png', [this.props.translate.get(Key.Forum, Deco.Cap)]: 'discourse.png', }; - const iconIfExists = titleToIcon[item.title]; + const iconIfExists = titleToIcon[link.title]; return ( -
- {item.isExternal ? ( - +
+ +
{!_.isUndefined(iconIfExists) ? (
{this._renderIcon(iconIfExists)}
-
{item.title}
+
{link.title}
) : ( - item.title + link.title )} -
- ) : ( - -
- {!_.isUndefined(iconIfExists) && ( -
{this._renderIcon(iconIfExists)}
- )} - {item.title} -
- - )} +
+
); } diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx index db093fb68..adf96f9ee 100644 --- a/packages/website/ts/components/inputs/token_amount_input.tsx +++ b/packages/website/ts/components/inputs/token_amount_input.tsx @@ -3,9 +3,9 @@ import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link } from 'react-router-dom'; import { Blockchain } from 'ts/blockchain'; import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input'; +import { Link } from 'ts/components/ui/link'; import { Token, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types'; interface TokenAmountInputProps { @@ -112,7 +112,7 @@ export class TokenAmountInput extends React.Component Set allowance diff --git a/packages/website/ts/components/portal/back_button.tsx b/packages/website/ts/components/portal/back_button.tsx index ca35abc2b..bdbcef343 100644 --- a/packages/website/ts/components/portal/back_button.tsx +++ b/packages/website/ts/components/portal/back_button.tsx @@ -1,6 +1,6 @@ import { Styles } from '@0xproject/react-shared'; import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; import { Island } from 'ts/components/ui/island'; import { colors } from 'ts/style/colors'; @@ -27,7 +27,7 @@ const styles: Styles = { export const BackButton = (props: BackButtonProps) => { return (
- +
diff --git a/packages/website/ts/components/portal/drawer_menu.tsx b/packages/website/ts/components/portal/drawer_menu.tsx index a6707e86c..3a8c69a70 100644 --- a/packages/website/ts/components/portal/drawer_menu.tsx +++ b/packages/website/ts/components/portal/drawer_menu.tsx @@ -39,7 +39,7 @@ export interface DrawerMenuProps { } export const DrawerMenu = (props: DrawerMenuProps) => { const relayerItemEntry = { - to: `${WebsitePaths.Portal}`, + to: WebsitePaths.Portal, labelText: 'Relayer ecosystem', iconName: 'zmdi-portable-wifi', }; diff --git a/packages/website/ts/components/portal/menu.tsx b/packages/website/ts/components/portal/menu.tsx index 39dab77f5..a3352529c 100644 --- a/packages/website/ts/components/portal/menu.tsx +++ b/packages/website/ts/components/portal/menu.tsx @@ -1,7 +1,7 @@ import { Styles } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; -import { MenuItem } from 'ts/components/ui/menu_item'; +import { CustomMenuItem } from 'ts/components/ui/custom_menu_item'; import { colors } from 'ts/style/colors'; import { WebsitePaths } from 'ts/types'; @@ -67,14 +67,14 @@ export const Menu: React.StatelessComponent = (props: MenuProps) => { {_.map(props.menuItemEntries, entry => { const isSelected = entry.to === props.selectedPath; return ( - + - + ); })}
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index b42954f60..a9ccf9e11 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -3,7 +3,8 @@ import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; -import { Link, Route, RouteComponentProps, Switch } from 'react-router-dom'; +import { Route, RouteComponentProps, Switch } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; import { Blockchain } from 'ts/blockchain'; import { BlockchainErrDialog } from 'ts/components/dialogs/blockchain_err_dialog'; @@ -317,7 +318,7 @@ export class Portal extends React.Component { }; return (
} + header={} body={} /> ); @@ -389,9 +390,7 @@ export class Portal extends React.Component { ); return !shouldStartOnboarding ? ( - - {startOnboarding} - + {startOnboarding} ) : ( startOnboarding ); diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index c2d753e31..3da2307e0 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -10,15 +10,15 @@ import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; -import { Link } from 'react-router-dom'; import { Blockchain } from 'ts/blockchain'; import { DevelopersDropDown } from 'ts/components/dropdowns/developers_drop_down'; import { DrawerMenu } from 'ts/components/portal/drawer_menu'; import { ProviderDisplay } from 'ts/components/top_bar/provider_display'; import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; import { Container } from 'ts/components/ui/container'; +import { Link } from 'ts/components/ui/link'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, ProviderType, WebsitePaths } from 'ts/types'; +import { Deco, Key, LinkType, ProviderType, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -151,7 +151,7 @@ export class TopBar extends React.Component { paddingLeft={this.props.paddingLeft} paddingRight={this.props.paddingRight} > - +
@@ -165,40 +165,36 @@ export class TopBar extends React.Component { />
@@ -260,20 +256,16 @@ export class TopBar extends React.Component {
{this.props.translate.get(Key.Website, Deco.Cap)}
- + {this.props.translate.get(Key.Home, Deco.Cap)} - + {this.props.translate.get(Key.Wiki, Deco.Cap)} {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => { if (!this._doesUrlInclude(websitePath)) { return ( - + {this.props.translate.get(key, Deco.Cap)}{' '} {this.props.translate.get(Key.Docs, Deco.Cap)} @@ -284,25 +276,25 @@ export class TopBar extends React.Component { return null; })} {!this._isViewingPortal() && ( - + {this.props.translate.get(Key.PortalDApp, Deco.CapWords)} )} - + {this.props.translate.get(Key.Whitepaper, Deco.Cap)} - - + + {this.props.translate.get(Key.About, Deco.Cap)} - + {this.props.translate.get(Key.Careers, Deco.Cap)} - + {this.props.translate.get(Key.Blog, Deco.Cap)} - - + + {this.props.translate.get(Key.Faq, Deco.Cap)} diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx index 25fab2868..89fd9e8a8 100644 --- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx +++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx @@ -1,7 +1,8 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; +import { LinkType } from 'ts/types'; import { CallToAction } from 'ts/components/ui/button'; @@ -13,7 +14,7 @@ interface TopBarMenuItemProps { title: string; path?: string; isPrimary?: boolean; - isExternal: boolean; + linkType: LinkType; style?: React.CSSProperties; className?: string; isNightVersion?: boolean; @@ -38,20 +39,9 @@ export class TopBarMenuItem extends React.Component - {this.props.isExternal ? ( - - {itemContent} - - ) : ( - - {itemContent} - - )} + + {itemContent} +
); } diff --git a/packages/website/ts/components/ui/custom_menu_item.tsx b/packages/website/ts/components/ui/custom_menu_item.tsx new file mode 100644 index 000000000..c51095709 --- /dev/null +++ b/packages/website/ts/components/ui/custom_menu_item.tsx @@ -0,0 +1,51 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { Link } from 'ts/components/ui/link'; + +interface CustomMenuItemProps { + to: string; + style?: React.CSSProperties; + onClick?: () => void; + className?: string; +} + +interface CustomMenuItemState { + isHovering: boolean; +} + +export class CustomMenuItem extends React.Component { + public static defaultProps: Partial = { + onClick: _.noop.bind(_), + className: '', + }; + public constructor(props: CustomMenuItemProps) { + super(props); + this.state = { + isHovering: false, + }; + } + public render(): React.ReactNode { + const menuItemStyles = { + cursor: 'pointer', + opacity: this.state.isHovering ? 0.5 : 1, + }; + return ( + +
+ {this.props.children} +
+ + ); + } + private _onToggleHover(isHovering: boolean): void { + this.setState({ + isHovering, + }); + } +} diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx index f7bca370b..ae62aad0c 100644 --- a/packages/website/ts/components/ui/link.tsx +++ b/packages/website/ts/components/ui/link.tsx @@ -1,9 +1,10 @@ import * as React from 'react'; import { Link as ReactRounterLink } from 'react-router-dom'; +import { LinkType } from 'ts/types'; export interface LinkProps { to: string; - isExternal?: boolean; + type?: LinkType; shouldOpenInNewTab?: boolean; style?: React.CSSProperties; className?: string; @@ -17,29 +18,39 @@ export interface LinkProps { export const Link: React.StatelessComponent = ({ style, className, - isExternal, + type, to, shouldOpenInNewTab, children, }) => { - if (isExternal) { - return ( - - {children} - - ); - } else { - return ( - - {children} - - ); + const styleWithDefault = { + textDecoration: 'none', + ...style, + }; + + switch (type) { + case LinkType.External: + return ( + + {children} + + ); + case LinkType.ReactRoute: + return ( + + {children} + + ); + case LinkType.ReactScroll: + return
TODO
; + default: + throw new Error(`Unrecognized LinkType: ${type}`); } }; Link.defaultProps = { - isExternal: false, - shouldOpenInNewTab: false, + type: LinkType.ReactRoute, + shouldOpenInNewTab: true, style: {}, className: '', }; diff --git a/packages/website/ts/components/ui/menu_item.tsx b/packages/website/ts/components/ui/menu_item.tsx deleted file mode 100644 index 0cb4b387c..000000000 --- a/packages/website/ts/components/ui/menu_item.tsx +++ /dev/null @@ -1,51 +0,0 @@ -import * as _ from 'lodash'; -import * as React from 'react'; -import { Link } from 'react-router-dom'; - -interface MenuItemProps { - to: string; - style?: React.CSSProperties; - onClick?: () => void; - className?: string; -} - -interface MenuItemState { - isHovering: boolean; -} - -export class MenuItem extends React.Component { - public static defaultProps: Partial = { - onClick: _.noop.bind(_), - className: '', - }; - public constructor(props: MenuItemProps) { - super(props); - this.state = { - isHovering: false, - }; - } - public render(): React.ReactNode { - const menuItemStyles = { - cursor: 'pointer', - opacity: this.state.isHovering ? 0.5 : 1, - }; - return ( - -
- {this.props.children} -
- - ); - } - private _onToggleHover(isHovering: boolean): void { - this.setState({ - isHovering, - }); - } -} diff --git a/packages/website/ts/components/ui/simple_menu.tsx b/packages/website/ts/components/ui/simple_menu.tsx index 8a9349c6d..767da3675 100644 --- a/packages/website/ts/components/ui/simple_menu.tsx +++ b/packages/website/ts/components/ui/simple_menu.tsx @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import * as CopyToClipboard from 'react-copy-to-clipboard'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; @@ -72,7 +72,7 @@ export const GoToAccountManagementSimpleMenuItem: React.StatelessComponent< GoToAccountManagementSimpleMenuItemProps > = ({ onClick }) => { return ( - + ); diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx index e097578bc..ba1b423b9 100644 --- a/packages/website/ts/pages/about/about.tsx +++ b/packages/website/ts/pages/about/about.tsx @@ -2,9 +2,9 @@ import { colors, Styles } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; -import { Link } from 'react-router-dom'; import { Footer } from 'ts/components/footer'; import { TopBar } from 'ts/components/top_bar/top_bar'; +import { Link } from 'ts/components/ui/link'; import { Profile } from 'ts/pages/about/profile'; import { Dispatcher } from 'ts/redux/dispatcher'; import { ProfileInfo, WebsitePaths } from 'ts/types'; @@ -370,7 +370,7 @@ export class About extends React.Component { }} > We are seeking outstanding candidates to{' '} - + join our team . We value passion, diversity and unique perspectives. diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 6bb30b368..42ed1db8c 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -1,11 +1,7 @@ -import { - colors, - constants as sharedConstants, - MarkdownLinkBlock, - NestedSidebarMenu, - utils as sharedUtils, -} from '@0xproject/react-shared'; +import { colors, constants as sharedConstants, MarkdownLinkBlock, utils as sharedUtils } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; +import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); import * as ReactMarkdown from 'react-markdown'; @@ -17,7 +13,7 @@ import { Container } from 'ts/components/ui/container'; import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; +import { ALink, Deco, Key, LinkType, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; @@ -26,28 +22,36 @@ const TOP_BAR_HEIGHT = 80; const SCROLLER_WIDTH = 4; const TUTORIALS: TutorialInfo[] = [ { - title: Key.DevelopOnEthereum, iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg', description: Key.DevelopOnEthereumDescription, - location: `${WebsitePaths.Wiki}#Ethereum-Development`, + link: { + title: Key.DevelopOnEthereum, + to: `${WebsitePaths.Wiki}#Ethereum-Development`, + }, }, { - title: Key.BuildARelayer, iconUrl: '/images/developers/tutorials/build_a_relayer.svg', description: Key.BuildARelayerDescription, - location: `${WebsitePaths.Wiki}#Build-A-Relayer`, + link: { + title: Key.BuildARelayer, + to: `${WebsitePaths.Wiki}#Build-A-Relayer`, + }, }, { - title: Key.OrderBasics, iconUrl: '/images/developers/tutorials/0x_order_basics.svg', description: Key.OrderBasicsDescription, - location: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + link: { + title: Key.OrderBasics, + to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + }, }, { - title: Key.UseSharedLiquidity, iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg', description: Key.UseSharedLiquidityDescription, - location: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + link: { + title: Key.UseSharedLiquidity, + to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + }, }, ]; enum Categories { @@ -59,221 +63,276 @@ enum Categories { const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { [Categories.ZeroExProtocol]: [ { - name: '0x.js', description: 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as [order-utils](https://0xproject.com/docs/order-utils) and [contract-wrappers](https://0xproject.com/docs/contract-wrappers).', - to: WebsitePaths.ZeroExJs, + link: { + title: '0x.js', + to: WebsitePaths.ZeroExJs, + }, }, { - name: '0x starter project', description: 'A Typescript starter project that will walk you through the basics of how to interact with 0x Protocol and trade of an SRA relayer', - to: 'https://github.com/0xProject/0x-starter-project', - isExternal: true, - shouldOpenInNewTab: true, + link: { + title: '0x starter project', + to: 'https://github.com/0xProject/0x-starter-project', + type: LinkType.External, + shouldOpenInNewTab: true, + }, }, { - name: '@0xproject/connect', description: 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)', - to: WebsitePaths.Connect, + link: { + title: '@0xproject/connect', + to: WebsitePaths.Connect, + }, }, { - name: '@0xproject/contract-wrappers', description: 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.', - to: WebsitePaths.ContractWrappers, + link: { + title: '@0xproject/contract-wrappers', + to: WebsitePaths.ContractWrappers, + }, }, { - name: '@0xproject/json-schemas', description: 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', - to: WebsitePaths.JSONSchemas, + link: { + title: '@0xproject/json-schemas', + to: WebsitePaths.JSONSchemas, + }, }, { - name: '@0xproject/order-utils', description: 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.', - to: WebsitePaths.OrderUtils, + link: { + title: '@0xproject/order-utils', + to: WebsitePaths.OrderUtils, + }, }, { - name: '@0xproject/order-watcher', description: "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.", - to: WebsitePaths.OrderWatcher, + link: { + title: '@0xproject/order-watcher', + to: WebsitePaths.OrderWatcher, + }, }, { - name: '@0xproject/sra-spec', description: 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', - to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', - isExternal: true, - shouldOpenInNewTab: true, + link: { + title: '@0xproject/sra-spec', + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', + type: LinkType.External, + shouldOpenInNewTab: true, + }, }, ], [Categories.Ethereum]: [ { - name: 'abi-gen', description: "This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by Geth abigen but takes a different approach. You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.", - to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', - isExternal: true, - shouldOpenInNewTab: true, + link: { + title: 'abi-gen', + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', + type: LinkType.External, + shouldOpenInNewTab: true, + }, }, { - name: 'ethereum-types', description: 'A collection of Typescript types that are useful when working on an Ethereum-based project (e.g RawLog, Transaction, TxData, SolidityTypes, etc...).', - to: WebsitePaths.EthereumTypes, + link: { + title: 'ethereum-types', + to: WebsitePaths.EthereumTypes, + }, }, { - name: '@0xproject/sol-compiler', description: 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.', - to: WebsitePaths.SolCompiler, + link: { + title: '@0xproject/sol-compiler', + to: WebsitePaths.SolCompiler, + }, }, { - name: '@0xproject/sol-cov', description: 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', - to: WebsitePaths.SolCov, + link: { + title: '@0xproject/sol-cov', + to: WebsitePaths.SolCov, + }, }, { - name: '@0xproject/subproviders', description: 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', - to: WebsitePaths.Subproviders, + link: { + title: '@0xproject/subproviders', + to: WebsitePaths.Subproviders, + }, }, { - name: '@0xproject/web3-wrapper', description: 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...', - to: WebsitePaths.Web3Wrapper, + link: { + title: '@0xproject/web3-wrapper', + to: WebsitePaths.Web3Wrapper, + }, }, ], [Categories.CommunityMaintained]: [ { - name: '0x Event Extractor', description: 'Node.js worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', - to: 'https://github.com/0xTracker/0x-event-extractor', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: '0x Event Extractor', + to: 'https://github.com/0xTracker/0x-event-extractor', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: '0x Tracker Worker', description: 'Node.js worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', - to: 'https://github.com/0xTracker/0x-tracker-worker', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: '0x Tracker Worker', + to: 'https://github.com/0xTracker/0x-tracker-worker', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'Aquaduct', description: "ERCdex's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", - to: 'https://www.npmjs.com/package/aqueduct', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'Aquaduct', + to: 'https://www.npmjs.com/package/aqueduct', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'Aquaduct Server SDK', description: 'SDKs for automation using Aqueduct & ERC dEX. Aqueduct Server is a lightweight, portable and secure server that runs locally on any workstation. The server exposes a small number of foundational endpoints that enable working with the decentralized Aqueduct liquidity pool from any context or programming language.', - to: 'https://github.com/ERCdEX/aqueduct-server-sdk', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'Aquaduct Server SDK', + to: 'https://github.com/ERCdEX/aqueduct-server-sdk', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'DDEX Node.js SDK', description: 'A node.js SDK for trading on the DDEX relayer', - to: 'https://www.npmjs.com/package/ddex-api', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://www.npmjs.com/package/ddex-api', + title: 'DDEX Node.js SDK', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'ERCdex Widget', description: "The ERC dEX Trade Widget let's any website provide token liquidity to it's users", - to: 'https://github.com/ERCdEX/widget', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://github.com/ERCdEX/widget', + title: 'ERCdex Widget', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'ERCdex Java SDK', description: "ERCdex's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", - to: 'https://github.com/ERCdEX/java', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://github.com/ERCdEX/java', + title: 'ERCdex Java SDK', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'ERCdex Python SDK', description: "ERCdex's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", - to: 'https://github.com/ERCdEX/python', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://github.com/ERCdEX/python', + title: 'ERCdex Python SDK', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'Massive', description: 'A set of command-line tools for creating command-line scripts for interacting with the Ethereum blockchain in general, and 0x in particular', - to: 'https://github.com/NoteGio/massive', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'Massive', + to: 'https://github.com/NoteGio/massive', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'OpenRelay', description: 'An open-source API-only Relayer written in Go', - to: 'https://github.com/NoteGio/openrelay', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://github.com/NoteGio/openrelay', + title: 'OpenRelay', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'OpenRelay.js', description: 'A JavaScript Library for Interacting with OpenRelay.xyz and other 0x Standard Relayer API Implementations', - to: 'https://github.com/NoteGio/openrelay.js', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'OpenRelay.js', + to: 'https://github.com/NoteGio/openrelay.js', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'Radar SDK', description: 'The Radar Relay SDK is a software development kit that simplifies the interactions with Radar Relay’s APIs', - to: 'https://github.com/RadarRelay/sdk', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'Radar SDK', + to: 'https://github.com/RadarRelay/sdk', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'The Ocean Javascript SDK', description: 'The Ocean provides a simple REST API, WebSockets API, and JavaScript library to help you integrate decentralized trading into your existing trading strategy.', - to: 'https://github.com/TheOceanTrade/theoceanx-javascript', - shouldOpenInNewTab: true, - isExternal: true, + link: { + title: 'The Ocean Javascript SDK', + to: 'https://github.com/TheOceanTrade/theoceanx-javascript', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'Tokenlon Javascript SDK', description: "Tokenlon SDK provides APIs for developers to trade of imToken's relayer", - to: 'https://www.npmjs.com/package/tokenlon-sdk', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://www.npmjs.com/package/tokenlon-sdk', + title: 'Tokenlon Javascript SDK', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, { - name: 'AssetData decoder library in Java', description: 'A small library that implements the 0x order assetData encoding/decoding in Java', - to: 'https://github.com/wildnothing/asset-data-decoder', - shouldOpenInNewTab: true, - isExternal: true, + link: { + to: 'https://github.com/wildnothing/asset-data-decoder', + title: 'AssetData decoder library in Java', + shouldOpenInNewTab: true, + type: LinkType.External, + }, }, ], }; interface Package { - name: string; description: string; - to: string; - isExternal?: boolean; - shouldOpenInNewTab?: boolean; + link: ALink; } export interface HomeProps { @@ -319,15 +378,18 @@ export class Home extends React.Component { }; const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; const mainContentPadding = isSmallScreen ? 20 : 50; - const topLevelMenu = { - 'Starter guides': _.map(TUTORIALS, tutorialInfo => - this.props.translate.get(tutorialInfo.title as Key, Deco.Cap), - ), - [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.name), - [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.name), + const sectionNameToLinks: ObjectMap = { + 'Starter guides': _.map(TUTORIALS, tutorialInfo => { + return { + ...tutorialInfo.link, + title: this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap), + }; + }), + [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.link), + [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.link), [Categories.CommunityMaintained]: _.map( CATEGORY_TO_PACKAGES[Categories.CommunityMaintained], - pkg => pkg.name, + pkg => pkg.link, ), }; return ( @@ -358,11 +420,7 @@ export class Home extends React.Component { onMouseEnter={this._onSidebarHover.bind(this, true)} onMouseLeave={this._onSidebarHover.bind(this, false)} > - + {this._renderMenu(sectionNameToLinks)}
{
{ {_.map(TUTORIALS, tutorialInfo => ( { ); } + private _renderMenu(sectionNameToLinks: ObjectMap): React.ReactNode { + const navigation = _.map(sectionNameToLinks, (links: ALink[], sectionName: string) => { + // tslint:disable-next-line:no-unused-variable + return ( +
+
+ {sectionName.toUpperCase()} +
+ {this._renderMenuItems(links)} +
+ ); + }); + return
{navigation}
; + } + private _renderMenuItems(links: ALink[]): React.ReactNode { + const menuItems = _.map(links, link => { + return ( +
+ + + {link.title} + + +
+ ); + }); + return menuItems; + } private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { return (
@@ -447,22 +541,21 @@ export class Home extends React.Component { ); } private _renderPackage(pkg: Package): React.ReactNode { - const id = sharedUtils.getIdFromName(pkg.name); + const id = sharedUtils.getIdFromName(pkg.link.title); return ( - +
- {pkg.name} + {pkg.link.title}
@@ -476,11 +569,11 @@ export class Home extends React.Component {
{this.props.translate.get(Key.More, Deco.Cap)}
diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index 388e83d51..b4462407f 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -2,13 +2,13 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); -import { Link } from 'react-router-dom'; import { Footer } from 'ts/components/footer'; import { SubscribeForm } from 'ts/components/forms/subscribe_form'; import { TopBar } from 'ts/components/top_bar/top_bar'; import { CallToAction } from 'ts/components/ui/button'; import { Container } from 'ts/components/ui/container'; import { Image } from 'ts/components/ui/image'; +import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { TypedText } from 'ts/components/ui/typed_text'; import { Dispatcher } from 'ts/redux/dispatcher'; @@ -213,14 +213,14 @@ export class Landing extends React.Component { className={`pt3 flex clearfix sm-mx-auto ${isSmallScreen ? 'justify-center' : ''}`} > - + {this.props.translate.get(Key.BuildCallToAction, Deco.Cap)}
- + {this.props.translate.get(Key.TradeCallToAction, Deco.Cap)} @@ -320,8 +320,7 @@ export class Landing extends React.Component { {this.props.translate.get(Key.FullListPrompt)}{' '} {this.props.translate.get(Key.FullListLink)} @@ -603,7 +602,7 @@ export class Landing extends React.Component { {this.props.translate.get(Key.FinalCallToAction, Deco.Cap)}
- + {this.props.translate.get(Key.BuildCallToAction, Deco.Cap)} diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index f93d998b6..7c79b271f 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -618,10 +618,22 @@ export interface InjectedWeb3 { }; } -export interface TutorialInfo { +export interface ALink { title: string; + to: string; + shouldOpenInNewTab?: boolean; + type?: LinkType; +} + +export interface TutorialInfo { iconUrl: string; description: string; - location: string; + link: ALink; +} + +export enum LinkType { + External = 'EXTERNAL', + ReactScroll = 'REACT_SCROLL', + ReactRoute = 'REACT_ROUTE', } // tslint:disable:max-file-line-count -- cgit From 4fb7b3515389439e1ffafebf520d0cfd84efb5d1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 10:52:37 +0100 Subject: Convert remaining Links to new UI component --- .../ts/components/documentation/docs_logo.tsx | 2 +- .../components/documentation/tutorial_button.tsx | 3 ++- packages/website/ts/components/ui/link.tsx | 30 ++++++++++++++++++++-- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 9bd742749..c16499158 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -1,5 +1,5 @@ import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; import { WebsitePaths } from 'ts/types'; export interface DocsLogoProps { diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 7ed9c6e4e..42aa37bc7 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -1,7 +1,7 @@ import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link } from 'react-router-dom'; +import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { Deco, Key, TutorialInfo } from 'ts/types'; import { Translate } from 'ts/utils/translate'; @@ -26,6 +26,7 @@ export class TutorialButton extends React.Component) => void; + onMouseLeave?: (event: React.MouseEvent) => void; + onMouseEnter?: (event: React.MouseEvent) => void; } /** @@ -22,6 +26,9 @@ export const Link: React.StatelessComponent = ({ to, shouldOpenInNewTab, children, + onMouseOver, + onMouseLeave, + onMouseEnter, }) => { const styleWithDefault = { textDecoration: 'none', @@ -31,13 +38,29 @@ export const Link: React.StatelessComponent = ({ switch (type) { case LinkType.External: return ( - + {children} ); case LinkType.ReactRoute: return ( - + {children} ); @@ -53,6 +76,9 @@ Link.defaultProps = { shouldOpenInNewTab: true, style: {}, className: '', + onMouseOver: _.noop.bind(_), + onMouseLeave: _.noop.bind(_), + onMouseEnter: _.noop.bind(_), }; Link.displayName = 'Link'; -- cgit From 0c80fea8216ede2b77c448e3e1b4d013c1c76669 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 10:52:48 +0100 Subject: Make tutorial buttons also open in a new tab --- packages/website/ts/pages/documentation/home.tsx | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 42ed1db8c..86999b8fe 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -27,6 +27,7 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.DevelopOnEthereum, to: `${WebsitePaths.Wiki}#Ethereum-Development`, + shouldOpenInNewTab: true, }, }, { @@ -35,6 +36,7 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.BuildARelayer, to: `${WebsitePaths.Wiki}#Build-A-Relayer`, + shouldOpenInNewTab: true, }, }, { @@ -43,6 +45,7 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.OrderBasics, to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + shouldOpenInNewTab: true, }, }, { @@ -51,6 +54,7 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.UseSharedLiquidity, to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + shouldOpenInNewTab: true, }, }, ]; @@ -68,6 +72,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '0x.js', to: WebsitePaths.ZeroExJs, + shouldOpenInNewTab: true, }, }, { @@ -76,8 +81,8 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '0x starter project', to: 'https://github.com/0xProject/0x-starter-project', - type: LinkType.External, shouldOpenInNewTab: true, + type: LinkType.External, }, }, { @@ -86,6 +91,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/connect', to: WebsitePaths.Connect, + shouldOpenInNewTab: true, }, }, { @@ -94,6 +100,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/contract-wrappers', to: WebsitePaths.ContractWrappers, + shouldOpenInNewTab: true, }, }, { @@ -102,6 +109,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/json-schemas', to: WebsitePaths.JSONSchemas, + shouldOpenInNewTab: true, }, }, { @@ -110,6 +118,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/order-utils', to: WebsitePaths.OrderUtils, + shouldOpenInNewTab: true, }, }, { @@ -118,6 +127,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/order-watcher', to: WebsitePaths.OrderWatcher, + shouldOpenInNewTab: true, }, }, { @@ -126,8 +136,8 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/sra-spec', to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', - type: LinkType.External, shouldOpenInNewTab: true, + type: LinkType.External, }, }, ], @@ -138,8 +148,8 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: 'abi-gen', to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', - type: LinkType.External, shouldOpenInNewTab: true, + type: LinkType.External, }, }, { @@ -148,6 +158,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: 'ethereum-types', to: WebsitePaths.EthereumTypes, + shouldOpenInNewTab: true, }, }, { @@ -156,6 +167,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/sol-compiler', to: WebsitePaths.SolCompiler, + shouldOpenInNewTab: true, }, }, { @@ -164,6 +176,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/sol-cov', to: WebsitePaths.SolCov, + shouldOpenInNewTab: true, }, }, { @@ -172,6 +185,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/subproviders', to: WebsitePaths.Subproviders, + shouldOpenInNewTab: true, }, }, { @@ -180,6 +194,7 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { link: { title: '@0xproject/web3-wrapper', to: WebsitePaths.Web3Wrapper, + shouldOpenInNewTab: true, }, }, ], -- cgit From 773220f84037680b17a8eccfbaa04cd265197390 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 11:27:28 +0100 Subject: Fix link --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 675357f41..a314f0f54 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -171,7 +171,12 @@ export class DevelopersDropDown extends React.Component - + {linkText}
-- cgit From 188564a343e2d0842bf4ac435c438df81c29ca2d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 11:28:56 +0100 Subject: Add padding to bottom of scroll area --- packages/website/ts/pages/documentation/home.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 86999b8fe..320fc6af2 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -489,8 +489,7 @@ export class Home extends React.Component { ))} -
-
+ {this._renderSectionTitle( this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords), )} @@ -504,6 +503,7 @@ export class Home extends React.Component { )} +
@@ -523,7 +523,11 @@ export class Home extends React.Component {
); }); - return
{navigation}
; + return ( + + {navigation} + + ); } private _renderMenuItems(links: ALink[]): React.ReactNode { const menuItems = _.map(links, link => { -- cgit From f13c48216160e0e1e58354ff09d0c583dfe30d10 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 11:43:17 +0100 Subject: Align logo and menu --- packages/website/ts/pages/documentation/home.tsx | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 320fc6af2..0aefc4662 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -490,20 +490,20 @@ export class Home extends React.Component { - {this._renderSectionTitle( - this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords), - )} - - {this._renderSectionDescription( - this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap), + {this._renderSectionTitle( + this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords), )} - - {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => - this._renderPackageCategory(category, pkgs), + + {this._renderSectionDescription( + this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap), )} + + {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => + this._renderPackageCategory(category, pkgs), + )} + -
@@ -524,7 +524,7 @@ export class Home extends React.Component { ); }); return ( - + {navigation} ); -- cgit From 55d61b0dc759255ce15b7c6be1a4dab2d9df792d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 12:14:22 +0100 Subject: Add border underneath logo while user is scrolling --- packages/website/ts/components/ui/container.tsx | 1 + packages/website/ts/pages/documentation/home.tsx | 35 ++++++++++++++++++++---- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx index 1e0bfd959..782ab3b6f 100644 --- a/packages/website/ts/components/ui/container.tsx +++ b/packages/website/ts/components/ui/container.tsx @@ -17,6 +17,7 @@ export interface ContainerProps { backgroundColor?: string; background?: string; borderRadius?: StringOrNum; + borderBottom?: StringOrNum; maxWidth?: StringOrNum; maxHeight?: StringOrNum; width?: StringOrNum; diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 0aefc4662..19a3f9eaf 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -360,24 +360,35 @@ export interface HomeProps { export interface HomeState { isHoveringSidebar: boolean; isHoveringMainContent: boolean; + isSidebarScrolling: boolean; } export class Home extends React.Component { private readonly _throttledScreenWidthUpdate: () => void; + private readonly _throttledSidebarScrolling: () => void; + private _sidebarScrollClearingInterval: number; constructor(props: HomeProps) { super(props); this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); + this._throttledSidebarScrolling = _.throttle(this._onSidebarScroll.bind(this), THROTTLE_TIMEOUT); this.state = { isHoveringSidebar: false, isHoveringMainContent: false, + isSidebarScrolling: false, }; } public componentDidMount(): void { window.addEventListener('resize', this._throttledScreenWidthUpdate); window.scrollTo(0, 0); + this._sidebarScrollClearingInterval = window.setInterval(() => { + this.setState({ + isSidebarScrolling: false, + }); + }, 1000); } public componentWillUnmount(): void { window.removeEventListener('resize', this._throttledScreenWidthUpdate); + window.clearInterval(this._sidebarScrollClearingInterval); } public render(): React.ReactNode { const scrollableContainerStyles: React.CSSProperties = { @@ -422,10 +433,14 @@ export class Home extends React.Component { width={234} paddingLeft={22} paddingRight={22} - paddingTop={2} + paddingTop={0} backgroundColor={colors.grey100} > - + + +
{ }} onMouseEnter={this._onSidebarHover.bind(this, true)} onMouseLeave={this._onSidebarHover.bind(this, false)} + onWheel={this._throttledSidebarScrolling} > {this._renderMenu(sectionNameToLinks)}
@@ -524,7 +540,7 @@ export class Home extends React.Component { ); }); return ( - + {navigation} ); @@ -625,9 +641,11 @@ export class Home extends React.Component { ); } private _onSidebarHover(isHovering: boolean, _event: React.FormEvent): void { - this.setState({ - isHoveringSidebar: isHovering, - }); + if (isHovering !== this.state.isHoveringSidebar) { + this.setState({ + isHoveringSidebar: isHovering, + }); + } } private _onMainContentHover(isHovering: boolean, _event: React.FormEvent): void { if (isHovering !== this.state.isHoveringMainContent) { @@ -636,6 +654,11 @@ export class Home extends React.Component { }); } } + private _onSidebarScroll(_event: React.FormEvent): void { + this.setState({ + isSidebarScrolling: true, + }); + } private _updateScreenWidth(): void { const newScreenWidth = utils.getScreenWidth(); this.props.dispatcher.updateScreenWidth(newScreenWidth); -- cgit From 80a6e6fe8dce9daeb69f0fd7529062780a58d5be Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 14:26:16 +0100 Subject: Decrease size of section descriptions --- packages/website/ts/pages/documentation/home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 19a3f9eaf..52a486c2d 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -635,7 +635,7 @@ export class Home extends React.Component { } private _renderSectionDescription(text: string): React.ReactNode { return ( - + {text} ); -- cgit From 6d8427a024d0175c4e0305503321b4169ff9ce05 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 14:26:30 +0100 Subject: Don't make opening links in new tab a default --- packages/website/ts/components/ui/link.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx index 30c76e3c9..f8522ca2b 100644 --- a/packages/website/ts/components/ui/link.tsx +++ b/packages/website/ts/components/ui/link.tsx @@ -39,7 +39,7 @@ export const Link: React.StatelessComponent = ({ case LinkType.External: return ( = ({ ); case LinkType.ReactRoute: + if (to === '/') { + console.log('got here!'); + } return ( = ({ Link.defaultProps = { type: LinkType.ReactRoute, - shouldOpenInNewTab: true, + shouldOpenInNewTab: false, style: {}, className: '', onMouseOver: _.noop.bind(_), -- cgit From 688325491fd9549c81ea65a4ad95fa42c2589927 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 14:37:49 +0100 Subject: Make whole bottom bar clickable not just the text --- .../components/dropdowns/developers_drop_down.tsx | 26 +++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index a314f0f54..af0ae825c 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -119,26 +119,26 @@ export class DevelopersDropDown extends React.Component{this._renderLinkSection(usefulLinksToLinkInfo)}
-
- {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)} - -
+
+
); return dropdownMenu; -- cgit From ab855cdd1cfa2e4fcc45499508dca9c9e8733b61 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 14:43:25 +0100 Subject: remove stray console --- packages/website/ts/components/ui/link.tsx | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/website/ts/components/ui/link.tsx b/packages/website/ts/components/ui/link.tsx index f8522ca2b..ad98efa6c 100644 --- a/packages/website/ts/components/ui/link.tsx +++ b/packages/website/ts/components/ui/link.tsx @@ -51,9 +51,6 @@ export const Link: React.StatelessComponent = ({ ); case LinkType.ReactRoute: - if (to === '/') { - console.log('got here!'); - } return ( Date: Wed, 3 Oct 2018 16:37:59 +0100 Subject: Use same Link UI component for react-scroll links --- .../react-docs/src/components/documentation.tsx | 9 +- packages/react-docs/src/docs_info.ts | 54 ++++++++--- packages/react-shared/package.json | 5 +- packages/react-shared/src/components/link.tsx | 100 +++++++++++++++++++++ .../src/components/nested_sidebar_menu.tsx | 66 ++++++-------- packages/react-shared/src/index.ts | 11 ++- packages/react-shared/src/types.ts | 13 +++ packages/website/package.json | 2 - .../documentation/docs_content_top_bar.tsx | 11 ++- .../ts/components/documentation/docs_logo.tsx | 2 +- .../components/documentation/tutorial_button.tsx | 3 +- .../components/dropdowns/developers_drop_down.tsx | 5 +- packages/website/ts/components/fill_order.tsx | 3 +- packages/website/ts/components/footer.tsx | 5 +- .../ts/components/inputs/token_amount_input.tsx | 3 +- .../website/ts/components/portal/back_button.tsx | 4 +- packages/website/ts/components/portal/portal.tsx | 3 +- packages/website/ts/components/top_bar/top_bar.tsx | 24 ++--- .../ts/components/top_bar/top_bar_menu_item.tsx | 4 +- .../website/ts/components/ui/custom_menu_item.tsx | 2 +- packages/website/ts/components/ui/link.tsx | 84 ----------------- packages/website/ts/components/ui/simple_menu.tsx | 2 +- packages/website/ts/pages/about/about.tsx | 3 +- .../website/ts/pages/documentation/doc_page.tsx | 8 +- packages/website/ts/pages/documentation/home.tsx | 13 ++- packages/website/ts/pages/landing/landing.tsx | 3 +- packages/website/ts/pages/wiki/wiki.tsx | 29 +++--- packages/website/ts/types.ts | 14 +-- yarn.lock | 27 ++++++ 29 files changed, 294 insertions(+), 218 deletions(-) create mode 100644 packages/react-shared/src/components/link.tsx delete mode 100644 packages/website/ts/components/ui/link.tsx diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 3cd14923c..1ed829b01 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -98,7 +98,10 @@ export class Documentation extends React.Component {_.isUndefined(this.props.docAgnosticFormat) ? ( @@ -128,8 +131,8 @@ export class Documentation extends React.Component
diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 6355a2f88..1c11e07de 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,5 +1,5 @@ -import { MenuSubsectionsBySection } from '@0xproject/react-shared'; -import { DocAgnosticFormat, TypeDefinitionByName } from '@0xproject/types'; +import { ALink, LinkType, MenuSubsectionsBySection, utils as sharedUtils } from '@0xproject/react-shared'; +import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0xproject/types'; import * as _ from 'lodash'; import { @@ -32,10 +32,10 @@ export class DocsInfo { this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId; } - public getMenuSubsectionsBySection(docAgnosticFormat?: DocAgnosticFormat): MenuSubsectionsBySection { - const menuSubsectionsBySection = {} as MenuSubsectionsBySection; + public getSubsectionNameToLinks(docAgnosticFormat?: DocAgnosticFormat): ObjectMap { + const subsectionNameToLinks: ObjectMap = {}; if (_.isUndefined(docAgnosticFormat)) { - return menuSubsectionsBySection; + return subsectionNameToLinks; } const docSections = _.keys(this.sections); @@ -56,7 +56,14 @@ export class DocsInfo { if (!_.isUndefined(this.sections.types) && sectionName === this.sections.types) { const sortedTypesNames = _.sortBy(docSection.types, 'name'); const typeNames = _.map(sortedTypesNames, t => t.name); - menuSubsectionsBySection[sectionName] = typeNames; + const typeLinks = _.map(typeNames, typeName => { + return { + to: `${sectionName}-${typeName}`, + title: typeName, + type: LinkType.ReactScroll, + }; + }); + subsectionNameToLinks[sectionName] = typeLinks; } else if (isExportedFunctionSection) { // Noop so that we don't have the method listed underneath itself. } else { @@ -71,15 +78,20 @@ export class DocsInfo { const methodNames = _.map(methodsSortedByName, m => m.name); const sortedFunctionNames = _.sortBy(docSection.functions, 'name'); const functionNames = _.map(sortedFunctionNames, m => m.name); - menuSubsectionsBySection[sectionName] = [ - ...eventNames, - ...propertyNames, - ...functionNames, - ...methodNames, - ]; + const names = [...eventNames, ...propertyNames, ...functionNames, ...methodNames]; + + const links = _.map(names, name => { + return { + to: `${sectionName}-${name}`, + title: name, + type: LinkType.ReactScroll, + }; + }); + + subsectionNameToLinks[sectionName] = links; } }); - return menuSubsectionsBySection; + return subsectionNameToLinks; } public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { if (_.isUndefined(this.sections.types)) { @@ -90,4 +102,20 @@ export class DocsInfo { const typeDefinitionByName = _.keyBy(typeDocSection.types, 'name') as any; return typeDefinitionByName; } + public getSectionNameToLinks(): ObjectMap { + const sectionNameToLinks: ObjectMap = {}; + _.each(this.menu, (linkTitles, sectionName) => { + sectionNameToLinks[sectionName] = []; + _.each(linkTitles, linkTitle => { + const to = sharedUtils.getIdFromName(linkTitle); + const links = sectionNameToLinks[sectionName]; + links.push({ + title: linkTitle, + to, + type: LinkType.ReactScroll, + }); + }); + }); + return sectionNameToLinks; + } } diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 67c644bf3..eaaa57ea2 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -33,6 +33,7 @@ "typescript": "3.0.1" }, "dependencies": { + "@0xproject/types": "^1.1.2", "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", @@ -40,6 +41,7 @@ "@types/node": "*", "@types/react": "*", "@types/react-dom": "*", + "@types/react-router-dom": "^4.0.4", "@types/react-scroll": "1.5.3", "basscss": "^8.0.3", "change-case": "^3.0.2", @@ -50,7 +52,8 @@ "react-dom": "^16.4.2", "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330" + "react-scroll": "0xproject/react-scroll#similar-to-pr-330", + "react-router-dom": "^4.1.1" }, "publishConfig": { "access": "public" diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx new file mode 100644 index 000000000..7425b9365 --- /dev/null +++ b/packages/react-shared/src/components/link.tsx @@ -0,0 +1,100 @@ +import * as _ from 'lodash'; +import * as React from 'react'; +import { Link as ReactRounterLink } from 'react-router-dom'; +import { Link as ScrollLink } from 'react-scroll'; + +import { LinkType } from '../types'; +import { constants } from '../utils/constants'; + +export interface LinkProps { + to: string; + type?: LinkType; + shouldOpenInNewTab?: boolean; + style?: React.CSSProperties; + className?: string; + onMouseOver?: (event: React.MouseEvent) => void; + onMouseLeave?: (event: React.MouseEvent) => void; + onMouseEnter?: (event: React.MouseEvent) => void; + containerId?: string; +} + +/** + * A generic link component which let's the developer render internal & external links, and their associated + * behaviors with a single link component. Many times we want a menu including both internal & external links + * and this abstracts away the differences of rendering both types of links. + */ +export const Link: React.StatelessComponent = ({ + style, + className, + type, + to, + shouldOpenInNewTab, + children, + onMouseOver, + onMouseLeave, + onMouseEnter, + containerId, +}) => { + const styleWithDefault = { + textDecoration: 'none', + ...style, + }; + + switch (type) { + case LinkType.External: + return ( + + {children} + + ); + case LinkType.ReactRoute: + return ( + + {children} + + ); + case LinkType.ReactScroll: + return ( + + {children} + + ); + default: + throw new Error(`Unrecognized LinkType: ${type}`); + } +}; + +Link.defaultProps = { + type: LinkType.ReactRoute, + shouldOpenInNewTab: false, + style: {}, + className: '', + onMouseOver: _.noop.bind(_), + onMouseLeave: _.noop.bind(_), + onMouseEnter: _.noop.bind(_), + containerId: constants.DOCS_CONTAINER_ID, +}; + +Link.displayName = 'Link'; diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 9933f3b38..2242349df 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -1,18 +1,19 @@ +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; -import { Link as ScrollLink } from 'react-scroll'; -import { MenuSubsectionsBySection, Styles } from '../types'; +import { ALink, LinkType, Styles } from '../types'; import { colors } from '../utils/colors'; import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; +import { Link } from './Link'; import { VersionDropDown } from './version_drop_down'; export interface NestedSidebarMenuProps { - topLevelMenu: { [topLevel: string]: string[] }; - menuSubsectionsBySection?: MenuSubsectionsBySection; + sectionNameToLinks: ObjectMap; + subsectionNameToLinks?: ObjectMap; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; onMenuItemClick?: () => void; @@ -44,10 +45,10 @@ export class NestedSidebarMenu extends React.Component { + const navigation = _.map(this.props.sectionNameToLinks, (links: ALink[], sectionName: string) => { const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); if (this.props.shouldDisplaySectionHeaders) { // tslint:disable-next-line:no-unused-variable @@ -56,11 +57,11 @@ export class NestedSidebarMenu extends React.Component {finalSectionName.toUpperCase()}
- {this._renderMenuItems(menuItems)} + {this._renderMenuItems(links)}
); } else { - return
{this._renderMenuItems(menuItems)}
; + return
{this._renderMenuItems(links)}
; } }); const maxWidthWithScrollbar = 307; @@ -82,26 +83,18 @@ export class NestedSidebarMenu extends React.Component ); } - private _renderMenuItems(menuItemNames: string[]): React.ReactNode[] { + private _renderMenuItems(links: ALink[]): React.ReactNode[] { const menuItemStyles = this.props.shouldDisplaySectionHeaders ? styles.menuItemWithHeaders : styles.menuItemWithoutHeaders; const menuItemInnerDivStyles = this.props.shouldDisplaySectionHeaders ? styles.menuItemInnerDivWithHeaders : {}; - const menuItems = _.map(menuItemNames, menuItemName => { + const menuItems = _.map(links, link => { const finalMenuItemName = this.props.shouldReformatMenuItemNames - ? utils.convertDashesToSpaces(menuItemName) - : menuItemName; - const id = utils.getIdFromName(menuItemName); + ? utils.convertDashesToSpaces(link.title) + : link.title; return ( -
- +
+ - - {this._renderMenuItemSubsections(menuItemName)} + + {this._renderMenuItemSubsections(link.title)}
); }); @@ -124,28 +117,21 @@ export class NestedSidebarMenu extends React.Component - {_.map(entityNames, entityName => { - const name = `${menuItemName}-${entityName}`; - const id = utils.getIdFromName(name); + {_.map(links, link => { + const name = `${menuItemName}-${link.title}`; return (
  • - + - {entityName} + {link.title} - +
  • ); })} diff --git a/packages/react-shared/src/index.ts b/packages/react-shared/src/index.ts index 3b50c0117..793214a87 100644 --- a/packages/react-shared/src/index.ts +++ b/packages/react-shared/src/index.ts @@ -4,8 +4,17 @@ export { MarkdownCodeBlock } from './components/markdown_code_block'; export { MarkdownSection } from './components/markdown_section'; export { NestedSidebarMenu } from './components/nested_sidebar_menu'; export { SectionHeader } from './components/section_header'; +export { Link } from './components/link'; -export { HeaderSizes, Styles, MenuSubsectionsBySection, EtherscanLinkSuffixes, Networks } from './types'; +export { + HeaderSizes, + Styles, + MenuSubsectionsBySection, + EtherscanLinkSuffixes, + Networks, + LinkType, + ALink, +} from './types'; export { utils } from './utils/utils'; export { constants } from './utils/constants'; diff --git a/packages/react-shared/src/types.ts b/packages/react-shared/src/types.ts index 88fadcc09..b3dd4045b 100644 --- a/packages/react-shared/src/types.ts +++ b/packages/react-shared/src/types.ts @@ -23,3 +23,16 @@ export enum Networks { Ropsten = 'Ropsten', Rinkeby = 'Rinkeby', } + +export enum LinkType { + External = 'EXTERNAL', + ReactScroll = 'REACT_SCROLL', + ReactRoute = 'REACT_ROUTE', +} + +export interface ALink { + title: string; + to: string; + shouldOpenInNewTab?: boolean; + type?: LinkType; +} diff --git a/packages/website/package.json b/packages/website/package.json index ab8835248..37e75e84e 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -52,7 +52,6 @@ "react-helmet": "^5.2.0", "react-popper": "^1.0.0-beta.6", "react-redux": "^5.0.3", - "react-router-dom": "^4.1.1", "react-scroll": "0xproject/react-scroll#similar-to-pr-330", "react-tooltip": "^3.2.7", "react-typist": "^2.0.4", @@ -81,7 +80,6 @@ "@types/react-dom": "^16.0.7", "@types/react-helmet": "^5.0.6", "@types/react-redux": "^4.4.37", - "@types/react-router-dom": "^4.0.4", "@types/react-scroll": "1.5.3", "@types/react-tap-event-plugin": "0.0.30", "@types/redux": "^3.6.0", diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index 7edb51587..d3735f2be 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -1,12 +1,11 @@ -import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; -import { Link } from 'ts/components/ui/link'; -import { ALink, Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -147,12 +146,12 @@ export class DocsContentTopBar extends React.Component
    TODO - {/* */} + />
    ); diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index c16499158..6f3c3c6e8 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -1,5 +1,5 @@ +import { Link } from '@0xproject/react-shared'; import * as React from 'react'; -import { Link } from 'ts/components/ui/link'; import { WebsitePaths } from 'ts/types'; export interface DocsLogoProps { diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 42aa37bc7..a0d99e175 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -1,7 +1,6 @@ -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; -import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { Deco, Key, TutorialInfo } from 'ts/types'; import { Translate } from 'ts/utils/translate'; diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index af0ae825c..4167b3d23 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -1,11 +1,10 @@ -import { colors } from '@0xproject/react-shared'; +import { ALink, colors, Link, LinkType } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; import { DropDown } from 'ts/components/ui/drop_down'; -import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; -import { ALink, Deco, Key, LinkType, WebsitePaths } from 'ts/types'; +import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index ec1d698f3..99939ce43 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -1,5 +1,5 @@ import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import { BigNumber, logUtils } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as accounting from 'accounting'; @@ -16,7 +16,6 @@ import { TokenAmountInput } from 'ts/components/inputs/token_amount_input'; import { Alert } from 'ts/components/ui/alert'; import { EthereumAddress } from 'ts/components/ui/ethereum_address'; import { Identicon } from 'ts/components/ui/identicon'; -import { Link } from 'ts/components/ui/link'; import { VisualOrder } from 'ts/components/visual_order'; import { Dispatcher } from 'ts/redux/dispatcher'; import { portalOrderSchema } from 'ts/schemas/portal_order_schema'; diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index bec3c17f7..02770c073 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -1,13 +1,12 @@ -import { colors } from '@0xproject/react-shared'; +import { ALink, colors, Link, LinkType } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; -import { Link } from 'ts/components/ui/link'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { ALink, Deco, Key, Language, LinkType, WebsitePaths } from 'ts/types'; +import { Deco, Key, Language, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx index adf96f9ee..562f670e2 100644 --- a/packages/website/ts/components/inputs/token_amount_input.tsx +++ b/packages/website/ts/components/inputs/token_amount_input.tsx @@ -1,11 +1,10 @@ -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { Blockchain } from 'ts/blockchain'; import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input'; -import { Link } from 'ts/components/ui/link'; import { Token, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types'; interface TokenAmountInputProps { diff --git a/packages/website/ts/components/portal/back_button.tsx b/packages/website/ts/components/portal/back_button.tsx index bdbcef343..64a332e07 100644 --- a/packages/website/ts/components/portal/back_button.tsx +++ b/packages/website/ts/components/portal/back_button.tsx @@ -1,7 +1,5 @@ -import { Styles } from '@0xproject/react-shared'; +import { Link, Styles } from '@0xproject/react-shared'; import * as React from 'react'; -import { Link } from 'ts/components/ui/link'; - import { Island } from 'ts/components/ui/island'; import { colors } from 'ts/style/colors'; diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index a9ccf9e11..b8cd45661 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -1,10 +1,9 @@ -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; import { Route, RouteComponentProps, Switch } from 'react-router-dom'; -import { Link } from 'ts/components/ui/link'; import { Blockchain } from 'ts/blockchain'; import { BlockchainErrDialog } from 'ts/components/dialogs/blockchain_err_dialog'; diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 3da2307e0..e25c0a0f7 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,11 +1,14 @@ -import { DocsInfo, DocsMenu } from '@0xproject/react-docs'; +import { DocsInfo } from '@0xproject/react-docs'; import { + ALink, colors, constants as sharedConstants, - MenuSubsectionsBySection, + Link, + LinkType, NestedSidebarMenu, Styles, } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; @@ -16,9 +19,8 @@ import { DrawerMenu } from 'ts/components/portal/drawer_menu'; import { ProviderDisplay } from 'ts/components/top_bar/provider_display'; import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item'; import { Container } from 'ts/components/ui/container'; -import { Link } from 'ts/components/ui/link'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, LinkType, ProviderType, WebsitePaths } from 'ts/types'; +import { Deco, Key, ProviderType, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -40,8 +42,8 @@ export interface TopBarProps { translate: Translate; docsVersion?: string; availableDocVersions?: string[]; - menu?: DocsMenu; - menuSubsectionsBySection?: MenuSubsectionsBySection; + sectionNameToLinks?: ObjectMap; + subsectionNameToLinks?: ObjectMap; displayType?: TopBarDisplayType; docsInfo?: DocsInfo; style?: React.CSSProperties; @@ -311,14 +313,14 @@ export class TopBar extends React.Component { // because the sidebar renders `react-scroll` links which depend on the scroll container already // being rendered. const documentationContainer = document.getElementById(sharedConstants.SCROLL_CONTAINER_ID); - if (!isViewingDocsPage || _.isUndefined(this.props.menu) || _.isNull(documentationContainer)) { + if (!isViewingDocsPage || _.isUndefined(this.props.sectionNameToLinks) || _.isNull(documentationContainer)) { return undefined; } return (
    { return (
    ) => void; - onMouseLeave?: (event: React.MouseEvent) => void; - onMouseEnter?: (event: React.MouseEvent) => void; -} - -/** - * A generic link component which let's the developer render internal & external links, and their associated - * behaviors with a single link component. Many times we want a menu including both internal & external links - * and this abstracts away the differences of rendering both types of links. - */ -export const Link: React.StatelessComponent = ({ - style, - className, - type, - to, - shouldOpenInNewTab, - children, - onMouseOver, - onMouseLeave, - onMouseEnter, -}) => { - const styleWithDefault = { - textDecoration: 'none', - ...style, - }; - - switch (type) { - case LinkType.External: - return ( - - {children} - - ); - case LinkType.ReactRoute: - return ( - - {children} - - ); - case LinkType.ReactScroll: - return
    TODO
    ; - default: - throw new Error(`Unrecognized LinkType: ${type}`); - } -}; - -Link.defaultProps = { - type: LinkType.ReactRoute, - shouldOpenInNewTab: false, - style: {}, - className: '', - onMouseOver: _.noop.bind(_), - onMouseLeave: _.noop.bind(_), - onMouseEnter: _.noop.bind(_), -}; - -Link.displayName = 'Link'; diff --git a/packages/website/ts/components/ui/simple_menu.tsx b/packages/website/ts/components/ui/simple_menu.tsx index 767da3675..bdaf0701e 100644 --- a/packages/website/ts/components/ui/simple_menu.tsx +++ b/packages/website/ts/components/ui/simple_menu.tsx @@ -1,7 +1,7 @@ +import { Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as CopyToClipboard from 'react-copy-to-clipboard'; -import { Link } from 'ts/components/ui/link'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx index ba1b423b9..efdf631b2 100644 --- a/packages/website/ts/pages/about/about.tsx +++ b/packages/website/ts/pages/about/about.tsx @@ -1,10 +1,9 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors, Link, Styles } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; import { Footer } from 'ts/components/footer'; import { TopBar } from 'ts/components/top_bar/top_bar'; -import { Link } from 'ts/components/ui/link'; import { Profile } from 'ts/pages/about/profile'; import { Dispatcher } from 'ts/redux/dispatcher'; import { ProfileInfo, WebsitePaths } from 'ts/types'; diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 6f029b6a2..9092a5cde 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -79,9 +79,9 @@ export class DocPage extends React.Component { this._isUnmounted = true; } public render(): React.ReactNode { - const menuSubsectionsBySection = _.isUndefined(this.state.docAgnosticFormat) + const subsectionNameToLinks = _.isUndefined(this.state.docAgnosticFormat) ? {} - : this.props.docsInfo.getMenuSubsectionsBySection(this.state.docAgnosticFormat); + : this.props.docsInfo.getSubsectionNameToLinks(this.state.docAgnosticFormat); const sourceUrl = this._getSourceUrl(); const iconFileName = idToIcon[this.props.docsInfo.id] || DEFAULT_ICON; const iconUrl = `/images/doc_icons/${iconFileName}`; @@ -93,8 +93,8 @@ export class DocPage extends React.Component { location={this.props.location} docsVersion={this.props.docsVersion} availableDocVersions={this.props.availableDocVersions} - menu={this.props.docsInfo.menu} - menuSubsectionsBySection={menuSubsectionsBySection} + sectionNameToLinks={this.props.docsInfo.getSectionNameToLinks()} + subsectionNameToLinks={subsectionNameToLinks} docsInfo={this.props.docsInfo} translate={this.props.translate} onVersionSelected={this._onVersionSelected.bind(this)} diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 52a486c2d..72e507a7b 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -1,4 +1,12 @@ -import { colors, constants as sharedConstants, MarkdownLinkBlock, utils as sharedUtils } from '@0xproject/react-shared'; +import { + ALink, + colors, + constants as sharedConstants, + Link, + LinkType, + MarkdownLinkBlock, + utils as sharedUtils, +} from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import MenuItem from 'material-ui/MenuItem'; @@ -10,10 +18,9 @@ import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_ import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { TutorialButton } from 'ts/components/documentation/tutorial_button'; import { Container } from 'ts/components/ui/container'; -import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { ALink, Deco, Key, LinkType, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; +import { Deco, Key, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index b4462407f..c819cd8a1 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); @@ -8,7 +8,6 @@ import { TopBar } from 'ts/components/top_bar/top_bar'; import { CallToAction } from 'ts/components/ui/button'; import { Container } from 'ts/components/ui/container'; import { Image } from 'ts/components/ui/image'; -import { Link } from 'ts/components/ui/link'; import { Text } from 'ts/components/ui/text'; import { TypedText } from 'ts/components/ui/typed_text'; import { Dispatcher } from 'ts/redux/dispatcher'; diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 55f532b11..3d8b8ef52 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -1,12 +1,15 @@ import { + ALink, colors, constants as sharedConstants, HeaderSizes, + LinkType, MarkdownSection, NestedSidebarMenu, Styles, utils as sharedUtils, } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import RaisedButton from 'material-ui/RaisedButton'; @@ -78,9 +81,10 @@ export class Wiki extends React.Component { window.removeEventListener('hashchange', this._onHashChanged.bind(this), false); } public render(): React.ReactNode { - const menuSubsectionsBySection = _.isUndefined(this.state.articlesBySection) + const sectionNameToLinks = _.isUndefined(this.state.articlesBySection) ? {} - : this._getMenuSubsectionsBySection(this.state.articlesBySection); + : this._getSectionNameToLinks(this.state.articlesBySection); + console.log('sectionNameToLinks', sectionNameToLinks); const mainContainersStyle: React.CSSProperties = { ...styles.mainContainers, overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden', @@ -92,7 +96,7 @@ export class Wiki extends React.Component { @@ -131,8 +135,7 @@ export class Wiki extends React.Component { onMouseLeave={this._onSidebarHoverOff.bind(this)} >
    @@ -223,15 +226,21 @@ export class Wiki extends React.Component { } } } - private _getMenuSubsectionsBySection(articlesBySection: ArticlesBySection): { [section: string]: string[] } { + private _getSectionNameToLinks(articlesBySection: ArticlesBySection): ObjectMap { const sectionNames = _.keys(articlesBySection); - const menuSubsectionsBySection: { [section: string]: string[] } = {}; + const sectionNameToLinks: ObjectMap = {}; for (const sectionName of sectionNames) { const articles = articlesBySection[sectionName]; - const articleNames = _.map(articles, article => article.title); - menuSubsectionsBySection[sectionName] = articleNames; + const articleLinks = _.map(articles, article => { + return { + to: sharedUtils.getIdFromName(article.title), + title: article.title, + type: LinkType.ReactScroll, + }; + }); + sectionNameToLinks[sectionName] = articleLinks; } - return menuSubsectionsBySection; + return sectionNameToLinks; } private _onSidebarHover(_event: React.FormEvent): void { this.setState({ diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 7c79b271f..a3d248a9d 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -1,3 +1,4 @@ +import { ALink } from '@0xproject/react-shared'; import { ObjectMap, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import { Provider } from 'ethereum-types'; @@ -618,22 +619,9 @@ export interface InjectedWeb3 { }; } -export interface ALink { - title: string; - to: string; - shouldOpenInNewTab?: boolean; - type?: LinkType; -} - export interface TutorialInfo { iconUrl: string; description: string; link: ALink; } - -export enum LinkType { - External = 'EXTERNAL', - ReactScroll = 'REACT_SCROLL', - ReactRoute = 'REACT_ROUTE', -} // tslint:disable:max-file-line-count diff --git a/yarn.lock b/yarn.lock index 9b9a04519..f2b7313ee 100644 --- a/yarn.lock +++ b/yarn.lock @@ -676,6 +676,16 @@ ethereum-types "^1.0.5" popper.js "1.14.3" +"@0xproject/typescript-typings@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-2.0.2.tgz#1812f64e341f1d24c09b8b5a951cbde0e5fff9c2" + dependencies: + "@types/bn.js" "^4.11.0" + "@types/react" "*" + bignumber.js "~4.1.0" + ethereum-types "^1.0.8" + popper.js "1.14.3" + "@0xproject/utils@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.7.3.tgz#ffa7c6da9bf0dd3e13694f185dcfc48a8981ff05" @@ -690,6 +700,23 @@ lodash "4.17.10" web3 "0.20.6" +"@0xproject/utils@^1.0.4": + version "1.0.11" + resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-1.0.11.tgz#5b53e7d9d4dbe68e219049218c9db04e97c37429" + dependencies: + "@0xproject/types" "^1.1.1" + "@0xproject/typescript-typings" "^2.0.2" + "@types/node" "*" + abortcontroller-polyfill "^1.1.9" + bignumber.js "~4.1.0" + detect-node "2.0.3" + ethereum-types "^1.0.8" + ethereumjs-util "^5.1.1" + ethers "3.0.22" + isomorphic-fetch "^2.2.1" + js-sha3 "^0.7.0" + lodash "^4.17.5" + "@0xproject/web3-wrapper@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@0xproject/web3-wrapper/-/web3-wrapper-0.7.3.tgz#9bd50b034b92fd505b6766b6e225f014b6d08b08" -- cgit From 751e8eafe483efb8b416b88c7edca6676ae9d607 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 16:41:44 +0100 Subject: Remove stray console.log --- packages/react-docs/src/components/documentation.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 1ed829b01..aa6d27402 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -99,9 +99,7 @@ export class Documentation extends React.Component {_.isUndefined(this.props.docAgnosticFormat) ? ( -- cgit From 72b1c60f392c8c8fc445223f2149ca3a62a83fed Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 16:44:18 +0100 Subject: Fix nit --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 4167b3d23..6133c8b4d 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -128,7 +128,7 @@ export class DevelopersDropDown extends React.Component
    Date: Wed, 3 Oct 2018 17:03:05 +0100 Subject: Use nestedSidebarMenu component for Dev home --- .../src/components/nested_sidebar_menu.tsx | 14 ++++++- packages/website/ts/pages/documentation/home.tsx | 49 ++++------------------ 2 files changed, 20 insertions(+), 43 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 2242349df..c871e77d4 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,7 +94,12 @@ export class NestedSidebarMenu extends React.Component - + - + { pkg => pkg.link, ), }; + console.log('sectionNameToLinks', sectionNameToLinks); return ( { onMouseLeave={this._onSidebarHover.bind(this, false)} onWheel={this._throttledSidebarScrolling} > - {this._renderMenu(sectionNameToLinks)} + + +
    { ); } - private _renderMenu(sectionNameToLinks: ObjectMap): React.ReactNode { - const navigation = _.map(sectionNameToLinks, (links: ALink[], sectionName: string) => { - // tslint:disable-next-line:no-unused-variable - return ( -
    -
    - {sectionName.toUpperCase()} -
    - {this._renderMenuItems(links)} -
    - ); - }); - return ( - - {navigation} - - ); - } - private _renderMenuItems(links: ALink[]): React.ReactNode { - const menuItems = _.map(links, link => { - return ( -
    - - - {link.title} - - -
    - ); - }); - return menuItems; - } private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { return (
    -- cgit From 1bef42cdcb45e4614ffdc8d8a1e455b4fe970a45 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 17:17:16 +0100 Subject: Improve comment --- packages/react-shared/src/components/link.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 7425b9365..6200bfbd3 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -19,9 +19,10 @@ export interface LinkProps { } /** - * A generic link component which let's the developer render internal & external links, and their associated - * behaviors with a single link component. Many times we want a menu including both internal & external links - * and this abstracts away the differences of rendering both types of links. + * A generic link component which let's the developer render internal, external and scroll-to-hash links, and + * their associated behaviors with a single link component. Many times we want a menu including a combination of + * internal, external and scroll links and the abstraction of the differences of rendering each types of link + * makes it much easier to do so. */ export const Link: React.StatelessComponent = ({ style, -- cgit From a7955c0964f3debaeaf77a58cdc5309535ad0ec0 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 17:19:39 +0100 Subject: Remove todo --- packages/website/ts/components/documentation/docs_content_top_bar.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx index d3735f2be..04385cfdb 100644 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_content_top_bar.tsx @@ -145,7 +145,6 @@ export class DocsContentTopBar extends React.Component
    - TODO Date: Wed, 3 Oct 2018 17:23:43 +0100 Subject: Fix linter --- packages/react-docs/src/docs_info.ts | 2 +- .../src/components/nested_sidebar_menu.tsx | 6 +- packages/react-shared/src/index.ts | 10 +- packages/react-shared/src/types.ts | 4 - .../documentation/docs_content_top_bar.tsx | 163 --------------------- .../ts/components/documentation/docs_top_bar.tsx | 163 +++++++++++++++++++++ packages/website/ts/pages/documentation/home.tsx | 5 +- 7 files changed, 170 insertions(+), 183 deletions(-) delete mode 100644 packages/website/ts/components/documentation/docs_content_top_bar.tsx create mode 100644 packages/website/ts/components/documentation/docs_top_bar.tsx diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 1c11e07de..12d571136 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,4 +1,4 @@ -import { ALink, LinkType, MenuSubsectionsBySection, utils as sharedUtils } from '@0xproject/react-shared'; +import { ALink, LinkType, utils as sharedUtils } from '@0xproject/react-shared'; import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0xproject/types'; import * as _ from 'lodash'; diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index c871e77d4..ec42c8265 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; -import { ALink, LinkType, Styles } from '../types'; +import { ALink, Styles } from '../types'; import { colors } from '../utils/colors'; import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; @@ -127,9 +127,9 @@ export class NestedSidebarMenu extends React.Component {_.map(links, link => { diff --git a/packages/react-shared/src/index.ts b/packages/react-shared/src/index.ts index 793214a87..1842e8af3 100644 --- a/packages/react-shared/src/index.ts +++ b/packages/react-shared/src/index.ts @@ -6,15 +6,7 @@ export { NestedSidebarMenu } from './components/nested_sidebar_menu'; export { SectionHeader } from './components/section_header'; export { Link } from './components/link'; -export { - HeaderSizes, - Styles, - MenuSubsectionsBySection, - EtherscanLinkSuffixes, - Networks, - LinkType, - ALink, -} from './types'; +export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, LinkType, ALink } from './types'; export { utils } from './utils/utils'; export { constants } from './utils/constants'; diff --git a/packages/react-shared/src/types.ts b/packages/react-shared/src/types.ts index b3dd4045b..daae7b115 100644 --- a/packages/react-shared/src/types.ts +++ b/packages/react-shared/src/types.ts @@ -8,10 +8,6 @@ export enum HeaderSizes { H3 = 'h3', } -export interface MenuSubsectionsBySection { - [section: string]: string[]; -} - export enum EtherscanLinkSuffixes { Address = 'address', Tx = 'tx', diff --git a/packages/website/ts/components/documentation/docs_content_top_bar.tsx b/packages/website/ts/components/documentation/docs_content_top_bar.tsx deleted file mode 100644 index 04385cfdb..000000000 --- a/packages/website/ts/components/documentation/docs_content_top_bar.tsx +++ /dev/null @@ -1,163 +0,0 @@ -import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; -import * as _ from 'lodash'; -import Drawer from 'material-ui/Drawer'; -import * as React from 'react'; -import { DocsLogo } from 'ts/components/documentation/docs_logo'; -import { Container } from 'ts/components/ui/container'; -import { Deco, Key, WebsitePaths } from 'ts/types'; -import { constants } from 'ts/utils/constants'; -import { Translate } from 'ts/utils/translate'; - -export interface DocsContentTopBarProps { - location: Location; - translate: Translate; - sectionNameToLinks?: ObjectMap; -} - -interface DocsContentTopBarState { - isDrawerOpen: boolean; -} - -interface MenuItemInfo { - title: string; - url: string; - iconUrl: string; - textStyle: React.CSSProperties; -} - -export class DocsContentTopBar extends React.Component { - constructor(props: DocsContentTopBarProps) { - super(props); - this.state = { - isDrawerOpen: false, - }; - } - public componentWillReceiveProps(nextProps: DocsContentTopBarProps): void { - if (nextProps.location.pathname !== this.props.location.pathname) { - this.setState({ - isDrawerOpen: false, - }); - } - } - public render(): React.ReactNode { - const menuItemInfos: MenuItemInfo[] = [ - { - title: this.props.translate.get(Key.Github, Deco.Cap), - url: constants.URL_GITHUB_ORG, - iconUrl: '/images/developers/github_icon.svg', - textStyle: { color: colors.linkSectionGrey }, - }, - { - title: this.props.translate.get(Key.Forum, Deco.Cap), - url: constants.URL_FORUM, - iconUrl: '/images/developers/forum_icon.svg', - textStyle: { color: colors.linkSectionGrey }, - }, - { - title: this.props.translate.get(Key.LiveChat, Deco.Cap), - url: constants.URL_ZEROEX_CHAT, - iconUrl: '/images/developers/chat_icon.svg', - textStyle: { color: colors.lightLinkBlue, fontWeight: 'bold' }, - }, - ]; - return ( - - -
    - - -
    - 0xproject.com -
    - -
    -
    -
    -
    - {this._renderMenuItems(menuItemInfos)} -
    -
    -
    - -
    -
    -
    - -
    -
    - -
    - {this._renderDrawer()} - - ); - } - private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { - const menuItems = _.map(menuItemInfos, menuItemInfo => { - return ( - -
    - -
    - {menuItemInfo.title} -
    -
    -
    - ); - }); - return menuItems; - } - private _renderDrawer(): React.ReactNode { - return ( - -
    - -
    -
    - ); - } - private _onMenuButtonClick(): void { - this.setState({ - isDrawerOpen: !this.state.isDrawerOpen, - }); - } -} diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx new file mode 100644 index 000000000..6a050d398 --- /dev/null +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -0,0 +1,163 @@ +import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; +import * as _ from 'lodash'; +import Drawer from 'material-ui/Drawer'; +import * as React from 'react'; +import { DocsLogo } from 'ts/components/documentation/docs_logo'; +import { Container } from 'ts/components/ui/container'; +import { Deco, Key, WebsitePaths } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +export interface DocsTopBarProps { + location: Location; + translate: Translate; + sectionNameToLinks?: ObjectMap; +} + +interface DocsTopBarState { + isDrawerOpen: boolean; +} + +interface MenuItemInfo { + title: string; + url: string; + iconUrl: string; + textStyle: React.CSSProperties; +} + +export class DocsTopBar extends React.Component { + constructor(props: DocsTopBarProps) { + super(props); + this.state = { + isDrawerOpen: false, + }; + } + public componentWillReceiveProps(nextProps: DocsTopBarProps): void { + if (nextProps.location.pathname !== this.props.location.pathname) { + this.setState({ + isDrawerOpen: false, + }); + } + } + public render(): React.ReactNode { + const menuItemInfos: MenuItemInfo[] = [ + { + title: this.props.translate.get(Key.Github, Deco.Cap), + url: constants.URL_GITHUB_ORG, + iconUrl: '/images/developers/github_icon.svg', + textStyle: { color: colors.linkSectionGrey }, + }, + { + title: this.props.translate.get(Key.Forum, Deco.Cap), + url: constants.URL_FORUM, + iconUrl: '/images/developers/forum_icon.svg', + textStyle: { color: colors.linkSectionGrey }, + }, + { + title: this.props.translate.get(Key.LiveChat, Deco.Cap), + url: constants.URL_ZEROEX_CHAT, + iconUrl: '/images/developers/chat_icon.svg', + textStyle: { color: colors.lightLinkBlue, fontWeight: 'bold' }, + }, + ]; + return ( + + +
    + + +
    + 0xproject.com +
    + +
    +
    +
    +
    + {this._renderMenuItems(menuItemInfos)} +
    +
    +
    + +
    +
    +
    + +
    +
    + +
    + {this._renderDrawer()} + + ); + } + private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { + const menuItems = _.map(menuItemInfos, menuItemInfo => { + return ( + +
    + +
    + {menuItemInfo.title} +
    +
    +
    + ); + }); + return menuItems; + } + private _renderDrawer(): React.ReactNode { + return ( + +
    + +
    +
    + ); + } + private _onMenuButtonClick(): void { + this.setState({ + isDrawerOpen: !this.state.isDrawerOpen, + }); + } +} diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 7c0bf433e..c0b50fab7 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -10,13 +10,12 @@ import { } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; -import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); import * as ReactMarkdown from 'react-markdown'; import { Element as ScrollElement } from 'react-scroll'; -import { DocsContentTopBar } from 'ts/components/documentation/docs_content_top_bar'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; +import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; import { TutorialButton } from 'ts/components/documentation/tutorial_button'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; @@ -475,7 +474,7 @@ export class Home extends React.Component { backgroundColor={colors.white} > - Date: Wed, 3 Oct 2018 17:25:23 +0100 Subject: rename for clarity --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index ec42c8265..0e6a06a3b 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -127,9 +127,9 @@ export class NestedSidebarMenu extends React.Component {_.map(links, link => { -- cgit From 4184c5db8597a7311f3efe82bce9a5e2668daf51 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 3 Oct 2018 17:30:23 +0100 Subject: Use Container and Text where possible --- .../ts/components/documentation/docs_top_bar.tsx | 23 +++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 6a050d398..e5aa2ea29 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -5,6 +5,7 @@ import Drawer from 'material-ui/Drawer'; import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; import { Deco, Key, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -71,9 +72,11 @@ export class DocsTopBar extends React.Component -
    - 0xproject.com -
    + + + 0xproject.com + +
    @@ -86,19 +89,15 @@ export class DocsTopBar extends React.Component
    -
    - -
    + onClick={this._onMenuButtonClick.bind(this)} + />
    Date: Wed, 3 Oct 2018 19:00:59 +0100 Subject: Convert more divs to Containers --- .../ts/components/documentation/docs_top_bar.tsx | 39 +++++++--------- packages/website/ts/pages/documentation/home.tsx | 54 +++++++++++----------- 2 files changed, 44 insertions(+), 49 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index e5aa2ea29..3fea1c714 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -65,7 +65,7 @@ export class DocsTopBar extends React.Component -
    + -
    -
    -
    -
    + + + + {this._renderMenuItems(menuItemInfos)} -
    -
    -
    + + + -
    -
    + + -
    + -
    + {this._renderDrawer()} ); @@ -124,12 +117,12 @@ export class DocsTopBar extends React.Component -
    +
    {menuItemInfo.title}
    -
    + ); }); @@ -143,14 +136,14 @@ export class DocsTopBar extends React.Component -
    + -
    + ); } diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index c0b50fab7..b95aa17f8 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -435,7 +435,7 @@ export class Home extends React.Component { } 50%, ${colors.white} 100%)`} > -
    + { onMouseOver={this._onMainContentHover.bind(this, true)} onMouseLeave={this._onMainContentHover.bind(this, false)} > -
    + {this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))} {this._renderSectionDescription( @@ -533,29 +533,29 @@ export class Home extends React.Component { -
    +
    -
    + ); } private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { return ( -
    + {category} -
    {_.map(pkgs, pkg => this._renderPackage(pkg))}
    -
    + {_.map(pkgs, pkg => this._renderPackage(pkg))} + ); } private _renderPackage(pkg: Package): React.ReactNode { const id = sharedUtils.getIdFromName(pkg.link.title); return ( -
    + -
    -
    + + { {pkg.link.title} -
    -
    - -
    -
    + + + + + + + { type={pkg.link.type} shouldOpenInNewTab={!!pkg.link.shouldOpenInNewTab} > -
    -
    {this.props.translate.get(Key.More, Deco.Cap)}
    + + {this.props.translate.get(Key.More, Deco.Cap)} -
    +
    -
    -
    -
    + + +
    ); } -- cgit From 85045267fe0643ab7f2af324df6135141aa8edb1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 4 Oct 2018 19:26:50 +0100 Subject: remove stray logs --- packages/website/ts/pages/documentation/home.tsx | 1 - packages/website/ts/pages/wiki/wiki.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index b95aa17f8..a8788aea7 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -425,7 +425,6 @@ export class Home extends React.Component { pkg => pkg.link, ), }; - console.log('sectionNameToLinks', sectionNameToLinks); return ( { const sectionNameToLinks = _.isUndefined(this.state.articlesBySection) ? {} : this._getSectionNameToLinks(this.state.articlesBySection); - console.log('sectionNameToLinks', sectionNameToLinks); const mainContainersStyle: React.CSSProperties = { ...styles.mainContainers, overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden', -- cgit From 60ba8d57d45aedde7a08e4638215453f899b8e0d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 10:13:19 +0100 Subject: Fix react warning --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 0e6a06a3b..709d0ace9 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -8,7 +8,7 @@ import { colors } from '../utils/colors'; import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; -import { Link } from './Link'; +import { Link } from './link'; import { VersionDropDown } from './version_drop_down'; export interface NestedSidebarMenuProps { -- cgit From 055763cceb9951b038b07488ddc7ae35210f1efe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 11:13:33 +0100 Subject: Fix bug where wiki links in dev dropdown weren't working when on the wiki --- packages/react-shared/src/components/link.tsx | 154 +++++++++++---------- .../components/dropdowns/developers_drop_down.tsx | 16 ++- packages/website/ts/components/top_bar/top_bar.tsx | 1 + 3 files changed, 93 insertions(+), 78 deletions(-) diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 6200bfbd3..7b22dc4fa 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -18,84 +18,94 @@ export interface LinkProps { containerId?: string; } +export interface LinkState {} + /** * A generic link component which let's the developer render internal, external and scroll-to-hash links, and * their associated behaviors with a single link component. Many times we want a menu including a combination of * internal, external and scroll links and the abstraction of the differences of rendering each types of link * makes it much easier to do so. */ -export const Link: React.StatelessComponent = ({ - style, - className, - type, - to, - shouldOpenInNewTab, - children, - onMouseOver, - onMouseLeave, - onMouseEnter, - containerId, -}) => { - const styleWithDefault = { - textDecoration: 'none', - ...style, +export class Link extends React.Component { + public static defaultProps: Partial = { + type: LinkType.ReactRoute, + shouldOpenInNewTab: false, + style: {}, + className: '', + onMouseOver: _.noop.bind(_), + onMouseLeave: _.noop.bind(_), + onMouseEnter: _.noop.bind(_), + containerId: constants.DOCS_CONTAINER_ID, }; - - switch (type) { - case LinkType.External: - return ( - - {children} - - ); - case LinkType.ReactRoute: - return ( - - {children} - - ); - case LinkType.ReactScroll: - return ( - - {children} - - ); - default: - throw new Error(`Unrecognized LinkType: ${type}`); + private _outerReactScrollSpan: HTMLSpanElement | null; + constructor(props: LinkProps) { + super(props); + this._outerReactScrollSpan = null; } -}; - -Link.defaultProps = { - type: LinkType.ReactRoute, - shouldOpenInNewTab: false, - style: {}, - className: '', - onMouseOver: _.noop.bind(_), - onMouseLeave: _.noop.bind(_), - onMouseEnter: _.noop.bind(_), - containerId: constants.DOCS_CONTAINER_ID, -}; + public render(): React.ReactNode { + const styleWithDefault = { + textDecoration: 'none', + cursor: 'pointer', + ...this.props.style, + }; -Link.displayName = 'Link'; + switch (this.props.type) { + case LinkType.External: + return ( + + {this.props.children} + + ); + case LinkType.ReactRoute: + return ( + + {this.props.children} + + ); + case LinkType.ReactScroll: + return ( + (this._outerReactScrollSpan = input)}> + + + {this.props.children} + + + + ); + default: + throw new Error(`Unrecognized LinkType: ${this.props.type}`); + } + } + // HACK(fabio): For some reason, the react-scroll link decided to stop the propagation of click events. + // We do however rely on these events being propagated in certain scenarios (e.g when the link + // is within a dropdown we want to close upon being clicked). Because of this, we registry the + // click event of an inner span, and pass it around the react-scroll link to an outer span. + private _onClickPropagateClickEventAroundScrollLink(): void { + if (!_.isNull(this._outerReactScrollSpan)) { + this._outerReactScrollSpan.click(); + } + } +} diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 6133c8b4d..ac1d82c75 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -64,6 +64,7 @@ const usefulLinksToLinkInfo: ALink[] = [ ]; interface DevelopersDropDownProps { + location: Location; translate: Translate; menuItemStyles: React.CSSProperties; menuIconStyle: React.CSSProperties; @@ -165,17 +166,20 @@ export class DevelopersDropDown extends React.Component { + const isWikiLink = _.startsWith(link.to, WebsitePaths.Wiki) && _.includes(link.to, '#'); + const isOnWiki = this.props.location.pathname === WebsitePaths.Wiki; + let to = link.to; + let type = link.type; + if (isWikiLink && isOnWiki) { + to = `${link.to.split('#')[1]}`; + type = LinkType.ReactScroll; + } i++; const isLast = i === numLinks; const linkText = this.props.translate.get(link.title as Key, Deco.Cap); return (
    - + {linkText}
    diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index e25c0a0f7..d05b72d98 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -161,6 +161,7 @@ export class TopBar extends React.Component {
    Date: Fri, 5 Oct 2018 11:46:35 +0100 Subject: Render paragraphs with spans so we don't get margin added --- packages/website/ts/pages/documentation/home.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index a8788aea7..7e34136a8 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -572,6 +572,7 @@ export class Home extends React.Component { source={pkg.description} renderers={{ link: MarkdownLinkBlock, + paragraph: 'span', }} /> -- cgit From e7de4b953fe8aaefee9c043679b021a485dc6dee Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 11:51:52 +0100 Subject: Apply props to all link variants when possible --- packages/react-shared/src/components/link.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 7b22dc4fa..ee55cc642 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -80,13 +80,19 @@ export class Link extends React.Component { ); case LinkType.ReactScroll: return ( - (this._outerReactScrollSpan = input)}> + (this._outerReactScrollSpan = input)} + onMouseOver={this.props.onMouseOver} + onMouseEnter={this.props.onMouseEnter} + onMouseLeave={this.props.onMouseLeave} + > -- cgit From f7aee9c7a9df36e20888c10616a249c2a79ed749 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 12:00:24 +0100 Subject: Remove containerId option and throw if passing in shouldOpenInNewTab with type ReactScroll --- packages/react-shared/src/components/link.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index ee55cc642..e8a13d506 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -6,7 +6,7 @@ import { Link as ScrollLink } from 'react-scroll'; import { LinkType } from '../types'; import { constants } from '../utils/constants'; -export interface LinkProps { +interface LinkProps { to: string; type?: LinkType; shouldOpenInNewTab?: boolean; @@ -15,7 +15,6 @@ export interface LinkProps { onMouseOver?: (event: React.MouseEvent) => void; onMouseLeave?: (event: React.MouseEvent) => void; onMouseEnter?: (event: React.MouseEvent) => void; - containerId?: string; } export interface LinkState {} @@ -35,7 +34,6 @@ export class Link extends React.Component { onMouseOver: _.noop.bind(_), onMouseLeave: _.noop.bind(_), onMouseEnter: _.noop.bind(_), - containerId: constants.DOCS_CONTAINER_ID, }; private _outerReactScrollSpan: HTMLSpanElement | null; constructor(props: LinkProps) { @@ -43,6 +41,10 @@ export class Link extends React.Component { this._outerReactScrollSpan = null; } public render(): React.ReactNode { + if (this.props.type === LinkType.ReactScroll && this.props.shouldOpenInNewTab) { + throw new Error(`Cannot open LinkType.ReactScroll links in new tab. link.to: ${this.props.to}`); + } + const styleWithDefault = { textDecoration: 'none', cursor: 'pointer', @@ -91,7 +93,7 @@ export class Link extends React.Component { offset={0} hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} - containerId={this.props.containerId} + containerId={constants.DOCS_CONTAINER_ID} className={this.props.className} style={styleWithDefault} > -- cgit From e0355a2e395fc056fd1d5c5e1780784853546acd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 12:03:15 +0100 Subject: Rename scroll container --- packages/react-docs/src/components/type.tsx | 2 +- packages/react-shared/src/components/anchor_title.tsx | 2 +- packages/react-shared/src/components/link.tsx | 2 +- .../react-shared/src/components/nested_sidebar_menu.tsx | 14 ++------------ packages/react-shared/src/utils/constants.ts | 3 +-- 5 files changed, 6 insertions(+), 17 deletions(-) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 5c018f5dd..2e0003198 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -228,7 +228,7 @@ export const Type: React.SFC = (props: TypeProps): any => { offset={0} hashSpy={true} duration={sharedConstants.DOCS_SCROLL_DURATION_MS} - containerId={sharedConstants.DOCS_CONTAINER_ID} + containerId={sharedConstants.SCROLL_CONTAINER_ID} > {sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? ( {typeName} diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 8f7e4af27..a83881b67 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -71,7 +71,7 @@ export class AnchorTitle extends React.Component { offset={0} hashSpy={true} duration={constants.DOCS_SCROLL_DURATION_MS} - containerId={constants.DOCS_CONTAINER_ID} + containerId={constants.SCROLL_CONTAINER_ID} className={this.props.className} style={styleWithDefault} > diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 709d0ace9..0bc516223 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,12 +94,7 @@ export class NestedSidebarMenu extends React.Component - + - + Date: Fri, 5 Oct 2018 13:54:37 +0100 Subject: Remove style prop from Link --- packages/react-docs/src/components/source_link.tsx | 8 ++--- packages/react-shared/src/components/link.tsx | 12 ++++--- .../ts/components/documentation/docs_logo.tsx | 8 ++--- .../ts/components/documentation/docs_top_bar.tsx | 6 ++-- .../components/dropdowns/developers_drop_down.tsx | 21 ++++------- packages/website/ts/components/fill_order.tsx | 2 +- packages/website/ts/components/footer.tsx | 7 +--- .../ts/components/inputs/token_amount_input.tsx | 3 +- .../ts/components/top_bar/top_bar_menu_item.tsx | 2 +- .../website/ts/components/ui/custom_menu_item.tsx | 3 +- packages/website/ts/pages/about/about.tsx | 2 +- packages/website/ts/pages/documentation/home.tsx | 41 ++++++++++++---------- packages/website/ts/pages/landing/landing.tsx | 5 +-- 13 files changed, 56 insertions(+), 64 deletions(-) diff --git a/packages/react-docs/src/components/source_link.tsx b/packages/react-docs/src/components/source_link.tsx index 3096ad8d5..c6dd09adb 100644 --- a/packages/react-docs/src/components/source_link.tsx +++ b/packages/react-docs/src/components/source_link.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import { Source } from '@0xproject/types'; import * as React from 'react'; @@ -13,9 +13,9 @@ export const SourceLink = (props: SourceLinkProps) => { const sourceCodeUrl = `${props.sourceUrl}/${src.fileName}#L${src.line}`; return (
    - - Source - + + {'Source'} +
    ); }; diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 51ffa1e1d..60891dd7a 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -10,11 +10,12 @@ interface LinkProps { to: string; type?: LinkType; shouldOpenInNewTab?: boolean; - style?: React.CSSProperties; className?: string; onMouseOver?: (event: React.MouseEvent) => void; onMouseLeave?: (event: React.MouseEvent) => void; onMouseEnter?: (event: React.MouseEvent) => void; + textDecoration?: string; + fontColor?: string; } export interface LinkState {} @@ -29,11 +30,12 @@ export class Link extends React.Component { public static defaultProps: Partial = { type: LinkType.ReactRoute, shouldOpenInNewTab: false, - style: {}, className: '', onMouseOver: _.noop.bind(_), onMouseLeave: _.noop.bind(_), onMouseEnter: _.noop.bind(_), + textDecoration: 'none', + fontColor: 'inherit', }; private _outerReactScrollSpan: HTMLSpanElement | null; constructor(props: LinkProps) { @@ -46,11 +48,13 @@ export class Link extends React.Component { } const styleWithDefault = { - textDecoration: 'none', + textDecoration: this.props.textDecoration, cursor: 'pointer', - ...this.props.style, + color: this.props.fontColor, }; + console.log('styleWithDefault', styleWithDefault); + switch (this.props.type) { case LinkType.External: return ( diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index 6f3c3c6e8..b727fea36 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -9,11 +9,9 @@ export interface DocsLogoProps { export const DocsLogo: React.StatelessComponent = props => { return ( -
    - - - -
    + + + ); }; diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 3fea1c714..0b563a76b 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -68,7 +68,7 @@ export class DocsTopBar extends React.Component @@ -86,7 +86,9 @@ export class DocsTopBar extends React.Component - + + + {this._renderLinkSection(usefulLinksToLinkInfo)}
    - +
    {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)} @@ -159,10 +154,6 @@ export class DevelopersDropDown extends React.Component { @@ -179,8 +170,10 @@ export class DevelopersDropDown extends React.Component - - {linkText} + + + {linkText} +
    ); diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 99939ce43..c1bbadfde 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -323,7 +323,7 @@ export class FillOrder extends React.Component { return (
    Order successfully filled. See the trade details in your{' '} - + trade history
    diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index 02770c073..d90f2f708 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -12,11 +12,6 @@ import { Translate } from 'ts/utils/translate'; const ICON_DIMENSION = 16; -const linkStyle = { - color: colors.white, - cursor: 'pointer', -}; - const languageToMenuTitle = { [Language.English]: 'English', [Language.Russian]: 'Русский', @@ -187,7 +182,7 @@ export class Footer extends React.Component { const iconIfExists = titleToIcon[link.title]; return (
    - +
    {!_.isUndefined(iconIfExists) ? (
    diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx index 562f670e2..134d1cc76 100644 --- a/packages/website/ts/components/inputs/token_amount_input.tsx +++ b/packages/website/ts/components/inputs/token_amount_input.tsx @@ -111,7 +111,8 @@ export class TokenAmountInput extends React.Component Set allowance diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx index d5ee96850..c88db95fa 100644 --- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx +++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx @@ -37,7 +37,7 @@ export class TopBarMenuItem extends React.Component - + {itemContent}
    diff --git a/packages/website/ts/components/ui/custom_menu_item.tsx b/packages/website/ts/components/ui/custom_menu_item.tsx index 11f61b336..c25da6be6 100644 --- a/packages/website/ts/components/ui/custom_menu_item.tsx +++ b/packages/website/ts/components/ui/custom_menu_item.tsx @@ -4,7 +4,6 @@ import * as React from 'react'; interface CustomMenuItemProps { to: string; - style?: React.CSSProperties; onClick?: () => void; className?: string; } @@ -30,7 +29,7 @@ export class CustomMenuItem extends React.Component +
    { }} > We are seeking outstanding candidates to{' '} - + join our team . We value passion, diversity and unique perspectives. diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index 7e34136a8..abe0ae6af 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -446,12 +446,14 @@ export class Home extends React.Component { - + + +
    { @@ -578,23 +580,24 @@ export class Home extends React.Component { - - - {this.props.translate.get(Key.More, Deco.Cap)} - - + + + + {this.props.translate.get(Key.More, Deco.Cap)} + + + - - + + diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index c819cd8a1..395cdabf8 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -317,10 +317,7 @@ export class Landing extends React.Component { }} > {this.props.translate.get(Key.FullListPrompt)}{' '} - + {this.props.translate.get(Key.FullListLink)}
    -- cgit From fa6bd348992674192d07fef3d60950980212ecbb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 14:55:28 +0100 Subject: Remove type prop and instead infer it from the value of to --- .../react-docs/src/components/documentation.tsx | 23 ++++++++++++---------- packages/react-docs/src/components/type.tsx | 11 +++-------- packages/react-docs/src/docs_info.ts | 5 +---- packages/react-shared/src/components/link.tsx | 22 ++++++++++++++------- .../src/components/markdown_section.tsx | 13 ++++++------ .../src/components/nested_sidebar_menu.tsx | 4 ++-- packages/react-shared/src/index.ts | 2 +- packages/react-shared/src/types.ts | 1 - packages/website/package.json | 2 ++ .../components/dialogs/blockchain_err_dialog.tsx | 2 +- .../components/dropdowns/developers_drop_down.tsx | 10 +++------- packages/website/ts/components/footer.tsx | 23 +++++++++++++--------- packages/website/ts/components/top_bar/top_bar.tsx | 16 ++++----------- .../ts/components/top_bar/top_bar_menu_item.tsx | 7 ++++--- packages/website/ts/pages/documentation/home.tsx | 21 -------------------- packages/website/ts/pages/wiki/wiki.tsx | 2 -- 16 files changed, 69 insertions(+), 95 deletions(-) diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index de2ccca8b..6a08d50e0 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -2,6 +2,7 @@ import { colors, constants as sharedConstants, EtherscanLinkSuffixes, + Link, MarkdownSection, NestedSidebarMenu, Networks, @@ -319,9 +320,9 @@ export class Documentation extends React.Component {`import { `} - + {exportName} - + {` } from '${this.props.docsInfo.packageName}'`}
    @@ -350,14 +351,16 @@ export class Documentation extends React.Component - - +
    + + + +
    ); }, ); diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 2e0003198..1ae1324c6 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -1,4 +1,4 @@ -import { colors, constants as sharedConstants, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0xproject/react-shared'; import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0xproject/types'; import { errorUtils } from '@0xproject/utils'; import * as _ from 'lodash'; @@ -205,14 +205,9 @@ export const Type: React.SFC = (props: TypeProps): any => { const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined; if (!_.isUndefined(typeNameUrlIfExists)) { typeName = ( - + {typeName} - + ); } else if ( (isReference || isArray) && diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index f3bdf4964..549106c77 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,4 +1,4 @@ -import { ALink, LinkType, utils as sharedUtils } from '@0xproject/react-shared'; +import { ALink, utils as sharedUtils } from '@0xproject/react-shared'; import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0xproject/types'; import * as _ from 'lodash'; @@ -62,7 +62,6 @@ export class DocsInfo { return { to: `${sectionName}-${typeName}`, title: typeName, - type: LinkType.ReactScroll, }; }); subsectionNameToLinks[sectionName] = typeLinks; @@ -86,7 +85,6 @@ export class DocsInfo { return { to: `${sectionName}-${name}`, title: name, - type: LinkType.ReactScroll, }; }); @@ -114,7 +112,6 @@ export class DocsInfo { links.push({ title: linkTitle, to, - type: LinkType.ReactScroll, }); }); }); diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 60891dd7a..05ca93cc5 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -2,13 +2,13 @@ import * as _ from 'lodash'; import * as React from 'react'; import { Link as ReactRounterLink } from 'react-router-dom'; import { Link as ScrollLink } from 'react-scroll'; +import * as validUrl from 'valid-url'; import { LinkType } from '../types'; import { constants } from '../utils/constants'; interface LinkProps { to: string; - type?: LinkType; shouldOpenInNewTab?: boolean; className?: string; onMouseOver?: (event: React.MouseEvent) => void; @@ -28,7 +28,6 @@ export interface LinkState {} */ export class Link extends React.Component { public static defaultProps: Partial = { - type: LinkType.ReactRoute, shouldOpenInNewTab: false, className: '', onMouseOver: _.noop.bind(_), @@ -43,7 +42,18 @@ export class Link extends React.Component { this._outerReactScrollSpan = null; } public render(): React.ReactNode { - if (this.props.type === LinkType.ReactScroll && this.props.shouldOpenInNewTab) { + let type: LinkType; + const isReactRoute = _.startsWith(this.props.to, '/'); + const isExternal = validUrl.isWebUri(this.props.to) || _.startsWith(this.props.to, 'mailto:'); + if (isReactRoute) { + type = LinkType.ReactRoute; + } else if (isExternal) { + type = LinkType.External; + } else { + type = LinkType.ReactScroll; + } + + if (type === LinkType.ReactScroll && this.props.shouldOpenInNewTab) { throw new Error(`Cannot open LinkType.ReactScroll links in new tab. link.to: ${this.props.to}`); } @@ -53,9 +63,7 @@ export class Link extends React.Component { color: this.props.fontColor, }; - console.log('styleWithDefault', styleWithDefault); - - switch (this.props.type) { + switch (type) { case LinkType.External: return ( { ); default: - throw new Error(`Unrecognized LinkType: ${this.props.type}`); + throw new Error(`Unrecognized LinkType: ${type}`); } } // HACK(fabio): For some reason, the react-scroll link decided to stop the propagation of click events. diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index 09b214548..e84d2b078 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -8,6 +8,7 @@ import { colors } from '../utils/colors'; import { utils } from '../utils/utils'; import { AnchorTitle } from './anchor_title'; +import { Link } from './link'; import { MarkdownCodeBlock } from './markdown_code_block'; import { MarkdownLinkBlock } from './markdown_link_block'; @@ -63,13 +64,11 @@ export class MarkdownSection extends React.Component
    diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 0bc516223..7f5e16f01 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -94,7 +94,7 @@ export class NestedSidebarMenu extends React.Component - + - + - + {linkText} diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index d90f2f708..f11ecae19 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -1,4 +1,4 @@ -import { ALink, colors, Link, LinkType } from '@0xproject/react-shared'; +import { ALink, colors, Link } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import DropDownMenu from 'material-ui/DropDownMenu'; @@ -54,7 +54,7 @@ export class Footer extends React.Component { { title: this.props.translate.get(Key.Whitepaper, Deco.Cap), to: WebsitePaths.Whitepaper, - type: LinkType.External, + shouldOpenInNewTab: true, }, { title: this.props.translate.get(Key.Wiki, Deco.Cap), @@ -68,28 +68,28 @@ export class Footer extends React.Component { [Key.Community]: [ { title: this.props.translate.get(Key.RocketChat, Deco.Cap), - type: LinkType.External, to: constants.URL_ZEROEX_CHAT, + shouldOpenInNewTab: true, }, { title: this.props.translate.get(Key.Blog, Deco.Cap), - type: LinkType.External, to: constants.URL_BLOG, + shouldOpenInNewTab: true, }, { title: 'Twitter', - type: LinkType.External, to: constants.URL_TWITTER, + shouldOpenInNewTab: true, }, { title: 'Reddit', - type: LinkType.External, to: constants.URL_REDDIT, + shouldOpenInNewTab: true, }, { title: this.props.translate.get(Key.Forum, Deco.Cap), - type: LinkType.External, to: constants.URL_DISCOURSE_FORUM, + shouldOpenInNewTab: true, }, ], [Key.Organization]: [ @@ -103,8 +103,8 @@ export class Footer extends React.Component { }, { title: this.props.translate.get(Key.Contact, Deco.Cap), - type: LinkType.External, to: 'mailto:team@0xproject.com', + shouldOpenInNewTab: true, }, ], }; @@ -182,7 +182,12 @@ export class Footer extends React.Component { const iconIfExists = titleToIcon[link.title]; return (
    - +
    {!_.isUndefined(iconIfExists) ? (
    diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index d05b72d98..3297befad 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,13 +1,5 @@ import { DocsInfo } from '@0xproject/react-docs'; -import { - ALink, - colors, - constants as sharedConstants, - Link, - LinkType, - NestedSidebarMenu, - Styles, -} from '@0xproject/react-shared'; +import { ALink, colors, constants as sharedConstants, Link, NestedSidebarMenu, Styles } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; @@ -177,7 +169,7 @@ export class TopBar extends React.Component { path={constants.URL_BLOG} style={styles.menuItem} isNightVersion={isNightVersion} - linkType={LinkType.External} + shouldOpenInNewTab={true} /> { )} - + {this.props.translate.get(Key.Whitepaper, Deco.Cap)} @@ -294,7 +286,7 @@ export class TopBar extends React.Component { {this.props.translate.get(Key.Careers, Deco.Cap)} - + {this.props.translate.get(Key.Blog, Deco.Cap)} diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx index c88db95fa..eff5ba66d 100644 --- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx +++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx @@ -1,4 +1,4 @@ -import { colors, Link, LinkType } from '@0xproject/react-shared'; +import { colors, Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; @@ -12,7 +12,7 @@ interface TopBarMenuItemProps { title: string; path?: string; isPrimary?: boolean; - linkType: LinkType; + shouldOpenInNewTab?: boolean; style?: React.CSSProperties; className?: string; isNightVersion?: boolean; @@ -25,6 +25,7 @@ export class TopBarMenuItem extends React.Component - + {itemContent}
    diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index abe0ae6af..f7c4839b4 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -3,7 +3,6 @@ import { colors, constants as sharedConstants, Link, - LinkType, MarkdownLinkBlock, NestedSidebarMenu, utils as sharedUtils, @@ -89,7 +88,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: '0x starter project', to: 'https://github.com/0xProject/0x-starter-project', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -144,7 +142,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: '@0xproject/sra-spec', to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', shouldOpenInNewTab: true, - type: LinkType.External, }, }, ], @@ -156,7 +153,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'abi-gen', to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -213,7 +209,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: '0x Event Extractor', to: 'https://github.com/0xTracker/0x-event-extractor', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -223,7 +218,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: '0x Tracker Worker', to: 'https://github.com/0xTracker/0x-tracker-worker', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -233,7 +227,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'Aquaduct', to: 'https://www.npmjs.com/package/aqueduct', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -243,7 +236,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'Aquaduct Server SDK', to: 'https://github.com/ERCdEX/aqueduct-server-sdk', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -252,7 +244,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://www.npmjs.com/package/ddex-api', title: 'DDEX Node.js SDK', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -261,7 +252,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://github.com/ERCdEX/widget', title: 'ERCdex Widget', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -270,7 +260,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://github.com/ERCdEX/java', title: 'ERCdex Java SDK', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -279,7 +268,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://github.com/ERCdEX/python', title: 'ERCdex Python SDK', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -289,7 +277,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'Massive', to: 'https://github.com/NoteGio/massive', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -298,7 +285,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://github.com/NoteGio/openrelay', title: 'OpenRelay', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -308,7 +294,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'OpenRelay.js', to: 'https://github.com/NoteGio/openrelay.js', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -318,7 +303,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'Radar SDK', to: 'https://github.com/RadarRelay/sdk', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -328,7 +312,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { title: 'The Ocean Javascript SDK', to: 'https://github.com/TheOceanTrade/theoceanx-javascript', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -337,7 +320,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://www.npmjs.com/package/tokenlon-sdk', title: 'Tokenlon Javascript SDK', shouldOpenInNewTab: true, - type: LinkType.External, }, }, { @@ -346,7 +328,6 @@ const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { to: 'https://github.com/wildnothing/asset-data-decoder', title: 'AssetData decoder library in Java', shouldOpenInNewTab: true, - type: LinkType.External, }, }, ], @@ -560,7 +541,6 @@ export class Home extends React.Component { @@ -584,7 +564,6 @@ export class Home extends React.Component { diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 230fff410..70f54aceb 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -3,7 +3,6 @@ import { colors, constants as sharedConstants, HeaderSizes, - LinkType, MarkdownSection, NestedSidebarMenu, Styles, @@ -234,7 +233,6 @@ export class Wiki extends React.Component { return { to: sharedUtils.getIdFromName(article.title), title: article.title, - type: LinkType.ReactScroll, }; }); sectionNameToLinks[sectionName] = articleLinks; -- cgit From ded6742ddd70e295f15dab6363c935777a6a5588 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 15:06:59 +0100 Subject: remove inline style --- packages/website/ts/components/documentation/docs_top_bar.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 0b563a76b..f95dbb5e1 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -115,14 +115,11 @@ export class DocsTopBar extends React.Component
    - {menuItemInfo.title} + {menuItemInfo.title}
    -- cgit From df7210163ad2835dcb6e461da173d1873d3195d4 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 15:33:15 +0100 Subject: Convert more divs to containers and text components --- .../ts/components/documentation/docs_top_bar.tsx | 22 ++++-- .../components/dropdowns/developers_drop_down.tsx | 86 +++++++++------------- packages/website/ts/components/ui/container.tsx | 2 + packages/website/ts/components/ui/text.tsx | 4 + 4 files changed, 57 insertions(+), 57 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index f95dbb5e1..9a2146f9c 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -24,7 +24,8 @@ interface MenuItemInfo { title: string; url: string; iconUrl: string; - textStyle: React.CSSProperties; + fontColor: string; + fontWeight?: string; } export class DocsTopBar extends React.Component { @@ -47,19 +48,20 @@ export class DocsTopBar extends React.Component -
    - {menuItemInfo.title} -
    + + + {menuItemInfo.title} + +
    ); diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 8a5ad53e2..df5dc173d 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -91,63 +91,50 @@ export class DevelopersDropDown extends React.Component + {this._renderTitle('Getting started')} -
    -
    {this._renderLinkSection(gettingStartedKeyToLinkInfo1)}
    -
    {this._renderLinkSection(gettingStartedKeyToLinkInfo2)}
    -
    + + + {this._renderLinkSection(gettingStartedKeyToLinkInfo1)} + + {this._renderLinkSection(gettingStartedKeyToLinkInfo2)} + +
    + + + + {this._renderTitle('Popular docs')} + {this._renderLinkSection(popularDocsToLinkInfos)} + + + {this._renderTitle('Useful links')} + {this._renderLinkSection(usefulLinksToLinkInfo)} + -
    -
    -
    -
    {this._renderTitle('Popular docs')}
    -
    {this._renderLinkSection(popularDocsToLinkInfos)}
    -
    -
    -
    {this._renderTitle('Useful links')}
    -
    {this._renderLinkSection(usefulLinksToLinkInfo)}
    -
    -
    -
    - {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)} -
    + + {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)} + + -
    +
    ); return dropdownMenu; } private _renderTitle(title: string): React.ReactNode { return ( -
    - {title.toUpperCase()} -
    + + + {title.toUpperCase()} + + ); } private _renderLinkSection(links: ALink[]): React.ReactNode { @@ -157,7 +144,6 @@ export class DevelopersDropDown extends React.Component + {linkText} -
    + ); }); - return
    {renderLinks}
    ; + return {renderLinks}; } } diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx index 782ab3b6f..ece077563 100644 --- a/packages/website/ts/components/ui/container.tsx +++ b/packages/website/ts/components/ui/container.tsx @@ -17,6 +17,8 @@ export interface ContainerProps { backgroundColor?: string; background?: string; borderRadius?: StringOrNum; + borderBottomLeftRadius?: StringOrNum; + borderBottomRightRadius?: StringOrNum; borderBottom?: StringOrNum; maxWidth?: StringOrNum; maxHeight?: StringOrNum; diff --git a/packages/website/ts/components/ui/text.tsx b/packages/website/ts/components/ui/text.tsx index cd8f290e3..4415962b1 100644 --- a/packages/website/ts/components/ui/text.tsx +++ b/packages/website/ts/components/ui/text.tsx @@ -19,7 +19,9 @@ export interface TextProps { textDecorationLine?: string; onClick?: (event: React.MouseEvent) => void; hoverColor?: string; + letterSpacing?: string | number; noWrap?: boolean; + textAlign?: string; display?: string; } @@ -34,6 +36,8 @@ export const Text = styled(PlainText)` font-style: ${props => props.fontStyle}; font-weight: ${props => props.fontWeight}; font-size: ${props => props.fontSize}; + text-align: ${props => props.textAlign}; + letter-spacing: ${props => props.letterSpacing}; text-decoration-line: ${props => props.textDecorationLine}; ${props => (props.lineHeight ? `line-height: ${props.lineHeight}` : '')}; ${props => (props.center ? 'text-align: center' : '')}; -- cgit From a5d0066d0016056ca0d01ad8bebef76b35848280 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 17:28:03 +0100 Subject: Convert TutorialButton to styled component --- .../components/documentation/tutorial_button.tsx | 109 +++++++++------------ 1 file changed, 45 insertions(+), 64 deletions(-) diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index a0d99e175..9c13ec732 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -1,79 +1,60 @@ import { colors, Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; +import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; import { Deco, Key, TutorialInfo } from 'ts/types'; import { Translate } from 'ts/utils/translate'; +import { darken, saturate } from 'polished'; +import { styled } from 'ts/style/theme'; + export interface TutorialButtonProps { + className?: string; translate: Translate; tutorialInfo: TutorialInfo; } -export interface TutorialButtonState { - isHovering: boolean; -} - -export class TutorialButton extends React.Component { - constructor(props: TutorialButtonProps) { - super(props); - this.state = { - isHovering: false, - }; - } - public render(): React.ReactNode { - return ( - -
    -
    - -
    -
    - - {this.props.translate.get(this.props.tutorialInfo.link.title as Key, Deco.Cap)} - - - {this.props.translate.get(this.props.tutorialInfo.description as Key, Deco.Cap)} - -
    -
    -
    - -
    +const PlainTutorialButton: React.StatelessComponent = ({ translate, tutorialInfo, className }) => ( + + +
    +
    + +
    +
    + + {translate.get(tutorialInfo.link.title as Key, Deco.Cap)} + + + {translate.get(tutorialInfo.description as Key, Deco.Cap)} + +
    +
    +
    +
    - - ); - } - private _onHover(_event: React.FormEvent): void { - if (this.state.isHovering) { - return; - } - this.setState({ - isHovering: true, - }); - } - private _onHoverOff(): void { - this.setState({ - isHovering: false, - }); +
    + +
    +); + +export const TutorialButton = styled(PlainTutorialButton)` + border-radius: 4px; + border: 1px solid ${colors.grey325}; + background-color: ${colors.white}; + &:hover { + border: 1px solid ${colors.lightLinkBlue}; + background-color: ${colors.lightestBlue}; } -} + padding: 20px; + margin-bottom: 15px; +`; + +TutorialButton.defaultProps = {}; + +TutorialButton.displayName = 'TutorialButton'; -- cgit From 03bfc7dd404c1ec9e4a2587d28014d3117f0e66a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 17:34:46 +0100 Subject: Fix liinter --- packages/website/ts/components/dialogs/blockchain_err_dialog.tsx | 2 +- packages/website/ts/components/documentation/tutorial_button.tsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx index d50fd6592..18c060991 100644 --- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx +++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx @@ -1,4 +1,4 @@ -import { colors, Link, Networks } from '@0xproject/react-shared'; +import { colors, Networks } from '@0xproject/react-shared'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index 9c13ec732..dc00bf743 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -6,7 +6,6 @@ import { Text } from 'ts/components/ui/text'; import { Deco, Key, TutorialInfo } from 'ts/types'; import { Translate } from 'ts/utils/translate'; -import { darken, saturate } from 'polished'; import { styled } from 'ts/style/theme'; export interface TutorialButtonProps { -- cgit From 3ce665eeabb9fc75dd50847304242de096e54d46 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 17:58:22 +0100 Subject: Fix comment --- packages/react-shared/src/components/link.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx index 05ca93cc5..5a456109b 100644 --- a/packages/react-shared/src/components/link.tsx +++ b/packages/react-shared/src/components/link.tsx @@ -121,7 +121,7 @@ export class Link extends React.Component { } // HACK(fabio): For some reason, the react-scroll link decided to stop the propagation of click events. // We do however rely on these events being propagated in certain scenarios (e.g when the link - // is within a dropdown we want to close upon being clicked). Because of this, we registry the + // is within a dropdown we want to close upon being clicked). Because of this, we register the // click event of an inner span, and pass it around the react-scroll link to an outer span. private _onClickPropagateClickEventAroundScrollLink(): void { if (!_.isNull(this._outerReactScrollSpan)) { -- cgit From 2966ab12e009ed214978b1fd9209fc13cc7d3630 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 17:58:34 +0100 Subject: Move valid-url import to react-shared --- packages/react-shared/package.json | 4 +++- packages/website/package.json | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 5629ec915..490933fb3 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -44,6 +44,7 @@ "@types/react-dom": "*", "@types/react-router-dom": "^4.0.4", "@types/react-scroll": "1.5.3", + "@types/valid-url": "^1.0.2", "basscss": "^8.0.3", "change-case": "^3.0.2", "is-mobile": "^0.2.2", @@ -54,7 +55,8 @@ "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", "react-scroll": "0xproject/react-scroll#similar-to-pr-330", - "react-router-dom": "^4.1.1" + "react-router-dom": "^4.1.1", + "valid-url": "^1.0.9" }, "publishConfig": { "access": "public" diff --git a/packages/website/package.json b/packages/website/package.json index 89135b4f9..3073eca72 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -62,7 +62,6 @@ "styled-components": "^3.3.0", "thenby": "^1.2.3", "truffle-contract": "2.0.1", - "valid-url": "^1.0.9", "web3-provider-engine": "14.0.6", "xml-js": "^1.6.4" }, @@ -85,7 +84,6 @@ "@types/react-scroll": "1.5.3", "@types/react-tap-event-plugin": "0.0.30", "@types/redux": "^3.6.0", - "@types/valid-url": "^1.0.2", "@types/web3-provider-engine": "^14.0.0", "awesome-typescript-loader": "^5.2.1", "copyfiles": "^2.0.0", -- cgit From 6cc9631ef6458d88249a5abd5c7c5ee7b3614e62 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 5 Oct 2018 17:58:54 +0100 Subject: remove unused import --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 7f5e16f01..5b6076df6 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -5,7 +5,6 @@ import * as React from 'react'; import { ALink, Styles } from '../types'; import { colors } from '../utils/colors'; -import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; import { Link } from './link'; -- cgit From 0fd158ac64f076859c296c641bdd2027971d8ac1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 10 Oct 2018 16:06:32 +0200 Subject: Replace Rollbar UMD with regular import --- packages/website/package.json | 1 + packages/website/ts/utils/error_reporter.ts | 5 ++-- yarn.lock | 41 ++++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/packages/website/package.json b/packages/website/package.json index aabb6b28e..3885e8066 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -58,6 +58,7 @@ "react-typist": "^2.0.4", "redux": "^3.6.0", "redux-devtools-extension": "^2.13.2", + "rollbar": "^2.4.7", "semver-sort": "0.0.4", "styled-components": "^3.3.0", "thenby": "^1.2.3", diff --git a/packages/website/ts/utils/error_reporter.ts b/packages/website/ts/utils/error_reporter.ts index 6008fffed..bec92e829 100644 --- a/packages/website/ts/utils/error_reporter.ts +++ b/packages/website/ts/utils/error_reporter.ts @@ -1,4 +1,5 @@ import { logUtils } from '@0xproject/utils'; +import Rollbar = require('rollbar'); import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { utils } from 'ts/utils/utils'; @@ -36,8 +37,8 @@ const rollbarConfig = { 'SecurityError (DOM Exception 18)', ], }; -import Rollbar = require('../../public/js/rollbar.umd.min.js'); -const rollbar = Rollbar.init(rollbarConfig); + +const rollbar = new Rollbar(rollbarConfig); export const errorReporter = { report(err: Error): void { diff --git a/yarn.lock b/yarn.lock index ff8a87c7b..3d42c2b4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4110,6 +4110,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" +console-polyfill@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/console-polyfill/-/console-polyfill-0.3.0.tgz#84900902a18c47a5eba932be75fa44d23e8af861" + constant-case@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46" @@ -5337,6 +5341,12 @@ error-ex@^1.2.0, error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +error-stack-parser@1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.3.tgz#fada6e3a9cd2b0e080e6d6fc751418649734f35c" + dependencies: + stackframe "^0.3.1" + error@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" @@ -8274,6 +8284,10 @@ is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" +is_js@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d" + isarray@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" @@ -13179,6 +13193,12 @@ request-ip@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-1.2.3.tgz#66988f0e22406ec4af630d19b573fe4b447c3b49" +request-ip@~2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-2.0.2.tgz#deeae6d4af21768497db8cd05fa37143f8f1257e" + dependencies: + is_js "^0.9.0" + request-promise-core@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6" @@ -13481,6 +13501,21 @@ rollbar@^0.6.5: optionalDependencies: decache "^3.0.5" +rollbar@^2.4.7: + version "2.4.7" + resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-2.4.7.tgz#9b1de1a0fab6b6e63fcfcd322c26081a1d8242e8" + dependencies: + async "~1.2.1" + console-polyfill "0.3.0" + debug "2.6.9" + error-stack-parser "1.3.3" + json-stringify-safe "~5.0.0" + lru-cache "~2.2.1" + request-ip "~2.0.1" + uuid "3.0.x" + optionalDependencies: + decache "^3.0.5" + rst-selector-parser@^2.2.3: version "2.2.3" resolved "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91" @@ -14335,6 +14370,10 @@ stack-utils@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620" +stackframe@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" + state-toggle@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.0.tgz#d20f9a616bb4f0c3b98b91922d25b640aa2bc425" @@ -15784,7 +15823,7 @@ uuid@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" -uuid@3.0.1, uuid@~3.0.0: +uuid@3.0.1, uuid@3.0.x, uuid@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" -- cgit From 636ce6331bf854d6b7b12a1e87929a5a55184062 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 11 Oct 2018 13:33:49 +0200 Subject: fix(website): Avoid hover activated dropdown from closing when activeNode is clicked --- packages/website/ts/components/ui/drop_down.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx index 1daaeb1c3..9044b218d 100644 --- a/packages/website/ts/components/ui/drop_down.tsx +++ b/packages/website/ts/components/ui/drop_down.tsx @@ -1,3 +1,4 @@ +import * as _ from 'lodash'; import Popover from 'material-ui/Popover'; import * as React from 'react'; import { MaterialUIPosition } from 'ts/types'; @@ -75,7 +76,11 @@ export class DropDown extends React.Component { anchorEl={this.state.anchorEl} anchorOrigin={this.props.anchorOrigin} targetOrigin={this.props.targetOrigin} - onRequestClose={this._closePopover.bind(this)} + onRequestClose={ + this.props.closeEvent === DropdownMouseEvent.Click + ? this._closePopover.bind(this) + : _.noop.bind(_) + } useLayerForClickAway={this.props.closeEvent === DropdownMouseEvent.Click} animated={false} zDepth={this.props.zDepth} -- cgit From 9b147f14955c5f6a0b38e03ae30ac13b1be183d1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 11 Oct 2018 13:49:56 +0200 Subject: fix(website): remove deadzone between "Developers" menu item and dropdown so it never closes when hovering between the two --- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- packages/website/ts/components/top_bar/top_bar.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index df5dc173d..2bdcb8a4c 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -85,7 +85,7 @@ export class DevelopersDropDown extends React.Component ); } diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 3297befad..80271fa63 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -154,7 +154,7 @@ export class TopBar extends React.Component {
    -- cgit From 7f217dcb3ced2cb5488badda690b51fc3be67618 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 11 Oct 2018 14:58:29 +0200 Subject: style: Make width of developer section same as rest of website (1064px) --- packages/website/ts/pages/documentation/home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx index f7c4839b4..f8ac6a9f4 100644 --- a/packages/website/ts/pages/documentation/home.tsx +++ b/packages/website/ts/pages/documentation/home.tsx @@ -451,7 +451,7 @@ export class Home extends React.Component { -- cgit From dcdc411ab73c860d58a47a9b721d8047e68ce738 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 11 Oct 2018 14:58:39 +0200 Subject: chore: update yarn.lock --- yarn.lock | 7 ------- 1 file changed, 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index d5460c1b2..59ce478c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5072,13 +5072,6 @@ error-stack-parser@1.3.3: dependencies: stackframe "^0.3.1" -error@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/error/-/error-7.0.2.tgz#a5f75fff4d9926126ddac0ea5dc38e689153cb02" - dependencies: - string-template "~0.2.1" - xtend "~4.0.0" - es-abstract@^1.10.0, es-abstract@^1.5.1, es-abstract@^1.6.1: version "1.12.0" resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165" -- cgit From de20ef1a49966153f25236ee68b186cd49f8dc20 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 15:54:44 +0200 Subject: Refactor Home so that Dev section chrome is reusable across pages --- .../react-docs/src/components/doc_reference.tsx | 331 +++++++++++ .../react-docs/src/components/documentation.tsx | 427 -------------- packages/react-docs/src/docs_info.ts | 59 +- packages/react-docs/src/index.ts | 2 +- packages/react-docs/src/utils/typedoc_utils.ts | 10 +- .../src/components/nested_sidebar_menu.tsx | 38 -- .../components/documentation/overview_content.tsx | 132 +++++ packages/website/ts/components/sidebar_header.tsx | 2 +- packages/website/ts/components/top_bar/top_bar.tsx | 3 - packages/website/ts/containers/docs_home.ts | 9 +- .../ts/pages/documentation/developers_page.tsx | 176 ++++++ .../website/ts/pages/documentation/doc_page.tsx | 90 +-- .../website/ts/pages/documentation/docs_home.tsx | 359 ++++++++++++ packages/website/ts/pages/documentation/home.tsx | 623 --------------------- packages/website/ts/types.ts | 11 + 15 files changed, 1099 insertions(+), 1173 deletions(-) create mode 100644 packages/react-docs/src/components/doc_reference.tsx delete mode 100644 packages/react-docs/src/components/documentation.tsx create mode 100644 packages/website/ts/components/documentation/overview_content.tsx create mode 100644 packages/website/ts/pages/documentation/developers_page.tsx create mode 100644 packages/website/ts/pages/documentation/docs_home.tsx delete mode 100644 packages/website/ts/pages/documentation/home.tsx diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx new file mode 100644 index 000000000..38ec818db --- /dev/null +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -0,0 +1,331 @@ +import { + colors, + constants as sharedConstants, + EtherscanLinkSuffixes, + Link, + MarkdownSection, + Networks, + SectionHeader, + utils as sharedUtils, +} from '@0xproject/react-shared'; +import { + DocAgnosticFormat, + Event, + ExternalExportToLink, + Property, + SolidityMethod, + TypeDefinitionByName, + TypescriptFunction, + TypescriptMethod, +} from '@0xproject/types'; +import * as _ from 'lodash'; +import * as React from 'react'; +import * as semver from 'semver'; + +import { DocsInfo } from '../docs_info'; +import { AddressByContractName, SupportedDocJson } from '../types'; +import { constants } from '../utils/constants'; + +import { Badge } from './badge'; +import { Comment } from './comment'; +import { EventDefinition } from './event_definition'; +import { PropertyBlock } from './property_block'; +import { SignatureBlock } from './signature_block'; +import { TypeDefinition } from './type_definition'; + +const networkNameToColor: { [network: string]: string } = { + [Networks.Kovan]: colors.purple, + [Networks.Ropsten]: colors.red, + [Networks.Mainnet]: colors.turquois, + [Networks.Rinkeby]: colors.darkYellow, +}; + +export interface DocReferenceProps { + selectedVersion: string; + availableVersions: string[]; + docsInfo: DocsInfo; + sourceUrl: string; + docAgnosticFormat?: DocAgnosticFormat; +} + +export interface DocReferenceState { + isHoveringSidebar: boolean; +} + +export class DocReference extends React.Component { + constructor(props: DocReferenceProps) { + super(props); + this.state = { + isHoveringSidebar: false, + }; + } + public componentDidMount(): void { + window.addEventListener('hashchange', this._onHashChanged.bind(this), false); + } + public componentWillUnmount(): void { + window.removeEventListener('hashchange', this._onHashChanged.bind(this), false); + } + public componentDidUpdate(prevProps: DocReferenceProps, _prevState: DocReferenceState): void { + if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { + const hash = window.location.hash.slice(1); + sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); + } + } + public render(): React.ReactNode { + const subMenus = _.values(this.props.docsInfo.markdownMenu); + const orderedSectionNames = _.flatten(subMenus); + + const typeDefinitionByName = this.props.docsInfo.getTypeDefinitionsByName(this.props.docAgnosticFormat); + const renderedSections = _.map(orderedSectionNames, this._renderSection.bind(this, typeDefinitionByName)); + + return ( +
    +
    + {renderedSections} +
    + ); + } + private _renderSection(typeDefinitionByName: TypeDefinitionByName, sectionName: string): React.ReactNode { + const markdownVersions = _.keys(this.props.docsInfo.sectionNameToMarkdownByVersion); + const eligibleVersions = _.filter(markdownVersions, mdVersion => { + return semver.lte(mdVersion, this.props.selectedVersion); + }); + if (_.isEmpty(eligibleVersions)) { + throw new Error( + `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${ + this.props.selectedVersion + }.`, + ); + } + const sortedEligibleVersions = eligibleVersions.sort(semver.rcompare.bind(semver)); + const closestVersion = sortedEligibleVersions[0]; + const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdownByVersion[closestVersion][sectionName]; + if (!_.isUndefined(markdownFileIfExists)) { + return ( + + ); + } + + const docSection = this.props.docAgnosticFormat[sectionName]; + if (_.isUndefined(docSection)) { + return null; + } + + const isExportedFunctionSection = + docSection.functions.length === 1 && + _.isEmpty(docSection.types) && + _.isEmpty(docSection.methods) && + _.isEmpty(docSection.constructors) && + _.isEmpty(docSection.properties) && + _.isEmpty(docSection.events); + + const sortedTypes = _.sortBy(docSection.types, 'name'); + const typeDefs = _.map(sortedTypes, (customType, i) => { + return ( + + ); + }); + + const sortedProperties = _.sortBy(docSection.properties, 'name'); + const propertyDefs = _.map( + sortedProperties, + this._renderProperty.bind(this, sectionName, typeDefinitionByName), + ); + + const sortedMethods = _.sortBy(docSection.methods, 'name'); + const methodDefs = _.map(sortedMethods, method => { + return this._renderSignatureBlocks(method, sectionName, typeDefinitionByName); + }); + + const sortedFunctions = _.sortBy(docSection.functions, 'name'); + const functionDefs = _.map(sortedFunctions, func => { + return this._renderSignatureBlocks(func, sectionName, typeDefinitionByName); + }); + + const sortedEvents = _.sortBy(docSection.events, 'name'); + const eventDefs = _.map(sortedEvents, (event: Event, i: number) => { + return ( + + ); + }); + const headerStyle: React.CSSProperties = { + fontWeight: 100, + }; + return ( +
    +
    +
    + +
    + {this._renderNetworkBadgesIfExists(sectionName)} +
    + {docSection.comment && } + {!_.isEmpty(docSection.constructors) && ( +
    +

    Constructor

    + {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} +
    + )} + {!_.isEmpty(docSection.properties) && ( +
    +

    Properties

    +
    {propertyDefs}
    +
    + )} + {!_.isEmpty(docSection.methods) && ( +
    +

    Methods

    +
    {methodDefs}
    +
    + )} + {!_.isEmpty(docSection.functions) && ( +
    + {!isExportedFunctionSection &&

    Functions

    } +
    {functionDefs}
    +
    + )} + {!_.isUndefined(docSection.events) && + docSection.events.length > 0 && ( +
    +

    Events

    +
    {eventDefs}
    +
    + )} + {!_.isUndefined(docSection.externalExportToLink) && + this._renderExternalExports(docSection.externalExportToLink)} + {!_.isUndefined(typeDefs) && + typeDefs.length > 0 && ( +
    +
    {typeDefs}
    +
    + )} +
    + ); + } + private _renderExternalExports(externalExportToLink: ExternalExportToLink): React.ReactNode { + const externalExports = _.map(externalExportToLink, (link: string, exportName: string) => { + return ( +
    + + {`import { `} + + {exportName} + + {` } from '${this.props.docsInfo.packageName}'`} + +
    + ); + }); + return
    {externalExports}
    ; + } + private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { + if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) { + return null; + } + + const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[ + this.props.selectedVersion + ]; + const badges = _.map( + networkToAddressByContractName, + (addressByContractName: AddressByContractName, networkName: string) => { + const contractAddress = addressByContractName[sectionName]; + if (_.isUndefined(contractAddress)) { + return null; + } + const linkIfExists = sharedUtils.getEtherScanLinkIfExists( + contractAddress, + sharedConstants.NETWORK_ID_BY_NAME[networkName], + EtherscanLinkSuffixes.Address, + ); + return ( +
    + + + +
    + ); + }, + ); + return badges; + } + private _renderConstructors( + constructors: SolidityMethod[] | TypescriptMethod[], + sectionName: string, + typeDefinitionByName: TypeDefinitionByName, + ): React.ReactNode { + const constructorDefs = _.map(constructors, constructor => { + return this._renderSignatureBlocks(constructor, sectionName, typeDefinitionByName); + }); + return
    {constructorDefs}
    ; + } + private _renderProperty( + sectionName: string, + typeDefinitionByName: TypeDefinitionByName, + property: Property, + ): React.ReactNode { + return ( + + ); + } + private _renderSignatureBlocks( + method: SolidityMethod | TypescriptFunction | TypescriptMethod, + sectionName: string, + typeDefinitionByName: TypeDefinitionByName, + ): React.ReactNode { + return ( + + ); + } + private _onSidebarHover(_event: React.FormEvent): void { + this.setState({ + isHoveringSidebar: true, + }); + } + private _onSidebarHoverOff(): void { + this.setState({ + isHoveringSidebar: false, + }); + } + private _onHashChanged(_event: any): void { + const hash = window.location.hash.slice(1); + sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); + } +} diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx deleted file mode 100644 index 6a08d50e0..000000000 --- a/packages/react-docs/src/components/documentation.tsx +++ /dev/null @@ -1,427 +0,0 @@ -import { - colors, - constants as sharedConstants, - EtherscanLinkSuffixes, - Link, - MarkdownSection, - NestedSidebarMenu, - Networks, - SectionHeader, - Styles, - utils as sharedUtils, -} from '@0xproject/react-shared'; -import { - DocAgnosticFormat, - Event, - ExternalExportToLink, - Property, - SolidityMethod, - TypeDefinitionByName, - TypescriptFunction, - TypescriptMethod, -} from '@0xproject/types'; -import * as _ from 'lodash'; -import CircularProgress from 'material-ui/CircularProgress'; -import * as React from 'react'; -import * as semver from 'semver'; - -import { DocsInfo } from '../docs_info'; -import { AddressByContractName, SupportedDocJson } from '../types'; -import { constants } from '../utils/constants'; - -import { Badge } from './badge'; -import { Comment } from './comment'; -import { EventDefinition } from './event_definition'; -import { PropertyBlock } from './property_block'; -import { SignatureBlock } from './signature_block'; -import { TypeDefinition } from './type_definition'; - -const networkNameToColor: { [network: string]: string } = { - [Networks.Kovan]: colors.purple, - [Networks.Ropsten]: colors.red, - [Networks.Mainnet]: colors.turquois, - [Networks.Rinkeby]: colors.darkYellow, -}; - -export interface DocumentationProps { - selectedVersion: string; - availableVersions: string[]; - docsInfo: DocsInfo; - sourceUrl: string; - onVersionSelected: (semver: string) => void; - docAgnosticFormat?: DocAgnosticFormat; - sidebarHeader?: React.ReactNode; - topBarHeight?: number; -} - -export interface DocumentationState { - isHoveringSidebar: boolean; -} - -export class Documentation extends React.Component { - public static defaultProps: Partial = { - topBarHeight: 0, - }; - constructor(props: DocumentationProps) { - super(props); - this.state = { - isHoveringSidebar: false, - }; - } - public componentDidMount(): void { - window.addEventListener('hashchange', this._onHashChanged.bind(this), false); - } - public componentWillUnmount(): void { - window.removeEventListener('hashchange', this._onHashChanged.bind(this), false); - } - public componentDidUpdate(prevProps: DocumentationProps, _prevState: DocumentationState): void { - if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { - const hash = window.location.hash.slice(1); - sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); - } - } - public render(): React.ReactNode { - const styles: Styles = { - mainContainers: { - position: 'absolute', - top: 1, - left: 0, - bottom: 0, - right: 0, - overflowX: 'hidden', - overflowY: 'scroll', - minHeight: `calc(100vh - ${this.props.topBarHeight}px)`, - WebkitOverflowScrolling: 'touch', - }, - menuContainer: { - borderColor: colors.grey300, - maxWidth: 330, - marginLeft: 20, - }, - }; - const sectionNameToLinks = this.props.docsInfo.getSectionNameToLinks(); - const subsectionNameToLinks = this.props.docsInfo.getSubsectionNameToLinks(this.props.docAgnosticFormat); - return ( -
    - {_.isUndefined(this.props.docAgnosticFormat) ? ( - this._renderLoading(styles.mainContainers) - ) : ( -
    -
    -
    -
    - -
    -
    -
    -
    -
    - {this._renderDocumentation()} -
    -
    -
    -
    - )} -
    - ); - } - private _renderLoading(mainContainersStyles: React.CSSProperties): React.ReactNode { - return ( -
    -
    -
    - -
    -
    - Loading documentation... -
    -
    -
    - ); - } - private _renderDocumentation(): React.ReactNode { - const subMenus = _.values(this.props.docsInfo.menu); - const orderedSectionNames = _.flatten(subMenus); - - const typeDefinitionByName = this.props.docsInfo.getTypeDefinitionsByName(this.props.docAgnosticFormat); - const renderedSections = _.map(orderedSectionNames, this._renderSection.bind(this, typeDefinitionByName)); - - return renderedSections; - } - private _renderSection(typeDefinitionByName: TypeDefinitionByName, sectionName: string): React.ReactNode { - const markdownVersions = _.keys(this.props.docsInfo.sectionNameToMarkdownByVersion); - const eligibleVersions = _.filter(markdownVersions, mdVersion => { - return semver.lte(mdVersion, this.props.selectedVersion); - }); - if (_.isEmpty(eligibleVersions)) { - throw new Error( - `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${ - this.props.selectedVersion - }.`, - ); - } - const sortedEligibleVersions = eligibleVersions.sort(semver.rcompare.bind(semver)); - const closestVersion = sortedEligibleVersions[0]; - const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdownByVersion[closestVersion][sectionName]; - if (!_.isUndefined(markdownFileIfExists)) { - return ( - - ); - } - - const docSection = this.props.docAgnosticFormat[sectionName]; - if (_.isUndefined(docSection)) { - return null; - } - - const isExportedFunctionSection = - docSection.functions.length === 1 && - _.isEmpty(docSection.types) && - _.isEmpty(docSection.methods) && - _.isEmpty(docSection.constructors) && - _.isEmpty(docSection.properties) && - _.isEmpty(docSection.events); - - const sortedTypes = _.sortBy(docSection.types, 'name'); - const typeDefs = _.map(sortedTypes, (customType, i) => { - return ( - - ); - }); - - const sortedProperties = _.sortBy(docSection.properties, 'name'); - const propertyDefs = _.map( - sortedProperties, - this._renderProperty.bind(this, sectionName, typeDefinitionByName), - ); - - const sortedMethods = _.sortBy(docSection.methods, 'name'); - const methodDefs = _.map(sortedMethods, method => { - return this._renderSignatureBlocks(method, sectionName, typeDefinitionByName); - }); - - const sortedFunctions = _.sortBy(docSection.functions, 'name'); - const functionDefs = _.map(sortedFunctions, func => { - return this._renderSignatureBlocks(func, sectionName, typeDefinitionByName); - }); - - const sortedEvents = _.sortBy(docSection.events, 'name'); - const eventDefs = _.map(sortedEvents, (event: Event, i: number) => { - return ( - - ); - }); - const headerStyle: React.CSSProperties = { - fontWeight: 100, - }; - return ( -
    -
    -
    - -
    - {this._renderNetworkBadgesIfExists(sectionName)} -
    - {docSection.comment && } - {!_.isEmpty(docSection.constructors) && ( -
    -

    Constructor

    - {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)} -
    - )} - {!_.isEmpty(docSection.properties) && ( -
    -

    Properties

    -
    {propertyDefs}
    -
    - )} - {!_.isEmpty(docSection.methods) && ( -
    -

    Methods

    -
    {methodDefs}
    -
    - )} - {!_.isEmpty(docSection.functions) && ( -
    - {!isExportedFunctionSection &&

    Functions

    } -
    {functionDefs}
    -
    - )} - {!_.isUndefined(docSection.events) && - docSection.events.length > 0 && ( -
    -

    Events

    -
    {eventDefs}
    -
    - )} - {!_.isUndefined(docSection.externalExportToLink) && - this._renderExternalExports(docSection.externalExportToLink)} - {!_.isUndefined(typeDefs) && - typeDefs.length > 0 && ( -
    -
    {typeDefs}
    -
    - )} -
    - ); - } - private _renderExternalExports(externalExportToLink: ExternalExportToLink): React.ReactNode { - const externalExports = _.map(externalExportToLink, (link: string, exportName: string) => { - return ( -
    - - {`import { `} - - {exportName} - - {` } from '${this.props.docsInfo.packageName}'`} - -
    - ); - }); - return
    {externalExports}
    ; - } - private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { - if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) { - return null; - } - - const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[ - this.props.selectedVersion - ]; - const badges = _.map( - networkToAddressByContractName, - (addressByContractName: AddressByContractName, networkName: string) => { - const contractAddress = addressByContractName[sectionName]; - if (_.isUndefined(contractAddress)) { - return null; - } - const linkIfExists = sharedUtils.getEtherScanLinkIfExists( - contractAddress, - sharedConstants.NETWORK_ID_BY_NAME[networkName], - EtherscanLinkSuffixes.Address, - ); - return ( -
    - - - -
    - ); - }, - ); - return badges; - } - private _renderConstructors( - constructors: SolidityMethod[] | TypescriptMethod[], - sectionName: string, - typeDefinitionByName: TypeDefinitionByName, - ): React.ReactNode { - const constructorDefs = _.map(constructors, constructor => { - return this._renderSignatureBlocks(constructor, sectionName, typeDefinitionByName); - }); - return
    {constructorDefs}
    ; - } - private _renderProperty( - sectionName: string, - typeDefinitionByName: TypeDefinitionByName, - property: Property, - ): React.ReactNode { - return ( - - ); - } - private _renderSignatureBlocks( - method: SolidityMethod | TypescriptFunction | TypescriptMethod, - sectionName: string, - typeDefinitionByName: TypeDefinitionByName, - ): React.ReactNode { - return ( - - ); - } - private _onSidebarHover(_event: React.FormEvent): void { - this.setState({ - isHoveringSidebar: true, - }); - } - private _onSidebarHoverOff(): void { - this.setState({ - isHoveringSidebar: false, - }); - } - private _onHashChanged(_event: any): void { - const hash = window.location.hash.slice(1); - sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); - } -} diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 549106c77..d75a1676c 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -17,7 +17,7 @@ export class DocsInfo { public displayName: string; public packageName: string; public packageUrl: string; - public menu: DocsMenu; + public markdownMenu: DocsMenu; public typeSectionName: string; public sections: SectionsMap; public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion; @@ -25,7 +25,7 @@ export class DocsInfo { constructor(config: DocsInfoConfig) { this.id = config.id; this.type = config.type; - this.menu = config.markdownMenu; + this.markdownMenu = config.markdownMenu; this.displayName = config.displayName; this.packageName = config.packageName; this.packageUrl = config.packageUrl; @@ -34,10 +34,31 @@ export class DocsInfo { this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId; } - public getSubsectionNameToLinks(docAgnosticFormat?: DocAgnosticFormat): ObjectMap { - const subsectionNameToLinks: ObjectMap = {}; + public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { + if (_.isUndefined(docAgnosticFormat[this.typeSectionName])) { + return {}; + } + + const section = docAgnosticFormat[this.typeSectionName]; + const typeDefinitionByName = _.keyBy(section.types, 'name') as any; + return typeDefinitionByName; + } + public getSectionNameToLinks(docAgnosticFormat: DocAgnosticFormat): ObjectMap { + const sectionNameToLinks: ObjectMap = {}; + _.each(this.markdownMenu, (linkTitles, sectionName) => { + sectionNameToLinks[sectionName] = []; + _.each(linkTitles, linkTitle => { + const to = sharedUtils.getIdFromName(linkTitle); + const links = sectionNameToLinks[sectionName]; + links.push({ + title: linkTitle, + to, + }); + }); + }); + if (_.isUndefined(docAgnosticFormat)) { - return subsectionNameToLinks; + return sectionNameToLinks; } const docSections = _.keys(this.sections); @@ -64,7 +85,7 @@ export class DocsInfo { title: typeName, }; }); - subsectionNameToLinks[sectionName] = typeLinks; + sectionNameToLinks[sectionName] = typeLinks; } else if (isExportedFunctionSection) { // Noop so that we don't have the method listed underneath itself. } else { @@ -88,33 +109,9 @@ export class DocsInfo { }; }); - subsectionNameToLinks[sectionName] = links; + sectionNameToLinks[sectionName] = links; } }); - return subsectionNameToLinks; - } - public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { - if (_.isUndefined(docAgnosticFormat[this.typeSectionName])) { - return {}; - } - - const section = docAgnosticFormat[this.typeSectionName]; - const typeDefinitionByName = _.keyBy(section.types, 'name') as any; - return typeDefinitionByName; - } - public getSectionNameToLinks(): ObjectMap { - const sectionNameToLinks: ObjectMap = {}; - _.each(this.menu, (linkTitles, sectionName) => { - sectionNameToLinks[sectionName] = []; - _.each(linkTitles, linkTitle => { - const to = sharedUtils.getIdFromName(linkTitle); - const links = sectionNameToLinks[sectionName]; - links.push({ - title: linkTitle, - to, - }); - }); - }); return sectionNameToLinks; } } diff --git a/packages/react-docs/src/index.ts b/packages/react-docs/src/index.ts index f9382940c..504091b34 100644 --- a/packages/react-docs/src/index.ts +++ b/packages/react-docs/src/index.ts @@ -5,7 +5,7 @@ export { DocAgnosticFormat, GeneratedDocJson } from '@0xproject/types'; export { Badge } from './components/badge'; export { Comment } from './components/comment'; export { CustomEnum } from './components/custom_enum'; -export { Documentation } from './components/documentation'; +export { DocReference } from './components/doc_reference'; export { Enum } from './components/enum'; export { EventDefinition } from './components/event_definition'; export { Interface } from './components/interface'; diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 19605d497..05c9dae55 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -95,7 +95,9 @@ export class TypeDocUtils { if (!_.isEmpty(this._externalExportToLink)) { this._docsInfo.sections[constants.EXTERNAL_EXPORTS_SECTION_NAME] = constants.EXTERNAL_EXPORTS_SECTION_NAME; - this._docsInfo.menu[constants.EXTERNAL_EXPORTS_SECTION_NAME] = [constants.EXTERNAL_EXPORTS_SECTION_NAME]; + this._docsInfo.markdownMenu[constants.EXTERNAL_EXPORTS_SECTION_NAME] = [ + constants.EXTERNAL_EXPORTS_SECTION_NAME, + ]; const docSection: DocSection = { comment: 'This package also re-exports some third-party libraries for your convenience.', constructors: [], @@ -119,7 +121,7 @@ export class TypeDocUtils { case KindString.ObjectLiteral: { sectionName = child.name; this._docsInfo.sections[sectionName] = sectionName; - this._docsInfo.menu[sectionName] = [sectionName]; + this._docsInfo.markdownMenu[sectionName] = [sectionName]; const entities = child.children; const commentObj = child.comment; const sectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; @@ -136,7 +138,7 @@ export class TypeDocUtils { case KindString.Function: { sectionName = child.name; this._docsInfo.sections[sectionName] = sectionName; - this._docsInfo.menu[sectionName] = [sectionName]; + this._docsInfo.markdownMenu[sectionName] = [sectionName]; const entities = [child]; const commentObj = child.comment; const SectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : ''; @@ -158,7 +160,7 @@ export class TypeDocUtils { }); if (!_.isEmpty(typeEntities)) { this._docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME; - this._docsInfo.menu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; + this._docsInfo.markdownMenu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME]; const docSection = this._convertEntitiesToDocSection(typeEntities, constants.TYPES_SECTION_NAME); docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection; } diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 5b6076df6..f3ce5f5bf 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -12,7 +12,6 @@ import { VersionDropDown } from './version_drop_down'; export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; - subsectionNameToLinks?: ObjectMap; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; onMenuItemClick?: () => void; @@ -44,7 +43,6 @@ export class NestedSidebarMenu extends React.Component { @@ -108,47 +106,11 @@ export class NestedSidebarMenu extends React.Component - {this._renderMenuItemSubsections(link.title)}
    ); }); return menuItems; } - private _renderMenuItemSubsections(menuItemName: string): React.ReactNode { - if ( - _.isUndefined(this.props.subsectionNameToLinks) || - _.isUndefined(this.props.subsectionNameToLinks[menuItemName]) - ) { - return null; - } - return this._renderSubsectionLinks(menuItemName, this.props.subsectionNameToLinks[menuItemName]); - } - private _renderSubsectionLinks(menuItemName: string, links: ALink[]): React.ReactNode { - return ( -
      - {_.map(links, link => { - const name = `${menuItemName}-${link.title}`; - return ( -
    • - - - {link.title} - - -
    • - ); - })} -
    - ); - } private _onMenuItemClick(): void { if (!_.isUndefined(this.props.onMenuItemClick)) { this.props.onMenuItemClick(); diff --git a/packages/website/ts/components/documentation/overview_content.tsx b/packages/website/ts/components/documentation/overview_content.tsx new file mode 100644 index 000000000..aa132a80f --- /dev/null +++ b/packages/website/ts/components/documentation/overview_content.tsx @@ -0,0 +1,132 @@ +import { colors, Link, MarkdownLinkBlock, utils as sharedUtils } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; +import * as _ from 'lodash'; +import * as React from 'react'; +import * as ReactMarkdown from 'react-markdown'; +import { Element as ScrollElement } from 'react-scroll'; +import { TutorialButton } from 'ts/components/documentation/tutorial_button'; +import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; +import { Deco, Key, Package, TutorialInfo } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; + +export interface OverviewContentProps { + translate: Translate; + tutorials: TutorialInfo[]; + categoryToPackages: ObjectMap; +} + +export interface OverviewContentState {} + +export class OverviewContent extends React.Component { + public render(): React.ReactNode { + return ( + + {this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))} + + {this._renderSectionDescription(this.props.translate.get(Key.StartBuildOn0xDescription, Deco.Cap))} + + {_.map(this.props.tutorials, tutorialInfo => ( + + + + ))} + + + + {this._renderSectionTitle(this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords))} + + {this._renderSectionDescription( + this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap), + )} + + {_.map(this.props.categoryToPackages, (pkgs, category) => + this._renderPackageCategory(category, pkgs), + )} + + + + + ); + } + private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { + return ( + + {category} + {_.map(pkgs, pkg => this._renderPackage(pkg))} + + ); + } + private _renderPackage(pkg: Package): React.ReactNode { + const id = sharedUtils.getIdFromName(pkg.link.title); + return ( + + + + + + + + {pkg.link.title} + + + + + + + + + + + + + {this.props.translate.get(Key.More, Deco.Cap)} + + + + + + + + + + + ); + } + private _renderSectionTitle(text: string): React.ReactNode { + return ( + + {text} + + ); + } + private _renderSectionDescription(text: string): React.ReactNode { + return ( + + {text} + + ); + } +} // tslint:disable:max-file-line-count diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx index a14ab54f5..56657ab72 100644 --- a/packages/website/ts/components/sidebar_header.tsx +++ b/packages/website/ts/components/sidebar_header.tsx @@ -11,7 +11,7 @@ interface SidebarHeaderState {} export class SidebarHeader extends React.Component { public render(): React.ReactNode { return ( -
    +
    0x
    diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 80271fa63..fc13efec9 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -35,7 +35,6 @@ export interface TopBarProps { docsVersion?: string; availableDocVersions?: string[]; sectionNameToLinks?: ObjectMap; - subsectionNameToLinks?: ObjectMap; displayType?: TopBarDisplayType; docsInfo?: DocsInfo; style?: React.CSSProperties; @@ -313,7 +312,6 @@ export class TopBar extends React.Component {
    {
    ({ +const mapStateToProps = (state: State, _ownProps: DocsHomeProps): ConnectedState => ({ translate: state.translate, screenWidth: state.screenWidth, }); @@ -25,4 +26,6 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const DocsHome: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)(HomeComponent); +export const DocsHome: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( + DocsHomeComponent, +); diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx new file mode 100644 index 000000000..7172a7c66 --- /dev/null +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -0,0 +1,176 @@ +import { ALink, colors, constants as sharedConstants, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; +import * as _ from 'lodash'; +import * as React from 'react'; +import DocumentTitle = require('react-document-title'); +import { DocsLogo } from 'ts/components/documentation/docs_logo'; +import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; +import { Container } from 'ts/components/ui/container'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { ScreenWidths } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; +import { utils } from 'ts/utils/utils'; + +const THROTTLE_TIMEOUT = 100; +const TOP_BAR_HEIGHT = 80; +const SCROLLER_WIDTH = 4; + +export interface DevelopersPageProps { + location: Location; + translate: Translate; + screenWidth: ScreenWidths; + dispatcher: Dispatcher; + mainContent: React.ReactNode; + sectionNameToLinks: ObjectMap; +} + +export interface DevelopersPageState { + isHoveringSidebar: boolean; + isHoveringMainContent: boolean; + isSidebarScrolling: boolean; +} + +export class DevelopersPage extends React.Component { + private readonly _throttledScreenWidthUpdate: () => void; + private readonly _throttledSidebarScrolling: () => void; + private _sidebarScrollClearingInterval: number; + constructor(props: DevelopersPageProps) { + super(props); + this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); + this._throttledSidebarScrolling = _.throttle(this._onSidebarScroll.bind(this), THROTTLE_TIMEOUT); + this.state = { + isHoveringSidebar: false, + isHoveringMainContent: false, + isSidebarScrolling: false, + }; + } + public componentDidMount(): void { + window.addEventListener('resize', this._throttledScreenWidthUpdate); + window.scrollTo(0, 0); + this._sidebarScrollClearingInterval = window.setInterval(() => { + this.setState({ + isSidebarScrolling: false, + }); + }, 1000); + } + public componentWillUnmount(): void { + window.removeEventListener('resize', this._throttledScreenWidthUpdate); + window.clearInterval(this._sidebarScrollClearingInterval); + } + public render(): React.ReactNode { + const scrollableContainerStyles: React.CSSProperties = { + position: 'absolute', + top: 80, + left: 0, + bottom: 0, + right: 0, + overflowX: 'hidden', + overflowY: 'scroll', + minHeight: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, + WebkitOverflowScrolling: 'touch', + }; + const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; + const mainContentPadding = isSmallScreen ? 20 : 50; + return ( + + + + + + + + + +
    + + + +
    +
    + + + + +
    + {this.props.mainContent} +
    +
    +
    +
    + ); + } + private _onSidebarHover(isHovering: boolean, _event: React.FormEvent): void { + if (isHovering !== this.state.isHoveringSidebar) { + this.setState({ + isHoveringSidebar: isHovering, + }); + } + } + private _onMainContentHover(isHovering: boolean, _event: React.FormEvent): void { + if (isHovering !== this.state.isHoveringMainContent) { + this.setState({ + isHoveringMainContent: isHovering, + }); + } + } + private _onSidebarScroll(_event: React.FormEvent): void { + this.setState({ + isSidebarScrolling: true, + }); + } + private _updateScreenWidth(): void { + const newScreenWidth = utils.getScreenWidth(); + this.props.dispatcher.updateScreenWidth(newScreenWidth); + } +} // tslint:disable:max-file-line-count diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index c64751f65..f13866ee8 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -1,35 +1,27 @@ import { DocAgnosticFormat, + DocReference, DocsInfo, - Documentation, GeneratedDocJson, SupportedDocJson, TypeDocUtils, } from '@0xproject/react-docs'; import findVersions = require('find-versions'); import * as _ from 'lodash'; +import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; -import DocumentTitle = require('react-document-title'); import semverSort = require('semver-sort'); -import { SidebarHeader } from 'ts/components/sidebar_header'; -import { TopBar } from 'ts/components/top_bar/top_bar'; +import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { docUtils } from 'ts/utils/doc_utils'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; const isDevelopmentOrStaging = utils.isDevelopment() || utils.isStaging(); -const DEFAULT_ICON = 'docs.png'; const ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH = '0.32.4'; -const idToIcon: { [id: string]: string } = { - [DocPackages.ZeroExJs]: 'zeroExJs.png', - [DocPackages.Connect]: 'connect.png', - [DocPackages.SmartContracts]: 'contracts.png', -}; - const docIdToSubpackageName: { [id: string]: string } = { [DocPackages.ZeroExJs]: '0x.js', [DocPackages.Connect]: 'connect', @@ -52,6 +44,7 @@ export interface DocPageProps { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface DocPageState { @@ -79,37 +72,50 @@ export class DocPage extends React.Component { this._isUnmounted = true; } public render(): React.ReactNode { - const subsectionNameToLinks = _.isUndefined(this.state.docAgnosticFormat) - ? {} - : this.props.docsInfo.getSubsectionNameToLinks(this.state.docAgnosticFormat); const sourceUrl = this._getSourceUrl(); - const iconFileName = idToIcon[this.props.docsInfo.id] || DEFAULT_ICON; - const iconUrl = `/images/doc_icons/${iconFileName}`; + const sectionNameToLinks = _.isUndefined(this.state.docAgnosticFormat) + ? {} + : this.props.docsInfo.getSectionNameToLinks(this.state.docAgnosticFormat); + const mainContent = ( + + ); return (
    - - } - /> - } - sourceUrl={sourceUrl} - topBarHeight={60} - onVersionSelected={this._onVersionSelected.bind(this)} - /> + {_.isUndefined(this.state.docAgnosticFormat) ? ( + this._renderLoading() + ) : ( + + )} +
    + ); + } + private _renderLoading(): React.ReactNode { + return ( +
    +
    +
    + +
    +
    + Loading documentation... +
    +
    ); } @@ -145,10 +151,10 @@ export class DocPage extends React.Component { // documenting solidity. docAgnosticFormat = versionDocObj as DocAgnosticFormat; // HACK: need to modify docsInfo like convertToDocAgnosticFormat() would do - this.props.docsInfo.menu.Contracts = []; + this.props.docsInfo.markdownMenu.Contracts = []; _.each(docAgnosticFormat, (_docObj, sectionName) => { this.props.docsInfo.sections[sectionName] = sectionName; - this.props.docsInfo.menu.Contracts.push(sectionName); + this.props.docsInfo.markdownMenu.Contracts.push(sectionName); }); } diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx new file mode 100644 index 000000000..81cddf852 --- /dev/null +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -0,0 +1,359 @@ +import { ALink } from '@0xproject/react-shared'; +import { ObjectMap } from '@0xproject/types'; +import * as _ from 'lodash'; +import * as React from 'react'; +import { OverviewContent } from 'ts/components/documentation/overview_content'; +import { DevelopersPage } from 'ts/pages/documentation/developers_page'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { Categories, Deco, Key, Package, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; + +const TUTORIALS: TutorialInfo[] = [ + { + iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg', + description: Key.DevelopOnEthereumDescription, + link: { + title: Key.DevelopOnEthereum, + to: `${WebsitePaths.Wiki}#Ethereum-Development`, + shouldOpenInNewTab: true, + }, + }, + { + iconUrl: '/images/developers/tutorials/build_a_relayer.svg', + description: Key.BuildARelayerDescription, + link: { + title: Key.BuildARelayer, + to: `${WebsitePaths.Wiki}#Build-A-Relayer`, + shouldOpenInNewTab: true, + }, + }, + { + iconUrl: '/images/developers/tutorials/0x_order_basics.svg', + description: Key.OrderBasicsDescription, + link: { + title: Key.OrderBasics, + to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, + shouldOpenInNewTab: true, + }, + }, + { + iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg', + description: Key.UseSharedLiquidityDescription, + link: { + title: Key.UseSharedLiquidity, + to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, + shouldOpenInNewTab: true, + }, + }, +]; + +// TODO(fabio): Move this to it's own file +const CATEGORY_TO_PACKAGES: ObjectMap = { + [Categories.ZeroExProtocol]: [ + { + description: + 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as [order-utils](https://0xproject.com/docs/order-utils) and [contract-wrappers](https://0xproject.com/docs/contract-wrappers).', + link: { + title: '0x.js', + to: WebsitePaths.ZeroExJs, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A Typescript starter project that will walk you through the basics of how to interact with 0x Protocol and trade of an SRA relayer', + link: { + title: '0x starter project', + to: 'https://github.com/0xProject/0x-starter-project', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)', + link: { + title: '@0xproject/connect', + to: WebsitePaths.Connect, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.', + link: { + title: '@0xproject/contract-wrappers', + to: WebsitePaths.ContractWrappers, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', + link: { + title: '@0xproject/json-schemas', + to: WebsitePaths.JSONSchemas, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.', + link: { + title: '@0xproject/order-utils', + to: WebsitePaths.OrderUtils, + shouldOpenInNewTab: true, + }, + }, + { + description: + "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.", + link: { + title: '@0xproject/order-watcher', + to: WebsitePaths.OrderWatcher, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', + link: { + title: '@0xproject/sra-spec', + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', + shouldOpenInNewTab: true, + }, + }, + ], + [Categories.Ethereum]: [ + { + description: + "This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by Geth abigen but takes a different approach. You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.", + link: { + title: 'abi-gen', + to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A collection of Typescript types that are useful when working on an Ethereum-based project (e.g RawLog, Transaction, TxData, SolidityTypes, etc...).', + link: { + title: 'ethereum-types', + to: WebsitePaths.EthereumTypes, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.', + link: { + title: '@0xproject/sol-compiler', + to: WebsitePaths.SolCompiler, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', + link: { + title: '@0xproject/sol-cov', + to: WebsitePaths.SolCov, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', + link: { + title: '@0xproject/subproviders', + to: WebsitePaths.Subproviders, + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...', + link: { + title: '@0xproject/web3-wrapper', + to: WebsitePaths.Web3Wrapper, + shouldOpenInNewTab: true, + }, + }, + ], + [Categories.CommunityMaintained]: [ + { + description: + 'Node.js worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', + link: { + title: '0x Event Extractor', + to: 'https://github.com/0xTracker/0x-event-extractor', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'Node.js worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', + link: { + title: '0x Tracker Worker', + to: 'https://github.com/0xTracker/0x-tracker-worker', + shouldOpenInNewTab: true, + }, + }, + { + description: + "ERCdex's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", + link: { + title: 'Aquaduct', + to: 'https://www.npmjs.com/package/aqueduct', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'SDKs for automation using Aqueduct & ERC dEX. Aqueduct Server is a lightweight, portable and secure server that runs locally on any workstation. The server exposes a small number of foundational endpoints that enable working with the decentralized Aqueduct liquidity pool from any context or programming language.', + link: { + title: 'Aquaduct Server SDK', + to: 'https://github.com/ERCdEX/aqueduct-server-sdk', + shouldOpenInNewTab: true, + }, + }, + { + description: 'A node.js SDK for trading on the DDEX relayer', + link: { + to: 'https://www.npmjs.com/package/ddex-api', + title: 'DDEX Node.js SDK', + shouldOpenInNewTab: true, + }, + }, + { + description: "The ERC dEX Trade Widget let's any website provide token liquidity to it's users", + link: { + to: 'https://github.com/ERCdEX/widget', + title: 'ERCdex Widget', + shouldOpenInNewTab: true, + }, + }, + { + description: "ERCdex's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", + link: { + to: 'https://github.com/ERCdEX/java', + title: 'ERCdex Java SDK', + shouldOpenInNewTab: true, + }, + }, + { + description: "ERCdex's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", + link: { + to: 'https://github.com/ERCdEX/python', + title: 'ERCdex Python SDK', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A set of command-line tools for creating command-line scripts for interacting with the Ethereum blockchain in general, and 0x in particular', + link: { + title: 'Massive', + to: 'https://github.com/NoteGio/massive', + shouldOpenInNewTab: true, + }, + }, + { + description: 'An open-source API-only Relayer written in Go', + link: { + to: 'https://github.com/NoteGio/openrelay', + title: 'OpenRelay', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'A JavaScript Library for Interacting with OpenRelay.xyz and other 0x Standard Relayer API Implementations', + link: { + title: 'OpenRelay.js', + to: 'https://github.com/NoteGio/openrelay.js', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'The Radar Relay SDK is a software development kit that simplifies the interactions with Radar Relay’s APIs', + link: { + title: 'Radar SDK', + to: 'https://github.com/RadarRelay/sdk', + shouldOpenInNewTab: true, + }, + }, + { + description: + 'The Ocean provides a simple REST API, WebSockets API, and JavaScript library to help you integrate decentralized trading into your existing trading strategy.', + link: { + title: 'The Ocean Javascript SDK', + to: 'https://github.com/TheOceanTrade/theoceanx-javascript', + shouldOpenInNewTab: true, + }, + }, + { + description: "Tokenlon SDK provides APIs for developers to trade of imToken's relayer", + link: { + to: 'https://www.npmjs.com/package/tokenlon-sdk', + title: 'Tokenlon Javascript SDK', + shouldOpenInNewTab: true, + }, + }, + { + description: 'A small library that implements the 0x order assetData encoding/decoding in Java', + link: { + to: 'https://github.com/wildnothing/asset-data-decoder', + title: 'AssetData decoder library in Java', + shouldOpenInNewTab: true, + }, + }, + ], +}; + +export interface DocsHomeProps { + location: Location; + translate: Translate; + screenWidth: ScreenWidths; + tutorials: TutorialInfo[]; + categoryToPackages: ObjectMap; + dispatcher: Dispatcher; +} + +export interface DocsHomeState {} + +export class DocsHome extends React.Component { + public render(): React.ReactNode { + const sectionNameToLinks: ObjectMap = { + 'Starter guides': _.map(TUTORIALS, tutorialInfo => { + return { + ...tutorialInfo.link, + title: this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap), + }; + }), + [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.link), + [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.link), + [Categories.CommunityMaintained]: _.map( + CATEGORY_TO_PACKAGES[Categories.CommunityMaintained], + pkg => pkg.link, + ), + }; + const mainContent = ( + + ); + return ( + + ); + } +} diff --git a/packages/website/ts/pages/documentation/home.tsx b/packages/website/ts/pages/documentation/home.tsx deleted file mode 100644 index f8ac6a9f4..000000000 --- a/packages/website/ts/pages/documentation/home.tsx +++ /dev/null @@ -1,623 +0,0 @@ -import { - ALink, - colors, - constants as sharedConstants, - Link, - MarkdownLinkBlock, - NestedSidebarMenu, - utils as sharedUtils, -} from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; -import * as _ from 'lodash'; -import * as React from 'react'; -import DocumentTitle = require('react-document-title'); -import * as ReactMarkdown from 'react-markdown'; -import { Element as ScrollElement } from 'react-scroll'; -import { DocsLogo } from 'ts/components/documentation/docs_logo'; -import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; -import { TutorialButton } from 'ts/components/documentation/tutorial_button'; -import { Container } from 'ts/components/ui/container'; -import { Text } from 'ts/components/ui/text'; -import { Dispatcher } from 'ts/redux/dispatcher'; -import { Deco, Key, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; -import { Translate } from 'ts/utils/translate'; -import { utils } from 'ts/utils/utils'; - -const THROTTLE_TIMEOUT = 100; -const TOP_BAR_HEIGHT = 80; -const SCROLLER_WIDTH = 4; -const TUTORIALS: TutorialInfo[] = [ - { - iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg', - description: Key.DevelopOnEthereumDescription, - link: { - title: Key.DevelopOnEthereum, - to: `${WebsitePaths.Wiki}#Ethereum-Development`, - shouldOpenInNewTab: true, - }, - }, - { - iconUrl: '/images/developers/tutorials/build_a_relayer.svg', - description: Key.BuildARelayerDescription, - link: { - title: Key.BuildARelayer, - to: `${WebsitePaths.Wiki}#Build-A-Relayer`, - shouldOpenInNewTab: true, - }, - }, - { - iconUrl: '/images/developers/tutorials/0x_order_basics.svg', - description: Key.OrderBasicsDescription, - link: { - title: Key.OrderBasics, - to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, - shouldOpenInNewTab: true, - }, - }, - { - iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg', - description: Key.UseSharedLiquidityDescription, - link: { - title: Key.UseSharedLiquidity, - to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, - shouldOpenInNewTab: true, - }, - }, -]; -enum Categories { - ZeroExProtocol = '0x Protocol', - Ethereum = 'Ethereum', - CommunityMaintained = 'Community Maintained', -} -// TODO(fabio): Move this to it's own file -const CATEGORY_TO_PACKAGES: { [category: string]: Package[] } = { - [Categories.ZeroExProtocol]: [ - { - description: - 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as [order-utils](https://0xproject.com/docs/order-utils) and [contract-wrappers](https://0xproject.com/docs/contract-wrappers).', - link: { - title: '0x.js', - to: WebsitePaths.ZeroExJs, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A Typescript starter project that will walk you through the basics of how to interact with 0x Protocol and trade of an SRA relayer', - link: { - title: '0x starter project', - to: 'https://github.com/0xProject/0x-starter-project', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)', - link: { - title: '@0xproject/connect', - to: WebsitePaths.Connect, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.', - link: { - title: '@0xproject/contract-wrappers', - to: WebsitePaths.ContractWrappers, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', - link: { - title: '@0xproject/json-schemas', - to: WebsitePaths.JSONSchemas, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.', - link: { - title: '@0xproject/order-utils', - to: WebsitePaths.OrderUtils, - shouldOpenInNewTab: true, - }, - }, - { - description: - "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.", - link: { - title: '@0xproject/order-watcher', - to: WebsitePaths.OrderWatcher, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', - link: { - title: '@0xproject/sra-spec', - to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', - shouldOpenInNewTab: true, - }, - }, - ], - [Categories.Ethereum]: [ - { - description: - "This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by Geth abigen but takes a different approach. You can write your custom handlebars templates which will allow you to seamlessly integrate the generated code into your existing codebase with existing conventions.", - link: { - title: 'abi-gen', - to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A collection of Typescript types that are useful when working on an Ethereum-based project (e.g RawLog, Transaction, TxData, SolidityTypes, etc...).', - link: { - title: 'ethereum-types', - to: WebsitePaths.EthereumTypes, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.', - link: { - title: '@0xproject/sol-compiler', - to: WebsitePaths.SolCompiler, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', - link: { - title: '@0xproject/sol-cov', - to: WebsitePaths.SolCov, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', - link: { - title: '@0xproject/subproviders', - to: WebsitePaths.Subproviders, - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...', - link: { - title: '@0xproject/web3-wrapper', - to: WebsitePaths.Web3Wrapper, - shouldOpenInNewTab: true, - }, - }, - ], - [Categories.CommunityMaintained]: [ - { - description: - 'Node.js worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.', - link: { - title: '0x Event Extractor', - to: 'https://github.com/0xTracker/0x-event-extractor', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'Node.js worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.', - link: { - title: '0x Tracker Worker', - to: 'https://github.com/0xTracker/0x-tracker-worker', - shouldOpenInNewTab: true, - }, - }, - { - description: - "ERCdex's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", - link: { - title: 'Aquaduct', - to: 'https://www.npmjs.com/package/aqueduct', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'SDKs for automation using Aqueduct & ERC dEX. Aqueduct Server is a lightweight, portable and secure server that runs locally on any workstation. The server exposes a small number of foundational endpoints that enable working with the decentralized Aqueduct liquidity pool from any context or programming language.', - link: { - title: 'Aquaduct Server SDK', - to: 'https://github.com/ERCdEX/aqueduct-server-sdk', - shouldOpenInNewTab: true, - }, - }, - { - description: 'A node.js SDK for trading on the DDEX relayer', - link: { - to: 'https://www.npmjs.com/package/ddex-api', - title: 'DDEX Node.js SDK', - shouldOpenInNewTab: true, - }, - }, - { - description: "The ERC dEX Trade Widget let's any website provide token liquidity to it's users", - link: { - to: 'https://github.com/ERCdEX/widget', - title: 'ERCdex Widget', - shouldOpenInNewTab: true, - }, - }, - { - description: "ERCdex's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", - link: { - to: 'https://github.com/ERCdEX/java', - title: 'ERCdex Java SDK', - shouldOpenInNewTab: true, - }, - }, - { - description: "ERCdex's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", - link: { - to: 'https://github.com/ERCdEX/python', - title: 'ERCdex Python SDK', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A set of command-line tools for creating command-line scripts for interacting with the Ethereum blockchain in general, and 0x in particular', - link: { - title: 'Massive', - to: 'https://github.com/NoteGio/massive', - shouldOpenInNewTab: true, - }, - }, - { - description: 'An open-source API-only Relayer written in Go', - link: { - to: 'https://github.com/NoteGio/openrelay', - title: 'OpenRelay', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'A JavaScript Library for Interacting with OpenRelay.xyz and other 0x Standard Relayer API Implementations', - link: { - title: 'OpenRelay.js', - to: 'https://github.com/NoteGio/openrelay.js', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'The Radar Relay SDK is a software development kit that simplifies the interactions with Radar Relay’s APIs', - link: { - title: 'Radar SDK', - to: 'https://github.com/RadarRelay/sdk', - shouldOpenInNewTab: true, - }, - }, - { - description: - 'The Ocean provides a simple REST API, WebSockets API, and JavaScript library to help you integrate decentralized trading into your existing trading strategy.', - link: { - title: 'The Ocean Javascript SDK', - to: 'https://github.com/TheOceanTrade/theoceanx-javascript', - shouldOpenInNewTab: true, - }, - }, - { - description: "Tokenlon SDK provides APIs for developers to trade of imToken's relayer", - link: { - to: 'https://www.npmjs.com/package/tokenlon-sdk', - title: 'Tokenlon Javascript SDK', - shouldOpenInNewTab: true, - }, - }, - { - description: 'A small library that implements the 0x order assetData encoding/decoding in Java', - link: { - to: 'https://github.com/wildnothing/asset-data-decoder', - title: 'AssetData decoder library in Java', - shouldOpenInNewTab: true, - }, - }, - ], -}; - -interface Package { - description: string; - link: ALink; -} - -export interface HomeProps { - location: Location; - translate: Translate; - screenWidth: ScreenWidths; - dispatcher: Dispatcher; -} - -export interface HomeState { - isHoveringSidebar: boolean; - isHoveringMainContent: boolean; - isSidebarScrolling: boolean; -} - -export class Home extends React.Component { - private readonly _throttledScreenWidthUpdate: () => void; - private readonly _throttledSidebarScrolling: () => void; - private _sidebarScrollClearingInterval: number; - constructor(props: HomeProps) { - super(props); - this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT); - this._throttledSidebarScrolling = _.throttle(this._onSidebarScroll.bind(this), THROTTLE_TIMEOUT); - this.state = { - isHoveringSidebar: false, - isHoveringMainContent: false, - isSidebarScrolling: false, - }; - } - public componentDidMount(): void { - window.addEventListener('resize', this._throttledScreenWidthUpdate); - window.scrollTo(0, 0); - this._sidebarScrollClearingInterval = window.setInterval(() => { - this.setState({ - isSidebarScrolling: false, - }); - }, 1000); - } - public componentWillUnmount(): void { - window.removeEventListener('resize', this._throttledScreenWidthUpdate); - window.clearInterval(this._sidebarScrollClearingInterval); - } - public render(): React.ReactNode { - const scrollableContainerStyles: React.CSSProperties = { - position: 'absolute', - top: 80, - left: 0, - bottom: 0, - right: 0, - overflowX: 'hidden', - overflowY: 'scroll', - minHeight: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, - WebkitOverflowScrolling: 'touch', - }; - const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; - const mainContentPadding = isSmallScreen ? 20 : 50; - const sectionNameToLinks: ObjectMap = { - 'Starter guides': _.map(TUTORIALS, tutorialInfo => { - return { - ...tutorialInfo.link, - title: this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap), - }; - }), - [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.link), - [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.link), - [Categories.CommunityMaintained]: _.map( - CATEGORY_TO_PACKAGES[Categories.CommunityMaintained], - pkg => pkg.link, - ), - }; - return ( - - - - - - - - - -
    - - - -
    -
    - - - - -
    - - {this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))} - - {this._renderSectionDescription( - this.props.translate.get(Key.StartBuildOn0xDescription, Deco.Cap), - )} - - {_.map(TUTORIALS, tutorialInfo => ( - - - - ))} - - - - {this._renderSectionTitle( - this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords), - )} - - {this._renderSectionDescription( - this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap), - )} - - {_.map(CATEGORY_TO_PACKAGES, (pkgs, category) => - this._renderPackageCategory(category, pkgs), - )} - - - - -
    -
    -
    -
    - ); - } - private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode { - return ( - - {category} - {_.map(pkgs, pkg => this._renderPackage(pkg))} - - ); - } - private _renderPackage(pkg: Package): React.ReactNode { - const id = sharedUtils.getIdFromName(pkg.link.title); - return ( - - - - - - - - {pkg.link.title} - - - - - - - - - - - - - {this.props.translate.get(Key.More, Deco.Cap)} - - - - - - - - - - - ); - } - private _renderSectionTitle(text: string): React.ReactNode { - return ( - - {text} - - ); - } - private _renderSectionDescription(text: string): React.ReactNode { - return ( - - {text} - - ); - } - private _onSidebarHover(isHovering: boolean, _event: React.FormEvent): void { - if (isHovering !== this.state.isHoveringSidebar) { - this.setState({ - isHoveringSidebar: isHovering, - }); - } - } - private _onMainContentHover(isHovering: boolean, _event: React.FormEvent): void { - if (isHovering !== this.state.isHoveringMainContent) { - this.setState({ - isHoveringMainContent: isHovering, - }); - } - } - private _onSidebarScroll(_event: React.FormEvent): void { - this.setState({ - isSidebarScrolling: true, - }); - } - private _updateScreenWidth(): void { - const newScreenWidth = utils.getScreenWidth(); - this.props.dispatcher.updateScreenWidth(newScreenWidth); - } -} // tslint:disable:max-file-line-count diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index a3d248a9d..6c1eb67f0 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -624,4 +624,15 @@ export interface TutorialInfo { description: string; link: ALink; } + +export enum Categories { + ZeroExProtocol = '0x Protocol', + Ethereum = 'Ethereum', + CommunityMaintained = 'Community Maintained', +} + +export interface Package { + description: string; + link: ALink; +} // tslint:disable:max-file-line-count -- cgit From 16386bc99e88d9e1915f073b101fb066d9fdaa66 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 15:55:00 +0200 Subject: Add Getting starter sidebar header --- packages/website/ts/containers/connect_documentation.ts | 3 +-- .../ts/containers/contract_wrappers_documentation.ts | 3 +-- .../website/ts/containers/ethereum_types_documentation.ts | 4 +--- .../website/ts/containers/json_schemas_documentation.ts | 6 +----- .../website/ts/containers/order_utils_documentation.ts | 3 +-- .../website/ts/containers/order_watcher_documentation.ts | 3 +-- .../website/ts/containers/sol_compiler_documentation.ts | 4 +--- packages/website/ts/containers/sol_cov_documentation.ts | 4 +--- .../website/ts/containers/subproviders_documentation.ts | 4 +--- .../website/ts/containers/web3_wrapper_documentation.ts | 11 +++++------ packages/website/ts/containers/zero_ex_js_documentation.ts | 14 ++++++++++---- 11 files changed, 24 insertions(+), 35 deletions(-) diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index a728abe2c..0eec9e39c 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -26,8 +26,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: '0x Connect', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 1e1735846..003fd7f83 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -25,8 +25,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 2b6d6e64d..4ccea65a8 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -26,9 +26,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Ethereum Types', packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/ethereum-types', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], - types: [markdownSections.types], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index f32a50ea9..c3f13d374 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -20,7 +20,6 @@ const markdownSections = { introduction: 'introduction', installation: 'installation', usage: 'usage', - schemaValidator: 'schemaValidator', schemas: 'schemas', }; @@ -31,10 +30,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'JSON Schemas', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], - usage: [markdownSections.usage], - schemaValidator: [markdownSections.schemaValidator], + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], schemas: [markdownSections.schemas], }, sectionNameToMarkdownByVersion: { diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index b54c30a1e..a3734dae0 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -25,8 +25,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Order utils', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 59a018847..833380ac4 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -25,8 +25,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'OrderWatcher', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 20f26ed1d..d01836c35 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -27,9 +27,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Solidity Compiler', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], - usage: [markdownSections.usage], + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 27efd641e..c8dc5f473 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -27,9 +27,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Sol-cov', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], - usage: [markdownSections.usage], + 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 28b2e9508..65e406991 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -27,9 +27,7 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Subproviders', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [docSections.introduction], - install: [docSections.installation], - ['ledger-node-hid-issue']: [docSections.ledgerNodeHid], + 'getting-started': [docSections.introduction, docSections.installation, docSections.ledgerNodeHid], }, sectionNameToMarkdownByVersion: { '0.0.1': { diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index dc9d23304..7ff11c3cc 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -13,7 +13,7 @@ const IntroMarkdownV1 = require('md/docs/web3_wrapper/introduction'); const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation'); /* tslint:enable:no-var-requires */ -const docSections = { +const markdownSections = { introduction: 'introduction', installation: 'installation', }; @@ -25,16 +25,15 @@ const docsInfoConfig: DocsInfoConfig = { displayName: 'Web3Wrapper', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [docSections.introduction], - install: [docSections.installation], + 'getting-started': [markdownSections.introduction, markdownSections.installation], }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdownV1, + [markdownSections.installation]: InstallationMarkdownV1, }, }, - markdownSections: docSections, + markdownSections, }; const docsInfo = new DocsInfo(docsInfoConfig); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 2a3afd86c..459d8390a 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -39,9 +39,13 @@ const docsInfoConfig: DocsInfoConfig = { displayName: '0x.js', packageUrl: 'https://github.com/0xProject/0x-monorepo', markdownMenu: { - introduction: [markdownSections.introduction], - install: [markdownSections.installation], - topics: [markdownSections.async, markdownSections.errors, markdownSections.versioning], + 'getting-started': [ + markdownSections.introduction, + markdownSections.installation, + markdownSections.async, + markdownSections.errors, + markdownSections.versioning, + ], }, sectionNameToMarkdownByVersion: { '0.0.1': { @@ -68,6 +72,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -79,6 +84,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, docsInfo, translate: state.translate, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ -- cgit From a86ca6257f71e0318741fbf7595363d50e74464c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 15:59:23 +0200 Subject: If sidebar menu item links to internal page, no longer open in new tab --- packages/website/ts/pages/documentation/docs_home.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index 81cddf852..c5b4ed318 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -15,7 +15,6 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.DevelopOnEthereum, to: `${WebsitePaths.Wiki}#Ethereum-Development`, - shouldOpenInNewTab: true, }, }, { @@ -24,7 +23,6 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.BuildARelayer, to: `${WebsitePaths.Wiki}#Build-A-Relayer`, - shouldOpenInNewTab: true, }, }, { @@ -33,7 +31,6 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.OrderBasics, to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`, - shouldOpenInNewTab: true, }, }, { @@ -42,7 +39,6 @@ const TUTORIALS: TutorialInfo[] = [ link: { title: Key.UseSharedLiquidity, to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, - shouldOpenInNewTab: true, }, }, ]; @@ -56,7 +52,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '0x.js', to: WebsitePaths.ZeroExJs, - shouldOpenInNewTab: true, }, }, { @@ -74,7 +69,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/connect', to: WebsitePaths.Connect, - shouldOpenInNewTab: true, }, }, { @@ -83,7 +77,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/contract-wrappers', to: WebsitePaths.ContractWrappers, - shouldOpenInNewTab: true, }, }, { @@ -92,7 +85,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/json-schemas', to: WebsitePaths.JSONSchemas, - shouldOpenInNewTab: true, }, }, { @@ -101,7 +93,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/order-utils', to: WebsitePaths.OrderUtils, - shouldOpenInNewTab: true, }, }, { @@ -110,7 +101,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/order-watcher', to: WebsitePaths.OrderWatcher, - shouldOpenInNewTab: true, }, }, { @@ -139,7 +129,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: 'ethereum-types', to: WebsitePaths.EthereumTypes, - shouldOpenInNewTab: true, }, }, { @@ -148,7 +137,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/sol-compiler', to: WebsitePaths.SolCompiler, - shouldOpenInNewTab: true, }, }, { @@ -157,7 +145,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/sol-cov', to: WebsitePaths.SolCov, - shouldOpenInNewTab: true, }, }, { @@ -166,7 +153,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/subproviders', to: WebsitePaths.Subproviders, - shouldOpenInNewTab: true, }, }, { @@ -175,7 +161,6 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { link: { title: '@0xproject/web3-wrapper', to: WebsitePaths.Web3Wrapper, - shouldOpenInNewTab: true, }, }, ], -- cgit From 36f202f7b439630e95fc28c6b928d605311676d2 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 16:38:25 +0200 Subject: Improve loading --- .../website/ts/pages/documentation/doc_page.tsx | 43 +++++++++------------- 1 file changed, 17 insertions(+), 26 deletions(-) diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index f13866ee8..58b6f076d 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -76,7 +76,9 @@ export class DocPage extends React.Component { const sectionNameToLinks = _.isUndefined(this.state.docAgnosticFormat) ? {} : this.props.docsInfo.getSectionNameToLinks(this.state.docAgnosticFormat); - const mainContent = ( + const mainContent = _.isUndefined(this.state.docAgnosticFormat) ? ( +
    {this._renderLoading()}
    + ) : ( { /> ); return ( -
    - {_.isUndefined(this.state.docAgnosticFormat) ? ( - this._renderLoading() - ) : ( - - )} -
    + ); } private _renderLoading(): React.ReactNode { return ( -
    -
    -
    - -
    -
    - Loading documentation... -
    +
    +
    + +
    +
    + Loading documentation...
    ); -- cgit From 3ca943948184bf8d891dddb423e5b285d2463e7b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 17:42:41 +0200 Subject: Make all doc reference pages responsive --- packages/website/ts/containers/connect_documentation.ts | 4 +++- packages/website/ts/containers/contract_wrappers_documentation.ts | 4 +++- packages/website/ts/containers/ethereum_types_documentation.ts | 4 +++- packages/website/ts/containers/json_schemas_documentation.ts | 4 +++- packages/website/ts/containers/order_utils_documentation.ts | 4 +++- packages/website/ts/containers/order_watcher_documentation.ts | 4 +++- packages/website/ts/containers/smart_contracts_documentation.ts | 4 +++- packages/website/ts/containers/sol_compiler_documentation.ts | 4 +++- packages/website/ts/containers/sol_cov_documentation.ts | 4 +++- packages/website/ts/containers/subproviders_documentation.ts | 4 +++- packages/website/ts/containers/web3_wrapper_documentation.ts | 4 +++- 11 files changed, 33 insertions(+), 11 deletions(-) diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 0eec9e39c..7c86357c5 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -47,6 +47,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -58,6 +59,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 003fd7f83..f7e5f17eb 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -42,6 +42,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -53,6 +54,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, docsInfo, translate: state.translate, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 4ccea65a8..3cab885b4 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -43,6 +43,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -54,6 +55,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index c3f13d374..4b3200203 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -56,6 +56,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -67,6 +68,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index a3734dae0..77204b480 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -42,6 +42,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -53,6 +54,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 833380ac4..1b0c1ec91 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -42,6 +42,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -53,6 +54,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index 05b2a50c3..0989a7d0e 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -6,7 +6,7 @@ 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, SmartContractDocSections as Sections } from 'ts/types'; +import { DocPackages, ScreenWidths, SmartContractDocSections as Sections } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -97,6 +97,7 @@ interface ConnectedState { docsVersion: string; availableDocVersions: string[]; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -108,6 +109,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState docsVersion: state.docsVersion, availableDocVersions: state.availableDocVersions, translate: state.translate, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index d01836c35..b84974d69 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -45,6 +45,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -56,6 +57,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index c8dc5f473..f9c428f8e 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -45,6 +45,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -56,6 +57,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 65e406991..1588c7d46 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -45,6 +45,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -56,6 +57,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 7ff11c3cc..0154c05b9 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -42,6 +42,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -53,6 +54,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ -- cgit From a4604cb2f294f08318aa432b233571ae4e205fd5 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 12 Oct 2018 19:44:18 +0100 Subject: Pass down sidebar instead of sectionNameToLinks --- .../website/ts/components/documentation/docs_top_bar.tsx | 11 +++-------- packages/website/ts/pages/documentation/developers_page.tsx | 12 ++++-------- packages/website/ts/pages/documentation/doc_page.tsx | 6 +++++- packages/website/ts/pages/documentation/docs_home.tsx | 7 +++++-- 4 files changed, 17 insertions(+), 19 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 9a2146f9c..41273eb30 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -13,7 +13,7 @@ import { Translate } from 'ts/utils/translate'; export interface DocsTopBarProps { location: Location; translate: Translate; - sectionNameToLinks?: ObjectMap; + sidebar?: React.ReactNode; } interface DocsTopBarState { @@ -143,13 +143,8 @@ export class DocsTopBar extends React.Component - - + + {this.props.sidebar} ); diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 7172a7c66..c924fb460 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -1,5 +1,4 @@ -import { ALink, colors, constants as sharedConstants, NestedSidebarMenu } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { colors, constants as sharedConstants } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); @@ -21,7 +20,7 @@ export interface DevelopersPageProps { screenWidth: ScreenWidths; dispatcher: Dispatcher; mainContent: React.ReactNode; - sectionNameToLinks: ObjectMap; + sidebar: React.ReactNode; } export interface DevelopersPageState { @@ -107,10 +106,7 @@ export class DevelopersPage extends React.Component - + {this.props.sidebar}
    @@ -124,7 +120,7 @@ export class DevelopersPage extends React.Component
    { sourceUrl={sourceUrl} /> ); + const sidebar = ( + + ); return ( { categoryToPackages={CATEGORY_TO_PACKAGES} /> ); + const sidebar = ( + + ); return ( Date: Fri, 12 Oct 2018 19:44:51 +0100 Subject: fix: Remove unnecessary onClick prop from NestedSidebar, since one can listen to container element onClick --- .../react-shared/src/components/nested_sidebar_menu.tsx | 13 +------------ packages/website/ts/components/top_bar/top_bar.tsx | 6 ++---- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index f3ce5f5bf..85206569c 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -14,7 +14,6 @@ export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; - onMenuItemClick?: () => void; selectedVersion?: string; versions?: string[]; onVersionSelected?: (semver: string) => void; @@ -41,7 +40,6 @@ const styles: Styles = { export class NestedSidebarMenu extends React.Component { public static defaultProps: Partial = { shouldDisplaySectionHeaders: true, - onMenuItemClick: _.noop.bind(_), shouldReformatMenuItemNames: true, }; public render(): React.ReactNode { @@ -92,11 +90,7 @@ export class NestedSidebarMenu extends React.Component - + { return undefined; } return ( -
    +
    { } return ( -
    +
    ); -- cgit From e0e011eb668a13c25cb5dc64256f89d07e9cbe15 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 15:10:25 +0100 Subject: Fix sidebar shifting onHover due to scrollbar width --- packages/website/ts/pages/documentation/developers_page.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index c924fb460..12c00b440 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -70,6 +70,7 @@ export class DevelopersPage extends React.Component - +
    {this.props.sidebar} - +
    Date: Sat, 13 Oct 2018 16:29:14 +0100 Subject: Implement new version dropdown and remove it from nestedTopBar --- .../src/components/nested_sidebar_menu.tsx | 16 ----- .../src/components/version_drop_down.tsx | 37 ---------- .../components/documentation/version_drop_down.tsx | 83 ++++++++++++++++++++++ packages/website/ts/components/ui/button.tsx | 4 +- .../website/ts/pages/documentation/doc_page.tsx | 46 +++++++++--- 5 files changed, 124 insertions(+), 62 deletions(-) delete mode 100644 packages/react-shared/src/components/version_drop_down.tsx create mode 100644 packages/website/ts/components/documentation/version_drop_down.tsx diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 85206569c..440db4b16 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -8,15 +8,11 @@ import { colors } from '../utils/colors'; import { utils } from '../utils/utils'; import { Link } from './link'; -import { VersionDropDown } from './version_drop_down'; export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; - selectedVersion?: string; - versions?: string[]; - onVersionSelected?: (semver: string) => void; shouldReformatMenuItemNames?: boolean; } @@ -59,21 +55,9 @@ export class NestedSidebarMenu extends React.Component{this._renderMenuItems(links)}
    ; } }); - const maxWidthWithScrollbar = 307; return (
    {this.props.sidebarHeader} - {!_.isUndefined(this.props.versions) && - !_.isUndefined(this.props.selectedVersion) && - !_.isUndefined(this.props.onVersionSelected) && ( -
    - -
    - )}
    {navigation}
    ); diff --git a/packages/react-shared/src/components/version_drop_down.tsx b/packages/react-shared/src/components/version_drop_down.tsx deleted file mode 100644 index 5ff4bed54..000000000 --- a/packages/react-shared/src/components/version_drop_down.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import MenuItem from '@material-ui/core/MenuItem'; -import Select from '@material-ui/core/Select'; -import * as _ from 'lodash'; -import * as React from 'react'; - -export interface VersionDropDownProps { - selectedVersion: string; - versions: string[]; - onVersionSelected: (semver: string) => void; -} - -export interface VersionDropDownState {} - -export class VersionDropDown extends React.Component { - public render(): React.ReactNode { - return ( -
    - -
    - ); - } - private _renderDropDownItems(): React.ReactNode[] { - const items = _.map(this.props.versions, version => { - return ( - - v{version} - - ); - }); - return items; - } - private _updateSelectedVersion(event: React.ChangeEvent): void { - this.props.onVersionSelected(event.target.value); - } -} diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx new file mode 100644 index 000000000..c7b8667d7 --- /dev/null +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -0,0 +1,83 @@ +import { ALink, colors, Link } from '@0xproject/react-shared'; +import * as _ from 'lodash'; +import * as React from 'react'; +import { Button } from 'ts/components/ui/button'; +import { Container } from 'ts/components/ui/container'; +import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down'; +import { Text } from 'ts/components/ui/text'; +import { styled } from 'ts/style/theme'; +import { Deco, Key, WebsitePaths } from 'ts/types'; +import { constants } from 'ts/utils/constants'; +import { Translate } from 'ts/utils/translate'; + +interface ActiveNodeProps { + className?: string; + selectedVersion: string; +} + +const PlainActiveNode: React.StatelessComponent = ({ className, selectedVersion }) => ( + + + + v {selectedVersion} + + + + + + +); + +const ActiveNode = styled(PlainActiveNode)` + cursor: pointer; + border: 2px solid ${colors.beigeWhite}; + border-radius: 4px; + padding: 4px 6px 4px 8px; +`; + +interface VersionDropDownProps { + selectedVersion: string; + versions: string[]; + onVersionSelected: (semver: string) => void; +} + +interface VersionDropDownState {} + +export class VersionDropDown extends React.Component { + public render(): React.ReactNode { + const activeNode = ; + return ( + + ); + } + private _renderDropdownMenu(): React.ReactNode { + const items = _.map(this.props.versions, version => { + const isSelected = version === this.props.selectedVersion; + return ( + + + + ); + }); + const dropdownMenu = {items}; + return dropdownMenu; + } + private _onClick(selectedVersion: string): void { + this.props.onVersionSelected(selectedVersion); + } +} diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx index 75ba7bcff..ccaadc800 100644 --- a/packages/website/ts/components/ui/button.tsx +++ b/packages/website/ts/components/ui/button.tsx @@ -10,6 +10,7 @@ export interface ButtonProps { fontFamily?: string; backgroundColor?: string; borderColor?: string; + borderRadius?: string; width?: string; padding?: string; type?: string; @@ -29,7 +30,7 @@ export const Button = styled(PlainButton)` color: ${props => props.fontColor}; transition: background-color, opacity 0.5s ease; padding: ${props => props.padding}; - border-radius: 6px; + border-radius: ${props => props.borderRadius}; font-weight: 500; outline: none; font-family: ${props => props.fontFamily}; @@ -52,6 +53,7 @@ export const Button = styled(PlainButton)` Button.defaultProps = { fontSize: '12px', + borderRadius: '6px', backgroundColor: colors.white, width: 'auto', fontFamily: 'Roboto', diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index bc0dc7b6a..ca2652c76 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -6,12 +6,15 @@ import { SupportedDocJson, TypeDocUtils, } from '@0xproject/react-docs'; -import { NestedSidebarMenu } from '@0xproject/react-shared'; +import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; import findVersions = require('find-versions'); import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; import semverSort = require('semver-sort'); +import { VersionDropDown } from 'ts/components/documentation/version_drop_down'; +import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { DocPackages, ScreenWidths } from 'ts/types'; @@ -89,7 +92,7 @@ export class DocPage extends React.Component { /> ); const sidebar = ( - + ); return ( { /> ); } + private _renderSidebarHeader(): React.ReactNode { + return ( + + + + + 0x.js + + + + + + + + + ); + } private _renderLoading(): React.ReactNode { return ( -
    -
    + + -
    -
    + + Loading documentation... -
    -
    +
    + ); } private async _fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists?: string): Promise { -- cgit From 1d30a2f91dfc23242602ed0da011e6b4edd44f86 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 16:29:24 +0100 Subject: Remove doc menus from main topBar --- packages/website/ts/components/top_bar/top_bar.tsx | 69 ++-------------------- 1 file changed, 4 insertions(+), 65 deletions(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 55a2a3954..f7043dca2 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -72,20 +72,6 @@ const styles: Styles = { }, }; -const DOC_WEBSITE_PATHS_TO_KEY = { - [WebsitePaths.SolCov]: Key.SolCov, - [WebsitePaths.SmartContracts]: Key.SmartContracts, - [WebsitePaths.Web3Wrapper]: Key.Web3Wrapper, - [WebsitePaths.SolCompiler]: Key.SolCompiler, - [WebsitePaths.JSONSchemas]: Key.JsonSchemas, - [WebsitePaths.Subproviders]: Key.Subproviders, - [WebsitePaths.ContractWrappers]: Key.ContractWrappers, - [WebsitePaths.Connect]: Key.Connect, - [WebsitePaths.ZeroExJs]: Key.ZeroExJs, - [WebsitePaths.OrderUtils]: Key.OrderUtils, - [WebsitePaths.OrderWatcher]: Key.OrderWatcher, -}; - const DEFAULT_HEIGHT = 68; const EXPANDED_HEIGHT = 75; @@ -245,7 +231,6 @@ export class TopBar extends React.Component { onRequestChange={this._onMenuButtonClick.bind(this)} >
    - {this._renderDocsMenu()} {this._renderWiki()}
    {this.props.translate.get(Key.Website, Deco.Cap)} @@ -253,22 +238,12 @@ export class TopBar extends React.Component { {this.props.translate.get(Key.Home, Deco.Cap)} + + {this.props.translate.get(Key.Documentation, Deco.Cap)} + {this.props.translate.get(Key.Wiki, Deco.Cap)} - {_.map(DOC_WEBSITE_PATHS_TO_KEY, (key, websitePath) => { - if (!this._doesUrlInclude(websitePath)) { - return ( - - - {this.props.translate.get(key, Deco.Cap)}{' '} - {this.props.translate.get(Key.Docs, Deco.Cap)} - - - ); - } - return null; - })} {!this._isViewingPortal() && ( @@ -297,30 +272,6 @@ export class TopBar extends React.Component { ); } - private _renderDocsMenu(): React.ReactNode { - const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { - return this._doesUrlInclude(websitePath); - }); - // HACK: We need to make sure the SCROLL_CONTAINER is loaded before rendering the Sidebar - // because the sidebar renders `react-scroll` links which depend on the scroll container already - // being rendered. - const documentationContainer = document.getElementById(sharedConstants.SCROLL_CONTAINER_ID); - if (!isViewingDocsPage || _.isUndefined(this.props.sectionNameToLinks) || _.isNull(documentationContainer)) { - return undefined; - } - return ( -
    - -
    - ); - } private _renderWiki(): React.ReactNode { if (!this._isViewingWiki()) { return undefined; @@ -344,9 +295,6 @@ export class TopBar extends React.Component { private _isViewingPortal(): boolean { return _.includes(this.props.location.pathname, WebsitePaths.Portal); } - private _isViewingDocs(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.Docs); - } private _isViewingFAQ(): boolean { return _.includes(this.props.location.pathname, WebsitePaths.FAQ); } @@ -357,15 +305,6 @@ export class TopBar extends React.Component { return _.includes(this.props.location.pathname, WebsitePaths.Wiki); } private _shouldDisplayBottomBar(): boolean { - const isViewingDocsPage = _.some(DOC_WEBSITE_PATHS_TO_KEY, (_key, websitePath) => { - return this._doesUrlInclude(websitePath); - }); - return ( - isViewingDocsPage || - this._isViewingWiki() || - this._isViewingFAQ() || - this._isViewingDocs() || - this._isViewingPortal() - ); + return this._isViewingWiki() || this._isViewingFAQ() || this._isViewingPortal(); } } // tslint:disable:max-file-line-count -- cgit From 2b2f5d6169b906e58691ad722099f8b677ff9080 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 16:32:26 +0100 Subject: Fix: Make width variable --- packages/website/ts/components/documentation/version_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx index c7b8667d7..8374e79e2 100644 --- a/packages/website/ts/components/documentation/version_drop_down.tsx +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -16,7 +16,7 @@ interface ActiveNodeProps { } const PlainActiveNode: React.StatelessComponent = ({ className, selectedVersion }) => ( - + v {selectedVersion} -- cgit From 6f77b90836be13d5b7c425a1ac4e8c9f46bd8790 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 16:32:36 +0100 Subject: Chore: remove unused imports --- .../website/ts/components/documentation/version_drop_down.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx index 8374e79e2..092572330 100644 --- a/packages/website/ts/components/documentation/version_drop_down.tsx +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -1,4 +1,4 @@ -import { ALink, colors, Link } from '@0xproject/react-shared'; +import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Button } from 'ts/components/ui/button'; @@ -6,9 +6,6 @@ import { Container } from 'ts/components/ui/container'; import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down'; import { Text } from 'ts/components/ui/text'; import { styled } from 'ts/style/theme'; -import { Deco, Key, WebsitePaths } from 'ts/types'; -import { constants } from 'ts/utils/constants'; -import { Translate } from 'ts/utils/translate'; interface ActiveNodeProps { className?: string; @@ -51,8 +48,8 @@ export class VersionDropDown extends React.Component ); -- cgit From 11941b08b686d13f02c0d2c1bf6d58692dd701db Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 17:09:04 +0100 Subject: Fix sidebar top so long titles display correctly --- packages/website/ts/pages/documentation/doc_page.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index ca2652c76..101040c2c 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -108,19 +108,19 @@ export class DocPage extends React.Component { private _renderSidebarHeader(): React.ReactNode { return ( - - + + - 0x.js + {this.props.docsInfo.displayName} - +
    - +
    Date: Sat, 13 Oct 2018 17:09:46 +0100 Subject: fix: Dropdown component so that re-clicking the activeNode when dropdown is open, closes it --- packages/website/ts/components/ui/drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx index 9044b218d..4138b3fe5 100644 --- a/packages/website/ts/components/ui/drop_down.tsx +++ b/packages/website/ts/components/ui/drop_down.tsx @@ -100,7 +100,7 @@ export class DropDown extends React.Component { private _onActiveNodeClick(event: React.FormEvent): void { if (this.props.activateEvent === DropdownMouseEvent.Click) { this.setState({ - isDropDownOpen: true, + isDropDownOpen: !this.state.isDropDownOpen, anchorEl: event.currentTarget, }); } -- cgit From 9b1f765ced7cabe21aa9fe8ef1cd3d08dcf96202 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Sat, 13 Oct 2018 17:11:47 +0100 Subject: chore: only show sidebar once docs have loaded --- packages/website/ts/pages/documentation/doc_page.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 101040c2c..19e76a51b 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -91,7 +91,9 @@ export class DocPage extends React.Component { sourceUrl={sourceUrl} /> ); - const sidebar = ( + const sidebar = _.isUndefined(this.state.docAgnosticFormat) ? ( +
    + ) : ( ); return ( -- cgit From 3fbf9c4285c1caba2340298fadcaf03a5632fe7a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 11:22:00 +0100 Subject: chore: round border of code snippets --- packages/website/less/all.less | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/website/less/all.less b/packages/website/less/all.less index c62db0d20..c8dd16fd3 100644 --- a/packages/website/less/all.less +++ b/packages/website/less/all.less @@ -83,6 +83,7 @@ a { code { border: 1px solid #e3eefe; + border-radius: 4px; font-family: 'Roboto Mono'; background-color: #f2f6ff !important; // lightBlue } -- cgit From bd763ebb3442f11b22f68f4c4c7804cbbd2b09a3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 11:22:22 +0100 Subject: chore: fix key issue --- packages/website/ts/components/documentation/version_drop_down.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx index 092572330..ec1c99f7b 100644 --- a/packages/website/ts/components/documentation/version_drop_down.tsx +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -58,7 +58,7 @@ export class VersionDropDown extends React.Component { const isSelected = version === this.props.selectedVersion; return ( - +
    )} +
    ); } diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index a83881b67..dabdfff9b 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -2,6 +2,7 @@ import * as React from 'react'; import { Link as ScrollLink } from 'react-scroll'; import { HeaderSizes, Styles } from '../types'; +import { colors } from '../utils/colors'; import { constants } from '../utils/constants'; const headerSizeToScrollOffset: { [headerSize: string]: number } = { @@ -27,7 +28,7 @@ const styles: Styles = { cursor: 'pointer', }, h1: { - fontSize: '1.8em', + fontSize: '30px', }, h2: { fontSize: '1.5em', @@ -63,7 +64,7 @@ export class AnchorTitle extends React.Component -
    +
    {this.props.title}
    ) => void; + overflowX?: 'scroll' | 'hidden' | 'auto' | 'visible'; +} + +export const Container: React.StatelessComponent = props => { + const { children, className, Tag, isHidden, id, onClick, ...style } = props; + const visibility = isHidden ? 'hidden' : undefined; + return ( + + {children} + + ); +}; + +Container.defaultProps = { + Tag: 'div', +}; + +Container.displayName = 'Container'; diff --git a/packages/react-shared/src/components/markdown_paragraph_block.tsx b/packages/react-shared/src/components/markdown_paragraph_block.tsx new file mode 100644 index 000000000..519638446 --- /dev/null +++ b/packages/react-shared/src/components/markdown_paragraph_block.tsx @@ -0,0 +1,14 @@ +import * as _ from 'lodash'; +import * as React from 'react'; + +import { colors } from '../utils/colors'; + +export interface MarkdownParagraphBlockProps {} + +export interface MarkdownParagraphBlockState {} + +export class MarkdownParagraphBlock extends React.Component { + public render(): React.ReactNode { + return {this.props.children}; + } +} diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index e84d2b078..3dc3efe12 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -8,15 +8,18 @@ import { colors } from '../utils/colors'; import { utils } from '../utils/utils'; import { AnchorTitle } from './anchor_title'; +import { Container } from './container'; import { Link } from './link'; import { MarkdownCodeBlock } from './markdown_code_block'; import { MarkdownLinkBlock } from './markdown_link_block'; +import { MarkdownParagraphBlock } from './markdown_paragraph_block'; export interface MarkdownSectionProps { sectionName: string; markdownContent: string; headerSize?: HeaderSizes; githubLink?: string; + shouldReformatTitle?: boolean; } interface DefaultMarkdownSectionProps { @@ -32,6 +35,7 @@ export interface MarkdownSectionState { export class MarkdownSection extends React.Component { public static defaultProps: Partial = { headerSize: HeaderSizes.H3, + shouldReformatTitle: true, }; constructor(props: MarkdownSectionProps) { super(props); @@ -43,7 +47,9 @@ export class MarkdownSection extends React.Component -
    +
    - + @@ -71,16 +77,23 @@ export class MarkdownSection extends React.Component )}
    -
    -
    + +
    ); diff --git a/packages/react-shared/src/index.ts b/packages/react-shared/src/index.ts index e33b09f19..2ab9b393e 100644 --- a/packages/react-shared/src/index.ts +++ b/packages/react-shared/src/index.ts @@ -5,6 +5,7 @@ export { MarkdownSection } from './components/markdown_section'; export { NestedSidebarMenu } from './components/nested_sidebar_menu'; export { SectionHeader } from './components/section_header'; export { Link } from './components/link'; +export { Container } from './components/container'; export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, ALink } from './types'; diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts index 596c17e83..a4dd7fefa 100644 --- a/packages/react-shared/src/utils/colors.ts +++ b/packages/react-shared/src/utils/colors.ts @@ -18,6 +18,7 @@ const baseColors = { darkGrey: '#818181', landingLinkGrey: '#919191', linkSectionGrey: '#999999', + greyTheme: '#666666', grey700: '#616161', grey750: '#515151', grey800: '#424242', diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json index 5abe0ab4e..9fd1b04cf 100644 --- a/packages/react-shared/tsconfig.json +++ b/packages/react-shared/tsconfig.json @@ -4,6 +4,7 @@ "outDir": "lib", "rootDir": "src", "jsx": "react", + "strictNullChecks": false, "baseUrl": ".", "paths": { "*": ["node_modules/@types/*", "*"] -- cgit From bf9af95654503df94b5b32af74a4cbc8bee7f2ec Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 11:57:16 +0100 Subject: chore: improve colors --- packages/react-docs/src/components/comment.tsx | 4 ++-- packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-docs/src/components/comment.tsx b/packages/react-docs/src/components/comment.tsx index c3687c510..9c866e62c 100644 --- a/packages/react-docs/src/components/comment.tsx +++ b/packages/react-docs/src/components/comment.tsx @@ -1,4 +1,4 @@ -import { MarkdownCodeBlock } from '@0xproject/react-shared'; +import { colors, MarkdownCodeBlock } from '@0xproject/react-shared'; import * as React from 'react'; import * as ReactMarkdown from 'react-markdown'; @@ -13,7 +13,7 @@ const defaultProps = { export const Comment: React.SFC = (props: CommentProps) => { return ( -
    +
    ); diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 853b69976..71b9b4d32 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -44,7 +44,7 @@ export class NestedSidebarMenu extends React.Component +
    {finalSectionName.toUpperCase()}
    -- cgit From b3a323efa1fc5d942c2f7052f585acc248394f44 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 12:20:30 +0100 Subject: fix: Nested a tag warning in console by not rendering a tags within type definition popovers --- packages/react-docs/src/components/type.tsx | 62 ++++++++++++---------- .../react-docs/src/components/type_definition.tsx | 1 + .../react-shared/src/components/anchor_title.tsx | 34 +++++++----- 3 files changed, 54 insertions(+), 43 deletions(-) diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 1ae1324c6..d579449f4 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -204,7 +204,9 @@ export const Type: React.SFC = (props: TypeProps): any => { const isExportedClassReference = !!props.type.isExportedClassReference; const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined; if (!_.isUndefined(typeNameUrlIfExists)) { - typeName = ( + typeName = props.isInPopover ? ( + {typeName} + ) : ( {typeName} @@ -218,39 +220,41 @@ export const Type: React.SFC = (props: TypeProps): any => { ? props.type.name : `${props.docsInfo.typeSectionName}-${typeName}`; typeName = ( - + {sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? ( {typeName} ) : ( - - {typeName} - - - - + + {typeName} + + + + + )} - + ); } return ( diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index 9a3e50a1b..e1c4f1f2b 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -124,6 +124,7 @@ export class TypeDefinition extends React.Component
    diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
    index dabdfff9b..0bdf61d44 100644
    --- a/packages/react-shared/src/components/anchor_title.tsx
    +++ b/packages/react-shared/src/components/anchor_title.tsx
    @@ -15,6 +15,7 @@ export interface AnchorTitleProps {
         id: string;
         headerSize: HeaderSizes;
         shouldShowAnchor: boolean;
    +    isDisabled?: boolean;
     }
     
     export interface AnchorTitleState {
    @@ -40,6 +41,9 @@ const styles: Styles = {
     };
     
     export class AnchorTitle extends React.Component {
    +    public static defaultProps: Partial = {
    +        isDisabled: false,
    +    };
         constructor(props: AnchorTitleProps) {
             super(props);
             this.state = {
    @@ -67,20 +71,22 @@ export class AnchorTitle extends React.Component
                         {this.props.title}
                     
    - - - + {!this.props.isDisabled && ( + + + + )}
    ); } -- cgit From 60208091a49fcd41514a60d5735bc736edf81275 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 12:35:38 +0100 Subject: chore: fix missed class rename --- packages/website/less/all.less | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/website/less/all.less b/packages/website/less/all.less index c8dd16fd3..3747e4860 100644 --- a/packages/website/less/all.less +++ b/packages/website/less/all.less @@ -34,17 +34,7 @@ a { } } -#documentation { - p { - line-height: 1.5; - } - - .comment { - p { - margin: 0px; - } - } - +#scroll_container { .typeTooltip { border: 1px solid lightgray; opacity: 1; -- cgit From 6ada38248ec4d44605465f41cfe5e0801d26aa32 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 12:49:47 +0100 Subject: chore: improve rendering of sidebar top section on mobile --- packages/website/ts/components/documentation/docs_top_bar.tsx | 2 +- packages/website/ts/pages/documentation/doc_page.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 41273eb30..95adc417d 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -143,7 +143,7 @@ export class DocsTopBar extends React.Component - + {this.props.sidebar} diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 19e76a51b..65d9b68a9 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -112,7 +112,11 @@ export class DocPage extends React.Component { - + {this.props.docsInfo.displayName} -- cgit From a5e435d8317c7532caa4eb0fcf5bb49cf42c87c7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 12:58:09 +0100 Subject: fix: menu item overflow issue --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 71b9b4d32..1ad61fcca 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -30,6 +30,9 @@ const styles: Styles = { fontSize: 14, lineHeight: 2, padding: 0, + whiteSpace: 'nowrap', + overflow: 'hidden', + textOverflow: 'ellipsis', }, }; -- cgit From c9a0c7872de22cf33f1cb82cf504d0df6923d0e8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 16:48:39 +0100 Subject: Chore: Only render one sidebar at a time --- packages/website/ts/components/documentation/docs_top_bar.tsx | 5 +++-- packages/website/ts/pages/documentation/developers_page.tsx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 95adc417d..28a205d7a 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -6,12 +6,13 @@ import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; -import { Deco, Key, WebsitePaths } from 'ts/types'; +import { Deco, Key, ScreenWidths, WebsitePaths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; export interface DocsTopBarProps { location: Location; + screenWidth: ScreenWidths; translate: Translate; sidebar?: React.ReactNode; } @@ -105,7 +106,7 @@ export class DocsTopBar extends React.Component - {this._renderDrawer()} + {this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()} ); } diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 12c00b440..042d80c61 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -115,7 +115,7 @@ export class DevelopersPage extends React.Component - {this.props.sidebar} + {this.props.screenWidth !== ScreenWidths.Sm && this.props.sidebar}
    @@ -128,6 +128,7 @@ export class DevelopersPage extends React.Component -- cgit From 96d145f54ff559fe6a46626e73c67e716d6927cd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 16:49:46 +0100 Subject: chore: Remove unused state --- packages/react-docs/src/components/doc_reference.tsx | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx index c70b99b19..da05b04f8 100644 --- a/packages/react-docs/src/components/doc_reference.tsx +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -50,17 +50,9 @@ export interface DocReferenceProps { docAgnosticFormat?: DocAgnosticFormat; } -export interface DocReferenceState { - isHoveringSidebar: boolean; -} +export interface DocReferenceState {} export class DocReference extends React.Component { - constructor(props: DocReferenceProps) { - super(props); - this.state = { - isHoveringSidebar: false, - }; - } public componentDidMount(): void { window.addEventListener('hashchange', this._onHashChanged.bind(this), false); } @@ -329,16 +321,6 @@ export class DocReference extends React.Component ); } - private _onSidebarHover(_event: React.FormEvent): void { - this.setState({ - isHoveringSidebar: true, - }); - } - private _onSidebarHoverOff(): void { - this.setState({ - isHoveringSidebar: false, - }); - } private _onHashChanged(_event: any): void { const hash = window.location.hash.slice(1); sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); -- cgit From ce151f630d10664353ff1c9172a7495557792abe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 17:35:40 +0100 Subject: feat: highlighted sidebar as you scroll on doc reference pages --- .../react-docs/src/components/doc_reference.tsx | 8 ++-- .../react-docs/src/components/signature_block.tsx | 2 +- .../src/components/markdown_section.tsx | 20 +++++----- .../src/components/nested_sidebar_menu.tsx | 46 ++++++++++++++++++++-- .../ts/pages/documentation/developers_page.tsx | 2 +- 5 files changed, 58 insertions(+), 20 deletions(-) diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx index da05b04f8..3a909db7e 100644 --- a/packages/react-docs/src/components/doc_reference.tsx +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -97,15 +97,15 @@ export class DocReference extends React.Component ); } @@ -196,7 +196,9 @@ export class DocReference extends React.Component - {!isExportedFunctionSection &&

    Functions

    } + {!isExportedFunctionSection && ( +
    Functions
    + )}
    {functionDefs}
    )} diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 5ec82983a..819311953 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -55,7 +55,7 @@ export class SignatureBlock extends React.Component diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index 3dc3efe12..9f5855d16 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -20,6 +20,7 @@ export interface MarkdownSectionProps { headerSize?: HeaderSizes; githubLink?: string; shouldReformatTitle?: boolean; + alternativeSectionTitle?: string; } interface DefaultMarkdownSectionProps { @@ -47,22 +48,25 @@ export class MarkdownSection extends React.Component - - + +
    @@ -87,13 +91,7 @@ export class MarkdownSection extends React.Component - +
    ); diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 1ad61fcca..87622310a 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -14,9 +14,12 @@ export interface NestedSidebarMenuProps { sidebarHeader?: React.ReactNode; shouldDisplaySectionHeaders?: boolean; shouldReformatMenuItemNames?: boolean; + parentName?: string; } -export interface NestedSidebarMenuState {} +export interface NestedSidebarMenuState { + scrolledToId: string; +} const styles: Styles = { menuItemWithHeaders: { @@ -40,7 +43,28 @@ export class NestedSidebarMenu extends React.Component = { shouldDisplaySectionHeaders: true, shouldReformatMenuItemNames: true, + parentName: 'default', }; + private _urlIntervalCheckId: number; + constructor(props: NestedSidebarMenuProps) { + super(props); + this.state = { + scrolledToId: '', + }; + } + public componentDidMount(): void { + this._urlIntervalCheckId = window.setInterval(() => { + const scrollId = location.hash.slice(1); + if (scrollId !== this.state.scrolledToId) { + this.setState({ + scrolledToId: scrollId, + }); + } + }, 200); + } + public componentWillUnmount(): void { + window.clearInterval(this._urlIntervalCheckId); + } public render(): React.ReactNode { const navigation = _.map(this.props.sectionNameToLinks, (links: ALink[], sectionName: string) => { const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); @@ -48,7 +72,7 @@ export class NestedSidebarMenu extends React.Component -
    +
    {finalSectionName.toUpperCase()}
    {this._renderMenuItems(links)} @@ -61,23 +85,37 @@ export class NestedSidebarMenu extends React.Component {this.props.sidebarHeader} -
    {navigation}
    +
    {navigation}
    ); } private _renderMenuItems(links: ALink[]): React.ReactNode[] { + const scrolledToId = this.state.scrolledToId; const menuItemStyles = this.props.shouldDisplaySectionHeaders ? styles.menuItemWithHeaders : styles.menuItemWithoutHeaders; const menuItemInnerDivStyles = this.props.shouldDisplaySectionHeaders ? styles.menuItemInnerDivWithHeaders : {}; const menuItems = _.map(links, link => { + const isScrolledTo = link.to === scrolledToId; const finalMenuItemName = this.props.shouldReformatMenuItemNames ? utils.convertDashesToSpaces(link.title) : link.title; return (
    - + Date: Mon, 15 Oct 2018 17:43:45 +0100 Subject: chore: replace Github with Wiki in topBar and refactor so can display internal & external links --- .../ts/components/documentation/docs_top_bar.tsx | 36 +++++++++++++--------- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 28a205d7a..2c37f8387 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -22,11 +22,10 @@ interface DocsTopBarState { } interface MenuItemInfo { - title: string; - url: string; iconUrl: string; fontColor: string; fontWeight?: string; + link: ALink; } export class DocsTopBar extends React.Component { @@ -46,20 +45,28 @@ export class DocsTopBar extends React.Component { return ( - @@ -127,11 +133,11 @@ export class DocsTopBar extends React.Component - {menuItemInfo.title} + {menuItemInfo.link.title} - + ); }); return menuItems; -- cgit From 8b8c9582035f4722d65d5ef207daf4e9b6af81cd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 17:46:42 +0100 Subject: chore: fix padding issue --- packages/website/ts/components/documentation/overview_content.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/website/ts/components/documentation/overview_content.tsx b/packages/website/ts/components/documentation/overview_content.tsx index aa132a80f..6999e039a 100644 --- a/packages/website/ts/components/documentation/overview_content.tsx +++ b/packages/website/ts/components/documentation/overview_content.tsx @@ -117,9 +117,11 @@ export class OverviewContent extends React.Component - {text} - + + + {text} + + ); } private _renderSectionDescription(text: string): React.ReactNode { -- cgit From fb0e0473de29bdffc6a1fce2587704146601dc66 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 15 Oct 2018 22:18:44 +0100 Subject: chore: move wiki to Developers section --- packages/website/ts/components/sidebar_header.tsx | 35 ----- packages/website/ts/containers/wiki.ts | 3 + packages/website/ts/pages/wiki/wiki.tsx | 176 ++++++++-------------- 3 files changed, 65 insertions(+), 149 deletions(-) delete mode 100644 packages/website/ts/components/sidebar_header.tsx diff --git a/packages/website/ts/components/sidebar_header.tsx b/packages/website/ts/components/sidebar_header.tsx deleted file mode 100644 index 56657ab72..000000000 --- a/packages/website/ts/components/sidebar_header.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { colors } from '@0xproject/react-shared'; -import * as React from 'react'; - -interface SidebarHeaderProps { - title: string; - iconUrl: string; -} - -interface SidebarHeaderState {} - -export class SidebarHeader extends React.Component { - public render(): React.ReactNode { - return ( -
    -
    -
    0x
    -
    - docs -
    -
    -
    - | -
    -
    -
    - -
    -
    - {this.props.title} -
    -
    -
    - ); - } -} diff --git a/packages/website/ts/containers/wiki.ts b/packages/website/ts/containers/wiki.ts index 357f8bbf4..069b0ae54 100644 --- a/packages/website/ts/containers/wiki.ts +++ b/packages/website/ts/containers/wiki.ts @@ -4,10 +4,12 @@ import { Dispatch } from 'redux'; import { Wiki as WikiComponent, WikiProps } from 'ts/pages/wiki/wiki'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; +import { ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; interface ConnectedState { translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -16,6 +18,7 @@ interface ConnectedDispatch { const mapStateToProps = (state: State, _ownProps: WikiProps): ConnectedState => ({ translate: state.translate, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 70f54aceb..01cbc4e4d 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -5,25 +5,22 @@ import { HeaderSizes, MarkdownSection, NestedSidebarMenu, - Styles, utils as sharedUtils, } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; -import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; -import DocumentTitle = require('react-document-title'); -import { SidebarHeader } from 'ts/components/sidebar_header'; -import { TopBar } from 'ts/components/top_bar/top_bar'; +import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; +import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Article, ArticlesBySection } from 'ts/types'; +import { Article, ArticlesBySection, ScreenWidths } from 'ts/types'; import { backendClient } from 'ts/utils/backend_client'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; -const TOP_BAR_HEIGHT = 60; const WIKI_NOT_READY_BACKOUT_TIMEOUT_MS = 5000; export interface WikiProps { @@ -31,6 +28,7 @@ export interface WikiProps { location: Location; dispatcher: Dispatcher; translate: Translate; + screenWidth: ScreenWidths; } interface WikiState { @@ -38,24 +36,6 @@ interface WikiState { isHoveringSidebar: boolean; } -const styles: Styles = { - mainContainers: { - position: 'absolute', - top: 1, - left: 0, - bottom: 0, - right: 0, - overflow: 'hidden', - height: `calc(100vh - ${TOP_BAR_HEIGHT}px)`, - WebkitOverflowScrolling: 'touch', - }, - menuContainer: { - borderColor: colors.grey300, - maxWidth: 330, - backgroundColor: colors.gray40, - }, -}; - export class Wiki extends React.Component { private _wikiBackoffTimeoutId: number; private _isUnmounted: boolean; @@ -83,84 +63,64 @@ export class Wiki extends React.Component { const sectionNameToLinks = _.isUndefined(this.state.articlesBySection) ? {} : this._getSectionNameToLinks(this.state.articlesBySection); - const mainContainersStyle: React.CSSProperties = { - ...styles.mainContainers, - overflow: this.state.isHoveringSidebar ? 'auto' : 'hidden', - }; - const sidebarHeader = ; + + const mainContent = _.isUndefined(this.state.articlesBySection) ? ( +
    {this._renderLoading()}
    + ) : ( +
    + {this._renderWikiArticles()} +
    + ); + const sidebar = _.isUndefined(this.state.articlesBySection) ? ( +
    + ) : ( + + ); return ( -
    - - - {_.isUndefined(this.state.articlesBySection) ? ( -
    -
    -
    - -
    -
    - Loading wiki... -
    -
    -
    - ) : ( -
    -
    + ); + } + private _renderSidebarHeader(): React.ReactNode { + return ( + + + + -
    -
    - -
    -
    -
    -
    -
    -
    - {this._renderWikiArticles()} -
    -
    -
    -
    -
    - )} -
    + Wiki + + + + + + ); + } + private _renderLoading(): React.ReactNode { + return ( + + + + + + Loading wiki... + + ); } private _renderWikiArticles(): React.ReactNode { @@ -180,22 +140,10 @@ export class Wiki extends React.Component { headerSize={HeaderSizes.H2} githubLink={githubLink} /> -
    -
    - See a way to improve this article? -
    -
    - -
    -
    ); }); - return ( -
    - {renderedArticles} -
    - ); + return
    {renderedArticles}
    ; } private async _fetchArticlesBySectionAsync(): Promise { try { -- cgit From 6ff35172d6ad865e353ab593ec23b788d5640f6c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 14:35:10 +0100 Subject: Replace sandbox with wiki in developer popover --- .../website/ts/components/dropdowns/developers_drop_down.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 2bdcb8a4c..1db1e89b8 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -43,6 +43,10 @@ const popularDocsToLinkInfos: ALink[] = [ }, ]; const usefulLinksToLinkInfo: ALink[] = [ + { + title: Key.Wiki, + to: WebsitePaths.Wiki, + }, { title: Key.Github, to: constants.URL_GITHUB_ORG, @@ -53,11 +57,6 @@ const usefulLinksToLinkInfo: ALink[] = [ to: WebsitePaths.Whitepaper, shouldOpenInNewTab: true, }, - { - title: Key.Sandbox, - to: constants.URL_SANDBOX, - shouldOpenInNewTab: true, - }, ]; interface DevelopersDropDownProps { -- cgit From ad235912d7c7fc618d7adf6c8568d723da812d66 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 14:35:33 +0100 Subject: chore: Replace FAQ with Developer home in footer --- packages/website/ts/components/footer.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index f11ecae19..db4f57100 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -39,6 +39,10 @@ export class Footer extends React.Component { public render(): React.ReactNode { const sectionNameToLinks: ObjectMap = { [Key.Documentation]: [ + { + title: 'Developer Home', + to: WebsitePaths.Docs, + }, { title: '0x.js', to: WebsitePaths.ZeroExJs, @@ -60,10 +64,6 @@ export class Footer extends React.Component { title: this.props.translate.get(Key.Wiki, Deco.Cap), to: WebsitePaths.Wiki, }, - { - title: this.props.translate.get(Key.Faq, Deco.Cap), - to: WebsitePaths.FAQ, - }, ], [Key.Community]: [ { -- cgit From 13f8801e08bc88c584cbc8cd9aba1e78773d9a8c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 14:35:55 +0100 Subject: chore: remove wiki from main website topBar --- packages/website/ts/components/top_bar/top_bar.tsx | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index f7043dca2..eb1854f50 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -143,12 +143,6 @@ export class TopBar extends React.Component { translate={this.props.translate} menuIconStyle={menuIconStyle} /> - { onRequestChange={this._onMenuButtonClick.bind(this)} >
    - {this._renderWiki()}
    {this.props.translate.get(Key.Website, Deco.Cap)}
    @@ -241,9 +234,6 @@ export class TopBar extends React.Component { {this.props.translate.get(Key.Documentation, Deco.Cap)} - - {this.props.translate.get(Key.Wiki, Deco.Cap)} - {!this._isViewingPortal() && ( @@ -272,21 +262,6 @@ export class TopBar extends React.Component { ); } - private _renderWiki(): React.ReactNode { - if (!this._isViewingWiki()) { - return undefined; - } - - return ( -
    - -
    - ); - } private _onMenuButtonClick(): void { this.setState({ isDrawerOpen: !this.state.isDrawerOpen, @@ -298,13 +273,7 @@ export class TopBar extends React.Component { private _isViewingFAQ(): boolean { return _.includes(this.props.location.pathname, WebsitePaths.FAQ); } - private _doesUrlInclude(aPath: string): boolean { - return _.includes(this.props.location.pathname, aPath); - } - private _isViewingWiki(): boolean { - return _.includes(this.props.location.pathname, WebsitePaths.Wiki); - } private _shouldDisplayBottomBar(): boolean { - return this._isViewingWiki() || this._isViewingFAQ() || this._isViewingPortal(); + return this._isViewingFAQ() || this._isViewingPortal(); } } // tslint:disable:max-file-line-count -- cgit From be45a3085196a652fc21856b43014bec9ba07f05 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 14:36:26 +0100 Subject: chore: change landing "build on 0x" to link to developer home, not 0x.js docs --- packages/website/ts/pages/landing/landing.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index 395cdabf8..f7a6fe0ce 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -212,7 +212,7 @@ export class Landing extends React.Component { className={`pt3 flex clearfix sm-mx-auto ${isSmallScreen ? 'justify-center' : ''}`} > - + {this.props.translate.get(Key.BuildCallToAction, Deco.Cap)} @@ -598,7 +598,7 @@ export class Landing extends React.Component { {this.props.translate.get(Key.FinalCallToAction, Deco.Cap)}
    - + {this.props.translate.get(Key.BuildCallToAction, Deco.Cap)} -- cgit From f35156517d8fe63935f34cec880b144aae3f55aa Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 15:35:56 +0100 Subject: chore: get menu onHover darken back --- .../src/components/nested_sidebar_menu.tsx | 64 +++++++++------------- 1 file changed, 27 insertions(+), 37 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 87622310a..70062182b 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -12,7 +12,6 @@ import { Link } from './link'; export interface NestedSidebarMenuProps { sectionNameToLinks: ObjectMap; sidebarHeader?: React.ReactNode; - shouldDisplaySectionHeaders?: boolean; shouldReformatMenuItemNames?: boolean; parentName?: string; } @@ -22,13 +21,12 @@ export interface NestedSidebarMenuState { } const styles: Styles = { - menuItemWithHeaders: { + menuItem: { minHeight: 0, + paddingLeft: 8, + borderRadius: 6, }, - menuItemWithoutHeaders: { - minHeight: 48, - }, - menuItemInnerDivWithHeaders: { + menuItemInnerDiv: { color: colors.grey800, fontSize: 14, lineHeight: 2, @@ -41,7 +39,6 @@ const styles: Styles = { export class NestedSidebarMenu extends React.Component { public static defaultProps: Partial = { - shouldDisplaySectionHeaders: true, shouldReformatMenuItemNames: true, parentName: 'default', }; @@ -68,19 +65,15 @@ export class NestedSidebarMenu extends React.Component { const finalSectionName = utils.convertCamelCaseToSpaces(sectionName); - if (this.props.shouldDisplaySectionHeaders) { - // tslint:disable-next-line:no-unused-variable - return ( -
    -
    - {finalSectionName.toUpperCase()} -
    - {this._renderMenuItems(links)} + // tslint:disable-next-line:no-unused-variable + return ( +
    +
    + {finalSectionName.toUpperCase()}
    - ); - } else { - return
    {this._renderMenuItems(links)}
    ; - } + {this._renderMenuItems(links)} +
    + ); }); return (
    @@ -91,31 +84,28 @@ export class NestedSidebarMenu extends React.Component { - const isScrolledTo = link.to === scrolledToId; const finalMenuItemName = this.props.shouldReformatMenuItemNames ? utils.convertDashesToSpaces(link.title) : link.title; + let menuItemStyle = styles.menuItem; + let menuItemInnerDivStyle = styles.menuItemInnerDiv; + const isScrolledTo = link.to === scrolledToId; + if (isScrolledTo) { + menuItemStyle = { + ...menuItemStyle, + backgroundColor: colors.lightLinkBlue, + }; + menuItemInnerDivStyle = { + ...menuItemInnerDivStyle, + color: colors.white, + fontWeight: 'bold', + }; + } return (
    - + Date: Tue, 16 Oct 2018 15:41:58 +0100 Subject: chore: remove unused imports --- packages/website/ts/components/documentation/docs_top_bar.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 2c37f8387..0806c8da2 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -1,5 +1,4 @@ -import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { ALink, colors, Link } from '@0xproject/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; -- cgit From afe618175728fd1341fd7c18d9f68363019d64e1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 15:53:24 +0100 Subject: chore: Implement newest topBar --- .../website/public/images/developers/chat_icon.svg | 5 -- .../public/images/developers/forum_icon.svg | 5 -- .../public/images/developers/github_icon.svg | 4 - .../ts/components/documentation/docs_top_bar.tsx | 88 ++++++---------------- 4 files changed, 25 insertions(+), 77 deletions(-) delete mode 100644 packages/website/public/images/developers/chat_icon.svg delete mode 100644 packages/website/public/images/developers/forum_icon.svg delete mode 100644 packages/website/public/images/developers/github_icon.svg diff --git a/packages/website/public/images/developers/chat_icon.svg b/packages/website/public/images/developers/chat_icon.svg deleted file mode 100644 index c48881454..000000000 --- a/packages/website/public/images/developers/chat_icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/website/public/images/developers/forum_icon.svg b/packages/website/public/images/developers/forum_icon.svg deleted file mode 100644 index 8fb659475..000000000 --- a/packages/website/public/images/developers/forum_icon.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/packages/website/public/images/developers/github_icon.svg b/packages/website/public/images/developers/github_icon.svg deleted file mode 100644 index bf10cb221..000000000 --- a/packages/website/public/images/developers/github_icon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 0806c8da2..a4bc3967b 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -20,13 +20,6 @@ interface DocsTopBarState { isDrawerOpen: boolean; } -interface MenuItemInfo { - iconUrl: string; - fontColor: string; - fontWeight?: string; - link: ALink; -} - export class DocsTopBar extends React.Component { constructor(props: DocsTopBarProps) { super(props); @@ -42,56 +35,32 @@ export class DocsTopBar extends React.Component - - - - - - - 0xproject.com - - - - - - + + - {this._renderMenuItems(menuItemInfos)} + {this._renderMenuItems(menuItemLinks)} @@ -116,25 +85,18 @@ export class DocsTopBar extends React.Component ); } - private _renderMenuItems(menuItemInfos: MenuItemInfo[]): React.ReactNode { - const menuItems = _.map(menuItemInfos, menuItemInfo => { + private _renderMenuItems(menuItemLinks: ALink[]): React.ReactNode { + const menuItems = _.map(menuItemLinks, menuItemInfo => { return ( - - - - - {menuItemInfo.link.title} - - + + + {menuItemInfo.title} + ); -- cgit From 6ad98420a033a5737e962adf6863b0ed1a682b5b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 16:12:26 +0100 Subject: style: improve menu & logo alignment --- packages/website/ts/components/documentation/docs_top_bar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index a4bc3967b..c0bd4fb19 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -57,7 +57,10 @@ export class DocsTopBar extends React.Component - + {this._renderMenuItems(menuItemLinks)} @@ -80,7 +83,7 @@ export class DocsTopBar extends React.Component - + {this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()} ); -- cgit From bf51728466956837bbe669dfa0883c4d6611a628 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 16:35:55 +0100 Subject: chore: simplify --- packages/react-docs/src/components/type_definition.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index e1c4f1f2b..3b64247f2 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -124,7 +124,7 @@ export class TypeDefinition extends React.Component
    -- 
    cgit 
    
    
    From 05f7b733076b566e17883695e85874db040f5a54 Mon Sep 17 00:00:00 2001
    From: Fabio Berger 
    Date: Tue, 16 Oct 2018 16:36:06 +0100
    Subject: chore: convert to stateless component
    
    ---
     .../react-shared/src/components/markdown_paragraph_block.tsx   | 10 +++-------
     1 file changed, 3 insertions(+), 7 deletions(-)
    
    diff --git a/packages/react-shared/src/components/markdown_paragraph_block.tsx b/packages/react-shared/src/components/markdown_paragraph_block.tsx
    index 519638446..eeaef8571 100644
    --- a/packages/react-shared/src/components/markdown_paragraph_block.tsx
    +++ b/packages/react-shared/src/components/markdown_paragraph_block.tsx
    @@ -5,10 +5,6 @@ import { colors } from '../utils/colors';
     
     export interface MarkdownParagraphBlockProps {}
     
    -export interface MarkdownParagraphBlockState {}
    -
    -export class MarkdownParagraphBlock extends React.Component {
    -    public render(): React.ReactNode {
    -        return {this.props.children};
    -    }
    -}
    +export const MarkdownParagraphBlock: React.StatelessComponent = ({ children }) => {
    +    return {children};
    +};
    -- 
    cgit 
    
    
    From 17fb4d5b5703df2a86be0c2f1210c1327debc033 Mon Sep 17 00:00:00 2001
    From: Fabio Berger 
    Date: Tue, 16 Oct 2018 16:38:05 +0100
    Subject: chore: Remove unused prop
    
    ---
     packages/react-docs/src/components/doc_reference.tsx      | 1 -
     packages/react-shared/src/components/markdown_section.tsx | 6 +-----
     2 files changed, 1 insertion(+), 6 deletions(-)
    
    diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx
    index 3a909db7e..83cc00bab 100644
    --- a/packages/react-docs/src/components/doc_reference.tsx
    +++ b/packages/react-docs/src/components/doc_reference.tsx
    @@ -104,7 +104,6 @@ export class DocReference extends React.Component
                 );
    diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx
    index 9f5855d16..d5de324c3 100644
    --- a/packages/react-shared/src/components/markdown_section.tsx
    +++ b/packages/react-shared/src/components/markdown_section.tsx
    @@ -19,7 +19,6 @@ export interface MarkdownSectionProps {
         markdownContent: string;
         headerSize?: HeaderSizes;
         githubLink?: string;
    -    shouldReformatTitle?: boolean;
         alternativeSectionTitle?: string;
     }
     
    @@ -36,7 +35,6 @@ export interface MarkdownSectionState {
     export class MarkdownSection extends React.Component {
         public static defaultProps: Partial = {
             headerSize: HeaderSizes.H3,
    -        shouldReformatTitle: true,
         };
         constructor(props: MarkdownSectionProps) {
             super(props);
    @@ -48,9 +46,7 @@ export class MarkdownSection extends React.Component
    Date: Tue, 16 Oct 2018 16:38:59 +0100
    Subject: chore: remove unused prop
    
    ---
     packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 --
     1 file changed, 2 deletions(-)
    
    diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx
    index 70062182b..34f3eb276 100644
    --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx
    +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx
    @@ -13,7 +13,6 @@ export interface NestedSidebarMenuProps {
         sectionNameToLinks: ObjectMap;
         sidebarHeader?: React.ReactNode;
         shouldReformatMenuItemNames?: boolean;
    -    parentName?: string;
     }
     
     export interface NestedSidebarMenuState {
    @@ -40,7 +39,6 @@ const styles: Styles = {
     export class NestedSidebarMenu extends React.Component {
         public static defaultProps: Partial = {
             shouldReformatMenuItemNames: true,
    -        parentName: 'default',
         };
         private _urlIntervalCheckId: number;
         constructor(props: NestedSidebarMenuProps) {
    -- 
    cgit 
    
    
    From 55a3bc8cb6772802672f60f22c5ed5c7e1b2dfdd Mon Sep 17 00:00:00 2001
    From: Fabio Berger 
    Date: Tue, 16 Oct 2018 16:43:43 +0100
    Subject: chore: don't use Container in react-shared, react-docs yet
    
    ---
     .../react-docs/src/components/doc_reference.tsx    | 15 +++---
     packages/react-shared/src/components/container.tsx | 55 ----------------------
     .../src/components/markdown_section.tsx            | 14 ++++--
     packages/react-shared/src/index.ts                 |  1 -
     packages/react-shared/tsconfig.json                |  1 -
     5 files changed, 18 insertions(+), 68 deletions(-)
     delete mode 100644 packages/react-shared/src/components/container.tsx
    
    diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx
    index 83cc00bab..5fdcdd2d9 100644
    --- a/packages/react-docs/src/components/doc_reference.tsx
    +++ b/packages/react-docs/src/components/doc_reference.tsx
    @@ -1,7 +1,6 @@
     import {
         colors,
         constants as sharedConstants,
    -    Container,
         EtherscanLinkSuffixes,
         HeaderSizes,
         Link,
    @@ -216,12 +215,14 @@ export class DocReference extends React.Component{typeDefs}
    )} -
    ); diff --git a/packages/react-shared/src/components/container.tsx b/packages/react-shared/src/components/container.tsx deleted file mode 100644 index f2ae68b70..000000000 --- a/packages/react-shared/src/components/container.tsx +++ /dev/null @@ -1,55 +0,0 @@ -import * as React from 'react'; - -type StringOrNum = string | number; - -export type ContainerTag = 'div' | 'span'; - -export interface ContainerProps { - marginTop?: StringOrNum; - marginBottom?: StringOrNum; - marginRight?: StringOrNum; - marginLeft?: StringOrNum; - padding?: StringOrNum; - paddingTop?: StringOrNum; - paddingBottom?: StringOrNum; - paddingRight?: StringOrNum; - paddingLeft?: StringOrNum; - backgroundColor?: string; - borderRadius?: StringOrNum; - maxWidth?: StringOrNum; - maxHeight?: StringOrNum; - width?: StringOrNum; - height?: StringOrNum; - minWidth?: StringOrNum; - minHeight?: StringOrNum; - isHidden?: boolean; - className?: string; - position?: 'absolute' | 'fixed' | 'relative' | 'unset'; - display?: 'inline-block' | 'block' | 'inline-flex' | 'inline'; - top?: string; - left?: string; - right?: string; - bottom?: string; - zIndex?: number; - Tag?: ContainerTag; - cursor?: string; - id?: string; - onClick?: (event: React.MouseEvent) => void; - overflowX?: 'scroll' | 'hidden' | 'auto' | 'visible'; -} - -export const Container: React.StatelessComponent = props => { - const { children, className, Tag, isHidden, id, onClick, ...style } = props; - const visibility = isHidden ? 'hidden' : undefined; - return ( - - {children} - - ); -}; - -Container.defaultProps = { - Tag: 'div', -}; - -Container.displayName = 'Container'; diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index d5de324c3..e6a7d80d5 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -8,7 +8,6 @@ import { colors } from '../utils/colors'; import { utils } from '../utils/utils'; import { AnchorTitle } from './anchor_title'; -import { Container } from './container'; import { Link } from './link'; import { MarkdownCodeBlock } from './markdown_code_block'; import { MarkdownLinkBlock } from './markdown_link_block'; @@ -57,7 +56,7 @@ export class MarkdownSection extends React.Component - +
    )}
    - +
    - +
    ); diff --git a/packages/react-shared/src/index.ts b/packages/react-shared/src/index.ts index 2ab9b393e..e33b09f19 100644 --- a/packages/react-shared/src/index.ts +++ b/packages/react-shared/src/index.ts @@ -5,7 +5,6 @@ export { MarkdownSection } from './components/markdown_section'; export { NestedSidebarMenu } from './components/nested_sidebar_menu'; export { SectionHeader } from './components/section_header'; export { Link } from './components/link'; -export { Container } from './components/container'; export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, ALink } from './types'; diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json index 9fd1b04cf..5abe0ab4e 100644 --- a/packages/react-shared/tsconfig.json +++ b/packages/react-shared/tsconfig.json @@ -4,7 +4,6 @@ "outDir": "lib", "rootDir": "src", "jsx": "react", - "strictNullChecks": false, "baseUrl": ".", "paths": { "*": ["node_modules/@types/*", "*"] -- cgit From 9bae3e51d96ee3fc2c9652a373df155421228609 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 17:09:17 +0100 Subject: chore: initalize _urlIntervalCheckId --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index 34f3eb276..fc5ab95fa 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -40,7 +40,7 @@ export class NestedSidebarMenu extends React.Component = { shouldReformatMenuItemNames: true, }; - private _urlIntervalCheckId: number; + private _urlIntervalCheckId: number | undefined = undefined; constructor(props: NestedSidebarMenuProps) { super(props); this.state = { -- cgit From 2305109170671b06c6d60ac04a16a9d57a8a9c11 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 17:42:58 +0100 Subject: chore: fix linter --- packages/website/ts/components/top_bar/top_bar.tsx | 2 +- packages/website/ts/pages/wiki/wiki.tsx | 10 ---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index eb1854f50..8b573335f 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,5 +1,5 @@ import { DocsInfo } from '@0xproject/react-docs'; -import { ALink, colors, constants as sharedConstants, Link, NestedSidebarMenu, Styles } from '@0xproject/react-shared'; +import { ALink, colors, Link, Styles } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 01cbc4e4d..4b101e45d 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -187,16 +187,6 @@ export class Wiki extends React.Component { } return sectionNameToLinks; } - private _onSidebarHover(_event: React.FormEvent): void { - this.setState({ - isHoveringSidebar: true, - }); - } - private _onSidebarHoverOff(): void { - this.setState({ - isHoveringSidebar: false, - }); - } private _onHashChanged(_event: any): void { const hash = window.location.hash.slice(1); sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); -- cgit From fb7d0b9d0be47a191314a98b9bb23a86b1b77174 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 22:09:04 +0100 Subject: chore: Fix logo on mobile topBar --- packages/website/ts/components/documentation/docs_top_bar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index c0bd4fb19..d6e0c124d 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -58,7 +58,7 @@ export class DocsTopBar extends React.Component @@ -67,7 +67,7 @@ export class DocsTopBar extends React.Component - + -- cgit From 7f2636fd05cdab3addd58f340bf25d93c3a59d00 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 22:34:00 +0100 Subject: chore: Add missing responsive classes --- packages/website/public/css/basscss_responsive_custom.css | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/website/public/css/basscss_responsive_custom.css b/packages/website/public/css/basscss_responsive_custom.css index 5f8bd9117..92a681cb1 100644 --- a/packages/website/public/css/basscss_responsive_custom.css +++ b/packages/website/public/css/basscss_responsive_custom.css @@ -26,6 +26,10 @@ .sm-right { float: right; } + .sm-justify-end { + ms-flex-pack: end; + justify-content: flex-end; + } } @media (min-width: 52em) { @@ -54,6 +58,10 @@ .md-right { float: right; } + .md-justify-end { + ms-flex-pack: end; + justify-content: flex-end; + } } @media (min-width: 64em) { @@ -82,4 +90,8 @@ .lg-right { float: right; } + .lg-justify-end { + ms-flex-pack: end; + justify-content: flex-end; + } } -- cgit From fdefa5952cb6cb6e1dce42e862dbc676690cdcbb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 16 Oct 2018 23:25:51 +0100 Subject: chore: componentize the sidebar header --- .../ts/components/documentation/sidebar_header.tsx | 57 ++++++++++++++++++++++ .../website/ts/pages/documentation/doc_page.tsx | 39 ++++----------- packages/website/ts/pages/wiki/wiki.tsx | 29 ++--------- 3 files changed, 70 insertions(+), 55 deletions(-) create mode 100644 packages/website/ts/components/documentation/sidebar_header.tsx diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx new file mode 100644 index 000000000..ec0ada8bd --- /dev/null +++ b/packages/website/ts/components/documentation/sidebar_header.tsx @@ -0,0 +1,57 @@ +import { colors } from '@0xproject/react-shared'; +import * as _ from 'lodash'; +import * as React from 'react'; +import { VersionDropDown } from 'ts/components/documentation/version_drop_down'; +import { Container } from 'ts/components/ui/container'; +import { Text } from 'ts/components/ui/text'; +import { ScreenWidths } from 'ts/types'; + +export interface SidebarHeaderProps { + screenWidth: ScreenWidths; + title: string; + docsVersion?: string; + availableDocVersions?: string[]; + onVersionSelected?: () => void; +} + +export const SidebarHeader: React.StatelessComponent = ({ + screenWidth, + title, + docsVersion, + availableDocVersions, + onVersionSelected, +}) => { + return ( + + + + + {title} + + + {!_.isUndefined(docsVersion) && + !_.isUndefined(availableDocVersions) && + !_.isUndefined(onVersionSelected) && ( +
    + +
    + )} +
    + + + ); +}; diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 65d9b68a9..a2babeda2 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -6,15 +6,14 @@ import { SupportedDocJson, TypeDocUtils, } from '@0xproject/react-docs'; -import { colors, NestedSidebarMenu } from '@0xproject/react-shared'; +import { NestedSidebarMenu } from '@0xproject/react-shared'; import findVersions = require('find-versions'); import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; import semverSort = require('semver-sort'); -import { VersionDropDown } from 'ts/components/documentation/version_drop_down'; +import { SidebarHeader } from 'ts/components/documentation/sidebar_header'; import { Container } from 'ts/components/ui/container'; -import { Text } from 'ts/components/ui/text'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { DocPackages, ScreenWidths } from 'ts/types'; @@ -109,33 +108,13 @@ export class DocPage extends React.Component { } private _renderSidebarHeader(): React.ReactNode { return ( - - - - - {this.props.docsInfo.displayName} - - -
    - -
    -
    - - + ); } private _renderLoading(): React.ReactNode { diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 4b101e45d..e7754fd9d 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -1,6 +1,5 @@ import { ALink, - colors, constants as sharedConstants, HeaderSizes, MarkdownSection, @@ -11,11 +10,11 @@ import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; +import { SidebarHeader } from 'ts/components/documentation/sidebar_header'; import { Container } from 'ts/components/ui/container'; -import { Text } from 'ts/components/ui/text'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { Article, ArticlesBySection, ScreenWidths } from 'ts/types'; +import { Article, ArticlesBySection, Deco, Key, ScreenWidths } from 'ts/types'; import { backendClient } from 'ts/utils/backend_client'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -88,28 +87,8 @@ export class Wiki extends React.Component { ); } private _renderSidebarHeader(): React.ReactNode { - return ( - - - - - Wiki - - - - - - ); + const wikiTitle = this.props.translate.get(Key.Wiki, Deco.Cap); + return ; } private _renderLoading(): React.ReactNode { return ( -- cgit From 18c31a3bc045d9e3ccc1e17573f879c2d49cecfe Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 00:37:56 +0100 Subject: chore: Add topBar menu items to mobile drawer --- .../ts/components/documentation/docs_top_bar.tsx | 26 ++--------------- packages/website/ts/components/ui/button.tsx | 3 ++ .../website/ts/pages/documentation/docs_home.tsx | 34 ++++++++++++++++++++-- packages/website/ts/utils/constants.ts | 29 ++++++++++++++++-- 4 files changed, 65 insertions(+), 27 deletions(-) diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index d6e0c124d..9a9b9a616 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; -import { Deco, Key, ScreenWidths, WebsitePaths } from 'ts/types'; +import { Deco, Key, ScreenWidths } from 'ts/types'; import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; @@ -35,26 +35,6 @@ export class DocsTopBar extends React.Component - {this._renderMenuItems(menuItemLinks)} + {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)} @@ -98,7 +78,7 @@ export class DocsTopBar extends React.Component - {menuItemInfo.title} + {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)} diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx index ccaadc800..2a6a1f477 100644 --- a/packages/website/ts/components/ui/button.tsx +++ b/packages/website/ts/components/ui/button.tsx @@ -16,6 +16,7 @@ export interface ButtonProps { type?: string; isDisabled?: boolean; onClick?: (event: React.MouseEvent) => void; + textAlign?: string; } const PlainButton: React.StatelessComponent = ({ children, isDisabled, onClick, type, className }) => ( @@ -35,6 +36,7 @@ export const Button = styled(PlainButton)` outline: none; font-family: ${props => props.fontFamily}; width: ${props => props.width}; + text-align: ${props => props.textAlign}; background-color: ${props => props.backgroundColor}; border: ${props => (props.borderColor ? `1px solid ${props.borderColor}` : 'none')}; &:hover { @@ -59,6 +61,7 @@ Button.defaultProps = { fontFamily: 'Roboto', isDisabled: false, padding: '0.8em 2.2em', + textAlign: 'center', }; Button.displayName = 'Button'; diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index 1059bb844..359f6b7e9 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -1,11 +1,13 @@ -import { ALink, NestedSidebarMenu } from '@0xproject/react-shared'; +import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; import { ObjectMap } from '@0xproject/types'; import * as _ from 'lodash'; import * as React from 'react'; import { OverviewContent } from 'ts/components/documentation/overview_content'; +import { Button } from 'ts/components/ui/button'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { Categories, Deco, Key, Package, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types'; +import { constants } from 'ts/utils/constants'; import { Translate } from 'ts/utils/translate'; const TUTORIALS: TutorialInfo[] = [ @@ -330,8 +332,13 @@ export class DocsHome extends React.Component { categoryToPackages={CATEGORY_TO_PACKAGES} /> ); + const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; const sidebar = ( - + ); return ( { /> ); } + private _renderSidebarHeader(): React.ReactNode { + const menuItems = _.map(constants.DEVELOPER_TOPBAR_LINKS, menuItemInfo => { + return ( + + + + ); + }); + return menuItems; + } } diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index 0809fb438..e76d40bd3 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -1,4 +1,9 @@ +import { ALink } from '@0xproject/react-shared'; import { BigNumber } from '@0xproject/utils'; +import { Key, WebsitePaths } from 'ts/types'; + +const URL_FORUM = 'https://forum.0xproject.com'; +const URL_ZEROEX_CHAT = 'https://chat.0xproject.com'; export const constants = { DECIMAL_PLACES_ETH: 18, @@ -74,7 +79,7 @@ export const constants = { URL_TESTNET_FAUCET: 'https://faucet.0xproject.com', URL_GITHUB_ORG: 'https://github.com/0xProject', URL_GITHUB_WIKI: 'https://github.com/0xProject/wiki', - URL_FORUM: 'https://forum.0xproject.com', + URL_FORUM, URL_METAMASK_CHROME_STORE: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn', URL_METAMASK_FIREFOX_STORE: 'https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/', URL_COINBASE_WALLET_IOS_APP_STORE: 'https://itunes.apple.com/us/app/coinbase-wallet/id1278383455?mt=8', @@ -89,7 +94,7 @@ export const constants = { URL_STANDARD_RELAYER_API_GITHUB: 'https://github.com/0xProject/standard-relayer-api/blob/master/README.md', URL_TWITTER: 'https://twitter.com/0xproject', URL_WETH_IO: 'https://weth.io/', - URL_ZEROEX_CHAT: 'https://chat.0xproject.com', + URL_ZEROEX_CHAT, URL_WEB3_DOCS: 'https://github.com/ethereum/wiki/wiki/JavaScript-API', URL_WEB3_DECODED_LOG_ENTRY_EVENT: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L123', @@ -97,4 +102,24 @@ export const constants = { URL_WEB3_PROVIDER_DOCS: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L150', URL_BIGNUMBERJS_GITHUB: 'http://mikemcl.github.io/bignumber.js', URL_MISSION_AND_VALUES_BLOG_POST: 'https://blog.0xproject.com/the-0x-mission-and-values-181a58706f9f', + DEVELOPER_TOPBAR_LINKS: [ + { + title: Key.Home, + to: WebsitePaths.Home, + }, + { + title: Key.Wiki, + to: WebsitePaths.Wiki, + }, + { + title: Key.Forum, + to: URL_FORUM, + shouldOpenInNewTab: true, + }, + { + title: Key.LiveChat, + to: URL_ZEROEX_CHAT, + shouldOpenInNewTab: true, + }, + ] as ALink[], }; -- cgit From ce43724bd449153842aa17b5c58daa9625b6ed65 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 00:39:55 +0100 Subject: chore: Rename "Documentation" to "Docs" in mobile menu --- packages/website/ts/components/top_bar/top_bar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 8b573335f..7e7247c25 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -232,7 +232,7 @@ export class TopBar extends React.Component { {this.props.translate.get(Key.Home, Deco.Cap)} - {this.props.translate.get(Key.Documentation, Deco.Cap)} + {this.props.translate.get(Key.Docs, Deco.Cap)} {!this._isViewingPortal() && ( -- cgit From 62f4bb21178415a1f5c8f55066a768671e852317 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 00:55:47 +0100 Subject: chore: Add topBar menu in wiki mobile sidebar menu --- packages/website/ts/pages/wiki/wiki.tsx | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index e7754fd9d..76d52c9bd 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -1,7 +1,9 @@ import { ALink, + colors, constants as sharedConstants, HeaderSizes, + Link, MarkdownSection, NestedSidebarMenu, utils as sharedUtils, @@ -11,6 +13,7 @@ import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; import { SidebarHeader } from 'ts/components/documentation/sidebar_header'; +import { Button } from 'ts/components/ui/button'; import { Container } from 'ts/components/ui/container'; import { DevelopersPage } from 'ts/pages/documentation/developers_page'; import { Dispatcher } from 'ts/redux/dispatcher'; @@ -87,8 +90,33 @@ export class Wiki extends React.Component { ); } private _renderSidebarHeader(): React.ReactNode { + const menuItems = _.map(constants.DEVELOPER_TOPBAR_LINKS, menuItemInfo => { + return ( + + + + ); + }); const wikiTitle = this.props.translate.get(Key.Wiki, Deco.Cap); - return ; + return ( + + + {menuItems} + + ); } private _renderLoading(): React.ReactNode { return ( -- cgit From 4ca89fc9f1c72fc1b8db270838965512a6e95982 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 15:53:01 +0100 Subject: nit: use ObjectMap --- packages/react-docs/src/docs_info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index d75a1676c..08e7703df 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -34,7 +34,7 @@ export class DocsInfo { this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion; this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId; } - public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): { [name: string]: TypeDefinitionByName } { + public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): ObjectMap { if (_.isUndefined(docAgnosticFormat[this.typeSectionName])) { return {}; } -- cgit From e18f66e5b7a099101c8d9273391744eacd705f59 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 15:53:28 +0100 Subject: nit: use styled-component instead of react-state for onHover --- packages/react-docs/package.json | 4 ++- .../react-shared/src/components/anchor_title.tsx | 37 +++++++--------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index b1e80d1b6..ff23c7fe3 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -27,6 +27,7 @@ "@0xproject/dev-utils": "^1.0.12", "@0xproject/tslint-config": "^1.0.8", "@types/compare-versions": "^3.0.0", + "@types/styled-components": "^4.0.0", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "^5.9.1", @@ -51,7 +52,8 @@ "react-markdown": "^3.2.2", "react-scroll": "0xproject/react-scroll#similar-to-pr-330", "react-tooltip": "^3.2.7", - "semver": "5.5.0" + "semver": "5.5.0", + "styled-components": "^3.3.0" }, "publishConfig": { "access": "public" diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 0bdf61d44..0164a8c4a 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import { Link as ScrollLink } from 'react-scroll'; +import styled from 'styled-components'; import { HeaderSizes, Styles } from '../types'; import { colors } from '../utils/colors'; @@ -15,12 +16,10 @@ export interface AnchorTitleProps { id: string; headerSize: HeaderSizes; shouldShowAnchor: boolean; - isDisabled?: boolean; + isDisabled: boolean; } -export interface AnchorTitleState { - isHovering: boolean; -} +export interface AnchorTitleState {} const styles: Styles = { anchor: { @@ -29,7 +28,7 @@ const styles: Styles = { cursor: 'pointer', }, h1: { - fontSize: '30px', + fontSize: '1.875em', }, h2: { fontSize: '1.5em', @@ -44,17 +43,13 @@ export class AnchorTitle extends React.Component = { isDisabled: false, }; - constructor(props: AnchorTitleProps) { - super(props); - this.state = { - isHovering: false, - }; - } public render(): React.ReactNode { - let opacity = 0; - if (this.props.shouldShowAnchor) { - opacity = this.state.isHovering ? 0.6 : 1; - } + const AnchorIcon = styled.i` + opacity: ${this.props.shouldShowAnchor ? 1 : 0}; + &:hover { + opacity: ${this.props.shouldShowAnchor ? 0.6 : 0}; + } + `; return (
    - + )}
    ); } - private _setHoverState(isHovering: boolean): void { - this.setState({ - isHovering, - }); - } } -- cgit From 4d275cc5916c2802bd1d0b64766409daff5006db Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 15:55:05 +0100 Subject: nit: don't init scrolledToId --- packages/react-shared/src/components/nested_sidebar_menu.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index fc5ab95fa..f734dc654 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -16,7 +16,7 @@ export interface NestedSidebarMenuProps { } export interface NestedSidebarMenuState { - scrolledToId: string; + scrolledToId?: string; } const styles: Styles = { @@ -43,9 +43,7 @@ export class NestedSidebarMenu extends React.Component { -- cgit From 03b20eed29f18b39ee832ea7414e6234a88a0815 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 15:58:10 +0100 Subject: nit: remove todo --- packages/website/ts/pages/documentation/docs_home.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index 359f6b7e9..b02959610 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -45,7 +45,6 @@ const TUTORIALS: TutorialInfo[] = [ }, ]; -// TODO(fabio): Move this to it's own file const CATEGORY_TO_PACKAGES: ObjectMap = { [Categories.ZeroExProtocol]: [ { -- cgit From ac68f8db4459b09f7fd0a0191e068eee2da9f76f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 17 Oct 2018 20:18:28 +0100 Subject: refactor: fix anchor so it doesn't keep re-rendering the anchor icon --- .../react-shared/src/components/anchor_title.tsx | 30 +++++++++++++--------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx index 0164a8c4a..bd99edcab 100644 --- a/packages/react-shared/src/components/anchor_title.tsx +++ b/packages/react-shared/src/components/anchor_title.tsx @@ -22,11 +22,6 @@ export interface AnchorTitleProps { export interface AnchorTitleState {} const styles: Styles = { - anchor: { - fontSize: 20, - transform: 'rotate(45deg)', - cursor: 'pointer', - }, h1: { fontSize: '1.875em', }, @@ -39,17 +34,28 @@ const styles: Styles = { }, }; +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; + `; + export class AnchorTitle extends React.Component { public static defaultProps: Partial = { isDisabled: false, }; public render(): React.ReactNode { - const AnchorIcon = styled.i` - opacity: ${this.props.shouldShowAnchor ? 1 : 0}; - &:hover { - opacity: ${this.props.shouldShowAnchor ? 0.6 : 0}; - } - `; return (
    - + )}
    -- cgit From 18c9907d6f168577c9d5f60117901268a25f6af9 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 12 Oct 2018 15:35:20 -0700 Subject: feat(instant): add sliding error --- .../instant/src/components/animations/slide_up_and_down_animation.tsx | 1 - packages/instant/src/components/ui/text.tsx | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/instant/src/components/animations/slide_up_and_down_animation.tsx b/packages/instant/src/components/animations/slide_up_and_down_animation.tsx index 9c18e0933..5fa0b0eda 100644 --- a/packages/instant/src/components/animations/slide_up_and_down_animation.tsx +++ b/packages/instant/src/components/animations/slide_up_and_down_animation.tsx @@ -19,7 +19,6 @@ export interface SlideAnimationProps { animationType: string; animationDirection?: string; } - export const SlideAnimation = styled.div < SlideAnimationProps > diff --git a/packages/instant/src/components/ui/text.tsx b/packages/instant/src/components/ui/text.tsx index 9fb8ea26f..af8e4d933 100644 --- a/packages/instant/src/components/ui/text.tsx +++ b/packages/instant/src/components/ui/text.tsx @@ -21,6 +21,8 @@ export interface TextProps { hoverColor?: string; noWrap?: boolean; display?: string; + marginRight?: string; + marginLeft?: string; } const PlainText: React.StatelessComponent = ({ children, className, onClick }) => ( @@ -47,6 +49,8 @@ export const Text = styled(PlainText)` ${props => (props.display ? `display: ${props.display}` : '')}; ${props => (props.letterSpacing ? `letter-spacing: ${props.letterSpacing}` : '')}; ${props => (props.textTransform ? `text-transform: ${props.textTransform}` : '')}; + ${props => (props.marginRight ? `margin-right: ${props.marginRight}` : '')}; + ${props => (props.marginLeft ? `margin-right: ${props.marginLeft}` : '')}; &:hover { ${props => props.onClick -- cgit From f36352be47a3caf92e16e3965c86b593bfc46fea Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 15 Oct 2018 14:04:53 -0700 Subject: move z-index setting to zero instant container, and add ability for zindex to be set on container --- packages/instant/src/components/zero_ex_instant_container.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 51f9dc63e..0c37e41db 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -6,6 +6,10 @@ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instan import { ColorOption } from '../style/theme'; +import { BuyButton } from './buy_button'; +import { InstantHeading } from './instant_heading'; +import { OrderDetails } from './order_details'; +import { SlidingError } from './sliding_error'; import { Container, Flex } from './ui'; export interface ZeroExInstantContainerProps {} -- cgit From db77cd10c550803c4f3fac585adc0a7f6ffa8999 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 16 Oct 2018 11:25:52 -0700 Subject: feat(instant): Handle AssetBuyer errors --- .../src/components/animations/slide_animations.tsx | 54 ++++++++++++ .../animations/slide_up_and_down_animation.tsx | 95 ---------------------- .../instant/src/components/asset_amount_input.tsx | 19 +---- packages/instant/src/components/sliding_error.tsx | 20 +++-- .../src/components/zero_ex_instant_container.tsx | 4 + packages/instant/src/containers/latest_error.tsx | 36 ++++++++ .../src/containers/selected_asset_amount_input.ts | 13 ++- packages/instant/src/redux/actions.ts | 6 ++ packages/instant/src/redux/reducer.ts | 30 ++++++- packages/instant/src/redux/store.ts | 3 +- packages/instant/src/util/asset_data.ts | 18 ++++ packages/instant/src/util/error_description.ts | 23 ++++++ packages/instant/src/util/error_flasher.ts | 27 ++++++ 13 files changed, 228 insertions(+), 120 deletions(-) create mode 100644 packages/instant/src/components/animations/slide_animations.tsx delete mode 100644 packages/instant/src/components/animations/slide_up_and_down_animation.tsx create mode 100644 packages/instant/src/containers/latest_error.tsx create mode 100644 packages/instant/src/util/asset_data.ts create mode 100644 packages/instant/src/util/error_description.ts create mode 100644 packages/instant/src/util/error_flasher.ts diff --git a/packages/instant/src/components/animations/slide_animations.tsx b/packages/instant/src/components/animations/slide_animations.tsx new file mode 100644 index 000000000..1f10a2ed6 --- /dev/null +++ b/packages/instant/src/components/animations/slide_animations.tsx @@ -0,0 +1,54 @@ +import * as React from 'react'; + +import { keyframes, styled } from '../../style/theme'; + +const slideKeyframeGenerator = (fromY: string, toY: string) => keyframes` + from { + position: relative; + top: ${fromY}; + } + + to { + position: relative; + top: ${toY}; + } +`; + +export interface SlideAnimationProps { + keyframes: string; + animationType: string; + animationDirection?: string; +} + +export const SlideAnimation = + styled.div < + SlideAnimationProps > + ` + animation-name: ${props => props.keyframes}; + animation-duration: 0.3s; + animation-timing-function: ${props => props.animationType}; + animation-delay: 0s; + animation-iteration-count: 1; + animation-fill-mode: ${props => props.animationDirection || 'none'}; + position: relative; +`; + +export interface SlideAnimationComponentProps { + downY: string; +} + +export const SlideUpAnimation: React.StatelessComponent = props => ( + + {props.children} + +); + +export const SlideDownAnimation: React.StatelessComponent = props => ( + + {props.children} + +); diff --git a/packages/instant/src/components/animations/slide_up_and_down_animation.tsx b/packages/instant/src/components/animations/slide_up_and_down_animation.tsx deleted file mode 100644 index 5fa0b0eda..000000000 --- a/packages/instant/src/components/animations/slide_up_and_down_animation.tsx +++ /dev/null @@ -1,95 +0,0 @@ -import * as React from 'react'; - -import { keyframes, styled } from '../../style/theme'; - -const slideKeyframeGenerator = (fromY: string, toY: string) => keyframes` - from { - position: relative; - top: ${fromY}; - } - - to { - position: relative; - top: ${toY}; - } -`; - -export interface SlideAnimationProps { - keyframes: string; - animationType: string; - animationDirection?: string; -} -export const SlideAnimation = - styled.div < - SlideAnimationProps > - ` - animation-name: ${props => props.keyframes}; - animation-duration: 0.3s; - animation-timing-function: ${props => props.animationType}; - animation-delay: 0s; - animation-iteration-count: 1; - animation-fill-mode: ${props => props.animationDirection || 'none'}; - position: relative; -`; - -export interface SlideAnimationComponentProps { - downY: string; -} - -export const SlideUpAnimationComponent: React.StatelessComponent = props => ( - - {props.children} - -); - -export const SlideDownAnimationComponent: React.StatelessComponent = props => ( - - {props.children} - -); - -export interface SlideUpAndDownAnimationProps extends SlideAnimationComponentProps { - delayMs: number; -} - -enum SlideState { - Up = 'up', - Down = 'down', -} -interface SlideUpAndDownState { - slideState: SlideState; -} - -export class SlideUpAndDownAnimation extends React.Component { - public state = { - slideState: SlideState.Up, - }; - - private _timeoutId?: number; - public render(): React.ReactNode { - return this._renderSlide(); - } - public componentDidMount(): void { - this._timeoutId = window.setTimeout(() => { - this.setState({ - slideState: SlideState.Down, - }); - }, this.props.delayMs); - - return; - } - public componentWillUnmount(): void { - if (this._timeoutId) { - window.clearTimeout(this._timeoutId); - } - } - private _renderSlide(): React.ReactNode { - const SlideComponent = this.state.slideState === 'up' ? SlideUpAnimationComponent : SlideDownAnimationComponent; - - return {this.props.children}; - } -} diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx index 7c6b03ee9..a7df2da4d 100644 --- a/packages/instant/src/components/asset_amount_input.tsx +++ b/packages/instant/src/components/asset_amount_input.tsx @@ -3,7 +3,8 @@ import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as React from 'react'; -import { assetMetaData } from '../data/asset_meta_data'; +import { bestNameForAsset } from '../util/asset_data'; + import { ColorOption } from '../style/theme'; import { util } from '../util/util'; @@ -26,26 +27,12 @@ export class AssetAmountInput extends React.Component { - {this._getAssetSymbolLabel()} + {bestNameForAsset(this.props.assetData, '???')}
    ); } - private readonly _getAssetSymbolLabel = (): string => { - const unknownLabel = '???'; - if (_.isUndefined(this.props.assetData)) { - return unknownLabel; - } - const metaData = assetMetaData[this.props.assetData]; - if (_.isUndefined(metaData)) { - return unknownLabel; - } - if (metaData.assetProxyId === AssetProxyId.ERC20) { - return metaData.symbol; - } - return unknownLabel; - }; private readonly _handleChange = (value?: BigNumber): void => { this.props.onChange(value, this.props.assetData); }; diff --git a/packages/instant/src/components/sliding_error.tsx b/packages/instant/src/components/sliding_error.tsx index 0237fb7e9..ad87481c4 100644 --- a/packages/instant/src/components/sliding_error.tsx +++ b/packages/instant/src/components/sliding_error.tsx @@ -2,7 +2,7 @@ import * as React from 'react'; import { ColorOption } from '../style/theme'; -import { SlideUpAndDownAnimation } from './animations/slide_up_and_down_animation'; +import { SlideDownAnimation, SlideUpAnimation } from './animations/slide_animations'; import { Container, Text } from './ui'; @@ -29,8 +29,16 @@ export const Error: React.StatelessComponent = props => (
    ); -export const SlidingError: React.StatelessComponent = props => ( - - - -); +export type SlidingDirection = 'up' | 'down'; +export interface SlidingErrorProps extends ErrorProps { + direction: SlidingDirection; +} +export const SlidingError: React.StatelessComponent = props => { + const AnimationComponent = props.direction === 'up' ? SlideUpAnimation : SlideDownAnimation; + + return ( + + + + ); +}; diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 0c37e41db..cc718d200 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,6 +1,7 @@ import * as React from 'react'; import { LatestBuyQuoteOrderDetails } from '../containers/latest_buy_quote_order_details'; +import { LatestError } from '../containers/latest_error'; import { SelectedAssetBuyButton } from '../containers/selected_asset_buy_button'; import { SelectedAssetInstantHeading } from '../containers/selected_asset_instant_heading'; @@ -16,6 +17,9 @@ export interface ZeroExInstantContainerProps {} export const ZeroExInstantContainer: React.StatelessComponent = props => ( + + + = props => { + if (!props.latestError) { + return
    ; + } + const slidingDirection = props.latestErrorDismissed ? 'down' : 'up'; + const { icon, message } = errorDescription(props.latestError, props.assetData); + return ; +}; + +interface ConnectedState { + assetData?: string; + latestError?: any; + latestErrorDismissed?: boolean; +} +export interface LatestErrorProps {} +const mapStateToProps = (state: State, _ownProps: LatestErrorProps): ConnectedState => ({ + assetData: state.selectedAssetData, + latestError: state.latestError, + latestErrorDismissed: state.latestErrorDismissed, +}); + +export const LatestError = connect(mapStateToProps)(LatestErrorComponent); diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index f2ca96ae4..00c0a1114 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -1,3 +1,4 @@ +import { BuyQuote } from '@0xproject/asset-buyer'; import { BigNumber } from '@0xproject/utils'; import { Web3Wrapper } from '@0xproject/web3-wrapper'; import * as _ from 'lodash'; @@ -11,6 +12,7 @@ import { State } from '../redux/reducer'; import { ColorOption } from '../style/theme'; import { AsyncProcessState } from '../types'; import { assetBuyer } from '../util/asset_buyer'; +import { errorFlasher } from '../util/error_flasher'; import { AssetAmountInput } from '../components/asset_amount_input'; @@ -43,7 +45,16 @@ const updateBuyQuoteAsync = async ( } // get a new buy quote. const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetAmount, zrxDecimals); - const newBuyQuote = await assetBuyer.getBuyQuoteAsync(assetData, baseUnitValue); + + let newBuyQuote: BuyQuote | undefined; + try { + newBuyQuote = await assetBuyer.getBuyQuoteAsync(assetData, baseUnitValue); + errorFlasher.clearError(dispatch); + } catch (error) { + errorFlasher.flashNewError(dispatch, error); + return; + } + // invalidate the last buy quote. dispatch(actions.updateLatestBuyQuote(newBuyQuote)); }; diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index 7d07b4950..cf5b39790 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -25,6 +25,9 @@ export enum ActionTypes { UPDATE_SELECTED_ASSET_AMOUNT = 'UPDATE_SELECTED_ASSET_AMOUNT', UPDATE_SELECTED_ASSET_BUY_STATE = 'UPDATE_SELECTED_ASSET_BUY_STATE', UPDATE_LATEST_BUY_QUOTE = 'UPDATE_LATEST_BUY_QUOTE', + SET_ERROR = 'SET_ERROR', + HIDE_ERROR = 'HIDE_ERROR', + CLEAR_ERROR = 'CLEAR_ERROR', } export const actions = { @@ -33,4 +36,7 @@ export const actions = { updateSelectedAssetBuyState: (buyState: AsyncProcessState) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE, buyState), updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote), + setError: (error?: any) => createAction(ActionTypes.SET_ERROR, error), + hideError: () => createAction(ActionTypes.HIDE_ERROR), + clearError: () => createAction(ActionTypes.CLEAR_ERROR), }; diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index adecf2ab7..4ff49c225 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -7,13 +7,22 @@ import { AsyncProcessState } from '../types'; import { Action, ActionTypes } from './actions'; -export interface State { +interface BaseState { selectedAssetData?: string; selectedAssetAmount?: BigNumber; selectedAssetBuyState: AsyncProcessState; ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; } +interface StateWithError extends BaseState { + latestError: any; + latestErrorDismissed: boolean; +} +interface StateWithoutError extends BaseState { + latestError: undefined; + latestErrorDismissed: undefined; +} +export type State = StateWithError | StateWithoutError; export const INITIAL_STATE: State = { // TODO: Remove hardcoded zrxAssetData @@ -22,6 +31,8 @@ export const INITIAL_STATE: State = { selectedAssetBuyState: AsyncProcessState.NONE, ethUsdPrice: undefined, latestBuyQuote: undefined, + latestError: undefined, + latestErrorDismissed: undefined, }; export const reducer = (state: State = INITIAL_STATE, action: Action): State => { @@ -46,6 +57,23 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => ...state, selectedAssetBuyState: action.data, }; + case ActionTypes.SET_ERROR: + return { + ...state, + latestError: action.data, + latestErrorDismissed: false, + }; + case ActionTypes.HIDE_ERROR: + return { + ...state, + latestErrorDismissed: true, + }; + case ActionTypes.CLEAR_ERROR: + return { + ...state, + latestError: undefined, + latestErrorDismissed: undefined, + }; default: return state; } diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index fcd19f9a8..8d9fe34cb 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -3,4 +3,5 @@ import { createStore, Store as ReduxStore } from 'redux'; import { reducer, State } from './reducer'; -export const store: ReduxStore = createStore(reducer); +const reduxDevTools = (window as any).__REDUX_DEVTOOLS_EXTENSION__; +export const store: ReduxStore = createStore(reducer, reduxDevTools && reduxDevTools()); diff --git a/packages/instant/src/util/asset_data.ts b/packages/instant/src/util/asset_data.ts new file mode 100644 index 000000000..958f500bb --- /dev/null +++ b/packages/instant/src/util/asset_data.ts @@ -0,0 +1,18 @@ +import { AssetProxyId } from '@0xproject/types'; + +import { assetMetaData } from '../data/asset_meta_data'; + +// TODO: tests for this +export const bestNameForAsset = (assetData: string | undefined, defaultString: string) => { + if (assetData === undefined) { + return defaultString; + } + const metaData = assetMetaData[assetData]; + if (metaData === undefined) { + return defaultString; + } + if (metaData.assetProxyId === AssetProxyId.ERC20) { + return metaData.symbol.toUpperCase(); + } + return defaultString; +}; diff --git a/packages/instant/src/util/error_description.ts b/packages/instant/src/util/error_description.ts new file mode 100644 index 000000000..78af9e9ff --- /dev/null +++ b/packages/instant/src/util/error_description.ts @@ -0,0 +1,23 @@ +import { AssetBuyerError } from '@0xproject/asset-buyer'; + +import { bestNameForAsset } from '../util/asset_data'; + +const humanReadableMessageForError = (error: Error, assetData?: string): string | undefined => { + if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { + const assetName = bestNameForAsset(assetData, 'of this asset'); + return `Not enough ${assetName} available`; + } + + return undefined; +}; + +export const errorDescription = (error?: any, assetData?: string): { icon: string; message: string } => { + let bestMessage: string | undefined; + if (error instanceof Error) { + bestMessage = humanReadableMessageForError(error, assetData); + } + return { + icon: '😢', + message: bestMessage || 'Something went wrong...', + }; +}; diff --git a/packages/instant/src/util/error_flasher.ts b/packages/instant/src/util/error_flasher.ts new file mode 100644 index 000000000..f43c4211b --- /dev/null +++ b/packages/instant/src/util/error_flasher.ts @@ -0,0 +1,27 @@ +import { Dispatch } from 'redux'; + +import { Action, actions } from '../redux/actions'; + +class ErrorFlasher { + private _timeoutId?: number; + public flashNewError(dispatch: Dispatch, error: any, delayMs: number = 7000): void { + this._clearTimeout(); + + // dispatch new message + dispatch(actions.setError(error)); + + this._timeoutId = window.setTimeout(() => { + dispatch(actions.hideError()); + }, delayMs); + } + public clearError(dispatch: Dispatch): void { + this._clearTimeout(); + dispatch(actions.hideError()); + } + private _clearTimeout(): void { + if (this._timeoutId) { + window.clearTimeout(this._timeoutId); + } + } +} +export const errorFlasher = new ErrorFlasher(); -- cgit From 1d079490871ebb0d63bf182a75695303a3a9f1f2 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 16 Oct 2018 17:30:32 -0700 Subject: linting, removing unused imports --- packages/instant/src/components/asset_amount_input.tsx | 1 - packages/instant/src/components/zero_ex_instant_container.tsx | 4 ---- 2 files changed, 5 deletions(-) diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx index a7df2da4d..c9d9c52b3 100644 --- a/packages/instant/src/components/asset_amount_input.tsx +++ b/packages/instant/src/components/asset_amount_input.tsx @@ -1,4 +1,3 @@ -import { AssetProxyId } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index cc718d200..cf918d890 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -7,10 +7,6 @@ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instan import { ColorOption } from '../style/theme'; -import { BuyButton } from './buy_button'; -import { InstantHeading } from './instant_heading'; -import { OrderDetails } from './order_details'; -import { SlidingError } from './sliding_error'; import { Container, Flex } from './ui'; export interface ZeroExInstantContainerProps {} -- cgit From dfc5d7d860c2edb93fe45653f755fe8ff530bf1d Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 15 Oct 2018 13:41:36 -0700 Subject: get rid of unused marginLeft and marginRight props --- packages/instant/src/components/ui/text.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/instant/src/components/ui/text.tsx b/packages/instant/src/components/ui/text.tsx index af8e4d933..9fb8ea26f 100644 --- a/packages/instant/src/components/ui/text.tsx +++ b/packages/instant/src/components/ui/text.tsx @@ -21,8 +21,6 @@ export interface TextProps { hoverColor?: string; noWrap?: boolean; display?: string; - marginRight?: string; - marginLeft?: string; } const PlainText: React.StatelessComponent = ({ children, className, onClick }) => ( @@ -49,8 +47,6 @@ export const Text = styled(PlainText)` ${props => (props.display ? `display: ${props.display}` : '')}; ${props => (props.letterSpacing ? `letter-spacing: ${props.letterSpacing}` : '')}; ${props => (props.textTransform ? `text-transform: ${props.textTransform}` : '')}; - ${props => (props.marginRight ? `margin-right: ${props.marginRight}` : '')}; - ${props => (props.marginLeft ? `margin-right: ${props.marginLeft}` : '')}; &:hover { ${props => props.onClick -- cgit From d46b28873385a8d6521d36f2a529451e1f725b26 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 11:08:56 -0700 Subject: use redux dev tools from package --- packages/instant/package.json | 1 + packages/instant/src/redux/store.ts | 4 ++-- yarn.lock | 43 +++++-------------------------------- 3 files changed, 8 insertions(+), 40 deletions(-) diff --git a/packages/instant/package.json b/packages/instant/package.json index 0c4b470fa..5c4436c52 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -55,6 +55,7 @@ "react-dom": "^16.5.2", "react-redux": "^5.0.7", "redux": "^4.0.0", + "redux-devtools-extension": "^2.13.5", "styled-components": "^3.4.9", "ts-optchain": "^0.1.1" }, diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index 8d9fe34cb..b9ce9c0c1 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import { createStore, Store as ReduxStore } from 'redux'; +import { devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; import { reducer, State } from './reducer'; -const reduxDevTools = (window as any).__REDUX_DEVTOOLS_EXTENSION__; -export const store: ReduxStore = createStore(reducer, reduxDevTools && reduxDevTools()); +export const store: ReduxStore = createStore(reducer, devToolsEnhancer({})); diff --git a/yarn.lock b/yarn.lock index b4f48b8ac..0a85f9011 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1602,10 +1602,6 @@ aes-js@^0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" -aes-js@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.1.1.tgz#89fd1f94ae51b4c72d62466adc1a7323ff52f072" - ajv-errors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" @@ -3006,7 +3002,7 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "^2.0.0" -bs58@=4.0.1, bs58@^4.0.0: +bs58@=4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" dependencies: @@ -3029,14 +3025,6 @@ bs58check@^1.0.8: bs58 "^3.1.0" create-hash "^1.1.0" -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - bser@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" @@ -5590,19 +5578,6 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethereumjs-wallet@~0.6.0: - version "0.6.2" - resolved "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.2.tgz#67244b6af3e8113b53d709124b25477b64aeccda" - dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereumjs-util "^5.2.0" - hdkey "^1.0.0" - safe-buffer "^5.1.2" - scrypt.js "^0.2.0" - utf8 "^3.0.0" - uuid "^3.3.2" - ethers@3.0.22: version "3.0.22" resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" @@ -7097,14 +7072,6 @@ hdkey@^0.7.0, hdkey@^0.7.1: coinstring "^2.0.0" secp256k1 "^3.0.1" -hdkey@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/hdkey/-/hdkey-1.1.0.tgz#e74e7b01d2c47f797fa65d1d839adb7a44639f29" - dependencies: - coinstring "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -12520,6 +12487,10 @@ redux-devtools-extension@^2.13.2: version "2.13.2" resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.2.tgz#e0f9a8e8dfca7c17be92c7124958a3b94eb2911d" +redux-devtools-extension@^2.13.5: + version "2.13.5" + resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.5.tgz#3ff34f7227acfeef3964194f5f7fc2765e5c5a39" + redux@*, redux@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.0.tgz#aa698a92b729315d22b34a0553d7e6533555cc03" @@ -15246,10 +15217,6 @@ utf8@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" -utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -- cgit From 187bbc7fc14ccc0385981a38602334de65e2506c Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:26:18 -0700 Subject: latestErrorDismissed -> latestErrorDisplay enum --- packages/instant/src/containers/latest_error.tsx | 11 +++++------ packages/instant/src/redux/reducer.ts | 25 +++++++++++------------- 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index 5272d9610..7f36d3bf8 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -3,34 +3,33 @@ import * as React from 'react'; import { connect } from 'react-redux'; import { SlidingError } from '../components/sliding_error'; -import { State } from '../redux/reducer'; +import { LatestErrorDisplay, State } from '../redux/reducer'; import { errorDescription } from '../util/error_description'; export interface LatestErrorComponentProps { assetData?: string; latestError?: any; - latestErrorDismissed?: boolean; + slidingDirection: 'down' | 'up'; } export const LatestErrorComponent: React.StatelessComponent = props => { if (!props.latestError) { return
    ; } - const slidingDirection = props.latestErrorDismissed ? 'down' : 'up'; const { icon, message } = errorDescription(props.latestError, props.assetData); - return ; + return ; }; interface ConnectedState { assetData?: string; latestError?: any; - latestErrorDismissed?: boolean; + slidingDirection: 'down' | 'up'; } export interface LatestErrorProps {} const mapStateToProps = (state: State, _ownProps: LatestErrorProps): ConnectedState => ({ assetData: state.selectedAssetData, latestError: state.latestError, - latestErrorDismissed: state.latestErrorDismissed, + slidingDirection: state.latestErrorDisplay === LatestErrorDisplay.Present ? 'up' : 'down', }); export const LatestError = connect(mapStateToProps)(LatestErrorComponent); diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 4ff49c225..d23064db7 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -7,22 +7,19 @@ import { AsyncProcessState } from '../types'; import { Action, ActionTypes } from './actions'; -interface BaseState { +export enum LatestErrorDisplay { + Present, + Hidden, +} +export interface State { selectedAssetData?: string; selectedAssetAmount?: BigNumber; selectedAssetBuyState: AsyncProcessState; ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; + latestError?: any; + latestErrorDisplay: LatestErrorDisplay; } -interface StateWithError extends BaseState { - latestError: any; - latestErrorDismissed: boolean; -} -interface StateWithoutError extends BaseState { - latestError: undefined; - latestErrorDismissed: undefined; -} -export type State = StateWithError | StateWithoutError; export const INITIAL_STATE: State = { // TODO: Remove hardcoded zrxAssetData @@ -32,7 +29,7 @@ export const INITIAL_STATE: State = { ethUsdPrice: undefined, latestBuyQuote: undefined, latestError: undefined, - latestErrorDismissed: undefined, + latestErrorDisplay: LatestErrorDisplay.Hidden, }; export const reducer = (state: State = INITIAL_STATE, action: Action): State => { @@ -61,18 +58,18 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => return { ...state, latestError: action.data, - latestErrorDismissed: false, + latestErrorDisplay: LatestErrorDisplay.Present, }; case ActionTypes.HIDE_ERROR: return { ...state, - latestErrorDismissed: true, + latestErrorDisplay: LatestErrorDisplay.Hidden, }; case ActionTypes.CLEAR_ERROR: return { ...state, latestError: undefined, - latestErrorDismissed: undefined, + latestErrorDisplay: LatestErrorDisplay.Hidden, }; default: return state; -- cgit From 32fa1bcc387e2eecae53db4b082e93f6fb09ae10 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:31:28 -0700 Subject: export assetDataUtil big obj --- .../instant/src/components/asset_amount_input.tsx | 4 ++-- packages/instant/src/util/asset_data.ts | 25 +++++++++++----------- packages/instant/src/util/error_description.ts | 4 ++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx index c9d9c52b3..db3dbe7f3 100644 --- a/packages/instant/src/components/asset_amount_input.tsx +++ b/packages/instant/src/components/asset_amount_input.tsx @@ -2,7 +2,7 @@ import { BigNumber } from '@0xproject/utils'; import * as _ from 'lodash'; import * as React from 'react'; -import { bestNameForAsset } from '../util/asset_data'; +import { assetDataUtil } from '../util/asset_data'; import { ColorOption } from '../style/theme'; import { util } from '../util/util'; @@ -26,7 +26,7 @@ export class AssetAmountInput extends React.Component { - {bestNameForAsset(this.props.assetData, '???')} + {assetDataUtil.bestNameForAsset(this.props.assetData, '???')} diff --git a/packages/instant/src/util/asset_data.ts b/packages/instant/src/util/asset_data.ts index 958f500bb..4f3db8447 100644 --- a/packages/instant/src/util/asset_data.ts +++ b/packages/instant/src/util/asset_data.ts @@ -2,17 +2,18 @@ import { AssetProxyId } from '@0xproject/types'; import { assetMetaData } from '../data/asset_meta_data'; -// TODO: tests for this -export const bestNameForAsset = (assetData: string | undefined, defaultString: string) => { - if (assetData === undefined) { +export const assetDataUtil = { + bestNameForAsset: (assetData: string | undefined, defaultString: string) => { + if (assetData === undefined) { + return defaultString; + } + const metaData = assetMetaData[assetData]; + if (metaData === undefined) { + return defaultString; + } + if (metaData.assetProxyId === AssetProxyId.ERC20) { + return metaData.symbol.toUpperCase(); + } return defaultString; - } - const metaData = assetMetaData[assetData]; - if (metaData === undefined) { - return defaultString; - } - if (metaData.assetProxyId === AssetProxyId.ERC20) { - return metaData.symbol.toUpperCase(); - } - return defaultString; + }, }; diff --git a/packages/instant/src/util/error_description.ts b/packages/instant/src/util/error_description.ts index 78af9e9ff..9419a1e16 100644 --- a/packages/instant/src/util/error_description.ts +++ b/packages/instant/src/util/error_description.ts @@ -1,10 +1,10 @@ import { AssetBuyerError } from '@0xproject/asset-buyer'; -import { bestNameForAsset } from '../util/asset_data'; +import { assetDataUtil } from '../util/asset_data'; const humanReadableMessageForError = (error: Error, assetData?: string): string | undefined => { if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { - const assetName = bestNameForAsset(assetData, 'of this asset'); + const assetName = assetDataUtil.bestNameForAsset(assetData, 'of this asset'); return `Not enough ${assetName} available`; } -- cgit From d052342df7247f1efc830797a8f69245db247166 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:32:54 -0700 Subject: use lodash isUndefined per PR comment --- packages/instant/src/util/asset_data.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/util/asset_data.ts b/packages/instant/src/util/asset_data.ts index 4f3db8447..f7c5b78cd 100644 --- a/packages/instant/src/util/asset_data.ts +++ b/packages/instant/src/util/asset_data.ts @@ -1,14 +1,16 @@ +import * as _ from 'lodash'; + import { AssetProxyId } from '@0xproject/types'; import { assetMetaData } from '../data/asset_meta_data'; export const assetDataUtil = { bestNameForAsset: (assetData: string | undefined, defaultString: string) => { - if (assetData === undefined) { + if (_.isUndefined(assetData)) { return defaultString; } const metaData = assetMetaData[assetData]; - if (metaData === undefined) { + if (_.isUndefined(metaData)) { return defaultString; } if (metaData.assetProxyId === AssetProxyId.ERC20) { -- cgit From 155858de6e79d488293473e34868e20d2c39ef37 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:42:28 -0700 Subject: creating big error util file per francescos comment in PR --- packages/instant/src/containers/latest_error.tsx | 4 +- .../src/containers/selected_asset_amount_input.ts | 6 +-- packages/instant/src/util/error.ts | 51 ++++++++++++++++++++++ packages/instant/src/util/error_description.ts | 23 ---------- packages/instant/src/util/error_flasher.ts | 27 ------------ 5 files changed, 56 insertions(+), 55 deletions(-) create mode 100644 packages/instant/src/util/error.ts delete mode 100644 packages/instant/src/util/error_description.ts delete mode 100644 packages/instant/src/util/error_flasher.ts diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx index 7f36d3bf8..08ea418e7 100644 --- a/packages/instant/src/containers/latest_error.tsx +++ b/packages/instant/src/containers/latest_error.tsx @@ -4,7 +4,7 @@ import { connect } from 'react-redux'; import { SlidingError } from '../components/sliding_error'; import { LatestErrorDisplay, State } from '../redux/reducer'; -import { errorDescription } from '../util/error_description'; +import { errorUtil } from '../util/error'; export interface LatestErrorComponentProps { assetData?: string; @@ -16,7 +16,7 @@ export const LatestErrorComponent: React.StatelessComponent; } - const { icon, message } = errorDescription(props.latestError, props.assetData); + const { icon, message } = errorUtil.errorDescription(props.latestError, props.assetData); return ; }; diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index 00c0a1114..0d2c6dd7b 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -12,7 +12,7 @@ import { State } from '../redux/reducer'; import { ColorOption } from '../style/theme'; import { AsyncProcessState } from '../types'; import { assetBuyer } from '../util/asset_buyer'; -import { errorFlasher } from '../util/error_flasher'; +import { errorUtil } from '../util/error'; import { AssetAmountInput } from '../components/asset_amount_input'; @@ -49,9 +49,9 @@ const updateBuyQuoteAsync = async ( let newBuyQuote: BuyQuote | undefined; try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(assetData, baseUnitValue); - errorFlasher.clearError(dispatch); + errorUtil.errorFlasher.clearError(dispatch); } catch (error) { - errorFlasher.flashNewError(dispatch, error); + errorUtil.errorFlasher.flashNewError(dispatch, error); return; } diff --git a/packages/instant/src/util/error.ts b/packages/instant/src/util/error.ts new file mode 100644 index 000000000..78d056e11 --- /dev/null +++ b/packages/instant/src/util/error.ts @@ -0,0 +1,51 @@ +import { AssetBuyerError } from '@0xproject/asset-buyer'; +import { Dispatch } from 'redux'; + +import { Action, actions } from '../redux/actions'; +import { assetDataUtil } from '../util/asset_data'; + +class ErrorFlasher { + private _timeoutId?: number; + public flashNewError(dispatch: Dispatch, error: any, delayMs: number = 7000): void { + this._clearTimeout(); + + // dispatch new message + dispatch(actions.setError(error)); + + this._timeoutId = window.setTimeout(() => { + dispatch(actions.hideError()); + }, delayMs); + } + public clearError(dispatch: Dispatch): void { + this._clearTimeout(); + dispatch(actions.hideError()); + } + private _clearTimeout(): void { + if (this._timeoutId) { + window.clearTimeout(this._timeoutId); + } + } +} + +const humanReadableMessageForError = (error: Error, assetData?: string): string | undefined => { + if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { + const assetName = assetDataUtil.bestNameForAsset(assetData, 'of this asset'); + return `Not enough ${assetName} available`; + } + + return undefined; +}; + +export const errorUtil = { + errorFlasher: new ErrorFlasher(), + errorDescription: (error?: any, assetData?: string): { icon: string; message: string } => { + let bestMessage: string | undefined; + if (error instanceof Error) { + bestMessage = humanReadableMessageForError(error, assetData); + } + return { + icon: '😢', + message: bestMessage || 'Something went wrong...', + }; + }, +}; diff --git a/packages/instant/src/util/error_description.ts b/packages/instant/src/util/error_description.ts deleted file mode 100644 index 9419a1e16..000000000 --- a/packages/instant/src/util/error_description.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { AssetBuyerError } from '@0xproject/asset-buyer'; - -import { assetDataUtil } from '../util/asset_data'; - -const humanReadableMessageForError = (error: Error, assetData?: string): string | undefined => { - if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { - const assetName = assetDataUtil.bestNameForAsset(assetData, 'of this asset'); - return `Not enough ${assetName} available`; - } - - return undefined; -}; - -export const errorDescription = (error?: any, assetData?: string): { icon: string; message: string } => { - let bestMessage: string | undefined; - if (error instanceof Error) { - bestMessage = humanReadableMessageForError(error, assetData); - } - return { - icon: '😢', - message: bestMessage || 'Something went wrong...', - }; -}; diff --git a/packages/instant/src/util/error_flasher.ts b/packages/instant/src/util/error_flasher.ts deleted file mode 100644 index f43c4211b..000000000 --- a/packages/instant/src/util/error_flasher.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Dispatch } from 'redux'; - -import { Action, actions } from '../redux/actions'; - -class ErrorFlasher { - private _timeoutId?: number; - public flashNewError(dispatch: Dispatch, error: any, delayMs: number = 7000): void { - this._clearTimeout(); - - // dispatch new message - dispatch(actions.setError(error)); - - this._timeoutId = window.setTimeout(() => { - dispatch(actions.hideError()); - }, delayMs); - } - public clearError(dispatch: Dispatch): void { - this._clearTimeout(); - dispatch(actions.hideError()); - } - private _clearTimeout(): void { - if (this._timeoutId) { - window.clearTimeout(this._timeoutId); - } - } -} -export const errorFlasher = new ErrorFlasher(); -- cgit From 2b495a793521397ed4e81764aa87c3a51fef0a72 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 13:54:19 -0700 Subject: bigger emoji --- packages/instant/src/components/sliding_error.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/components/sliding_error.tsx b/packages/instant/src/components/sliding_error.tsx index ad87481c4..3865a8797 100644 --- a/packages/instant/src/components/sliding_error.tsx +++ b/packages/instant/src/components/sliding_error.tsx @@ -20,8 +20,8 @@ export const Error: React.StatelessComponent = props => ( borderRadius="6px" marginBottom="10px" > - - {props.icon} + + {props.icon} {props.message} -- cgit From ae4f1a093a3d02f13e56716dca2383a42b6422ba Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 14:02:39 -0700 Subject: handle other errors --- packages/instant/src/util/error.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/instant/src/util/error.ts b/packages/instant/src/util/error.ts index 78d056e11..48cb131a9 100644 --- a/packages/instant/src/util/error.ts +++ b/packages/instant/src/util/error.ts @@ -28,11 +28,22 @@ class ErrorFlasher { } const humanReadableMessageForError = (error: Error, assetData?: string): string | undefined => { - if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { + const hasInsufficientLiquidity = + error.message === AssetBuyerError.InsufficientAssetLiquidity || + error.message === AssetBuyerError.InsufficientZrxLiquidity; + if (hasInsufficientLiquidity) { const assetName = assetDataUtil.bestNameForAsset(assetData, 'of this asset'); return `Not enough ${assetName} available`; } + if ( + error.message === AssetBuyerError.StandardRelayerApiError || + error.message.startsWith(AssetBuyerError.AssetUnavailable) + ) { + const assetName = assetDataUtil.bestNameForAsset(assetData, 'This asset'); + return `${assetName} is currently unavailable`; + } + return undefined; }; -- cgit From f2f7598c0edcbef2a190595f835870c0b76af0cc Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 14:19:18 -0700 Subject: asset data util tests --- packages/instant/test/util/asset_data.test.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 packages/instant/test/util/asset_data.test.ts diff --git a/packages/instant/test/util/asset_data.test.ts b/packages/instant/test/util/asset_data.test.ts new file mode 100644 index 000000000..cf247142a --- /dev/null +++ b/packages/instant/test/util/asset_data.test.ts @@ -0,0 +1,17 @@ +import { assetDataUtil } from '../../src/util/asset_data'; + +const ZRX_ASSET_DATA = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498'; + +describe('assetDataUtil', () => { + describe('bestNameForAsset', () => { + it('should return default string if assetData is undefined', () => { + expect(assetDataUtil.bestNameForAsset(undefined, 'xyz')).toEqual('xyz'); + }); + it('should return default string if assetData isnt found', () => { + expect(assetDataUtil.bestNameForAsset('fake', 'mah default')).toEqual('mah default'); + }); + it('should return ZRX for ZRX assetData', () => { + expect(assetDataUtil.bestNameForAsset(ZRX_ASSET_DATA, 'mah default')).toEqual('ZRX'); + }); + }); +}); -- cgit From 7b43cd14b305e3f01081e7ea7d0385966e4529be Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 14:34:04 -0700 Subject: error test --- packages/instant/test/util/error.test.ts | 48 ++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 packages/instant/test/util/error.test.ts diff --git a/packages/instant/test/util/error.test.ts b/packages/instant/test/util/error.test.ts new file mode 100644 index 000000000..56f3a1e86 --- /dev/null +++ b/packages/instant/test/util/error.test.ts @@ -0,0 +1,48 @@ +import { AssetBuyerError } from '@0xproject/asset-buyer'; + +import { errorUtil } from '../../src/util/error'; + +const ZRX_ASSET_DATA = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498'; + +describe('errorUtil', () => { + describe('errorFlasher', () => { + it('should return error and asset name for InsufficientAssetLiquidity', () => { + const insufficientAssetError = new Error(AssetBuyerError.InsufficientAssetLiquidity); + expect(errorUtil.errorDescription(insufficientAssetError, ZRX_ASSET_DATA).message).toEqual( + 'Not enough ZRX available', + ); + }); + it('should return error default name for InsufficientAssetLiquidity', () => { + const insufficientZrxError = new Error(AssetBuyerError.InsufficientZrxLiquidity); + expect(errorUtil.errorDescription(insufficientZrxError).message).toEqual( + 'Not enough of this asset available', + ); + }); + it('should return asset name for InsufficientAssetLiquidity', () => { + const insufficientZrxError = new Error(AssetBuyerError.InsufficientZrxLiquidity); + expect(errorUtil.errorDescription(insufficientZrxError, ZRX_ASSET_DATA).message).toEqual( + 'Not enough ZRX available', + ); + }); + it('should return unavailable error and asset name for StandardRelayerApiError', () => { + const standardRelayerError = new Error(AssetBuyerError.StandardRelayerApiError); + expect(errorUtil.errorDescription(standardRelayerError, ZRX_ASSET_DATA).message).toEqual( + 'ZRX is currently unavailable', + ); + }); + it('should return error for AssetUnavailable error', () => { + const assetUnavailableError = new Error( + `${AssetBuyerError.AssetUnavailable}: For assetData ${ZRX_ASSET_DATA}`, + ); + expect(errorUtil.errorDescription(assetUnavailableError, ZRX_ASSET_DATA).message).toEqual( + 'ZRX is currently unavailable', + ); + }); + it('should return default for AssetUnavailable error', () => { + const assetUnavailableError = new Error(`${AssetBuyerError.AssetUnavailable}: For assetData xyz`); + expect(errorUtil.errorDescription(assetUnavailableError, 'xyz').message).toEqual( + 'This asset is currently unavailable', + ); + }); + }); +}); -- cgit From 6cf8d57aee3ed332bd1109f8f39792894147d2dd Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 16:41:35 -0700 Subject: add concept of quoteState --- .../instant/src/components/instant_heading.tsx | 22 ++++++++++++++++---- .../src/containers/selected_asset_amount_input.ts | 24 ++++++++++++++-------- .../containers/selected_asset_instant_heading.ts | 3 +++ packages/instant/src/redux/actions.ts | 4 ++++ packages/instant/src/redux/reducer.ts | 17 ++++++++++++++- packages/instant/src/types.ts | 8 ++++---- 6 files changed, 60 insertions(+), 18 deletions(-) diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 492c1b2c0..848056800 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -4,6 +4,7 @@ import * as React from 'react'; import { SelectedAssetAmountInput } from '../containers/selected_asset_amount_input'; import { ColorOption } from '../style/theme'; +import { AsyncProcessState } from '../types'; import { format } from '../util/format'; import { Container, Flex, Text } from './ui'; @@ -12,20 +13,33 @@ export interface InstantHeadingProps { selectedAssetAmount?: BigNumber; totalEthBaseAmount?: BigNumber; ethUsdPrice?: BigNumber; + quoteState: AsyncProcessState; } const displaytotalEthBaseAmount = ({ selectedAssetAmount, totalEthBaseAmount }: InstantHeadingProps): string => { if (_.isUndefined(selectedAssetAmount)) { return '0 ETH'; } - return format.ethBaseAmount(totalEthBaseAmount, 4, '...loading'); + return format.ethBaseAmount(totalEthBaseAmount, 4, '-'); }; const displayUsdAmount = ({ totalEthBaseAmount, selectedAssetAmount, ethUsdPrice }: InstantHeadingProps): string => { if (_.isUndefined(selectedAssetAmount)) { return '$0.00'; } - return format.ethBaseAmountInUsd(totalEthBaseAmount, ethUsdPrice, 2, '...loading'); + return format.ethBaseAmountInUsd(totalEthBaseAmount, ethUsdPrice, 2, '-'); +}; + +const loadingOrAmount = (quoteState: AsyncProcessState, amount: string): React.ReactNode => { + if (quoteState === AsyncProcessState.PENDING) { + return ( + + …loading + + ); + } else { + return amount; + } }; export const InstantHeading: React.StatelessComponent = props => ( @@ -47,11 +61,11 @@ export const InstantHeading: React.StatelessComponent = pro - {displaytotalEthBaseAmount(props)} + {loadingOrAmount(props.quoteState, displaytotalEthBaseAmount(props))} - {displayUsdAmount(props)} + {loadingOrAmount(props.quoteState, displayUsdAmount(props))} diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index 0d2c6dd7b..87bb0e335 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -37,24 +37,25 @@ const mapStateToProps = (state: State, _ownProps: SelectedAssetAmountInputProps) const updateBuyQuoteAsync = async ( dispatch: Dispatch, - assetData?: string, - assetAmount?: BigNumber, + assetData: string, + assetAmount: BigNumber, ): Promise => { - if (_.isUndefined(assetAmount) || _.isUndefined(assetData)) { - return; - } // get a new buy quote. const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetAmount, zrxDecimals); + // mark quote as pending + dispatch(actions.updateBuyQuoteStatePending()); + let newBuyQuote: BuyQuote | undefined; try { newBuyQuote = await assetBuyer.getBuyQuoteAsync(assetData, baseUnitValue); - errorUtil.errorFlasher.clearError(dispatch); } catch (error) { + dispatch(actions.updateBuyQuoteStateFailure()); errorUtil.errorFlasher.flashNewError(dispatch, error); return; } - + // We have a successful new buy quote + errorUtil.errorFlasher.clearError(dispatch); // invalidate the last buy quote. dispatch(actions.updateLatestBuyQuote(newBuyQuote)); }; @@ -72,8 +73,13 @@ const mapDispatchToProps = ( dispatch(actions.updateLatestBuyQuote(undefined)); // reset our buy state dispatch(actions.updateSelectedAssetBuyState(AsyncProcessState.NONE)); - // tslint:disable-next-line:no-floating-promises - debouncedUpdateBuyQuoteAsync(dispatch, assetData, value); + + if (!_.isUndefined(value) && !_.isUndefined(assetData)) { + // even if it's debounced, give them the illusion it's loading + dispatch(actions.updateBuyQuoteStatePending()); + // tslint:disable-next-line:no-floating-promises + debouncedUpdateBuyQuoteAsync(dispatch, assetData, value); + } }, }); diff --git a/packages/instant/src/containers/selected_asset_instant_heading.ts b/packages/instant/src/containers/selected_asset_instant_heading.ts index c97cfe11a..be31527f1 100644 --- a/packages/instant/src/containers/selected_asset_instant_heading.ts +++ b/packages/instant/src/containers/selected_asset_instant_heading.ts @@ -5,6 +5,7 @@ import { connect } from 'react-redux'; import { oc } from 'ts-optchain'; import { State } from '../redux/reducer'; +import { AsyncProcessState } from '../types'; import { InstantHeading } from '../components/instant_heading'; @@ -14,12 +15,14 @@ interface ConnectedState { selectedAssetAmount?: BigNumber; totalEthBaseAmount?: BigNumber; ethUsdPrice?: BigNumber; + quoteState: AsyncProcessState; } const mapStateToProps = (state: State, _ownProps: InstantHeadingProps): ConnectedState => ({ selectedAssetAmount: state.selectedAssetAmount, totalEthBaseAmount: oc(state).latestBuyQuote.worstCaseQuoteInfo.totalEthAmount(), ethUsdPrice: state.ethUsdPrice, + quoteState: state.quoteState, }); export const SelectedAssetInstantHeading: React.ComponentClass = connect(mapStateToProps)( diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index cf5b39790..e12c728bb 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -25,6 +25,8 @@ export enum ActionTypes { UPDATE_SELECTED_ASSET_AMOUNT = 'UPDATE_SELECTED_ASSET_AMOUNT', UPDATE_SELECTED_ASSET_BUY_STATE = 'UPDATE_SELECTED_ASSET_BUY_STATE', UPDATE_LATEST_BUY_QUOTE = 'UPDATE_LATEST_BUY_QUOTE', + UPDATE_BUY_QUOTE_STATE_PENDING = 'UPDATE_BUY_QUOTE_STATE_PENDING', + UPDATE_BUY_QUOTE_STATE_FAILURE = 'UPDATE_BUY_QUOTE_STATE_FAILURE', SET_ERROR = 'SET_ERROR', HIDE_ERROR = 'HIDE_ERROR', CLEAR_ERROR = 'CLEAR_ERROR', @@ -36,6 +38,8 @@ export const actions = { updateSelectedAssetBuyState: (buyState: AsyncProcessState) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE, buyState), updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote), + updateBuyQuoteStatePending: () => createAction(ActionTypes.UPDATE_BUY_QUOTE_STATE_PENDING), + updateBuyQuoteStateFailure: () => createAction(ActionTypes.UPDATE_BUY_QUOTE_STATE_FAILURE), setError: (error?: any) => createAction(ActionTypes.SET_ERROR, error), hideError: () => createAction(ActionTypes.HIDE_ERROR), clearError: () => createAction(ActionTypes.CLEAR_ERROR), diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index d23064db7..ed8d0f6cf 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -14,9 +14,10 @@ export enum LatestErrorDisplay { export interface State { selectedAssetData?: string; selectedAssetAmount?: BigNumber; - selectedAssetBuyState: AsyncProcessState; + selectedAssetBuyState: AsyncProcessState; // TODO: rename buyOrderState ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; + quoteState: AsyncProcessState; latestError?: any; latestErrorDisplay: LatestErrorDisplay; } @@ -30,6 +31,7 @@ export const INITIAL_STATE: State = { latestBuyQuote: undefined, latestError: undefined, latestErrorDisplay: LatestErrorDisplay.Hidden, + quoteState: AsyncProcessState.NONE, }; export const reducer = (state: State = INITIAL_STATE, action: Action): State => { @@ -48,6 +50,19 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => return { ...state, latestBuyQuote: action.data, + quoteState: AsyncProcessState.SUCCESS, + }; + case ActionTypes.UPDATE_BUY_QUOTE_STATE_PENDING: + return { + ...state, + latestBuyQuote: undefined, + quoteState: AsyncProcessState.PENDING, + }; + case ActionTypes.UPDATE_BUY_QUOTE_STATE_FAILURE: + return { + ...state, + latestBuyQuote: undefined, + quoteState: AsyncProcessState.FAILURE, }; case ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE: return { diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index bf3ee392f..f0ffb893b 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -2,10 +2,10 @@ import { AssetProxyId, ObjectMap } from '@0xproject/types'; // Reusable export enum AsyncProcessState { - NONE, - PENDING, - SUCCESS, - FAILURE, + NONE = 'None', + PENDING = 'Pending', + SUCCESS = 'Success', + FAILURE = 'Failure', } export type FunctionType = (...args: any[]) => any; -- cgit From 01b98c3ed09429dac92a46446bb73c8596116d18 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 16:46:01 -0700 Subject: ReactNode as default for formatters, and show bold dash --- packages/instant/src/components/instant_heading.tsx | 20 ++++++++++++++++---- packages/instant/src/util/format.ts | 20 ++++++++++++++------ 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 848056800..73a419019 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -16,18 +16,30 @@ export interface InstantHeadingProps { quoteState: AsyncProcessState; } -const displaytotalEthBaseAmount = ({ selectedAssetAmount, totalEthBaseAmount }: InstantHeadingProps): string => { +const Placeholder = () => ( + + — + +); +const displaytotalEthBaseAmount = ({ + selectedAssetAmount, + totalEthBaseAmount, +}: InstantHeadingProps): React.ReactNode => { if (_.isUndefined(selectedAssetAmount)) { return '0 ETH'; } - return format.ethBaseAmount(totalEthBaseAmount, 4, '-'); + return format.ethBaseAmount(totalEthBaseAmount, 4, ); }; -const displayUsdAmount = ({ totalEthBaseAmount, selectedAssetAmount, ethUsdPrice }: InstantHeadingProps): string => { +const displayUsdAmount = ({ + totalEthBaseAmount, + selectedAssetAmount, + ethUsdPrice, +}: InstantHeadingProps): React.ReactNode => { if (_.isUndefined(selectedAssetAmount)) { return '$0.00'; } - return format.ethBaseAmountInUsd(totalEthBaseAmount, ethUsdPrice, 2, '-'); + return format.ethBaseAmountInUsd(totalEthBaseAmount, ethUsdPrice, 2, ); }; const loadingOrAmount = (quoteState: AsyncProcessState, amount: string): React.ReactNode => { diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts index b62c968fb..09eb880b2 100644 --- a/packages/instant/src/util/format.ts +++ b/packages/instant/src/util/format.ts @@ -5,14 +5,22 @@ import * as _ from 'lodash'; import { ethDecimals } from '../constants'; export const format = { - ethBaseAmount: (ethBaseAmount?: BigNumber, decimalPlaces: number = 4, defaultText: string = '0 ETH'): string => { + ethBaseAmount: ( + ethBaseAmount?: BigNumber, + decimalPlaces: number = 4, + defaultText: React.ReactNode = '0 ETH', + ): React.ReactNode => { if (_.isUndefined(ethBaseAmount)) { return defaultText; } const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseAmount, ethDecimals); return format.ethUnitAmount(ethUnitAmount, decimalPlaces); }, - ethUnitAmount: (ethUnitAmount?: BigNumber, decimalPlaces: number = 4, defaultText: string = '0 ETH'): string => { + ethUnitAmount: ( + ethUnitAmount?: BigNumber, + decimalPlaces: number = 4, + defaultText: React.ReactNode = '0 ETH', + ): React.ReactNode => { if (_.isUndefined(ethUnitAmount)) { return defaultText; } @@ -23,8 +31,8 @@ export const format = { ethBaseAmount?: BigNumber, ethUsdPrice?: BigNumber, decimalPlaces: number = 2, - defaultText: string = '$0.00', - ): string => { + defaultText: React.ReactNode = '$0.00', + ): React.ReactNode => { if (_.isUndefined(ethBaseAmount) || _.isUndefined(ethUsdPrice)) { return defaultText; } @@ -35,8 +43,8 @@ export const format = { ethUnitAmount?: BigNumber, ethUsdPrice?: BigNumber, decimalPlaces: number = 2, - defaultText: string = '$0.00', - ): string => { + defaultText: React.ReactNode = '$0.00', + ): React.ReactNode => { if (_.isUndefined(ethUnitAmount) || _.isUndefined(ethUsdPrice)) { return defaultText; } -- cgit From 1d38b75d6f599b37c14bf06bf95811e4f6bafb54 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 16:49:57 -0700 Subject: fix type --- packages/instant/src/components/instant_heading.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index 73a419019..f57b59b73 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -42,7 +42,7 @@ const displayUsdAmount = ({ return format.ethBaseAmountInUsd(totalEthBaseAmount, ethUsdPrice, 2, ); }; -const loadingOrAmount = (quoteState: AsyncProcessState, amount: string): React.ReactNode => { +const loadingOrAmount = (quoteState: AsyncProcessState, amount: React.ReactNode): React.ReactNode => { if (quoteState === AsyncProcessState.PENDING) { return ( -- cgit From 6ea386a7af89c1b8a4df94b656ae1772c29c1401 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Wed, 17 Oct 2018 16:50:21 -0700 Subject: selectedAssetBuyState -> buyOrderState --- packages/instant/src/containers/selected_asset_amount_input.ts | 2 +- packages/instant/src/containers/selected_asset_buy_button.ts | 8 ++++---- packages/instant/src/redux/actions.ts | 2 +- packages/instant/src/redux/reducer.ts | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index 87bb0e335..0873f1ab6 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -72,7 +72,7 @@ const mapDispatchToProps = ( // invalidate the last buy quote. dispatch(actions.updateLatestBuyQuote(undefined)); // reset our buy state - dispatch(actions.updateSelectedAssetBuyState(AsyncProcessState.NONE)); + dispatch(actions.updatebuyOrderState(AsyncProcessState.NONE)); if (!_.isUndefined(value) && !_.isUndefined(assetData)) { // even if it's debounced, give them the illusion it's loading diff --git a/packages/instant/src/containers/selected_asset_buy_button.ts b/packages/instant/src/containers/selected_asset_buy_button.ts index 4cbaf5537..7d3919468 100644 --- a/packages/instant/src/containers/selected_asset_buy_button.ts +++ b/packages/instant/src/containers/selected_asset_buy_button.ts @@ -39,14 +39,14 @@ const textForState = (state: AsyncProcessState): string => { }; const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyButtonProps): ConnectedState => ({ - text: textForState(state.selectedAssetBuyState), + text: textForState(state.buyOrderState), buyQuote: state.latestBuyQuote, }); const mapDispatchToProps = (dispatch: Dispatch, ownProps: SelectedAssetBuyButtonProps): ConnectedDispatch => ({ - onClick: buyQuote => dispatch(actions.updateSelectedAssetBuyState(AsyncProcessState.PENDING)), - onBuySuccess: buyQuote => dispatch(actions.updateSelectedAssetBuyState(AsyncProcessState.SUCCESS)), - onBuyFailure: buyQuote => dispatch(actions.updateSelectedAssetBuyState(AsyncProcessState.FAILURE)), + onClick: buyQuote => dispatch(actions.updatebuyOrderState(AsyncProcessState.PENDING)), + onBuySuccess: buyQuote => dispatch(actions.updatebuyOrderState(AsyncProcessState.SUCCESS)), + onBuyFailure: buyQuote => dispatch(actions.updatebuyOrderState(AsyncProcessState.FAILURE)), }); export const SelectedAssetBuyButton: React.ComponentClass = connect( diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index e12c728bb..bec847742 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -35,7 +35,7 @@ export enum ActionTypes { export const actions = { updateEthUsdPrice: (price?: BigNumber) => createAction(ActionTypes.UPDATE_ETH_USD_PRICE, price), updateSelectedAssetAmount: (amount?: BigNumber) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_AMOUNT, amount), - updateSelectedAssetBuyState: (buyState: AsyncProcessState) => + updatebuyOrderState: (buyState: AsyncProcessState) => createAction(ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE, buyState), updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UPDATE_LATEST_BUY_QUOTE, buyQuote), updateBuyQuoteStatePending: () => createAction(ActionTypes.UPDATE_BUY_QUOTE_STATE_PENDING), diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index ed8d0f6cf..54290483b 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -14,7 +14,7 @@ export enum LatestErrorDisplay { export interface State { selectedAssetData?: string; selectedAssetAmount?: BigNumber; - selectedAssetBuyState: AsyncProcessState; // TODO: rename buyOrderState + buyOrderState: AsyncProcessState; ethUsdPrice?: BigNumber; latestBuyQuote?: BuyQuote; quoteState: AsyncProcessState; @@ -26,7 +26,7 @@ export const INITIAL_STATE: State = { // TODO: Remove hardcoded zrxAssetData selectedAssetData: zrxAssetData, selectedAssetAmount: undefined, - selectedAssetBuyState: AsyncProcessState.NONE, + buyOrderState: AsyncProcessState.NONE, ethUsdPrice: undefined, latestBuyQuote: undefined, latestError: undefined, @@ -67,7 +67,7 @@ export const reducer = (state: State = INITIAL_STATE, action: Action): State => case ActionTypes.UPDATE_SELECTED_ASSET_BUY_STATE: return { ...state, - selectedAssetBuyState: action.data, + buyOrderState: action.data, }; case ActionTypes.SET_ERROR: return { -- cgit From 02cf99fa367f8058447a0a05b1d148afb68ab85c Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 11:07:00 +1100 Subject: fix(order-utils): remove constants export --- packages/monorepo-scripts/src/doc_gen_configs.ts | 6 ++++++ packages/order-utils/src/index.ts | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/doc_gen_configs.ts b/packages/monorepo-scripts/src/doc_gen_configs.ts index b5a36376a..0aaf5a6a5 100644 --- a/packages/monorepo-scripts/src/doc_gen_configs.ts +++ b/packages/monorepo-scripts/src/doc_gen_configs.ts @@ -16,8 +16,14 @@ export const docGenConfigs: DocGenConfigs = { Schema: 'https://github.com/tdegrunt/jsonschema/blob/5c2edd4baba149964aec0f23c87ad12c25a50dfb/lib/index.d.ts#L49', Uint8Array: 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array', + // HACK: CI can handle these without the namespace but some local setups (Jacob) require the namespace prefix + // This is duplicated until we can discover the source of the issue. GanacheOpts: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ganache-core/index.d.ts#L8', keystore: 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/eth-lightwallet/index.d.ts#L36', + 'Ganache.GanacheOpts': + 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ganache-core/index.d.ts#L8', + 'lightwallet.keystore': + 'https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/eth-lightwallet/index.d.ts#L36', }, // If a 0x package re-exports an external package, we should add a link to it's exported items here EXTERNAL_EXPORT_TO_LINK: { diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index a356a1d44..50b8a88a8 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -18,7 +18,6 @@ export { ExchangeTransferSimulator } from './exchange_transfer_simulator'; export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store'; export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store'; -export { constants } from './constants'; export { eip712Utils } from './eip712_utils'; export { -- cgit From 95775dca1fbd115f57ee7cde314ebcdb9ca80c45 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 18 Oct 2018 00:10:33 -0700 Subject: feat(website): add expanded and minimized display types to relayer grid --- packages/website/ts/components/portal/portal.tsx | 9 ++++- .../components/relayer_index/relayer_grid_tile.tsx | 46 ++++++++++++++-------- .../ts/components/relayer_index/relayer_index.tsx | 23 +++++++++-- yarn.lock | 39 +----------------- 4 files changed, 57 insertions(+), 60 deletions(-) diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index b42954f60..1470239d6 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -18,7 +18,7 @@ import { Loading } from 'ts/components/portal/loading'; import { Menu, MenuTheme } from 'ts/components/portal/menu'; import { Section } from 'ts/components/portal/section'; import { TextHeader } from 'ts/components/portal/text_header'; -import { RelayerIndex } from 'ts/components/relayer_index/relayer_index'; +import { RelayerIndex, RelayerIndexCellStyle } from 'ts/components/relayer_index/relayer_index'; import { TokenBalances } from 'ts/components/token_balances'; import { TopBar, TopBarDisplayType } from 'ts/components/top_bar/top_bar'; import { TradeHistory } from 'ts/components/trade_history/trade_history'; @@ -541,6 +541,7 @@ export class Portal extends React.Component { } private _renderRelayerIndexSection(): React.ReactNode { const isMobile = utils.isMobileWidth(this.props.screenWidth); + // TODO(bmillman): revert RelayerIndex cellStyle to Expanded once data pipeline is tracking v2 volume return (
    } @@ -551,7 +552,11 @@ export class Portal extends React.Component { {this._renderStartOnboarding()} )} - + } /> diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx index 193dd237a..a81ab107a 100644 --- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx +++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx @@ -14,9 +14,15 @@ import { styled } from 'ts/style/theme'; import { WebsiteBackendRelayerInfo } from 'ts/types'; import { utils } from 'ts/utils/utils'; +export enum RelayerGridTileStyle { + Expanded = 0, + Minimized, +} + export interface RelayerGridTileProps { relayerInfo: WebsiteBackendRelayerInfo; networkId: number; + style: RelayerGridTileStyle; } const styles: Styles = { @@ -30,10 +36,14 @@ const styles: Styles = { height: '100%', boxSizing: 'border-box', }, - header: { + expandedHeader: { height: '50%', width: '100%', }, + minimizedHeader: { + height: '100%', + width: '100%', + }, body: { height: '50%', width: '100%', @@ -75,10 +85,12 @@ export const RelayerGridTile: React.StatelessComponent = ( !_.isUndefined(headerImageUrl) && !_.isUndefined(props.relayerInfo.primaryColor) ? props.relayerInfo.primaryColor : FALLBACK_PRIMARY_COLOR; + const isExpanded = props.style === RelayerGridTileStyle.Expanded; + const headerStyle = isExpanded ? styles.expandedHeader : styles.minimizedHeader; return (
    -
    +
    = ( height={RELAYER_ICON_HEIGHT} />
    -
    -
    - {props.relayerInfo.name} -
    -
    - {!_.isUndefined(weeklyTxnVolume) && ( -
    {props.relayerInfo.weeklyTxnVolume}
    - )} -
    - -
    - {!_.isEmpty(topTokens) && } + {isExpanded && ( +
    +
    + {props.relayerInfo.name} +
    +
    + {!_.isUndefined(weeklyTxnVolume) && ( +
    {props.relayerInfo.weeklyTxnVolume}
    + )}
    - -
    + +
    + {!_.isEmpty(topTokens) && } +
    +
    +
    + )}
    ); diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx index 91dbeb27a..e88c20d7e 100644 --- a/packages/website/ts/components/relayer_index/relayer_index.tsx +++ b/packages/website/ts/components/relayer_index/relayer_index.tsx @@ -3,14 +3,20 @@ import CircularProgress from 'material-ui/CircularProgress'; import { GridList } from 'material-ui/GridList'; import * as React from 'react'; -import { RelayerGridTile } from 'ts/components/relayer_index/relayer_grid_tile'; +import { RelayerGridTile, RelayerGridTileStyle } from 'ts/components/relayer_index/relayer_grid_tile'; import { Retry } from 'ts/components/ui/retry'; import { ScreenWidths, WebsiteBackendRelayerInfo } from 'ts/types'; import { backendClient } from 'ts/utils/backend_client'; +export enum RelayerIndexCellStyle { + Expanded = 0, + Minimized, +} + export interface RelayerIndexProps { networkId: number; screenWidth: ScreenWidths; + cellStyle: RelayerIndexCellStyle; } interface RelayerIndexState { @@ -18,7 +24,8 @@ interface RelayerIndexState { error?: Error; } -const CELL_HEIGHT = 290; +const CELL_HEIGHT_EXPANDED = 290; +const CELL_HEIGHT_MINIMIZED = 225; const NUMBER_OF_COLUMNS_LARGE = 3; const NUMBER_OF_COLUMNS_MEDIUM = 2; const NUMBER_OF_COLUMNS_SMALL = 2; @@ -61,15 +68,23 @@ export class RelayerIndex extends React.Component {this.state.relayerInfos.map((relayerInfo: WebsiteBackendRelayerInfo, index) => ( - + ))} ); diff --git a/yarn.lock b/yarn.lock index b4f48b8ac..b0bbd8fb3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1602,10 +1602,6 @@ aes-js@^0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" -aes-js@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/aes-js/-/aes-js-3.1.1.tgz#89fd1f94ae51b4c72d62466adc1a7323ff52f072" - ajv-errors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" @@ -3006,7 +3002,7 @@ bs-logger@0.x: dependencies: fast-json-stable-stringify "^2.0.0" -bs58@=4.0.1, bs58@^4.0.0: +bs58@=4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" dependencies: @@ -3029,14 +3025,6 @@ bs58check@^1.0.8: bs58 "^3.1.0" create-hash "^1.1.0" -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - bser@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" @@ -5590,19 +5578,6 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethereumjs-wallet@~0.6.0: - version "0.6.2" - resolved "https://registry.npmjs.org/ethereumjs-wallet/-/ethereumjs-wallet-0.6.2.tgz#67244b6af3e8113b53d709124b25477b64aeccda" - dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereumjs-util "^5.2.0" - hdkey "^1.0.0" - safe-buffer "^5.1.2" - scrypt.js "^0.2.0" - utf8 "^3.0.0" - uuid "^3.3.2" - ethers@3.0.22: version "3.0.22" resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" @@ -7097,14 +7072,6 @@ hdkey@^0.7.0, hdkey@^0.7.1: coinstring "^2.0.0" secp256k1 "^3.0.1" -hdkey@^1.0.0: - version "1.1.0" - resolved "https://registry.npmjs.org/hdkey/-/hdkey-1.1.0.tgz#e74e7b01d2c47f797fa65d1d839adb7a44639f29" - dependencies: - coinstring "^2.0.0" - safe-buffer "^5.1.1" - secp256k1 "^3.0.1" - he@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" @@ -15246,10 +15213,6 @@ utf8@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.2.tgz#1fa0d9270e9be850d9b05027f63519bf46457d96" -utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" -- cgit From 376034ac7e2053ea81aa637983d1f6a7e61588d9 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 20:03:22 +1100 Subject: Update changelog entries for unpublished packages --- packages/contract-addresses/CHANGELOG.json | 10 +++++++++- packages/contract-artifacts/CHANGELOG.json | 10 +++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json index d91ad0b36..d9bd2c077 100644 --- a/packages/contract-addresses/CHANGELOG.json +++ b/packages/contract-addresses/CHANGELOG.json @@ -1,11 +1,19 @@ [ { - "version": "1.0.0", + "version": "1.0.1", "changes": [ { "pr": 1105, "note": "Initial release" } ] + }, + { + "version": "1.0.0", + "changes": [ + { + "note": "Unpublished Package" + } + ] } ] diff --git a/packages/contract-artifacts/CHANGELOG.json b/packages/contract-artifacts/CHANGELOG.json index d91ad0b36..d9bd2c077 100644 --- a/packages/contract-artifacts/CHANGELOG.json +++ b/packages/contract-artifacts/CHANGELOG.json @@ -1,11 +1,19 @@ [ { - "version": "1.0.0", + "version": "1.0.1", "changes": [ { "pr": 1105, "note": "Initial release" } ] + }, + { + "version": "1.0.0", + "changes": [ + { + "note": "Unpublished Package" + } + ] } ] -- cgit From 612e8db93005a3ee7594015c6128c63384ac343a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 10:39:37 +0100 Subject: Update changelogs for unpublished packages --- packages/ethereum-types/CHANGELOG.json | 10 +++++++++- packages/react-shared/CHANGELOG.json | 12 ++++++++++-- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json index 60fb8c806..ffc4742b1 100644 --- a/packages/ethereum-types/CHANGELOG.json +++ b/packages/ethereum-types/CHANGELOG.json @@ -1,6 +1,6 @@ [ { - "version": "1.1.0", + "version": "1.1.1", "changes": [ { "note": "Add `JSONRPCResponseError` and error field on `JSONRPCResponsePayload`.", @@ -8,6 +8,14 @@ } ] }, + { + "version": "1.1.0", + "changes": [ + { + "note": "Unpublished package." + } + ] + }, { "timestamp": 1538693146, "version": "1.0.11", diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index d1907e785..ee0352561 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -1,13 +1,21 @@ [ { - "timestamp": 1538693146, - "version": "1.0.15", + "version": "1.0.17", "changes": [ { "note": "Dependencies updated" } ] }, + { + "timestamp": 1538693146, + "version": "1.0.16", + "changes": [ + { + "note": "Unpublished package" + } + ] + }, { "timestamp": 1538475601, "version": "1.0.14", -- cgit From 6ab6a9aa2b3511df60c078398168a84faf3e2385 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 11:28:48 +0100 Subject: Update react-scroll hash to avoid collision with older, unfixed branch --- packages/react-docs/package.json | 2 +- packages/react-shared/package.json | 2 +- packages/website/package.json | 2 +- yarn.lock | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index ff23c7fe3..6830a2101 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -50,7 +50,7 @@ "react": "^16.4.2", "react-dom": "^16.4.2", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "react-tooltip": "^3.2.7", "semver": "5.5.0", "styled-components": "^3.3.0" diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 178b6d76e..1c23c4c8a 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -53,7 +53,7 @@ "react-dom": "^16.4.2", "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "react-router-dom": "^4.1.1", "valid-url": "^1.0.9" }, diff --git a/packages/website/package.json b/packages/website/package.json index 22250f59a..4af556b5f 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -53,7 +53,7 @@ "react-helmet": "^5.2.0", "react-popper": "^1.0.0-beta.6", "react-redux": "^5.0.3", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "react-tooltip": "^3.2.7", "react-typist": "^2.0.4", "redux": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index d210d7a8c..729be3a0c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12164,7 +12164,7 @@ react-router@^4.2.0: prop-types "^15.5.4" warning "^3.0.0" -react-scroll@0xproject/react-scroll#similar-to-pr-330: +react-scroll@0xproject/react-scroll#similar-to-pr-330-but-with-replace-state: version "1.7.10" resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/0f625b270d7e966313cac8b811c0ae807b37e170" dependencies: -- cgit From d5daa68703a0fb8f5f3f1cf35ecb8a69a26ae811 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 12:46:06 +0200 Subject: Enable linter on generated abi-gen wrappers --- packages/abi-gen-wrappers/package.json | 2 ++ packages/abi-gen-wrappers/tslint.json | 3 +++ yarn.lock | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 packages/abi-gen-wrappers/tslint.json diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index a660d3015..0a4ae5829 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -12,6 +12,7 @@ "scripts": { "build": "yarn pre_build && tsc -b", "build:ci": "yarn build", + "lint": "tslint --project .", "pre_build": "yarn generate_contract_wrappers", "clean": "shx rm -rf lib wrappers", "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" @@ -30,6 +31,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { "@0xproject/abi-gen": "^1.0.12", + "@0xproject/tslint-config": "^1.0.8", "shx": "^0.2.2" }, "dependencies": { diff --git a/packages/abi-gen-wrappers/tslint.json b/packages/abi-gen-wrappers/tslint.json new file mode 100644 index 000000000..ffaefe83a --- /dev/null +++ b/packages/abi-gen-wrappers/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["@0xproject/tslint-config"] +} diff --git a/yarn.lock b/yarn.lock index 0a85f9011..386f42fd6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6385,7 +6385,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "0.6.0" + ethereumjs-wallet "~0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" -- cgit From 56cb2470cce2fed776f3cabacd6d31fa0ccdbbd7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 12:01:01 +0100 Subject: chore: fix up asset-buyer doc and add to Dev Home --- packages/website/ts/containers/asset_buyer_documentation.ts | 4 +++- packages/website/ts/pages/documentation/docs_home.tsx | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/containers/asset_buyer_documentation.ts b/packages/website/ts/containers/asset_buyer_documentation.ts index f794625de..13a597ea3 100644 --- a/packages/website/ts/containers/asset_buyer_documentation.ts +++ b/packages/website/ts/containers/asset_buyer_documentation.ts @@ -5,7 +5,7 @@ import { Dispatch } from 'redux'; import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; import { Dispatcher } from 'ts/redux/dispatcher'; import { State } from 'ts/redux/reducer'; -import { DocPackages } from 'ts/types'; +import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ @@ -47,6 +47,7 @@ interface ConnectedState { availableDocVersions: string[]; docsInfo: DocsInfo; translate: Translate; + screenWidth: ScreenWidths; } interface ConnectedDispatch { @@ -58,6 +59,7 @@ const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState availableDocVersions: state.availableDocVersions, translate: state.translate, docsInfo, + screenWidth: state.screenWidth, }); const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index b02959610..f0af78fc1 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -113,6 +113,14 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { shouldOpenInNewTab: true, }, }, + { + description: + 'Convenience package for buying assets represented on the Ethereum blockchain using 0x. In its simplest form, the package helps in the usage of the [0x forwarder contract](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md), which allows users to execute [Wrapped Ether](https://weth.io/) based 0x orders without having to set allowances, wrap Ether or own ZRX, meaning they can buy tokens with Ether alone. Given some liquidity (0x signed orders), it helps estimate the Ether cost of buying a certain asset (giving a range) and then buying that asset.', + link: { + title: '@0xproject/asset-buyer', + to: WebsitePaths.AssetBuyer, + }, + }, ], [Categories.Ethereum]: [ { -- cgit From e7c6f2a35795610645598deba2c14ceeda6acc89 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 12:04:19 +0100 Subject: Add styled-components dep --- packages/react-shared/package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 1c23c4c8a..847946eb1 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -44,6 +44,7 @@ "@types/react-router-dom": "^4.0.4", "@types/react-scroll": "1.5.3", "@types/valid-url": "^1.0.2", + "@types/styled-components": "^4.0.0", "basscss": "^8.0.3", "change-case": "^3.0.2", "is-mobile": "^0.2.2", @@ -55,6 +56,7 @@ "react-markdown": "^3.2.2", "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "react-router-dom": "^4.1.1", + "styled-components": "^3.3.0", "valid-url": "^1.0.9" }, "publishConfig": { -- cgit From f8876ab60b5e8fa606073d6c48aa1395dbadd88b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 13:15:39 +0200 Subject: Remove sra-report --- .circleci/config.yml | 8 - README.md | 3 +- packages/monorepo-scripts/src/test_installation.ts | 7 +- packages/sra-report/.npmignore | 6 - packages/sra-report/CHANGELOG.json | 289 -- packages/sra-report/CHANGELOG.md | 132 - packages/sra-report/README.md | 138 - packages/sra-report/bin/sra-report.js | 2 - packages/sra-report/coverage/.gitkeep | 0 packages/sra-report/package.json | 73 - .../sra_report.postman_collection.json | 910 ----- .../src/contract_addresses/kovan_addresses.ts | 5 - .../src/contract_addresses/mainnet_addresses.ts | 5 - .../src/contract_addresses/rinkeby_addresses.ts | 5 - .../src/contract_addresses/ropsten_addresses.ts | 5 - packages/sra-report/src/globals.d.ts | 4 - packages/sra-report/src/index.ts | 111 - .../sra-report/src/postman_environment_factory.ts | 144 - packages/sra-report/src/utils.ts | 6 - .../test/environments/postman_environment.json | 223 -- .../fixtures/v0/token_pairs/default_request.json | 3698 -------------------- .../test/fixtures/v0/token_pairs/malformed.json | 30 - .../v0/token_pairs/token_a_and_token_b_params.json | 16 - .../fixtures/v0/token_pairs/token_a_param.json | 1864 ---------- .../fixtures/v0/token_pairs/token_b_param.json | 1864 ---------- .../sra-report/test/postman_collection_v0_test.ts | 76 - packages/sra-report/test/test_runner.ts | 143 - packages/sra-report/tsconfig.json | 8 - packages/sra-report/tslint.json | 3 - packages/sra-spec/src/md/introduction.md | 4 - tsconfig.json | 1 - 31 files changed, 2 insertions(+), 9781 deletions(-) delete mode 100644 packages/sra-report/.npmignore delete mode 100644 packages/sra-report/CHANGELOG.json delete mode 100644 packages/sra-report/CHANGELOG.md delete mode 100644 packages/sra-report/README.md delete mode 100755 packages/sra-report/bin/sra-report.js delete mode 100644 packages/sra-report/coverage/.gitkeep delete mode 100644 packages/sra-report/package.json delete mode 100644 packages/sra-report/postman_collections/sra_report.postman_collection.json delete mode 100644 packages/sra-report/src/contract_addresses/kovan_addresses.ts delete mode 100644 packages/sra-report/src/contract_addresses/mainnet_addresses.ts delete mode 100644 packages/sra-report/src/contract_addresses/rinkeby_addresses.ts delete mode 100644 packages/sra-report/src/contract_addresses/ropsten_addresses.ts delete mode 100644 packages/sra-report/src/globals.d.ts delete mode 100644 packages/sra-report/src/index.ts delete mode 100644 packages/sra-report/src/postman_environment_factory.ts delete mode 100644 packages/sra-report/src/utils.ts delete mode 100644 packages/sra-report/test/environments/postman_environment.json delete mode 100644 packages/sra-report/test/fixtures/v0/token_pairs/default_request.json delete mode 100644 packages/sra-report/test/fixtures/v0/token_pairs/malformed.json delete mode 100644 packages/sra-report/test/fixtures/v0/token_pairs/token_a_and_token_b_params.json delete mode 100644 packages/sra-report/test/fixtures/v0/token_pairs/token_a_param.json delete mode 100644 packages/sra-report/test/fixtures/v0/token_pairs/token_b_param.json delete mode 100644 packages/sra-report/test/postman_collection_v0_test.ts delete mode 100644 packages/sra-report/test/test_runner.ts delete mode 100644 packages/sra-report/tsconfig.json delete mode 100644 packages/sra-report/tslint.json diff --git a/.circleci/config.yml b/.circleci/config.yml index 1cf665cce..bb1ad393c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,7 +94,6 @@ jobs: - run: yarn wsrun test:circleci @0xproject/sol-compiler - run: yarn wsrun test:circleci @0xproject/sol-cov - run: yarn wsrun test:circleci @0xproject/sol-doc - - run: yarn wsrun test:circleci @0xproject/sra-report - run: yarn wsrun test:circleci @0xproject/subproviders - run: yarn wsrun test:circleci @0xproject/web3-wrapper - run: yarn wsrun test:circleci @0xproject/utils @@ -151,10 +150,6 @@ jobs: key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} paths: - ~/repo/packages/sol-doc/coverage/lcov.info - - save_cache: - key: coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sra-report/coverage/lcov.info - save_cache: key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} paths: @@ -306,9 +301,6 @@ jobs: - restore_cache: keys: - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sra-report-{{ .Environment.CIRCLE_SHA1 }} - restore_cache: keys: - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} diff --git a/README.md b/README.md index d850d5703..52e14de98 100644 --- a/README.md +++ b/README.md @@ -36,8 +36,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t | [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components | | [`@0xproject/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-compiler.svg)](https://www.npmjs.com/package/@0xproject/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties. | | [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool | -| [`@0xproject/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-spec.svg)](https://www.npmjs.com/package/@0xproject/sra-spec) | OpenAPI specification for the standard relayer API | -| [`@0xproject/sra-report`](/packages/sra-report) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-report.svg)](https://www.npmjs.com/package/@0xproject/sra-report) | Generate reports for standard relayer API compliance | +| [`@0xproject/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-spec.svg)](https://www.npmjs.com/package/@0xproject/sra-spec) | OpenAPI specification for the standard relayer API | | | [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) | | [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules | | [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations | diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index a642498ac..459f70839 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -12,12 +12,7 @@ import { Package } from './types'; import { utils } from './utils/utils'; // Packages might not be runnable if they are command-line tools or only run in browsers. -const UNRUNNABLE_PACKAGES = [ - '@0xproject/abi-gen', - '@0xproject/sra-report', - '@0xproject/react-shared', - '@0xproject/react-docs', -]; +const UNRUNNABLE_PACKAGES = ['@0xproject/abi-gen', '@0xproject/react-shared', '@0xproject/react-docs']; const mkdirpAsync = promisify(mkdirp); const rimrafAsync = promisify(rimraf); diff --git a/packages/sra-report/.npmignore b/packages/sra-report/.npmignore deleted file mode 100644 index d645458f6..000000000 --- a/packages/sra-report/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -.* -yarn-error.log -/src/ -/scripts/ -tsconfig.json -/lib/monorepo_scripts/ diff --git a/packages/sra-report/CHANGELOG.json b/packages/sra-report/CHANGELOG.json deleted file mode 100644 index c88854b08..000000000 --- a/packages/sra-report/CHANGELOG.json +++ /dev/null @@ -1,289 +0,0 @@ -[ - { - "version": "1.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ], - "timestamp": 1538693146 - }, - { - "timestamp": 1538157789, - "version": "1.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537907159, - "version": "1.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537875740, - "version": "1.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1537541580, - "version": "1.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1536142250, - "version": "1.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535377027, - "version": "1.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1535133899, - "version": "1.0.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1534210131, - "version": "1.0.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532619515, - "version": "1.0.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532614997, - "version": "1.0.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532605697, - "version": "1.0.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532357734, - "version": "1.0.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1532043000, - "version": "1.0.0", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1531919263, - "version": "0.1.6", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1531149657, - "version": "0.1.5", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1529397769, - "version": "0.1.4", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527617805, - "version": "0.1.3", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527617227, - "version": "0.1.2", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1527616612, - "version": "0.1.1", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.1.0", - "changes": [ - { - "note": "Properly export the executable binary", - "pr": 588 - } - ], - "timestamp": 1527009133 - }, - { - "timestamp": 1525477860, - "version": "0.0.14", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525453812, - "version": "0.0.13", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1525428773, - "version": "0.0.12", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524079658, - "version": "0.0.11", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524073495, - "version": "0.0.10", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1524044013, - "version": "0.0.9", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1523462196, - "version": "0.0.8", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "timestamp": 1522673609, - "version": "0.0.7", - "changes": [ - { - "note": "Dependencies updated" - } - ] - }, - { - "version": "0.0.6", - "changes": [ - { - "note": "Added postman collection unit tests", - "pr": 451 - } - ], - "timestamp": 1522658513 - }, - { - "version": "0.0.2", - "changes": [ - { - "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package", - "pr": 452 - } - ], - "timestamp": 1521298800 - }, - { - "version": "0.0.1", - "changes": [], - "timestamp": 1520434800 - } -] diff --git a/packages/sra-report/CHANGELOG.md b/packages/sra-report/CHANGELOG.md deleted file mode 100644 index 803baae5b..000000000 --- a/packages/sra-report/CHANGELOG.md +++ /dev/null @@ -1,132 +0,0 @@ - - -CHANGELOG - -## v1.0.13 - _October 4, 2018_ - - * Dependencies updated - -## v1.0.12 - _September 28, 2018_ - - * Dependencies updated - -## v1.0.11 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.10 - _September 25, 2018_ - - * Dependencies updated - -## v1.0.9 - _September 21, 2018_ - - * Dependencies updated - -## v1.0.8 - _September 5, 2018_ - - * Dependencies updated - -## v1.0.7 - _August 27, 2018_ - - * Dependencies updated - -## v1.0.6 - _August 24, 2018_ - - * Dependencies updated - -## v1.0.5 - _August 13, 2018_ - - * Dependencies updated - -## v1.0.4 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.3 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.2 - _July 26, 2018_ - - * Dependencies updated - -## v1.0.1 - _July 23, 2018_ - - * Dependencies updated - -## v1.0.0 - _July 19, 2018_ - - * Dependencies updated - -## v0.1.6 - _July 18, 2018_ - - * Dependencies updated - -## v0.1.5 - _July 9, 2018_ - - * Dependencies updated - -## v0.1.4 - _June 19, 2018_ - - * Dependencies updated - -## v0.1.3 - _May 29, 2018_ - - * Dependencies updated - -## v0.1.2 - _May 29, 2018_ - - * Dependencies updated - -## v0.1.1 - _May 29, 2018_ - - * Dependencies updated - -## v0.1.0 - _May 22, 2018_ - - * Properly export the executable binary (#588) - -## v0.0.14 - _May 4, 2018_ - - * Dependencies updated - -## v0.0.13 - _May 4, 2018_ - - * Dependencies updated - -## v0.0.12 - _May 4, 2018_ - - * Dependencies updated - -## v0.0.11 - _April 18, 2018_ - - * Dependencies updated - -## v0.0.10 - _April 18, 2018_ - - * Dependencies updated - -## v0.0.9 - _April 18, 2018_ - - * Dependencies updated - -## v0.0.8 - _April 11, 2018_ - - * Dependencies updated - -## v0.0.7 - _April 2, 2018_ - - * Dependencies updated - -## v0.0.6 - _April 2, 2018_ - - * Added postman collection unit tests (#451) - -## v0.0.2 - _March 17, 2018_ - - * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452) - -## v0.0.1 - _March 7, 2018_ diff --git a/packages/sra-report/README.md b/packages/sra-report/README.md deleted file mode 100644 index d8df36a29..000000000 --- a/packages/sra-report/README.md +++ /dev/null @@ -1,138 +0,0 @@ -# SRA Report - -This tool allows you to generate reports that detail an endpoint's [standard relayer API HTTP specification](https://github.com/0xProject/standard-relayer-api/blob/master/http/v0.md) compliance. The tool will perform a [Postman collection](https://www.getpostman.com/docs/v6/postman/collections/creating_collections) run and either print a report to the console or save it to disk as a json file. SRA report can also output a Postman collection file and [Postman environment](https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments) file in order to facilitate replication and debugging of collection runs using the [Postman native app](https://www.getpostman.com/docs/v6/postman/launching_postman/installation_and_updates). - -The tool currently performs the following checks for each endpoint: - -* `application/json` Content-Type header validation -* JSON schema validation -* Correct filtering when a query paramater is provided (ex. when querying for a specific maker address, all orders returned have the same maker address that was provided by the query) - -Features to come: - -* Correct sorting (ex. the `/orderbook` endpoint should return orders in order of price) -* Tests for pagination -* Tests for the `POST /order` endpoint -* Tests for failure cases and errors - -## Installation - -`yarn add -g @0xproject/sra-report` - -## Options - -``` -sra-report -Options: - --help Show help [boolean] - --version Show version number [boolean] - --endpoint-url, -e API endpoint url to test for standard relayer API - compliance [string] [required] - --output, -o, --out The relative path to write the report generated by - the collection run, prints to console by default - [string] - --network-id, -n ID of the network that the API is serving orders - from [number] [default: 1] - --environment, --env The relative path to a postman environment file - for the collection run [string] - --export-collection, --ec The relative path to write the postman collection - file used by the collection run [string] - --export-environment, --ee The relative path to write the postman environment - file used by the collection run [string] -``` - -## Example Usage - -### Print report to console - -```bash -sra-report --endpoint-url 'http://api.example.com' -``` - -### Save a report to disk - -```bash -sra-report --endpoint-url 'http://api.example.com' --output 'path/to/report.json' -``` - -### Generate report for an endpoint that serves kovan testnet orders - -```bash -sra-report --endpoint-url 'http://kovan.api.example.com' --network-id 42 -``` - -### Write Postman collection and environment files for use in the Postman native app - -```bash -sra-report --endpoint-url 'http://.api.example.com' --export-collection 'path/to/collection.json' --export-environment 'path/to/environment.json' -``` - -### Run the report using a custom environment - -```bash -sra-report --endpoint-url 'http://.api.example.com' --environment 'path/to/custom/environment.json' -``` - -## Custom environments - -When testing your standard relayer API endpoint in development, it may be useful to modify the Postman environment file generated by this tool such that specific query parameters are used during the collection run. For example, by default, this tool will grab the first order it can from the `/orders` endpoint and use properties from that order as query parameters for the rest of the run. Another example is the tool will default to the [WETH](https://etherscan.io/address/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2) and [ZRX](https://etherscan.io/address/0xe41d2489571d322189246dafa5ebde1f4699f498) token contracts when querying some endpoints but you may want to specify these. - -In order to provide a custom environment to the tool, perform the following steps: - -1. Export a Postman environment file using the tool: [example](#Write-Postman-collection-and-environment-files-for-use-in-the-Postman-native-app) -2. Open the Postman environment file using your favorite text editor or in the Postman native app -3. Modify the specific values you want -4. Save the environment file and export it if using the Postman native app -5. Run the tool and supply a path to your modified environment file: [example](#Run-the-report-using-a-custom-environment) - -## Contributing - -We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository. - -Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started. - -### Install dependencies - -If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them: - -```bash -yarn config set workspaces-experimental true -``` - -Then install dependencies - -```bash -yarn install -``` - -### Build - -To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: - -```bash -PKG=@0xproject/sra-report yarn build -``` - -Or continuously rebuild on change: - -```bash -PKG=@0xproject/sra-report yarn watch -``` - -### Clean - -```bash -yarn clean -``` - -### Lint - -```bash -yarn lint -``` - -### Run Tests - -```bash -yarn test -``` diff --git a/packages/sra-report/bin/sra-report.js b/packages/sra-report/bin/sra-report.js deleted file mode 100755 index 8d6bdccf8..000000000 --- a/packages/sra-report/bin/sra-report.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../lib/src/index.js') diff --git a/packages/sra-report/coverage/.gitkeep b/packages/sra-report/coverage/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/sra-report/package.json b/packages/sra-report/package.json deleted file mode 100644 index a822aa61d..000000000 --- a/packages/sra-report/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "@0xproject/sra-report", - "version": "1.0.13", - "engines": { - "node": ">=6.12" - }, - "description": "Generate reports for standard relayer API compliance", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", - "scripts": { - "clean": "shx rm -rf lib", - "build": "tsc -b", - "build:ci": "yarn build", - "lint": "tslint --project .", - "test:circleci": "yarn test:coverage", - "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov", - "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info", - "test": "run-s copy_test_environments copy_test_fixtures run_mocha", - "rebuild_and_test": "run-s clean build test", - "copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures", - "copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments", - "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit" - }, - "bin": { - "sra-report": "bin/sra-report.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-report/README.md", - "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/connect": "1.0.4", - "@0xproject/json-schemas": "^0.8.3", - "@0xproject/order-utils": "^0.0.9", - "@0xproject/types": "^0.8.2", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "chalk": "^2.3.0", - "lodash": "^4.17.5", - "newman": "^3.9.3", - "yargs": "^10.0.3" - }, - "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", - "@types/lodash": "4.14.104", - "@types/mocha": "^2.2.48", - "@types/newman": "^3.9.0", - "@types/nock": "^9.1.2", - "@types/node": "*", - "@types/yargs": "^10.0.0", - "chai": "^4.0.1", - "chai-as-promised": "^7.1.0", - "copyfiles": "^2.0.0", - "dirty-chai": "^2.0.1", - "make-promises-safe": "^1.1.0", - "mocha": "^4.1.0", - "nock": "^9.2.3", - "npm-run-all": "^4.1.2", - "nyc": "^11.0.1", - "shx": "^0.2.2", - "tslint": "5.11.0", - "typescript": "3.0.1" - }, - "publishConfig": { - "access": "public" - } -} diff --git a/packages/sra-report/postman_collections/sra_report.postman_collection.json b/packages/sra-report/postman_collections/sra_report.postman_collection.json deleted file mode 100644 index 9a8e8e0fa..000000000 --- a/packages/sra-report/postman_collections/sra_report.postman_collection.json +++ /dev/null @@ -1,910 +0,0 @@ -{ - "info": { - "name": "sra_report", - "_postman_id": "d5828163-ddb9-46a9-ec39-c2b81417b6c0", - "description": - "[Standard Relayer API](\nhttps://github.com/0xProject/standard-relayer-api)\n\n\n0x Protocol is an open standard. Because of this, we expect many independent applications to be built that will want to use the protocol. In order to make it easier for anyone to source liquidity that conforms to the 0x order format, relayers can opt-in to implementing a set of standard relayer API endpoints. In doing so, they allow clients of the standard relayer API to access the orders on their orderbook.", - "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" - }, - "item": [ - { - "name": "GET /token_pairs", - "description": "", - "item": [ - { - "name": "default request", - "event": [ - { - "listen": "test", - "script": { - "id": "42cb5e3f-6013-4a7c-b341-0d10cb3f2c9c", - "type": "text/javascript", - "exec": [""] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/token_pairs", - "host": ["{{url}}"], - "path": ["token_pairs"] - }, - "description": "" - }, - "response": [] - }, - { - "name": "tokenA param", - "event": [ - { - "listen": "test", - "script": { - "id": "0b0712ff-7846-40a3-9253-4bca2551350c", - "type": "text/javascript", - "exec": [ - "const filterTokenEnvKey = 'tokenContractAddress1';", - "const filterTokenAddress = pm.environment.get(filterTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Token pairs are properly filtered', function() {", - " _.forEach(responseJsonData, function(tokenPair) {", - " const tokenAIsFilterToken = _.get(tokenPair, 'tokenA.address') === filterTokenAddress;", - " const tokenBIsFilterToken = _.get(tokenPair, 'tokenB.address') === filterTokenAddress;", - " const condition = tokenAIsFilterToken || tokenBIsFilterToken", - " pm.expect(condition).to.be.true;", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/token_pairs?tokenA={{tokenContractAddress1}}", - "host": ["{{url}}"], - "path": ["token_pairs"], - "query": [ - { - "key": "tokenA", - "value": "{{tokenContractAddress1}}", - "equals": true - } - ] - }, - "description": "" - }, - "response": [] - }, - { - "name": "tokenB param", - "event": [ - { - "listen": "test", - "script": { - "id": "ef0e6be8-06d8-4975-a1c4-2199bc8b5aa6", - "type": "text/javascript", - "exec": [ - "const filterTokenEnvKey = 'tokenContractAddress1';", - "const filterTokenAddress = pm.environment.get(filterTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Token pairs are properly filtered', function() {", - " _.forEach(responseJsonData, function(tokenPair) {", - " const tokenAIsFilterToken = _.get(tokenPair, 'tokenA.address') === filterTokenAddress;", - " const tokenBIsFilterToken = _.get(tokenPair, 'tokenB.address') === filterTokenAddress;", - " const condition = tokenAIsFilterToken || tokenBIsFilterToken", - " pm.expect(condition).to.be.true;", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/token_pairs?tokenB={{tokenContractAddress1}}", - "host": ["{{url}}"], - "path": ["token_pairs"], - "query": [ - { - "key": "tokenB", - "value": "{{tokenContractAddress1}}", - "equals": true - } - ] - }, - "description": "" - }, - "response": [] - }, - { - "name": "tokenA and tokenB params", - "event": [ - { - "listen": "test", - "script": { - "id": "9ca4bed3-b8e0-4a90-96ba-42f0da3a7d68", - "type": "text/javascript", - "exec": [ - "const filterTokenAEnvKey = 'tokenContractAddress1';", - "const filterTokenBEnvKey = 'tokenContractAddress2';", - "const filterTokenAAddress = pm.environment.get(filterTokenAEnvKey);", - "const filterTokenBAddress = pm.environment.get(filterTokenBEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Token pairs are properly filtered', function() {", - " _.forEach(responseJsonData, function(tokenPair) {", - " const tokenAIsFilterTokenA = _.get(tokenPair, 'tokenA.address') === filterTokenAAddress;", - " const tokenAIsFilterTokenB = _.get(tokenPair, 'tokenA.address') === filterTokenBAddress;", - " const tokenBIsFilterTokenA = _.get(tokenPair, 'tokenB.address') === filterTokenAAddress;", - " const tokenBIsFilterTokenB = _.get(tokenPair, 'tokenB.address') === filterTokenBAddress;", - " const condition = (tokenAIsFilterTokenA && tokenBIsFilterTokenB) || (tokenBIsFilterTokenA && tokenAIsFilterTokenB)", - " pm.expect(condition).to.be.true;", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": - "{{url}}/token_pairs?tokenA={{tokenContractAddress1}}&tokenB={{tokenContractAddress2}}", - "host": ["{{url}}"], - "path": ["token_pairs"], - "query": [ - { - "key": "tokenA", - "value": "{{tokenContractAddress1}}", - "equals": true - }, - { - "key": "tokenB", - "value": "{{tokenContractAddress2}}", - "equals": true - } - ] - }, - "description": "" - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "3d032e92-6a17-49f0-8115-bae1c7298b55", - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "id": "25addb38-bd1c-4eb3-a193-5617119dc0d6", - "type": "text/javascript", - "exec": [ - "const schema = tv4.getSchema('/RelayerApiTokenPairsResponse');", - "const responseJsonData = pm.response.json();", - "", - "pm.test('Schema is valid', function() {", - " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;", - "});", - "" - ] - } - } - ] - }, - { - "name": "GET /orders", - "description": "", - "item": [ - { - "name": "default request", - "event": [ - { - "listen": "test", - "script": { - "id": "118f47dd-1d93-4288-841f-de88783eff3b", - "type": "text/javascript", - "exec": [""] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders", - "host": ["{{url}}"], - "path": ["orders"] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "exchangeContract param", - "event": [ - { - "listen": "test", - "script": { - "id": "374c4b28-5672-400c-8c23-9cb1a3e63117", - "type": "text/javascript", - "exec": [ - "const exchangeContractEnvKey = 'exchangeContractAddress';", - "const requestedExchangeContractAddress = pm.environment.get(exchangeContractEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const returnedExchangeContractAddress = _.get(order, 'exchangeContractAddress');", - " pm.expect(requestedExchangeContractAddress).to.equal(returnedExchangeContractAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?exchangeContractAddress={{exchangeContractAddress}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "exchangeContractAddress", - "value": "{{exchangeContractAddress}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "tokenAddress param", - "event": [ - { - "listen": "test", - "script": { - "id": "e74a9069-18b9-42d3-b2d0-e18580ad73f2", - "type": "text/javascript", - "exec": [ - "const filterTokenEnvKey = 'tokenContractAddress2';", - "const filterTokenAddress = pm.environment.get(filterTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const makerTokenAddress = _.get(order, 'makerTokenAddress');", - " const takerTokenAddress = _.get(order, 'takerTokenAddress');", - " const makerTokenAddressIsFilterToken = makerTokenAddress === filterTokenAddress;", - " const takerTokenAddressIsFilterToken = takerTokenAddress === filterTokenAddress;", - " const condition = makerTokenAddressIsFilterToken || takerTokenAddressIsFilterToken;", - " pm.expect(condition).to.be.true;", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?tokenAddress={{tokenContractAddress2}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "tokenAddress", - "value": "{{tokenContractAddress2}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "makerTokenAddress param", - "event": [ - { - "listen": "test", - "script": { - "id": "c539f306-aa03-495d-a90a-0179e1b751aa", - "type": "text/javascript", - "exec": [ - "const filterTokenEnvKey = 'tokenContractAddress2';", - "const filterTokenAddress = pm.environment.get(filterTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const makerTokenAddress = _.get(order, 'makerTokenAddress');", - " pm.expect(makerTokenAddress).to.be.equal(filterTokenAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?makerTokenAddress={{tokenContractAddress2}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "makerTokenAddress", - "value": "{{tokenContractAddress2}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "takerTokenAddress param", - "event": [ - { - "listen": "test", - "script": { - "id": "49b2fcaf-5fe2-471f-ae10-e48a440d4c6d", - "type": "text/javascript", - "exec": [ - "const filterTokenEnvKey = 'tokenContractAddress2';", - "const filterTokenAddress = pm.environment.get(filterTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const takerTokenAddress = _.get(order, 'takerTokenAddress');", - " pm.expect(takerTokenAddress).to.be.equal(filterTokenAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?takerTokenAddress={{tokenContractAddress2}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "takerTokenAddress", - "value": "{{tokenContractAddress2}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "maker param", - "event": [ - { - "listen": "test", - "script": { - "id": "1f5960de-117f-44fb-82e0-581626cbf62b", - "type": "text/javascript", - "exec": [ - "const orderMakerEnvKey = 'orderMaker';", - "const referenceOrderMakerAddress = pm.environment.get(orderMakerEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const returnedMakerAddress = _.get(order, 'maker');", - " pm.expect(referenceOrderMakerAddress).to.be.equal(returnedMakerAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?maker={{orderMaker}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "maker", - "value": "{{orderMaker}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "taker param", - "event": [ - { - "listen": "test", - "script": { - "id": "f23de2eb-b444-49d3-93b7-14ae712d6502", - "type": "text/javascript", - "exec": [ - "const orderTakerEnvKey = 'orderTaker';", - "const referenceOrderTakerAddress = pm.environment.get(orderTakerEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const returnedTakerAddress = _.get(order, 'taker');", - " pm.expect(referenceOrderTakerAddress).to.be.equal(returnedTakerAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?taker={{orderTaker}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "taker", - "value": "{{orderTaker}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "trader param", - "event": [ - { - "listen": "test", - "script": { - "id": "9689639a-47ce-4c3b-8180-859fd28437be", - "type": "text/javascript", - "exec": [ - "const orderTraderEnvKey = 'orderMaker';", - "const referenceOrderTraderAddress = pm.environment.get(orderTraderEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const returnedMakerAddress = _.get(order, 'maker');", - " const returnedTakerAddress = _.get(order, 'taker');", - " const condition = (referenceOrderTraderAddress === returnedMakerAddress) || (referenceOrderTraderAddress === returnedTakerAddress);", - " pm.expect(condition).to.be.true;", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?trader={{orderMaker}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "trader", - "value": "{{orderMaker}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - }, - { - "name": "feeRecipient param", - "event": [ - { - "listen": "test", - "script": { - "id": "010c0cf6-8d5b-4fe3-8b92-b2009ea43a3e", - "type": "text/javascript", - "exec": [ - "const orderFeeRecipientEnvKey = 'orderFeeRecipient';", - "const referenceOrderFeeRecipientAddress = pm.environment.get(orderFeeRecipientEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orders are properly filtered', function() {", - " _.forEach(responseJsonData, function(order) {", - " const returnedFeeRecipientAddress = _.get(order, 'feeRecipient');", - " pm.expect(referenceOrderFeeRecipientAddress).to.be.equal(returnedFeeRecipientAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/orders?feeRecipient={{orderFeeRecipient}}", - "host": ["{{url}}"], - "path": ["orders"], - "query": [ - { - "key": "feeRecipient", - "value": "{{orderFeeRecipient}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "4eafcc26-fb01-4182-b963-67a0b418fcbc", - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "id": "d28effd1-4a73-4ee8-82cc-21b1ab06928d", - "type": "text/javascript", - "exec": [ - "const schema = tv4.getSchema('/signedOrdersSchema');", - "const responseJsonData = pm.response.json();", - "", - "pm.test('Schema is valid', function() {", - " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;", - "});", - "" - ] - } - } - ] - }, - { - "name": "GET /order", - "description": "", - "item": [ - { - "name": "orderHash param", - "event": [ - { - "listen": "test", - "script": { - "id": "18876df2-384e-43d5-93a1-7e24571e1308", - "type": "text/javascript", - "exec": [ - "const orderEnvKey = 'order';", - "const referenceOrderString = pm.environment.get(orderEnvKey);", - "const referenceOrderJson = JSON.parse(referenceOrderString);", - "const orderPropertyNames = [", - " 'maker',", - " 'taker',", - " 'makerFee',", - " 'takerFee',", - " 'makerTokenAmount',", - " 'takerTokenAmount',", - " 'makerTokenAddress',", - " 'takerTokenAddress',", - " 'salt',", - " 'feeRecipient',", - " 'expirationUnixTimestampSec',", - " 'exchangeContractAddress'", - "];", - "const signaturePropertyNames = [", - " 'v',", - " 'r',", - " 's'", - "];", - "const returnedOrderJson = pm.response.json();", - "pm.test('Order is properly retreived', function() {", - " _.forEach(orderPropertyNames, function(propertyName) {", - " const returnedProperty = _.get(returnedOrderJson, propertyName);", - " const referenceProperty = _.get(referenceOrderJson, propertyName);", - " pm.expect(returnedProperty).to.be.equal(referenceProperty);", - " });", - " const returnedSignature = _.get(returnedOrderJson, 'ecSignature');", - " const referenceSignature = _.get(returnedOrderJson, 'ecSignature');", - " _.forEach(signaturePropertyNames, function(propertyName) {", - " const returnedSignatureProperty = _.get(returnedSignature, propertyName);", - " const referenceSignatureProperty = _.get(referenceSignature, propertyName);", - " pm.expect(returnedSignatureProperty).to.be.equal(referenceSignatureProperty);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": "{{url}}/order/{{orderHash}}", - "host": ["{{url}}"], - "path": ["order", "{{orderHash}}"] - }, - "description": "Retrieves a specific order by orderHash." - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "e356d2ff-d105-42c1-b679-d9d917dcd68d", - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "id": "8d2d4717-6f76-47ab-8e5a-f383192f6ee4", - "type": "text/javascript", - "exec": [ - "const schema = tv4.getSchema('/SignedOrder');", - "const responseJsonData = pm.response.json();", - "", - "pm.test('Schema is valid', function() {", - " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;", - "});", - "" - ] - } - } - ] - }, - { - "name": "GET /orderbook", - "description": "", - "item": [ - { - "name": "baseTokenAddress and quoteTokenAddress params", - "event": [ - { - "listen": "test", - "script": { - "id": "9ed05327-1a2f-4e50-b4aa-e21f961dbe78", - "type": "text/javascript", - "exec": [ - "const baseTokenEnvKey = 'tokenContractAddress2';", - "const quoteTokenEnvKey = 'tokenContractAddress1';", - "const baseTokenAddress = pm.environment.get(baseTokenEnvKey);", - "const quoteTokenAddress = pm.environment.get(quoteTokenEnvKey);", - "const responseJsonData = pm.response.json();", - "pm.test('Orderbook is properly filtered', function() {", - " const bids = _.get(responseJsonData, 'bids');", - " const asks = _.get(responseJsonData, 'asks');", - " _.forEach(bids, function(order) {", - " const makerTokenAddress = _.get(order, 'makerTokenAddress');", - " const takerTokenAddress = _.get(order, 'takerTokenAddress');", - " pm.expect(makerTokenAddress).to.be.equal(quoteTokenAddress);", - " pm.expect(takerTokenAddress).to.be.equal(baseTokenAddress);", - " });", - " _.forEach(asks, function(order) {", - " const makerTokenAddress = _.get(order, 'makerTokenAddress');", - " const takerTokenAddress = _.get(order, 'takerTokenAddress');", - " pm.expect(makerTokenAddress).to.be.equal(baseTokenAddress);", - " pm.expect(takerTokenAddress).to.be.equal(quoteTokenAddress);", - " });", - "});", - "" - ] - } - } - ], - "request": { - "method": "GET", - "header": [], - "body": {}, - "url": { - "raw": - "{{url}}/orderbook?baseTokenAddress={{tokenContractAddress2}}"eTokenAddress={{tokenContractAddress1}}", - "host": ["{{url}}"], - "path": ["orderbook"], - "query": [ - { - "key": "baseTokenAddress", - "value": "{{tokenContractAddress2}}", - "equals": true - }, - { - "key": "quoteTokenAddress", - "value": "{{tokenContractAddress1}}", - "equals": true - } - ] - }, - "description": - "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional." - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "bdf90dbc-9217-4089-8bc0-351baadddd3e", - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "id": "d5080a34-57c4-4d5d-8e01-5e79599282ec", - "type": "text/javascript", - "exec": [ - "const schema = tv4.getSchema('/RelayerApiOrderBookResponse');", - "const responseJsonData = pm.response.json();", - "", - "pm.test('Schema is valid', function() {", - " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;", - "});", - "" - ] - } - } - ] - }, - { - "name": "POST /fees", - "description": "", - "item": [ - { - "name": "default request", - "request": { - "method": "POST", - "header": [ - { - "key": "Content-Type", - "value": "application/json" - } - ], - "body": { - "mode": "raw", - "raw": - "{\n \"exchangeContractAddress\": \"0x12459c951127e0c374ff9105dda097662a027093\",\n \"maker\": \"0x9e56625509c2f60af937f23b7b532600390e8c8b\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"makerTokenAddress\": \"0x323b5d4c32345ced77393b3530b1eed0f346429d\",\n \"takerTokenAddress\": \"0xef7fff64389b814a946f3e92105513705ca6b990\",\n \"makerTokenAmount\": \"10000000000000000\",\n \"takerTokenAmount\": \"20000000000000000\",\n \"expirationUnixTimestampSec\": \"42\",\n \"salt\": \"67006738228878699843088602623665307406148487219438534730168799356281242528500\"\n}" - }, - "url": { - "raw": "{{url}}/fees", - "host": ["{{url}}"], - "path": ["fees"] - }, - "description": - "Given an unsigned order without the fee-related properties, returns the required feeRecipient, makerFee, and takerFee of that order." - }, - "response": [] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "75d66506-0fa9-4b0e-982b-ef53bf3310f8", - "type": "text/javascript", - "exec": [""] - } - }, - { - "listen": "test", - "script": { - "id": "4c5f9f7b-8635-4bdb-9240-a74754a2de4f", - "type": "text/javascript", - "exec": [ - "const schema = tv4.getSchema('/RelayerApiFeesResponse');", - "const responseJsonData = pm.response.json();", - "", - "pm.test('Schema is valid', function() {", - " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;", - "});", - "" - ] - } - } - ] - } - ], - "event": [ - { - "listen": "prerequest", - "script": { - "id": "da60f639-df79-4f4d-9861-79219f5fc341", - "type": "text/javascript", - "exec": [ - "const schemaKeysString = pm.environment.get('schemaKeys');", - "const schemaKeys = JSON.parse(schemaKeysString);", - "_.forEach(schemaKeys, function(schemaKey) {", - " const schemaString = pm.environment.get(schemaKey);", - " const schema = JSON.parse(schemaString);", - " tv4.addSchema(schema);", - "});", - "" - ] - } - }, - { - "listen": "test", - "script": { - "id": "b4917e72-ac87-421d-b7a5-21b64285ba5b", - "type": "text/javascript", - "exec": [ - "pm.test('Has Content-Type header with value application/json', function () {", - " pm.response.to.have.header('Content-Type');", - " const contentType = postman.getResponseHeader('Content-Type');", - " pm.expect(contentType).to.include('application/json');", - "});", - "" - ] - } - } - ] -} diff --git a/packages/sra-report/src/contract_addresses/kovan_addresses.ts b/packages/sra-report/src/contract_addresses/kovan_addresses.ts deleted file mode 100644 index e06568f52..000000000 --- a/packages/sra-report/src/contract_addresses/kovan_addresses.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const addresses = { - WETH: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', - ZRX: '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570', - EXCHANGE: '0x90fe2af704b34e0224bf2299c838e04d4dcf1364', -}; diff --git a/packages/sra-report/src/contract_addresses/mainnet_addresses.ts b/packages/sra-report/src/contract_addresses/mainnet_addresses.ts deleted file mode 100644 index e9aa0f167..000000000 --- a/packages/sra-report/src/contract_addresses/mainnet_addresses.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const addresses = { - WETH: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - ZRX: '0xe41d2489571d322189246dafa5ebde1f4699f498', - EXCHANGE: '0x12459c951127e0c374ff9105dda097662a027093', -}; diff --git a/packages/sra-report/src/contract_addresses/rinkeby_addresses.ts b/packages/sra-report/src/contract_addresses/rinkeby_addresses.ts deleted file mode 100644 index b1e0848d0..000000000 --- a/packages/sra-report/src/contract_addresses/rinkeby_addresses.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const addresses = { - WETH: '0xc778417e063141139fce010982780140aa0cd5ab', - ZRX: '0x00f58d6d585f84b2d7267940cede30ce2fe6eae8', - EXCHANGE: '0x1d16ef40fac01cec8adac2ac49427b9384192c05', -}; diff --git a/packages/sra-report/src/contract_addresses/ropsten_addresses.ts b/packages/sra-report/src/contract_addresses/ropsten_addresses.ts deleted file mode 100644 index 80e6e5e7e..000000000 --- a/packages/sra-report/src/contract_addresses/ropsten_addresses.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const addresses = { - WETH: '0xc778417e063141139fce010982780140aa0cd5ab', - ZRX: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d', - EXCHANGE: '0x479cc461fecd078f766ecc58533d6f69580cf3ac', -}; diff --git a/packages/sra-report/src/globals.d.ts b/packages/sra-report/src/globals.d.ts deleted file mode 100644 index 783b92913..000000000 --- a/packages/sra-report/src/globals.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.json' { - const value: any; - export default value; -} diff --git a/packages/sra-report/src/index.ts b/packages/sra-report/src/index.ts deleted file mode 100644 index b23b6c8d2..000000000 --- a/packages/sra-report/src/index.ts +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env node -import { assert } from '@0xproject/assert'; -import { logUtils } from '@0xproject/utils'; -import chalk from 'chalk'; -import * as _ from 'lodash'; -import * as yargs from 'yargs'; - -import * as sraReportCollectionJSON from '../../postman_collections/sra_report.postman_collection.json'; - -import { postmanEnvironmentFactory } from './postman_environment_factory'; -import { utils } from './utils'; - -const DEFAULT_NETWORK_ID = 1; -const networkNameToId: { [networkName: string]: number } = { - mainnet: 1, - ropsten: 3, - rinkeby: 4, - kovan: 42, -}; -const SUPPORTED_NETWORK_IDS = [ - networkNameToId.mainnet, - networkNameToId.ropsten, - networkNameToId.rinkeby, - networkNameToId.kovan, -]; - -// extract command line arguments -const args = yargs - .option('endpoint-url', { - alias: ['e'], - describe: 'API endpoint url to test for standard relayer API compliance', - type: 'string', - demandOption: true, - }) - .option('output', { - alias: ['o', 'out'], - describe: 'The relative path to write the report generated by the collection run, prints to console by default', - type: 'string', - normalize: true, - demandOption: false, - }) - .option('network-id', { - alias: ['n'], - describe: 'ID of the network that the API is serving orders from', - type: 'number', - default: DEFAULT_NETWORK_ID, - }) - .option('environment', { - alias: ['env'], - describe: 'The relative path to a postman environment file for the collection run', - type: 'string', - normalize: true, - demandOption: false, - }) - .option('export-collection', { - alias: ['ec'], - describe: 'The relative path to write the postman collection file used by the collection run', - type: 'string', - normalize: true, - demandOption: false, - }) - .option('export-environment', { - alias: ['ee'], - describe: 'The relative path to write the postman environment file used by the collection run', - type: 'string', - normalize: true, - demandOption: false, - }) - .example( - "$0 --endpoint-url 'http://api.example.com' --out 'path/to/report.json' --network-id 42 --environment 'path/to/custom/environment.json' --export-collection 'path/to/collection.json' --export-environment 'path/to/environment.json'", - 'Full usage example', - ).argv; -// perform extra validation on command line arguments -try { - assert.isWebUri('args', args.endpointUrl); -} catch (err) { - logUtils.log(`${chalk.red(`Invalid url format:`)} ${args.endpointUrl}`); - process.exit(1); -} -if (!_.includes(SUPPORTED_NETWORK_IDS, args.networkId)) { - logUtils.log(`${chalk.red(`Unsupported network id:`)} ${args.networkId}`); - logUtils.log(`${chalk.bold(`Supported network ids:`)} ${SUPPORTED_NETWORK_IDS}`); - process.exit(1); -} -const mainAsync = async () => { - const newmanReporterOptions = !_.isUndefined(args.output) - ? { - reporters: 'json', - reporter: { - json: { - export: args.output, - }, - }, - } - : { - reporters: 'cli', - }; - const environment = !_.isUndefined(args.environment) - ? args.environment - : await postmanEnvironmentFactory.createPostmanEnvironmentAsync(args.endpointUrl, args.networkId); - const newmanRunOptions = { - collection: sraReportCollectionJSON, - environment, - exportCollection: args.exportCollection, - exportEnvironment: args.exportEnvironment, - ...newmanReporterOptions, - }; - await utils.newmanRunAsync(newmanRunOptions); -}; - -mainAsync().catch(logUtils.log.bind(logUtils)); diff --git a/packages/sra-report/src/postman_environment_factory.ts b/packages/sra-report/src/postman_environment_factory.ts deleted file mode 100644 index 3dcb97829..000000000 --- a/packages/sra-report/src/postman_environment_factory.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { HttpClient } from '@0xproject/connect'; -import { Schema, schemas as schemasByName } from '@0xproject/json-schemas'; -import { getOrderHashHex } from '@0xproject/order-utils'; -import { logUtils } from '@0xproject/utils'; -import chalk from 'chalk'; -import * as _ from 'lodash'; - -import { addresses as kovanAddresses } from './contract_addresses/kovan_addresses'; -import { addresses as mainnetAddresses } from './contract_addresses/mainnet_addresses'; -import { addresses as rinkebyAddresses } from './contract_addresses/rinkeby_addresses'; -import { addresses as ropstenAddresses } from './contract_addresses/ropsten_addresses'; - -const ENVIRONMENT_NAME = 'SRA Report'; -const networkNameToId: { [networkName: string]: number } = { - mainnet: 1, - ropsten: 3, - rinkeby: 4, - kovan: 42, -}; - -export interface EnvironmentValue { - key: string; - value: string; - enabled: true; - type: 'text'; -} - -export interface Environment { - name: string; - values: EnvironmentValue[]; -} - -export interface Addresses { - WETH: string; - ZRX: string; - EXCHANGE: string; -} - -export const postmanEnvironmentFactory = { - /** - * Dynamically generates a postman environment (https://www.getpostman.com/docs/v6/postman/environments_and_globals/manage_environments) - * When running the postman collection via newman, we provide it a set of environment variables - * These variables include: - * - 0x JSON schemas for response body validation - * - Contract addresses based on the network id for making specific queries (ex. baseTokenAddress=ZRX_address) - * - Order properties for making specific queries (ex. maker=orderMaker) - */ - async createPostmanEnvironmentAsync(url: string, networkId: number): Promise { - const orderEnvironmentValues = await createOrderEnvironmentValuesAsync(url); - const allEnvironmentValues = _.concat( - createSchemaEnvironmentValues(), - createContractAddressEnvironmentValues(networkId), - orderEnvironmentValues, - createEnvironmentValue('url', url), - ); - const environment = { - name: ENVIRONMENT_NAME, - values: allEnvironmentValues, - }; - return environment; - }, -}; -function createSchemaEnvironmentValues(): EnvironmentValue[] { - const schemas: Schema[] = _.values(schemasByName); - const schemaEnvironmentValues = _.compact( - _.map(schemas, (schema: Schema) => { - if (_.isUndefined(schema.id)) { - return undefined; - } else { - const schemaKey = convertSchemaIdToKey(schema.id); - const stringifiedSchema = JSON.stringify(schema); - const schemaEnvironmentValue = createEnvironmentValue(schemaKey, stringifiedSchema); - return schemaEnvironmentValue; - } - }), - ); - const schemaKeys = _.map(schemaEnvironmentValues, (environmentValue: EnvironmentValue) => { - return environmentValue.key; - }); - const result = _.concat(schemaEnvironmentValues, createEnvironmentValue('schemaKeys', JSON.stringify(schemaKeys))); - return result; -} -function createContractAddressEnvironmentValues(networkId: number): EnvironmentValue[] { - const contractAddresses = getContractAddresses(networkId); - return [ - createEnvironmentValue('tokenContractAddress1', contractAddresses.WETH), - createEnvironmentValue('tokenContractAddress2', contractAddresses.ZRX), - createEnvironmentValue('exchangeContractAddress', contractAddresses.EXCHANGE), - ]; -} -async function createOrderEnvironmentValuesAsync(url: string): Promise { - const httpClient = new HttpClient(url); - const orders = await httpClient.getOrdersAsync(); - const orderIfExists = _.head(orders); - if (!_.isUndefined(orderIfExists)) { - return [ - createEnvironmentValue('order', JSON.stringify(orderIfExists)), - createEnvironmentValue('orderMaker', orderIfExists.maker), - createEnvironmentValue('orderTaker', orderIfExists.taker), - createEnvironmentValue('orderFeeRecipient', orderIfExists.feeRecipient), - createEnvironmentValue('orderHash', getOrderHashHex(orderIfExists)), - ]; - } else { - logUtils.log(`${chalk.red(`No orders from /orders found`)}`); - return [ - createEnvironmentValue('order', ''), - createEnvironmentValue('orderMaker', ''), - createEnvironmentValue('orderTaker', ''), - createEnvironmentValue('orderFeeRecipient', ''), - createEnvironmentValue('orderHash', ''), - ]; - } -} -function getContractAddresses(networkId: number): Addresses { - switch (networkId) { - case networkNameToId.mainnet: - return mainnetAddresses; - case networkNameToId.ropsten: - return ropstenAddresses; - case networkNameToId.rinkeby: - return rinkebyAddresses; - case networkNameToId.kovan: - return kovanAddresses; - default: - throw new Error('Unsupported network id'); - } -} -function convertSchemaIdToKey(schemaId: string): string { - let result = schemaId; - if (_.startsWith(result, '/')) { - result = result.substr(1); - } - result = `${result}Schema`; - return result; -} - -function createEnvironmentValue(key: string, value: string): EnvironmentValue { - return { - key, - value, - enabled: true, - type: 'text', - }; -} diff --git a/packages/sra-report/src/utils.ts b/packages/sra-report/src/utils.ts deleted file mode 100644 index 3a83a7ea0..000000000 --- a/packages/sra-report/src/utils.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { promisify } from '@0xproject/utils'; -import { NewmanRunSummary, run as newmanRun } from 'newman'; - -export const utils = { - newmanRunAsync: promisify(newmanRun), -}; diff --git a/packages/sra-report/test/environments/postman_environment.json b/packages/sra-report/test/environments/postman_environment.json deleted file mode 100644 index e26a47e5f..000000000 --- a/packages/sra-report/test/environments/postman_environment.json +++ /dev/null @@ -1,223 +0,0 @@ -{ - "id": "f23e415f-99a8-4d47-8796-6400af77d85f", - "name": "SRA Report", - "values": [ - { - "type": "any", - "value": "{\"id\":\"/Number\",\"type\":\"string\",\"pattern\":\"^\\\\d+(\\\\.\\\\d+)?$\"}", - "key": "NumberSchema" - }, - { - "type": "any", - "value": "{\"id\":\"/Address\",\"type\":\"string\",\"pattern\":\"^0x[0-9a-f]{40}$\"}", - "key": "AddressSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/ECSignature\",\"properties\":{\"v\":{\"type\":\"number\",\"minimum\":27,\"maximum\":28},\"r\":{\"$ref\":\"/ECSignatureParameter\"},\"s\":{\"$ref\":\"/ECSignatureParameter\"}},\"required\":[\"v\",\"r\",\"s\"],\"type\":\"object\"}", - "key": "ECSignatureSchema" - }, - { - "type": "any", - "value": "{\"id\":\"/ECSignatureParameter\",\"type\":\"string\",\"pattern\":\"^0[xX][0-9A-Fa-f]{64}$\"}", - "key": "ECSignatureParameterSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/IndexFilterValues\",\"additionalProperties\":{\"oneOf\":[{\"$ref\":\"/Number\"},{\"$ref\":\"/Address\"},{\"$ref\":\"/OrderHashSchema\"}]},\"type\":\"object\"}", - "key": "IndexFilterValuesSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/OrderCancellationRequests\",\"type\":\"array\",\"items\":{\"properties\":{\"order\":{\"$ref\":\"/Order\"},\"takerTokenCancelAmount\":{\"$ref\":\"/Number\"}},\"required\":[\"order\",\"takerTokenCancelAmount\"],\"type\":\"object\"}}", - "key": "OrderCancellationRequestsSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/OrderFillOrKillRequests\",\"type\":\"array\",\"items\":{\"properties\":{\"signedOrder\":{\"$ref\":\"/SignedOrder\"},\"fillTakerAmount\":{\"$ref\":\"/Number\"}},\"required\":[\"signedOrder\",\"fillTakerAmount\"],\"type\":\"object\"}}", - "key": "OrderFillOrKillRequestsSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/OrderFillRequests\",\"type\":\"array\",\"items\":{\"properties\":{\"signedOrder\":{\"$ref\":\"/SignedOrder\"},\"takerTokenFillAmount\":{\"$ref\":\"/Number\"}},\"required\":[\"signedOrder\",\"takerTokenFillAmount\"],\"type\":\"object\"}}", - "key": "OrderFillRequestsSchema" - }, - { - "type": "any", - "value": "{\"id\":\"/OrderHashSchema\",\"type\":\"string\",\"pattern\":\"^0x[0-9a-fA-F]{64}$\"}", - "key": "OrderHashSchemaSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/Order\",\"properties\":{\"maker\":{\"$ref\":\"/Address\"},\"taker\":{\"$ref\":\"/Address\"},\"makerFee\":{\"$ref\":\"/Number\"},\"takerFee\":{\"$ref\":\"/Number\"},\"makerTokenAmount\":{\"$ref\":\"/Number\"},\"takerTokenAmount\":{\"$ref\":\"/Number\"},\"makerTokenAddress\":{\"$ref\":\"/Address\"},\"takerTokenAddress\":{\"$ref\":\"/Address\"},\"salt\":{\"$ref\":\"/Number\"},\"feeRecipient\":{\"$ref\":\"/Address\"},\"expirationUnixTimestampSec\":{\"$ref\":\"/Number\"},\"exchangeContractAddress\":{\"$ref\":\"/Address\"}},\"required\":[\"maker\",\"taker\",\"makerFee\",\"takerFee\",\"makerTokenAmount\",\"takerTokenAmount\",\"salt\",\"feeRecipient\",\"expirationUnixTimestampSec\",\"exchangeContractAddress\"],\"type\":\"object\"}", - "key": "OrderSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/SignedOrder\",\"allOf\":[{\"$ref\":\"/Order\"},{\"properties\":{\"ecSignature\":{\"$ref\":\"/ECSignature\"}},\"required\":[\"ecSignature\"]}]}", - "key": "SignedOrderSchema" - }, - { - "type": "any", - "value": "{\"id\":\"/signedOrdersSchema\",\"type\":\"array\",\"items\":{\"$ref\":\"/SignedOrder\"}}", - "key": "signedOrdersSchemaSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/BlockParam\",\"oneOf\":[{\"type\":\"number\"},{\"enum\":[\"latest\",\"earliest\",\"pending\"]}]}", - "key": "BlockParamSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/BlockRange\",\"properties\":{\"fromBlock\":{\"$ref\":\"/BlockParam\"},\"toBlock\":{\"$ref\":\"/BlockParam\"}},\"type\":\"object\"}", - "key": "BlockRangeSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/Token\",\"properties\":{\"name\":{\"type\":\"string\"},\"symbol\":{\"type\":\"string\"},\"decimals\":{\"type\":\"number\"},\"address\":{\"$ref\":\"/Address\"}},\"required\":[\"name\",\"symbol\",\"decimals\",\"address\"],\"type\":\"object\"}", - "key": "TokenSchema" - }, - { - "type": "any", - "value": "{\"id\":\"/JsNumber\",\"type\":\"number\",\"minimum\":0}", - "key": "JsNumberSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/TxData\",\"properties\":{\"from\":{\"$ref\":\"/Address\"},\"to\":{\"$ref\":\"/Address\"},\"value\":{\"oneOf\":[{\"$ref\":\"/Number\"},{\"$ref\":\"/JsNumber\"}]},\"gas\":{\"oneOf\":[{\"$ref\":\"/Number\"},{\"$ref\":\"/JsNumber\"}]},\"gasPrice\":{\"oneOf\":[{\"$ref\":\"/Number\"},{\"$ref\":\"/JsNumber\"}]},\"data\":{\"type\":\"string\",\"pattern\":\"^0x[0-9a-f]*$\"},\"nonce\":{\"type\":\"number\",\"minimum\":0}},\"required\":[\"from\"],\"type\":\"object\",\"additionalProperties\":false}", - "key": "TxDataSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiErrorResponse\",\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"number\"},\"reason\":{\"type\":\"string\"},\"validationErrors\":{\"type\":\"array\",\"items\":{\"type\":\"object\",\"properties\":{\"field\":{\"type\":\"string\"},\"code\":{\"type\":\"number\"},\"reason\":{\"type\":\"string\"}},\"required\":[\"field\",\"code\",\"reason\"]}}},\"required\":[\"code\",\"reason\"]}", - "key": "RelayerApiErrorResponseSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiFeesPayload\",\"type\":\"object\",\"properties\":{\"exchangeContractAddress\":{\"$ref\":\"/Address\"},\"maker\":{\"$ref\":\"/Address\"},\"taker\":{\"$ref\":\"/Address\"},\"makerTokenAddress\":{\"$ref\":\"/Address\"},\"takerTokenAddress\":{\"$ref\":\"/Address\"},\"makerTokenAmount\":{\"$ref\":\"/Number\"},\"takerTokenAmount\":{\"$ref\":\"/Number\"},\"expirationUnixTimestampSec\":{\"$ref\":\"/Number\"},\"salt\":{\"$ref\":\"/Number\"}},\"required\":[\"exchangeContractAddress\",\"maker\",\"taker\",\"makerTokenAddress\",\"takerTokenAddress\",\"expirationUnixTimestampSec\",\"salt\"]}", - "key": "RelayerApiFeesPayloadSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiFeesResponse\",\"type\":\"object\",\"properties\":{\"makerFee\":{\"$ref\":\"/Number\"},\"takerFee\":{\"$ref\":\"/Number\"},\"feeRecipient\":{\"$ref\":\"/Address\"}},\"required\":[\"makerFee\",\"takerFee\",\"feeRecipient\"]}", - "key": "RelayerApiFeesResponseSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderBookResponse\",\"type\":\"object\",\"properties\":{\"bids\":{\"$ref\":\"/signedOrdersSchema\"},\"asks\":{\"$ref\":\"/signedOrdersSchema\"}},\"required\":[\"bids\",\"asks\"]}", - "key": "RelayerApiOrderBookResponseSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiTokenPairsResponse\",\"type\":\"array\",\"items\":{\"properties\":{\"tokenA\":{\"$ref\":\"/RelayerApiTokenTradeInfo\"},\"tokenB\":{\"$ref\":\"/RelayerApiTokenTradeInfo\"}},\"required\":[\"tokenA\",\"tokenB\"],\"type\":\"object\"}}", - "key": "RelayerApiTokenPairsResponseSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiTokenTradeInfo\",\"type\":\"object\",\"properties\":{\"address\":{\"$ref\":\"/Address\"},\"minAmount\":{\"$ref\":\"/Number\"},\"maxAmount\":{\"$ref\":\"/Number\"},\"precision\":{\"type\":\"number\"}},\"required\":[\"address\"]}", - "key": "RelayerApiTokenTradeInfoSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderbookChannelSubscribe\",\"type\":\"object\",\"properties\":{\"type\":{\"enum\":[\"subscribe\"]},\"channel\":{\"enum\":[\"orderbook\"]},\"requestId\":{\"type\":\"number\"},\"payload\":{\"$ref\":\"/RelayerApiOrderbookChannelSubscribePayload\"}},\"required\":[\"type\",\"channel\",\"requestId\",\"payload\"]}", - "key": "RelayerApiOrderbookChannelSubscribeSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderbookChannelSubscribePayload\",\"type\":\"object\",\"properties\":{\"baseTokenAddress\":{\"$ref\":\"/Address\"},\"quoteTokenAddress\":{\"$ref\":\"/Address\"},\"snapshot\":{\"type\":\"boolean\"},\"limit\":{\"type\":\"number\"}},\"required\":[\"baseTokenAddress\",\"quoteTokenAddress\"]}", - "key": "RelayerApiOrderbookChannelSubscribePayloadSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderbookChannelUpdate\",\"type\":\"object\",\"properties\":{\"type\":{\"enum\":[\"update\"]},\"channel\":{\"enum\":[\"orderbook\"]},\"requestId\":{\"type\":\"number\"},\"payload\":{\"$ref\":\"/SignedOrder\"}},\"required\":[\"type\",\"channel\",\"requestId\",\"payload\"]}", - "key": "RelayerApiOrderbookChannelUpdateSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderbookChannelSnapshot\",\"type\":\"object\",\"properties\":{\"type\":{\"enum\":[\"snapshot\"]},\"channel\":{\"enum\":[\"orderbook\"]},\"requestId\":{\"type\":\"number\"},\"payload\":{\"$ref\":\"/RelayerApiOrderbookChannelSnapshotPayload\"}},\"required\":[\"type\",\"channel\",\"requestId\",\"payload\"]}", - "key": "RelayerApiOrderbookChannelSnapshotSchema" - }, - { - "type": "any", - "value": - "{\"id\":\"/RelayerApiOrderbookChannelSnapshotPayload\",\"type\":\"object\",\"properties\":{\"bids\":{\"$ref\":\"/signedOrdersSchema\"},\"asks\":{\"$ref\":\"/signedOrdersSchema\"}},\"required\":[\"bids\",\"asks\"]}", - "key": "RelayerApiOrderbookChannelSnapshotPayloadSchema" - }, - { - "type": "any", - "value": - "[\"NumberSchema\",\"AddressSchema\",\"ECSignatureSchema\",\"ECSignatureParameterSchema\",\"IndexFilterValuesSchema\",\"OrderCancellationRequestsSchema\",\"OrderFillOrKillRequestsSchema\",\"OrderFillRequestsSchema\",\"OrderHashSchemaSchema\",\"OrderSchema\",\"SignedOrderSchema\",\"signedOrdersSchemaSchema\",\"BlockParamSchema\",\"BlockRangeSchema\",\"TokenSchema\",\"JsNumberSchema\",\"TxDataSchema\",\"RelayerApiErrorResponseSchema\",\"RelayerApiFeesPayloadSchema\",\"RelayerApiFeesResponseSchema\",\"RelayerApiOrderBookResponseSchema\",\"RelayerApiTokenPairsResponseSchema\",\"RelayerApiTokenTradeInfoSchema\",\"RelayerApiOrderbookChannelSubscribeSchema\",\"RelayerApiOrderbookChannelSubscribePayloadSchema\",\"RelayerApiOrderbookChannelUpdateSchema\",\"RelayerApiOrderbookChannelSnapshotSchema\",\"RelayerApiOrderbookChannelSnapshotPayloadSchema\"]", - "key": "schemaKeys" - }, - { - "type": "any", - "value": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "key": "tokenContractAddress1" - }, - { - "type": "any", - "value": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "key": "tokenContractAddress2" - }, - { - "type": "any", - "value": "0x12459c951127e0c374ff9105dda097662a027093", - "key": "exchangeContractAddress" - }, - { - "type": "any", - "value": - "{\"orderHash\":\"0xe91e990bab4c9c6bd60ff3673222390e3da8b7bd9a50eab98a8cb20723b24ee1\",\"exchangeContractAddress\":\"0x12459c951127e0c374ff9105dda097662a027093\",\"maker\":\"0x93690d55b14d701c259ba7960395c095aa52c3a8\",\"taker\":\"0x0000000000000000000000000000000000000000\",\"makerTokenAddress\":\"0x2956356cd2a2bf3202f771f50d3d14a367b48070\",\"takerTokenAddress\":\"0x0abdace70d3790235af448c88547603b945604ea\",\"feeRecipient\":\"0xa258b39954cef5cb142fd567a46cddb31a670124\",\"makerTokenAmount\":\"2926675830000000000\",\"takerTokenAmount\":\"24386933000000000000000\",\"makerFee\":\"18419638100000000000\",\"takerFee\":\"35812978500000000000\",\"expirationUnixTimestampSec\":\"9223372036854775807\",\"salt\":\"89583415499996246176114840147523733506098603782358761236056286417408784066968\",\"ecSignature\":{\"r\":\"0x32eb5bbf713210274ddd885e6b555699bc0189676ff73a4dc98c4cac41d3a6a6\",\"s\":\"0x193eb9440df49dc7817b6142c0be021cd1f9fc0916d86c7b49e9e07a402f3645\",\"v\":28}}", - "key": "order" - }, - { - "type": "any", - "value": "0x93690d55b14d701c259ba7960395c095aa52c3a8", - "key": "orderMaker" - }, - { - "type": "any", - "value": "0x0000000000000000000000000000000000000000", - "key": "orderTaker" - }, - { - "type": "any", - "value": "0xa258b39954cef5cb142fd567a46cddb31a670124", - "key": "orderFeeRecipient" - }, - { - "type": "any", - "value": "0xe91e990bab4c9c6bd60ff3673222390e3da8b7bd9a50eab98a8cb20723b24ee1", - "key": "orderHash" - }, - { - "type": "any", - "value": "https://example.com", - "key": "url" - } - ], - "_postman_variable_scope": "environment", - "_postman_exported_at": "2018-03-10T23:53:03.913Z", - "_postman_exported_using": "Newman/3.9.3" -} diff --git a/packages/sra-report/test/fixtures/v0/token_pairs/default_request.json b/packages/sra-report/test/fixtures/v0/token_pairs/default_request.json deleted file mode 100644 index cd19be1e1..000000000 --- a/packages/sra-report/test/fixtures/v0/token_pairs/default_request.json +++ /dev/null @@ -1,3698 +0,0 @@ -[ - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x01b3ec4aae1b8729529beb4965f27d008788b0eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0371a82e4a9d0a4312f3ee2ac9c6958512891372", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x076c97e1c869072ee22f8c91978c99b4bcb02591", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x09d8b66c48424324b25754a873e290cae5dca439", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0abdace70d3790235af448c88547603b945604ea", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0cf0ee63788a0849fe5297f3407f701e122cc023", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0e0989b1f9b8a38983c2ba8053269ca62ec9b195", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f513ffb4926ff82d7f60a05069047aca295c413", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1063ce524265d5a3a624f4914acd573dd89ce988", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x106aa49295b525fcf959aa75ec3f7dcbf5352f1c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x107c4504cd79c5d2696ea0030a8dd4e92601b82e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1183f92a5624d68e85ffb9170f16bf0443b4c242", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12b19d3e2ccc14da04fae33e63652ce469b3f2fd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x168296bb09e24a88805cb9c33356536b980d3fc5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1776e1f26f98b1a5df9cd347953a26dd3cb46671", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27054b13b1b798b345b591a4d22e6562d47ea75a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27695e09149adc738a978e9a678f99e4c39e9eb9", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27dce1ec4d3f72c3e457cc50354f1f975ddef488", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27f610bf36eca0939093343ac28b1534a721dbb4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x340d2bde5eb28c1eed91b2f790723e3b160613b7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3597bfd533a99c9aa083587b074434e61eb0a258", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3618516f45cd3c913f81f9987af41077932bc40d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x386467f1f3ddbe832448650418311a479eecfc57", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3883f5e181fccaf8410fa61e12b59bad963fb645", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x399a0e6fbeb3d74c85357439f4c8aed9678a5cbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x39bb259f66e1c59d5abef88375979b4d20d98022", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4156d3342d5c385a87d264f90653733592000581", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x41e5560054824ea6b0732e656e3ad64e20e94e45", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x42d6622dece394b54999fbd73d108123806f6a18", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x44f588aeeb8c44471439d1270b3603c66a9262f1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4d8fc1453a0f359e99c9675954e656d80d996fbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df47b4969b2911c966506e3592c41389493953b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df812f6064def1e5e029f1ca858777cc98d2d81", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x52a7cb918c11a16958be40cba7e31e32a499a465", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x533ef0984b2faa227acc620c67cce12aa39cd8cd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x554c20b7c486beee439277b4540a434566dc4c02", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x56ba2ee7890461f463f7be02aac3099f6d5811a8", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5732046a883704404f284ce41ffadd5b007fd668", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x595832f8fc6bf59c85c527fec3740a1b7a361269", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5af2be193a6abca9c8817001f45744777db30756", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5b2e4a700dfbc560061e957edec8f6eeeb74a320", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5e3346444010135322268a4630d2ed5f8d09446c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x607f4c5bb672230e8672085532f7e901544a7375", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x614ea929892ea43d3ea2c5e3311b01cc589bad6c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6425c6be902d692ae2db752b3c268afadb099d3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x672a1ad4f667fb18a333af13667aa0af1f5b5bdd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6781a0f84c7e9e846dcb84a9a5bd49333067b104", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6810e776880c02933d47db1b9fc05908e5386b96", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x744d70fdbe2ba4cf95131626614a1763df805b9e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7654915a1b82d6d2d0afc37c52af556ea8983c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7b69b78cc7fee48202c208609ae6d1f78ce42e13", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7d4b8cce0591c9044a22ee543533b72e976e36c3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x80fb784b7ed66730e8b1dbd9820afd29931aab03", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x814964b1bceaf24e26296d031eadf134a2ca4105", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x865e3707a580f9db89304005cddd050ade8873eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x88fcfbc22c6d3dbaa25af478c578978339bde77a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8a854288a5976036a725879164ca3e91d30c6a1b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8ae4bf2c33a8e667de34b54938b0ccd03eb8cc06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8eb24319393716668d768dcec29356ae9cffe285", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8f8221afbb33998d8584a2b05749ba73c37a938a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9214ec02cb71cba0ada6896b8da260736a67ab10", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x960b236a07cf122663c4303350609a66a7b288c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9a005c9a89bd72a4bd27721e7a09a3c11d2b03c4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa5fd1a791c4dfcaacc963d4f73c6ae5824149ea7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa8006c4ca56f24d6836727d106349320db7fef82", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa87c3ec87eb802aad080df0adb331e504d327e5d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xab16e0d25c06cb376259cc18c1de4aca57605589", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xac3211a5025414af2866ff09c23fc18bc97e79b1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xacfa209fb73bf3dd5bbfb1101b9bc999c49062a5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb24754be79281553dc1adc160ddf5cd9b74361a4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb3bd49e28f8f832b8d1e246106991e546c323502", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb45a50545beeab73f38f31e5973768c421805e5e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb4efd85c19999d84251304bda99e90b92300bd93", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5c0e43a6330b9eb904ec57ea24d70269ae4652e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb62d18dea74045e822352ce4b3ee77319dc5ff2f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb98d4c97425d9908e66e53a6fdf673acca0be986", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba2184520a1cc49a6159c57e61e1844e085615b6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba5f11b16b155792cf3b2e6880e8706859a8aeb6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbdc5bac39dbe132b1e030e898ae3830017d7d969", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbf2179859fc6d5bee9bf9158632dc51678a4100e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc27a2f05fa577a83ba0fdb4c38443c0718356501", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc438b4c0dfbb1593be6dee03bbd1a84bb3aa6213", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc66ea802717bfb9833400264dd12c2bceaa34a6d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc997d07b0bc607b6d1bcb6fb9d4a5579c466c3e5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd26114cd6ee289accf82350c8d8487fedb8a0c07", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd2d6158683aee4cc838067727209a0aaf4359de3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4c435f5b09f855c3317c8524cb1f586e42795fa", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd8912c10681d8b21fd3742244f44658dba12264e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe2e6d4be086c6938b53b22144855eef674281639", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe94327d07fc17907b4db788e5adf2ed424addff6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea097a2b1db00627b2fa17460ad260c016016977", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea1f346faf023f974eb5adaf088bbcdf02d761f4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea38eaa3c86c8f9b751533ba2e562deb9acded40", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeab43193cf0623073ca89db9b712796356fa7414", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb2da9fac54284cea731d1f10bb34eecb3c00c14", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb7c20027172e5d143fb030d50f91cece2d1485d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xef2463099360a085f1f10b076ed72ef625497a06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf433089366899d83a9f26a773d59ec7ecf30355e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6b55acbbc49f4524aa48d19281a9a77c54de10f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6cfe53d6febaeea051f400ff5fc14f0cbbdaca1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf7b098298f7c69fc14610bf71d5e02c60792894c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf970b8e36e23f7fc3fd752eea86f8be8d83375a6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xfec0cf7fe078a500abf15f1284958f22049c2c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x01b3ec4aae1b8729529beb4965f27d008788b0eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0371a82e4a9d0a4312f3ee2ac9c6958512891372", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x076c97e1c869072ee22f8c91978c99b4bcb02591", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x09d8b66c48424324b25754a873e290cae5dca439", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0abdace70d3790235af448c88547603b945604ea", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0cf0ee63788a0849fe5297f3407f701e122cc023", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0e0989b1f9b8a38983c2ba8053269ca62ec9b195", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f513ffb4926ff82d7f60a05069047aca295c413", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1063ce524265d5a3a624f4914acd573dd89ce988", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x106aa49295b525fcf959aa75ec3f7dcbf5352f1c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x107c4504cd79c5d2696ea0030a8dd4e92601b82e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1183f92a5624d68e85ffb9170f16bf0443b4c242", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12b19d3e2ccc14da04fae33e63652ce469b3f2fd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x168296bb09e24a88805cb9c33356536b980d3fc5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1776e1f26f98b1a5df9cd347953a26dd3cb46671", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27054b13b1b798b345b591a4d22e6562d47ea75a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27695e09149adc738a978e9a678f99e4c39e9eb9", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27dce1ec4d3f72c3e457cc50354f1f975ddef488", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27f610bf36eca0939093343ac28b1534a721dbb4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x340d2bde5eb28c1eed91b2f790723e3b160613b7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3597bfd533a99c9aa083587b074434e61eb0a258", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3618516f45cd3c913f81f9987af41077932bc40d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x386467f1f3ddbe832448650418311a479eecfc57", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3883f5e181fccaf8410fa61e12b59bad963fb645", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x399a0e6fbeb3d74c85357439f4c8aed9678a5cbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x39bb259f66e1c59d5abef88375979b4d20d98022", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4156d3342d5c385a87d264f90653733592000581", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x41e5560054824ea6b0732e656e3ad64e20e94e45", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x42d6622dece394b54999fbd73d108123806f6a18", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x44f588aeeb8c44471439d1270b3603c66a9262f1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4d8fc1453a0f359e99c9675954e656d80d996fbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df47b4969b2911c966506e3592c41389493953b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df812f6064def1e5e029f1ca858777cc98d2d81", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x52a7cb918c11a16958be40cba7e31e32a499a465", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x533ef0984b2faa227acc620c67cce12aa39cd8cd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x554c20b7c486beee439277b4540a434566dc4c02", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x56ba2ee7890461f463f7be02aac3099f6d5811a8", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5732046a883704404f284ce41ffadd5b007fd668", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x595832f8fc6bf59c85c527fec3740a1b7a361269", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5af2be193a6abca9c8817001f45744777db30756", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5b2e4a700dfbc560061e957edec8f6eeeb74a320", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5e3346444010135322268a4630d2ed5f8d09446c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x607f4c5bb672230e8672085532f7e901544a7375", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x614ea929892ea43d3ea2c5e3311b01cc589bad6c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6425c6be902d692ae2db752b3c268afadb099d3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x672a1ad4f667fb18a333af13667aa0af1f5b5bdd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6781a0f84c7e9e846dcb84a9a5bd49333067b104", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6810e776880c02933d47db1b9fc05908e5386b96", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x744d70fdbe2ba4cf95131626614a1763df805b9e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7654915a1b82d6d2d0afc37c52af556ea8983c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7b69b78cc7fee48202c208609ae6d1f78ce42e13", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7d4b8cce0591c9044a22ee543533b72e976e36c3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x80fb784b7ed66730e8b1dbd9820afd29931aab03", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x814964b1bceaf24e26296d031eadf134a2ca4105", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x865e3707a580f9db89304005cddd050ade8873eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x88fcfbc22c6d3dbaa25af478c578978339bde77a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8a854288a5976036a725879164ca3e91d30c6a1b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8ae4bf2c33a8e667de34b54938b0ccd03eb8cc06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8eb24319393716668d768dcec29356ae9cffe285", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8f8221afbb33998d8584a2b05749ba73c37a938a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9214ec02cb71cba0ada6896b8da260736a67ab10", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x960b236a07cf122663c4303350609a66a7b288c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9a005c9a89bd72a4bd27721e7a09a3c11d2b03c4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa5fd1a791c4dfcaacc963d4f73c6ae5824149ea7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa8006c4ca56f24d6836727d106349320db7fef82", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa87c3ec87eb802aad080df0adb331e504d327e5d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xab16e0d25c06cb376259cc18c1de4aca57605589", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xac3211a5025414af2866ff09c23fc18bc97e79b1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xacfa209fb73bf3dd5bbfb1101b9bc999c49062a5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb24754be79281553dc1adc160ddf5cd9b74361a4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb3bd49e28f8f832b8d1e246106991e546c323502", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb45a50545beeab73f38f31e5973768c421805e5e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb4efd85c19999d84251304bda99e90b92300bd93", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5c0e43a6330b9eb904ec57ea24d70269ae4652e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb62d18dea74045e822352ce4b3ee77319dc5ff2f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb98d4c97425d9908e66e53a6fdf673acca0be986", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba2184520a1cc49a6159c57e61e1844e085615b6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba5f11b16b155792cf3b2e6880e8706859a8aeb6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbdc5bac39dbe132b1e030e898ae3830017d7d969", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbf2179859fc6d5bee9bf9158632dc51678a4100e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc27a2f05fa577a83ba0fdb4c38443c0718356501", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc438b4c0dfbb1593be6dee03bbd1a84bb3aa6213", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc66ea802717bfb9833400264dd12c2bceaa34a6d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc997d07b0bc607b6d1bcb6fb9d4a5579c466c3e5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd26114cd6ee289accf82350c8d8487fedb8a0c07", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd2d6158683aee4cc838067727209a0aaf4359de3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4c435f5b09f855c3317c8524cb1f586e42795fa", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd8912c10681d8b21fd3742244f44658dba12264e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe2e6d4be086c6938b53b22144855eef674281639", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe94327d07fc17907b4db788e5adf2ed424addff6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea097a2b1db00627b2fa17460ad260c016016977", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea1f346faf023f974eb5adaf088bbcdf02d761f4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea38eaa3c86c8f9b751533ba2e562deb9acded40", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeab43193cf0623073ca89db9b712796356fa7414", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb2da9fac54284cea731d1f10bb34eecb3c00c14", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb7c20027172e5d143fb030d50f91cece2d1485d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xef2463099360a085f1f10b076ed72ef625497a06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf433089366899d83a9f26a773d59ec7ecf30355e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6b55acbbc49f4524aa48d19281a9a77c54de10f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6cfe53d6febaeea051f400ff5fc14f0cbbdaca1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf7b098298f7c69fc14610bf71d5e02c60792894c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf970b8e36e23f7fc3fd752eea86f8be8d83375a6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xfec0cf7fe078a500abf15f1284958f22049c2c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - } -] diff --git a/packages/sra-report/test/fixtures/v0/token_pairs/malformed.json b/packages/sra-report/test/fixtures/v0/token_pairs/malformed.json deleted file mode 100644 index 19e076c41..000000000 --- a/packages/sra-report/test/fixtures/v0/token_pairs/malformed.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "tokenA": { - "address": "4a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x01b3ec4aae1b8729529beb4965f27d008788b0eb", - "minAmount": "1", - "maxAmount": 999999999999999999999, - "precision": 8 - } - }, - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenX": { - "address": "0x0371a82e4a9d0a4312f3ee2ac9c6958512891372", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - } -] diff --git a/packages/sra-report/test/fixtures/v0/token_pairs/token_a_and_token_b_params.json b/packages/sra-report/test/fixtures/v0/token_pairs/token_a_and_token_b_params.json deleted file mode 100644 index cdb9c477b..000000000 --- a/packages/sra-report/test/fixtures/v0/token_pairs/token_a_and_token_b_params.json +++ /dev/null @@ -1,16 +0,0 @@ -[ - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - } -] diff --git a/packages/sra-report/test/fixtures/v0/token_pairs/token_a_param.json b/packages/sra-report/test/fixtures/v0/token_pairs/token_a_param.json deleted file mode 100644 index 7c2e8cb3a..000000000 --- a/packages/sra-report/test/fixtures/v0/token_pairs/token_a_param.json +++ /dev/null @@ -1,1864 +0,0 @@ -[ - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x01b3ec4aae1b8729529beb4965f27d008788b0eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0371a82e4a9d0a4312f3ee2ac9c6958512891372", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x076c97e1c869072ee22f8c91978c99b4bcb02591", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x09d8b66c48424324b25754a873e290cae5dca439", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0abdace70d3790235af448c88547603b945604ea", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0cf0ee63788a0849fe5297f3407f701e122cc023", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0e0989b1f9b8a38983c2ba8053269ca62ec9b195", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f513ffb4926ff82d7f60a05069047aca295c413", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1063ce524265d5a3a624f4914acd573dd89ce988", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x106aa49295b525fcf959aa75ec3f7dcbf5352f1c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x107c4504cd79c5d2696ea0030a8dd4e92601b82e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1183f92a5624d68e85ffb9170f16bf0443b4c242", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12b19d3e2ccc14da04fae33e63652ce469b3f2fd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x168296bb09e24a88805cb9c33356536b980d3fc5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1776e1f26f98b1a5df9cd347953a26dd3cb46671", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27054b13b1b798b345b591a4d22e6562d47ea75a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27695e09149adc738a978e9a678f99e4c39e9eb9", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27dce1ec4d3f72c3e457cc50354f1f975ddef488", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x27f610bf36eca0939093343ac28b1534a721dbb4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x340d2bde5eb28c1eed91b2f790723e3b160613b7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3597bfd533a99c9aa083587b074434e61eb0a258", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3618516f45cd3c913f81f9987af41077932bc40d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x386467f1f3ddbe832448650418311a479eecfc57", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3883f5e181fccaf8410fa61e12b59bad963fb645", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x399a0e6fbeb3d74c85357439f4c8aed9678a5cbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x39bb259f66e1c59d5abef88375979b4d20d98022", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4156d3342d5c385a87d264f90653733592000581", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x41e5560054824ea6b0732e656e3ad64e20e94e45", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x42d6622dece394b54999fbd73d108123806f6a18", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x44f588aeeb8c44471439d1270b3603c66a9262f1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4d8fc1453a0f359e99c9675954e656d80d996fbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df47b4969b2911c966506e3592c41389493953b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x4df812f6064def1e5e029f1ca858777cc98d2d81", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x52a7cb918c11a16958be40cba7e31e32a499a465", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x533ef0984b2faa227acc620c67cce12aa39cd8cd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x554c20b7c486beee439277b4540a434566dc4c02", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x56ba2ee7890461f463f7be02aac3099f6d5811a8", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5732046a883704404f284ce41ffadd5b007fd668", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x595832f8fc6bf59c85c527fec3740a1b7a361269", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5af2be193a6abca9c8817001f45744777db30756", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5b2e4a700dfbc560061e957edec8f6eeeb74a320", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x5e3346444010135322268a4630d2ed5f8d09446c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x607f4c5bb672230e8672085532f7e901544a7375", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x614ea929892ea43d3ea2c5e3311b01cc589bad6c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6425c6be902d692ae2db752b3c268afadb099d3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x672a1ad4f667fb18a333af13667aa0af1f5b5bdd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6781a0f84c7e9e846dcb84a9a5bd49333067b104", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x6810e776880c02933d47db1b9fc05908e5386b96", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x744d70fdbe2ba4cf95131626614a1763df805b9e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7654915a1b82d6d2d0afc37c52af556ea8983c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7b69b78cc7fee48202c208609ae6d1f78ce42e13", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x7d4b8cce0591c9044a22ee543533b72e976e36c3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x80fb784b7ed66730e8b1dbd9820afd29931aab03", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x814964b1bceaf24e26296d031eadf134a2ca4105", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x865e3707a580f9db89304005cddd050ade8873eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x88fcfbc22c6d3dbaa25af478c578978339bde77a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8a854288a5976036a725879164ca3e91d30c6a1b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8ae4bf2c33a8e667de34b54938b0ccd03eb8cc06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8eb24319393716668d768dcec29356ae9cffe285", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x8f8221afbb33998d8584a2b05749ba73c37a938a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9214ec02cb71cba0ada6896b8da260736a67ab10", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x960b236a07cf122663c4303350609a66a7b288c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9a005c9a89bd72a4bd27721e7a09a3c11d2b03c4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa5fd1a791c4dfcaacc963d4f73c6ae5824149ea7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa8006c4ca56f24d6836727d106349320db7fef82", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xa87c3ec87eb802aad080df0adb331e504d327e5d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xab16e0d25c06cb376259cc18c1de4aca57605589", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xac3211a5025414af2866ff09c23fc18bc97e79b1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xacfa209fb73bf3dd5bbfb1101b9bc999c49062a5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb24754be79281553dc1adc160ddf5cd9b74361a4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb3bd49e28f8f832b8d1e246106991e546c323502", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb45a50545beeab73f38f31e5973768c421805e5e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb4efd85c19999d84251304bda99e90b92300bd93", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb5c0e43a6330b9eb904ec57ea24d70269ae4652e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb62d18dea74045e822352ce4b3ee77319dc5ff2f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xb98d4c97425d9908e66e53a6fdf673acca0be986", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba2184520a1cc49a6159c57e61e1844e085615b6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xba5f11b16b155792cf3b2e6880e8706859a8aeb6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbdc5bac39dbe132b1e030e898ae3830017d7d969", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xbf2179859fc6d5bee9bf9158632dc51678a4100e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc27a2f05fa577a83ba0fdb4c38443c0718356501", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc438b4c0dfbb1593be6dee03bbd1a84bb3aa6213", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc66ea802717bfb9833400264dd12c2bceaa34a6d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc997d07b0bc607b6d1bcb6fb9d4a5579c466c3e5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd26114cd6ee289accf82350c8d8487fedb8a0c07", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd2d6158683aee4cc838067727209a0aaf4359de3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4c435f5b09f855c3317c8524cb1f586e42795fa", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xd8912c10681d8b21fd3742244f44658dba12264e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe2e6d4be086c6938b53b22144855eef674281639", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xe94327d07fc17907b4db788e5adf2ed424addff6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea097a2b1db00627b2fa17460ad260c016016977", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea1f346faf023f974eb5adaf088bbcdf02d761f4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xea38eaa3c86c8f9b751533ba2e562deb9acded40", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeab43193cf0623073ca89db9b712796356fa7414", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb2da9fac54284cea731d1f10bb34eecb3c00c14", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xeb7c20027172e5d143fb030d50f91cece2d1485d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xef2463099360a085f1f10b076ed72ef625497a06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf433089366899d83a9f26a773d59ec7ecf30355e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6b55acbbc49f4524aa48d19281a9a77c54de10f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf6cfe53d6febaeea051f400ff5fc14f0cbbdaca1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf7b098298f7c69fc14610bf71d5e02c60792894c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xf970b8e36e23f7fc3fd752eea86f8be8d83375a6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenA": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xfec0cf7fe078a500abf15f1284958f22049c2c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - } -] diff --git a/packages/sra-report/test/fixtures/v0/token_pairs/token_b_param.json b/packages/sra-report/test/fixtures/v0/token_pairs/token_b_param.json deleted file mode 100644 index 1be6cae96..000000000 --- a/packages/sra-report/test/fixtures/v0/token_pairs/token_b_param.json +++ /dev/null @@ -1,1864 +0,0 @@ -[ - { - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x01b3ec4aae1b8729529beb4965f27d008788b0eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0371a82e4a9d0a4312f3ee2ac9c6958512891372", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x076c97e1c869072ee22f8c91978c99b4bcb02591", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x09d8b66c48424324b25754a873e290cae5dca439", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0abdace70d3790235af448c88547603b945604ea", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0cf0ee63788a0849fe5297f3407f701e122cc023", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0d8775f648430679a709e98d2b0cb6250d2887ef", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0e0989b1f9b8a38983c2ba8053269ca62ec9b195", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0f513ffb4926ff82d7f60a05069047aca295c413", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x0f5d2fb29fb7d3cfee444a200298f468908cc942", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x1063ce524265d5a3a624f4914acd573dd89ce988", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x106aa49295b525fcf959aa75ec3f7dcbf5352f1c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x107c4504cd79c5d2696ea0030a8dd4e92601b82e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x1183f92a5624d68e85ffb9170f16bf0443b4c242", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x12b19d3e2ccc14da04fae33e63652ce469b3f2fd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x168296bb09e24a88805cb9c33356536b980d3fc5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x1776e1f26f98b1a5df9cd347953a26dd3cb46671", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x177d39ac676ed1c67a2b268ad7f1e58826e5b0af", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x24692791bc444c5cd0b81e3cbcaba4b04acd1f3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x255aa6df07540cb5d3d297f0d0d4d84cb52bc8e6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x27054b13b1b798b345b591a4d22e6562d47ea75a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x27695e09149adc738a978e9a678f99e4c39e9eb9", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x27dce1ec4d3f72c3e457cc50354f1f975ddef488", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x27f610bf36eca0939093343ac28b1534a721dbb4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x340d2bde5eb28c1eed91b2f790723e3b160613b7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x3597bfd533a99c9aa083587b074434e61eb0a258", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x3618516f45cd3c913f81f9987af41077932bc40d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x386467f1f3ddbe832448650418311a479eecfc57", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x3883f5e181fccaf8410fa61e12b59bad963fb645", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x399a0e6fbeb3d74c85357439f4c8aed9678a5cbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x39bb259f66e1c59d5abef88375979b4d20d98022", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x4156d3342d5c385a87d264f90653733592000581", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x419d0d8bdd9af5e606ae2232ed285aff190e711b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x41e5560054824ea6b0732e656e3ad64e20e94e45", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x42d6622dece394b54999fbd73d108123806f6a18", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x44f588aeeb8c44471439d1270b3603c66a9262f1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x4d8fc1453a0f359e99c9675954e656d80d996fbf", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x4df47b4969b2911c966506e3592c41389493953b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x4df812f6064def1e5e029f1ca858777cc98d2d81", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x514910771af9ca656af840dff83e8264ecf986ca", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x52a7cb918c11a16958be40cba7e31e32a499a465", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x533ef0984b2faa227acc620c67cce12aa39cd8cd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x554c20b7c486beee439277b4540a434566dc4c02", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x56ba2ee7890461f463f7be02aac3099f6d5811a8", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5732046a883704404f284ce41ffadd5b007fd668", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x595832f8fc6bf59c85c527fec3740a1b7a361269", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5af2be193a6abca9c8817001f45744777db30756", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5b2e4a700dfbc560061e957edec8f6eeeb74a320", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x5e3346444010135322268a4630d2ed5f8d09446c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x607f4c5bb672230e8672085532f7e901544a7375", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x614ea929892ea43d3ea2c5e3311b01cc589bad6c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x6425c6be902d692ae2db752b3c268afadb099d3b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x672a1ad4f667fb18a333af13667aa0af1f5b5bdd", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x6781a0f84c7e9e846dcb84a9a5bd49333067b104", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x6810e776880c02933d47db1b9fc05908e5386b96", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x744d70fdbe2ba4cf95131626614a1763df805b9e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x7654915a1b82d6d2d0afc37c52af556ea8983c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x7b69b78cc7fee48202c208609ae6d1f78ce42e13", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x7d4b8cce0591c9044a22ee543533b72e976e36c3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x80fb784b7ed66730e8b1dbd9820afd29931aab03", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x814964b1bceaf24e26296d031eadf134a2ca4105", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x865e3707a580f9db89304005cddd050ade8873eb", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x88fcfbc22c6d3dbaa25af478c578978339bde77a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x8a854288a5976036a725879164ca3e91d30c6a1b", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x8ae4bf2c33a8e667de34b54938b0ccd03eb8cc06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x8eb24319393716668d768dcec29356ae9cffe285", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x8f8221afbb33998d8584a2b05749ba73c37a938a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x9214ec02cb71cba0ada6896b8da260736a67ab10", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x960b236a07cf122663c4303350609a66a7b288c0", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x983f6d60db79ea8ca4eb9968c6aff8cfa04b3c63", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x99ea4db9ee77acd40b119bd1dc4e33e1c070b80d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x9a005c9a89bd72a4bd27721e7a09a3c11d2b03c4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xa5fd1a791c4dfcaacc963d4f73c6ae5824149ea7", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xa8006c4ca56f24d6836727d106349320db7fef82", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xa87c3ec87eb802aad080df0adb331e504d327e5d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xab16e0d25c06cb376259cc18c1de4aca57605589", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xac3211a5025414af2866ff09c23fc18bc97e79b1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xacfa209fb73bf3dd5bbfb1101b9bc999c49062a5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb24754be79281553dc1adc160ddf5cd9b74361a4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb3bd49e28f8f832b8d1e246106991e546c323502", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb45a50545beeab73f38f31e5973768c421805e5e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb4efd85c19999d84251304bda99e90b92300bd93", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb5a5f22694352c15b00323844ad545abb2b11028", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb5c0e43a6330b9eb904ec57ea24d70269ae4652e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb62d18dea74045e822352ce4b3ee77319dc5ff2f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xb98d4c97425d9908e66e53a6fdf673acca0be986", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xba2184520a1cc49a6159c57e61e1844e085615b6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xba5f11b16b155792cf3b2e6880e8706859a8aeb6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xbdc5bac39dbe132b1e030e898ae3830017d7d969", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xbf2179859fc6d5bee9bf9158632dc51678a4100e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xc27a2f05fa577a83ba0fdb4c38443c0718356501", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xc438b4c0dfbb1593be6dee03bbd1a84bb3aa6213", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xc66ea802717bfb9833400264dd12c2bceaa34a6d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xc997d07b0bc607b6d1bcb6fb9d4a5579c466c3e5", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd0a4b8946cb52f0661273bfbc6fd0e0c75fc6433", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd26114cd6ee289accf82350c8d8487fedb8a0c07", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd2d6158683aee4cc838067727209a0aaf4359de3", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd4c435f5b09f855c3317c8524cb1f586e42795fa", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd4fa1460f537bb9085d22c7bccb5dd450ef28e3a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xd8912c10681d8b21fd3742244f44658dba12264e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xe0b7927c4af23765cb51314a0e0521a9645f0e2a", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xe2e6d4be086c6938b53b22144855eef674281639", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xe41d2489571d322189246dafa5ebde1f4699f498", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xe94327d07fc17907b4db788e5adf2ed424addff6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xea097a2b1db00627b2fa17460ad260c016016977", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xea1f346faf023f974eb5adaf088bbcdf02d761f4", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xea38eaa3c86c8f9b751533ba2e562deb9acded40", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xeab43193cf0623073ca89db9b712796356fa7414", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xeb2da9fac54284cea731d1f10bb34eecb3c00c14", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xeb7c20027172e5d143fb030d50f91cece2d1485d", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xef2463099360a085f1f10b076ed72ef625497a06", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xf433089366899d83a9f26a773d59ec7ecf30355e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xf6b55acbbc49f4524aa48d19281a9a77c54de10f", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xf6cfe53d6febaeea051f400ff5fc14f0cbbdaca1", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xf7b098298f7c69fc14610bf71d5e02c60792894c", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xf970b8e36e23f7fc3fd752eea86f8be8d83375a6", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - }, - { - "tokenB": { - "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - }, - "tokenA": { - "address": "0xfec0cf7fe078a500abf15f1284958f22049c2c7e", - "minAmount": "1", - "maxAmount": "999999999999999999999", - "precision": 8 - } - } -] diff --git a/packages/sra-report/test/postman_collection_v0_test.ts b/packages/sra-report/test/postman_collection_v0_test.ts deleted file mode 100644 index dfb16b10d..000000000 --- a/packages/sra-report/test/postman_collection_v0_test.ts +++ /dev/null @@ -1,76 +0,0 @@ -import 'mocha'; -import * as nock from 'nock'; - -import * as defaultRequestTokenPairsResponseJSON from './fixtures/v0/token_pairs/default_request.json'; -import * as malformedTokenPairsResponseJSON from './fixtures/v0/token_pairs/malformed.json'; -import * as tokenAAndTokenBParamsTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_a_and_token_b_params.json'; -import * as tokenAParamTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_a_param.json'; -import * as tokenBParamTokenPairsResponseJSON from './fixtures/v0/token_pairs/token_b_param.json'; -import { testRunner } from './test_runner'; - -describe('Postman Collection v0', () => { - const testRelayerUrl = 'https://example.com'; - const nockScope = nock(testRelayerUrl); - afterEach(() => { - nock.cleanAll(); - }); - describe('GET /token_pairs', () => { - const postmanCollectionFolderName = 'GET /token_pairs'; - const resourcePath = '/token_pairs'; - describe('default request', () => { - const postmanCollectionRequestName = 'default request'; - const nockInterceptor = nockScope.get(resourcePath); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - defaultRequestTokenPairsResponseJSON, - ); - }); - describe('tokenA param', () => { - const postmanCollectionRequestName = 'tokenA param'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenA: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenAParamTokenPairsResponseJSON, - ); - }); - describe('tokenB param', () => { - const postmanCollectionRequestName = 'tokenB param'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenB: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenBParamTokenPairsResponseJSON, - ); - }); - describe('tokenA and tokenB params', () => { - const postmanCollectionRequestName = 'tokenA and tokenB params'; - const nockInterceptor = nockScope.get(resourcePath).query({ - tokenA: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', - tokenB: '0xe41d2489571d322189246dafa5ebde1f4699f498', - }); - testRunner.runContentTypeTests(nockInterceptor, postmanCollectionFolderName, postmanCollectionRequestName); - testRunner.runSchemaTests( - nockInterceptor, - postmanCollectionFolderName, - postmanCollectionRequestName, - malformedTokenPairsResponseJSON, - tokenAAndTokenBParamsTokenPairsResponseJSON, - ); - }); - }); -}); diff --git a/packages/sra-report/test/test_runner.ts b/packages/sra-report/test/test_runner.ts deleted file mode 100644 index 8094018f2..000000000 --- a/packages/sra-report/test/test_runner.ts +++ /dev/null @@ -1,143 +0,0 @@ -import * as chai from 'chai'; -import * as chaiAsPromised from 'chai-as-promised'; -import * as dirtyChai from 'dirty-chai'; -import * as _ from 'lodash'; -import 'mocha'; -import { - NewmanRunExecution, - NewmanRunExecutionAssertion, - NewmanRunExecutionAssertionError, - NewmanRunSummary, -} from 'newman'; -import * as nock from 'nock'; - -import * as sraReportCollectionJSON from '../../postman_collections/sra_report.postman_collection.json'; -import { utils } from '../src/utils'; - -import * as postmanEnvironmentJSON from './environments/postman_environment.json'; - -chai.config.includeStack = true; -chai.use(dirtyChai); -chai.use(chaiAsPromised); -const expect = chai.expect; - -const CONTENT_TYPE_ASSERTION_NAME = 'Has Content-Type header with value application/json'; -const SCHEMA_ASSERTION_NAME = 'Schema is valid'; -const SUCCESS_STATUS = 200; -const baseNewmanRunOptions = { - collection: sraReportCollectionJSON, - environment: postmanEnvironmentJSON, - reporter: { - cli: { - noConsole: true, - }, - }, -}; - -export const testRunner = { - runContentTypeTests( - nockInterceptor: nock.Interceptor, - postmanCollectionFolderName: string, - postmanCollectionRequestName: string, - ): void { - const newmanRunOptions = { - ...baseNewmanRunOptions, - folder: postmanCollectionFolderName, - }; - describe(CONTENT_TYPE_ASSERTION_NAME, () => { - it('fails when there are no headers', async () => { - nockInterceptor.reply(SUCCESS_STATUS, {}); - const summary = await utils.newmanRunAsync(newmanRunOptions); - const error = findAssertionErrorIfExists( - summary, - postmanCollectionRequestName, - CONTENT_TYPE_ASSERTION_NAME, - ); - const errorMessage = _.get(error, 'message'); - expect(error).to.not.be.undefined(); - expect(errorMessage).to.equal(`expected response to have header with key 'Content-Type'`); - }); - it('fails when Content-Type header exists but not with value application/json', async () => { - const headers = { - 'Content-Type': 'text/html', - }; - nockInterceptor.reply(SUCCESS_STATUS, {}, headers); - const summary = await utils.newmanRunAsync(newmanRunOptions); - const error = findAssertionErrorIfExists( - summary, - postmanCollectionRequestName, - CONTENT_TYPE_ASSERTION_NAME, - ); - const errorMessage = _.get(error, 'message'); - expect(error).to.not.be.undefined(); - expect(errorMessage).to.equal(`expected 'text/html' to include 'application/json'`); - }); - it('passes when Content-Type header exists with value application/json', async () => { - const headers = { - 'Content-Type': 'charset=utf-8; application/json', - }; - nockInterceptor.reply(SUCCESS_STATUS, {}, headers); - const summary = await utils.newmanRunAsync(newmanRunOptions); - const error = findAssertionErrorIfExists( - summary, - postmanCollectionRequestName, - CONTENT_TYPE_ASSERTION_NAME, - ); - expect(error).to.be.undefined(); - }); - }); - }, - runSchemaTests( - nockInterceptor: nock.Interceptor, - postmanCollectionFolderName: string, - postmanCollectionRequestName: string, - malformedJson: object, - correctJson: object, - ): void { - const newmanRunOptions = { - ...baseNewmanRunOptions, - folder: postmanCollectionFolderName, - }; - describe(SCHEMA_ASSERTION_NAME, () => { - it('fails when schema is invalid', async () => { - nockInterceptor.reply(SUCCESS_STATUS, malformedJson); - const summary = await utils.newmanRunAsync(newmanRunOptions); - const error = findAssertionErrorIfExists(summary, postmanCollectionRequestName, SCHEMA_ASSERTION_NAME); - const errorMessage = _.get(error, 'message'); - expect(error).to.not.be.undefined(); - expect(errorMessage).to.equal('expected false to be true'); - }); - it('passes when schema is valid', async () => { - nockInterceptor.reply(SUCCESS_STATUS, correctJson); - const summary = await utils.newmanRunAsync(newmanRunOptions); - const error = findAssertionErrorIfExists(summary, postmanCollectionRequestName, SCHEMA_ASSERTION_NAME); - expect(error).to.be.undefined(); - }); - }); - }, -}; - -function findAssertionErrorIfExists( - summary: NewmanRunSummary, - postmanCollectionRequestName: string, - postmanCollectionAssertionName: string, -): NewmanRunExecutionAssertionError | undefined { - const matchingExecutionIfExists = _.find(summary.run.executions, (execution: NewmanRunExecution) => { - return execution.item.name === postmanCollectionRequestName; - }); - if (_.isUndefined(matchingExecutionIfExists)) { - return undefined; - } - const matchingAssertionIfExists = _.find( - matchingExecutionIfExists.assertions, - (assertion: NewmanRunExecutionAssertion) => { - return assertion.assertion === postmanCollectionAssertionName; - }, - ); - if (_.isUndefined(matchingAssertionIfExists)) { - return undefined; - } else { - const error = matchingAssertionIfExists.error; - return error; - } -} diff --git a/packages/sra-report/tsconfig.json b/packages/sra-report/tsconfig.json deleted file mode 100644 index 2ee711adc..000000000 --- a/packages/sra-report/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../tsconfig", - "compilerOptions": { - "outDir": "lib", - "rootDir": "." - }, - "include": ["./src/**/*", "./test/**/*"] -} diff --git a/packages/sra-report/tslint.json b/packages/sra-report/tslint.json deleted file mode 100644 index ffaefe83a..000000000 --- a/packages/sra-report/tslint.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": ["@0xproject/tslint-config"] -} diff --git a/packages/sra-spec/src/md/introduction.md b/packages/sra-spec/src/md/introduction.md index f27186f41..824df8998 100644 --- a/packages/sra-spec/src/md/introduction.md +++ b/packages/sra-spec/src/md/introduction.md @@ -1,7 +1,3 @@ -# Testing - -Use the [sra-report](https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-report) command line tool to test your API for SRA compliance. - # Schemas The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas). Examples of each payload and response can be found in the library's [test suite](https://github.com/0xProject/0x.js/blob/development/packages/json-schemas/test/schema_test.ts#L1). diff --git a/tsconfig.json b/tsconfig.json index 119b85572..2bed48649 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -45,7 +45,6 @@ { "path": "./packages/sol-compiler" }, { "path": "./packages/sol-cov" }, { "path": "./packages/sol-resolver" }, - { "path": "./packages/sra-report" }, { "path": "./packages/sra-spec" }, { "path": "./packages/subproviders" }, { "path": "./packages/testnet-faucets" }, -- cgit From 9f924e459c43c023e35ab7222cd9824cc0e67411 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 21:51:56 +1100 Subject: chore: change package org from 0xproject to 0x --- package.json | 16 ++++++---- packages/0x.js/package.json | 34 +++++++++++----------- packages/0x.js/src/index.ts | 18 ++++++------ packages/abi-gen-wrappers/package.json | 14 +++++---- .../src/generated-wrappers/asset_proxy_owner.ts | 6 ++-- .../src/generated-wrappers/dummy_erc20_token.ts | 6 ++-- .../src/generated-wrappers/dummy_erc721_token.ts | 6 ++-- .../src/generated-wrappers/erc20_proxy.ts | 6 ++-- .../src/generated-wrappers/erc20_token.ts | 6 ++-- .../src/generated-wrappers/erc721_proxy.ts | 6 ++-- .../src/generated-wrappers/erc721_token.ts | 6 ++-- .../src/generated-wrappers/exchange.ts | 6 ++-- .../src/generated-wrappers/forwarder.ts | 6 ++-- .../src/generated-wrappers/i_validator.ts | 6 ++-- .../src/generated-wrappers/i_wallet.ts | 6 ++-- .../src/generated-wrappers/order_validator.ts | 6 ++-- .../src/generated-wrappers/weth9.ts | 6 ++-- .../src/generated-wrappers/zrx_token.ts | 6 ++-- packages/abi-gen/package.json | 8 ++--- packages/abi-gen/src/index.ts | 2 +- packages/assert/package.json | 10 +++---- packages/assert/src/index.ts | 4 +-- packages/assert/test/assert_test.ts | 4 +-- packages/asset-buyer/package.json | 24 +++++++-------- packages/asset-buyer/src/asset_buyer.ts | 12 ++++---- packages/asset-buyer/src/constants.ts | 2 +- packages/asset-buyer/src/index.ts | 4 +-- .../src/order_providers/basic_order_provider.ts | 4 +-- .../standard_relayer_api_order_provider.ts | 4 +-- packages/asset-buyer/src/types.ts | 4 +-- packages/asset-buyer/src/utils/assert.ts | 6 ++-- packages/asset-buyer/src/utils/asset_data_utils.ts | 4 +-- .../asset-buyer/src/utils/buy_quote_calculator.ts | 4 +-- .../src/utils/order_provider_response_processor.ts | 10 +++---- packages/asset-buyer/src/utils/order_utils.ts | 4 +-- .../asset-buyer/test/buy_quote_calculator_test.ts | 4 +-- packages/base-contract/package.json | 10 +++---- packages/base-contract/src/index.ts | 4 +-- packages/base-contract/test/utils_test.ts | 2 +- packages/connect/package.json | 16 +++++----- packages/connect/src/http_client.ts | 8 ++--- packages/connect/src/index.ts | 2 +- packages/connect/src/types.ts | 2 +- packages/connect/src/utils/assert.ts | 8 ++--- .../src/utils/orders_channel_message_parser.ts | 6 ++-- .../src/utils/relayer_response_json_parsers.ts | 8 ++--- packages/connect/src/utils/type_converters.ts | 4 +-- packages/connect/src/ws_orders_channel.ts | 2 +- .../fixtures/standard_relayer_api/asset_pairs.ts | 4 +-- .../standard_relayer_api/fee_recipients.ts | 2 +- ...f977fa9ac94a50f016026fd13f42990861238897721f.ts | 2 +- .../fixtures/standard_relayer_api/order_config.ts | 4 +-- .../fixtures/standard_relayer_api/orderbook.ts | 4 +-- .../test/fixtures/standard_relayer_api/orders.ts | 4 +-- packages/connect/test/http_client_test.ts | 2 +- packages/contract-addresses/package.json | 2 +- packages/contract-artifacts/package.json | 2 +- packages/contract-wrappers/package.json | 32 ++++++++++---------- ...tract_balance_and_proxy_allowance_lazy_store.ts | 2 +- .../contract-wrappers/src/contract_wrappers.ts | 4 +-- .../src/contract_wrappers/contract_wrapper.ts | 4 +-- .../src/contract_wrappers/erc20_proxy_wrapper.ts | 8 ++--- .../src/contract_wrappers/erc20_token_wrapper.ts | 10 +++---- .../src/contract_wrappers/erc721_proxy_wrapper.ts | 8 ++--- .../src/contract_wrappers/erc721_token_wrapper.ts | 10 +++---- .../src/contract_wrappers/ether_token_wrapper.ts | 10 +++---- .../src/contract_wrappers/exchange_wrapper.ts | 14 ++++----- .../src/contract_wrappers/forwarder_wrapper.ts | 12 ++++---- .../contract_wrappers/order_validator_wrapper.ts | 12 ++++---- .../asset_balance_and_proxy_allowance_fetcher.ts | 6 ++-- .../src/fetchers/order_filled_cancelled_fetcher.ts | 4 +-- packages/contract-wrappers/src/index.ts | 8 ++--- packages/contract-wrappers/src/types.ts | 8 ++--- packages/contract-wrappers/src/utils/assert.ts | 12 ++++---- .../src/utils/calldata_optimization_utils.ts | 2 +- packages/contract-wrappers/src/utils/constants.ts | 2 +- .../src/utils/contract_addresses.ts | 2 +- .../src/utils/exchange_transfer_simulator.ts | 4 +-- .../src/utils/transaction_encoder.ts | 10 +++---- packages/contract-wrappers/src/utils/utils.ts | 4 +-- .../test/calldata_optimization_utils_test.ts | 2 +- .../contract-wrappers/test/erc20_wrapper_test.ts | 10 +++---- .../contract-wrappers/test/erc721_wrapper_test.ts | 8 ++--- .../test/ether_token_wrapper_test.ts | 10 +++---- .../test/exchange_wrapper_test.ts | 10 +++---- .../test/forwarder_wrapper_test.ts | 10 +++---- .../test/order_validator_wrapper_test.ts | 12 ++++---- .../test/revert_validation_test.ts | 14 ++++----- .../contract-wrappers/test/subscription_test.ts | 4 +-- .../test/transaction_encoder_test.ts | 10 +++---- packages/contract-wrappers/test/utils/constants.ts | 2 +- packages/contract-wrappers/test/utils/migrate.ts | 6 ++-- .../contract-wrappers/test/utils/token_utils.ts | 8 ++--- .../contract-wrappers/test/utils/web3_wrapper.ts | 4 +-- packages/contracts/package.json | 24 +++++++-------- .../contracts/test/asset_proxy/authorizable.ts | 6 ++-- packages/contracts/test/asset_proxy/proxies.ts | 8 ++--- packages/contracts/test/exchange/core.ts | 10 +++---- packages/contracts/test/exchange/dispatcher.ts | 8 ++--- packages/contracts/test/exchange/fill_order.ts | 2 +- packages/contracts/test/exchange/internal.ts | 6 ++-- packages/contracts/test/exchange/libs.ts | 8 ++--- packages/contracts/test/exchange/match_orders.ts | 10 +++---- .../contracts/test/exchange/signature_validator.ts | 6 ++-- packages/contracts/test/exchange/transactions.ts | 8 ++--- packages/contracts/test/exchange/wrapper.ts | 10 +++---- packages/contracts/test/extensions/forwarder.ts | 10 +++---- .../contracts/test/extensions/order_validator.ts | 8 ++--- packages/contracts/test/global_hooks.ts | 2 +- packages/contracts/test/libraries/lib_bytes.ts | 8 ++--- .../contracts/test/multisig/asset_proxy_owner.ts | 6 ++-- .../test/multisig/multi_sig_with_time_lock.ts | 6 ++-- packages/contracts/test/tokens/erc721_token.ts | 6 ++-- .../test/tokens/unlimited_allowance_token.ts | 6 ++-- packages/contracts/test/tokens/weth9.ts | 6 ++-- packages/contracts/test/tokens/zrx_token.ts | 6 ++-- packages/contracts/test/tutorials/arbitrage.ts | 6 ++-- packages/contracts/test/utils/address_utils.ts | 4 +-- packages/contracts/test/utils/assertions.ts | 6 ++-- packages/contracts/test/utils/asset_wrapper.ts | 6 ++-- .../contracts/test/utils/combinatorial_utils.ts | 2 +- packages/contracts/test/utils/constants.ts | 4 +-- packages/contracts/test/utils/coverage.ts | 4 +-- packages/contracts/test/utils/erc20_wrapper.ts | 6 ++-- packages/contracts/test/utils/erc721_wrapper.ts | 6 ++-- packages/contracts/test/utils/exchange_wrapper.ts | 6 ++-- .../test/utils/fill_order_combinatorial_utils.ts | 8 ++--- packages/contracts/test/utils/formatters.ts | 4 +-- packages/contracts/test/utils/forwarder_wrapper.ts | 6 ++-- packages/contracts/test/utils/log_decoder.ts | 4 +-- .../contracts/test/utils/match_order_tester.ts | 6 ++-- packages/contracts/test/utils/multi_sig_wrapper.ts | 4 +-- packages/contracts/test/utils/order_factory.ts | 6 ++-- .../test/utils/order_factory_from_scenario.ts | 6 ++-- packages/contracts/test/utils/order_utils.ts | 4 +-- packages/contracts/test/utils/profiler.ts | 4 +-- packages/contracts/test/utils/revert_trace.ts | 4 +-- packages/contracts/test/utils/signing_utils.ts | 2 +- ...le_asset_balance_and_proxy_allowance_fetcher.ts | 4 +-- .../utils/simple_order_filled_cancelled_fetcher.ts | 4 +-- .../contracts/test/utils/transaction_factory.ts | 6 ++-- .../contracts/test/utils/type_encoding_utils.ts | 2 +- packages/contracts/test/utils/types.ts | 4 +-- packages/contracts/test/utils/web3_wrapper.ts | 8 ++--- packages/dev-tools-pages/package.json | 4 +-- packages/dev-utils/package.json | 14 ++++----- packages/dev-utils/src/blockchain_lifecycle.ts | 4 +-- packages/dev-utils/src/callback_error_reporter.ts | 2 +- packages/dev-utils/src/web3_factory.ts | 2 +- .../dev-utils/test/blockchain_lifecycle_test.ts | 2 +- packages/dev-utils/test/rpc_test.ts | 2 +- packages/ethereum-types/package.json | 2 +- packages/fill-scenarios/package.json | 20 ++++++------- packages/fill-scenarios/src/fill_scenarios.ts | 14 ++++----- packages/instant/package.json | 14 ++++----- packages/instant/src/constants.ts | 2 +- .../containers/latest_buy_quote_order_details.ts | 4 +-- .../src/containers/selected_asset_amount_input.ts | 6 ++-- .../src/containers/selected_asset_buy_button.ts | 2 +- .../containers/selected_asset_instant_heading.ts | 2 +- packages/instant/src/data/asset_meta_data.ts | 2 +- packages/instant/src/redux/actions.ts | 4 +-- packages/instant/src/redux/reducer.ts | 4 +-- packages/instant/src/style/util.ts | 2 +- packages/instant/src/types.ts | 2 +- packages/instant/src/util/asset_buyer.ts | 2 +- packages/instant/src/util/asset_data.ts | 2 +- packages/instant/src/util/coinbase_api.ts | 2 +- packages/instant/src/util/error.ts | 2 +- packages/instant/src/util/format.ts | 4 +-- packages/instant/src/util/web3_wrapper.ts | 2 +- packages/instant/test/util/error.test.ts | 2 +- packages/instant/test/util/format.test.ts | 4 +-- packages/json-schemas/package.json | 8 ++--- packages/json-schemas/test/schema_test.ts | 2 +- packages/metacoin/package.json | 24 +++++++-------- packages/metacoin/test/global_hooks.ts | 2 +- packages/metacoin/test/metacoin_test.ts | 4 +-- packages/metacoin/test/utils/config.ts | 2 +- packages/metacoin/test/utils/coverage.ts | 4 +-- packages/metacoin/test/utils/profiler.ts | 4 +-- packages/metacoin/test/utils/web3_wrapper.ts | 8 ++--- packages/migrations/package.json | 28 +++++++++--------- packages/migrations/src/migrate.ts | 4 +-- packages/migrations/src/migration.ts | 12 ++++---- packages/migrations/src/types.ts | 2 +- packages/migrations/src/utils/constants.ts | 2 +- packages/migrations/src/utils/provider_factory.ts | 2 +- packages/migrations/src/utils/token_info.ts | 2 +- packages/monorepo-scripts/package.json | 2 +- .../src/find_unused_dependencies.ts | 2 +- packages/monorepo-scripts/src/publish.ts | 8 ++--- .../monorepo-scripts/src/publish_release_notes.ts | 2 +- packages/monorepo-scripts/src/test_installation.ts | 4 +-- .../src/utils/doc_generate_and_upload_utils.ts | 4 +-- .../src/utils/github_release_utils.ts | 2 +- packages/order-utils/package.json | 24 +++++++-------- ...abstract_balance_and_proxy_allowance_fetcher.ts | 2 +- ...tract_balance_and_proxy_allowance_lazy_store.ts | 2 +- .../abstract_order_filled_cancelled_fetcher.ts | 2 +- .../abstract_order_filled_cancelled_lazy_store.ts | 2 +- packages/order-utils/src/assert.ts | 10 +++---- packages/order-utils/src/asset_data_utils.ts | 4 +-- packages/order-utils/src/constants.ts | 2 +- packages/order-utils/src/eip712_utils.ts | 6 ++-- .../order-utils/src/exchange_transfer_simulator.ts | 4 +-- packages/order-utils/src/index.ts | 2 +- packages/order-utils/src/market_utils.ts | 6 ++-- packages/order-utils/src/order_factory.ts | 4 +-- packages/order-utils/src/order_hash.ts | 6 ++-- packages/order-utils/src/order_state_utils.ts | 4 +-- packages/order-utils/src/order_validation_utils.ts | 4 +-- packages/order-utils/src/parsing_utils.ts | 2 +- packages/order-utils/src/rate_utils.ts | 6 ++-- .../src/remaining_fillable_calculator.ts | 2 +- packages/order-utils/src/salt.ts | 2 +- packages/order-utils/src/signature_utils.ts | 10 +++---- packages/order-utils/src/sorting_utils.ts | 6 ++-- .../balance_and_proxy_allowance_lazy_store.ts | 4 +-- .../src/store/order_filled_cancelled_lazy_store.ts | 2 +- packages/order-utils/src/types.ts | 10 +++---- packages/order-utils/src/utils.ts | 2 +- packages/order-utils/test/eip712_utils_test.ts | 2 +- .../test/exchange_transfer_simulator_test.ts | 10 +++---- packages/order-utils/test/market_utils_test.ts | 2 +- packages/order-utils/test/order_hash_test.ts | 4 +-- .../order-utils/test/order_state_utils_test.ts | 2 +- .../test/order_validation_utils_test.ts | 2 +- packages/order-utils/test/rate_utils_test.ts | 2 +- .../test/remaining_fillable_calculator_test.ts | 6 ++-- packages/order-utils/test/signature_utils_test.ts | 4 +-- packages/order-utils/test/sorting_utils_test.ts | 2 +- ...le_erc20_balance_and_proxy_allowance_fetcher.ts | 4 +-- .../order-utils/test/utils/test_order_factory.ts | 2 +- packages/order-utils/test/utils/web3_wrapper.ts | 4 +-- packages/order-watcher/package.json | 34 +++++++++++----------- packages/order-watcher/src/index.ts | 6 ++-- .../collision_resistant_abi_decoder.ts | 2 +- .../dependent_order_hashes_tracker.ts | 6 ++-- .../src/order_watcher/event_watcher.ts | 4 +-- .../src/order_watcher/expiration_watcher.ts | 2 +- .../src/order_watcher/order_watcher.ts | 14 ++++----- packages/order-watcher/src/types.ts | 2 +- packages/order-watcher/src/utils/assert.ts | 10 +++---- packages/order-watcher/src/utils/utils.ts | 2 +- .../order-watcher/test/expiration_watcher_test.ts | 12 ++++---- packages/order-watcher/test/order_watcher_test.ts | 16 +++++----- packages/order-watcher/test/utils/migrate.ts | 6 ++-- packages/order-watcher/test/utils/web3_wrapper.ts | 4 +-- packages/react-docs/package.json | 12 ++++---- packages/react-docs/src/docs_info.ts | 4 +-- packages/react-docs/src/index.ts | 2 +- packages/react-docs/src/utils/typedoc_utils.ts | 4 +-- packages/react-shared/package.json | 6 ++-- packages/sol-compiler/package.json | 20 ++++++------- packages/sol-compiler/src/cli.ts | 2 +- packages/sol-compiler/src/compiler.ts | 6 ++-- packages/sol-compiler/src/utils/compiler.ts | 4 +-- packages/sol-compiler/src/utils/fs_wrapper.ts | 2 +- packages/sol-compiler/test/util/constants.ts | 2 +- packages/sol-compiler/test/util/provider.ts | 2 +- packages/sol-cov/package.json | 16 +++++----- .../sol_compiler_artifact_adapter.ts | 2 +- .../artifact_adapters/truffle_artifact_adapter.ts | 2 +- packages/sol-cov/src/index.ts | 2 +- packages/sol-cov/src/revert_trace.ts | 2 +- packages/sol-cov/src/trace.ts | 2 +- .../sol-cov/src/trace_collection_subprovider.ts | 6 ++-- packages/sol-cov/src/trace_collector.ts | 2 +- packages/sol-cov/src/utils.ts | 2 +- packages/sol-doc/package.json | 10 +++---- packages/sol-doc/src/cli.ts | 2 +- packages/sol-doc/src/sol_doc.ts | 4 +-- .../sol-doc/test/solidity_doc_generator_test.ts | 2 +- packages/sol-resolver/package.json | 8 ++--- packages/sra-spec/package.json | 6 ++-- packages/sra-spec/src/json-schemas.ts | 2 +- packages/subproviders/package.json | 14 ++++----- packages/subproviders/src/index.ts | 2 +- .../src/subproviders/base_wallet_subprovider.ts | 4 +-- .../subproviders/eth_lightwallet_subprovider.ts | 2 +- packages/subproviders/src/subproviders/ledger.ts | 4 +-- .../src/subproviders/metamask_subprovider.ts | 2 +- .../src/subproviders/mnemonic_wallet.ts | 6 ++-- .../src/subproviders/private_key_wallet.ts | 6 ++-- .../src/subproviders/redundant_subprovider.ts | 2 +- .../src/subproviders/rpc_subprovider.ts | 6 ++-- packages/subproviders/src/subproviders/signer.ts | 2 +- .../subproviders/src/subproviders/subprovider.ts | 2 +- packages/subproviders/src/types.ts | 2 +- .../test/integration/ledger_subprovider_test.ts | 4 +-- .../test/unit/nonce_tracker_subprovider_test.ts | 2 +- .../test/unit/redundant_rpc_subprovider_test.ts | 2 +- .../test/utils/report_callback_errors.ts | 2 +- packages/testnet-faucets/package.json | 12 ++++---- packages/testnet-faucets/src/ts/dispatch_queue.ts | 2 +- .../testnet-faucets/src/ts/dispense_asset_tasks.ts | 4 +-- packages/testnet-faucets/src/ts/error_reporter.ts | 2 +- packages/testnet-faucets/src/ts/handler.ts | 6 ++-- .../src/ts/parameter_transformer.ts | 2 +- packages/tslint-config/package.json | 2 +- packages/types/package.json | 4 +-- packages/typescript-typings/package.json | 2 +- packages/utils/package.json | 8 ++--- packages/utils/src/sign_typed_data_utils.ts | 2 +- packages/web3-wrapper/package.json | 12 ++++---- packages/web3-wrapper/src/index.ts | 2 +- packages/web3-wrapper/src/marshaller.ts | 2 +- packages/web3-wrapper/src/utils.ts | 2 +- packages/web3-wrapper/src/web3_wrapper.ts | 8 ++--- packages/website/package.json | 22 +++++++------- packages/website/ts/blockchain.ts | 14 ++++----- packages/website/ts/blockchain_watcher.ts | 4 +-- .../ts/containers/asset_buyer_documentation.ts | 4 +-- .../website/ts/containers/connect_documentation.ts | 4 +-- .../containers/contract_wrappers_documentation.ts | 4 +-- .../ts/containers/ethereum_types_documentation.ts | 2 +- .../website/ts/containers/generate_order_form.ts | 2 +- .../ts/containers/inputs/eth_amount_input.ts | 4 +-- .../ts/containers/json_schemas_documentation.ts | 4 +-- .../ts/containers/order_utils_documentation.ts | 4 +-- .../ts/containers/order_watcher_documentation.ts | 4 +-- packages/website/ts/containers/portal.ts | 2 +- .../ts/containers/portal_onboarding_flow.ts | 2 +- .../ts/containers/smart_contracts_documentation.ts | 4 +-- .../ts/containers/sol_compiler_documentation.ts | 4 +-- .../website/ts/containers/sol_cov_documentation.ts | 4 +-- .../ts/containers/subproviders_documentation.ts | 4 +-- .../ts/containers/web3_wrapper_documentation.ts | 4 +-- .../ts/containers/zero_ex_js_documentation.ts | 2 +- packages/website/ts/redux/dispatcher.ts | 2 +- packages/website/ts/redux/reducer.ts | 4 +-- packages/website/ts/schemas/validator.ts | 2 +- packages/website/ts/style/colors.ts | 2 +- packages/website/ts/types.ts | 6 ++-- packages/website/ts/utils/analytics.ts | 4 +-- packages/website/ts/utils/constants.ts | 4 +-- packages/website/ts/utils/doc_utils.ts | 4 +-- packages/website/ts/utils/error_reporter.ts | 2 +- packages/website/ts/utils/fetch_utils.ts | 2 +- packages/website/ts/utils/mui_theme.ts | 2 +- packages/website/ts/utils/order_parser.ts | 4 +-- .../website/ts/utils/token_address_overrides.ts | 2 +- packages/website/ts/utils/utils.ts | 12 ++++---- 344 files changed, 986 insertions(+), 978 deletions(-) diff --git a/package.json b/package.json index 9785cd672..c786e7f19 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "wsrun": "wsrun", "lerna": "lerna", "build": "wsrun build $PKG --fast-exit -r --stages", - "build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0xproject/website", - "build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0xproject/website", - "build:monorepo_scripts": "PKG=@0xproject/monorepo-scripts yarn build", + "build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0x/website", + "build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website", + "build:monorepo_scripts": "PKG=@0x/monorepo-scripts yarn build", "build:ts": "tsc -b", "watch:ts": "tsc -b -w", "clean": "wsrun clean $PKG --fast-exit -r --parallel", @@ -42,7 +42,7 @@ "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" }, - "bundlewatch" : { + "bundlewatch": { "files": [ { "path": "packages/0x.js/_bundles/index.min.js", @@ -54,18 +54,22 @@ } ], "ci": { - "trackBranches": ["master", "development"], + "trackBranches": [ + "master", + "development" + ], "repoBranchBase": "development" } }, "devDependencies": { "@0x-lerna-fork/lerna": "3.0.0-beta.25", + "@0xproject/npm-cli-login": "^0.0.11", "async-child-process": "^1.1.1", "bundlewatch": "^0.2.1", "coveralls": "^3.0.0", "ganache-cli": "6.1.8", "lcov-result-merger": "^3.0.0", - "@0xproject/npm-cli-login": "^0.0.11", + "lerna": "^3.0.0-beta.25", "npm-run-all": "^4.1.2", "prettier": "^1.11.1", "source-map-support": "^0.5.6", diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index c439c8af3..80dba73a6 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -42,13 +42,13 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0xproject/contract-addresses": "^1.0.0", - "@0xproject/abi-gen": "^1.0.13", - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/migrations": "^1.0.14", - "@0xproject/monorepo-scripts": "^1.0.11", - "@0xproject/tslint-config": "^1.0.8", + "@0x/contract-addresses": "^1.0.0", + "@0x/abi-gen": "^1.0.13", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/dev-utils": "^1.0.12", + "@0x/migrations": "^1.0.14", + "@0x/monorepo-scripts": "^1.0.11", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "*", @@ -74,16 +74,16 @@ "webpack": "^4.20.2" }, "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/contract-wrappers": "^2.0.2", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/order-watcher": "^2.1.1", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.13", + "@0x/base-contract": "^3.0.1", + "@0x/contract-wrappers": "^2.0.2", + "@0x/order-utils": "^1.0.7", + "@0x/order-watcher": "^2.1.1", + "@0x/subproviders": "^2.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/web3-provider-engine": "^14.0.0", "ethereum-types": "^1.0.11", "ethers": "~4.0.4", diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts index 2fcfb5ce7..2df360b96 100644 --- a/packages/0x.js/src/index.ts +++ b/packages/0x.js/src/index.ts @@ -1,6 +1,6 @@ -export { ContractAddresses } from '@0xproject/contract-addresses'; +export { ContractAddresses } from '@0x/contract-addresses'; -export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils'; +export { assetDataUtils, signatureUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils'; export { ContractWrappers, @@ -27,7 +27,7 @@ export { OrderAndTraderInfo, TraderInfo, ValidateOrderFillableOpts, -} from '@0xproject/contract-wrappers'; +} from '@0x/contract-wrappers'; export { WETH9Events, @@ -52,9 +52,9 @@ export { ExchangeCancelEventArgs, ExchangeEventArgs, ExchangeEvents, -} from '@0xproject/abi-gen-wrappers'; +} from '@0x/abi-gen-wrappers'; -export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0xproject/order-watcher'; +export { OrderWatcher, OnOrderStateChangeCallback, OrderWatcherConfig } from '@0x/order-watcher'; export import Web3ProviderEngine = require('web3-provider-engine'); @@ -64,11 +64,11 @@ export { JSONRPCRequestPayloadWithMethod, ErrorCallback, MetamaskSubprovider, -} from '@0xproject/subproviders'; +} from '@0x/subproviders'; -export { AbiDecoder } from '@0xproject/utils'; +export { AbiDecoder } from '@0x/utils'; -export { BigNumber } from '@0xproject/utils'; +export { BigNumber } from '@0x/utils'; export { ExchangeContractErrs, @@ -85,7 +85,7 @@ export { SignatureType, OrderRelevantState, Stats, -} from '@0xproject/types'; +} from '@0x/types'; export { BlockParamLiteral, diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 0a4ae5829..01a577702 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -1,10 +1,10 @@ { - "name": "@0xproject/abi-gen-wrappers", + "name": "@0x/abi-gen-wrappers", "version": "1.0.0", "engines": { "node": ">=6.12" }, - "description": "Low-level 0x smart contract wrappers generated using @0xproject/abi-gen", + "description": "Low-level 0x smart contract wrappers generated using @0x/abi-gen", "main": "lib/src/index.js", "directories": { "test": "test" @@ -30,12 +30,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { - "@0xproject/abi-gen": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", + "@0x/abi-gen": "^1.0.12", + "@0x/tslint-config": "^1.0.8", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", + "ethers": "~4.0.4", + "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0xproject/base-contract": "^3.0.1" + "@0x/base-contract": "^3.0.1" }, "publishConfig": { "access": "public" 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 464f80305..8ca70e026 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 @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 f8ba30cb1..1efeeed0a 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 @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 ec56448fc..cc5f9679f 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 @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 0130faec5..ab207b38e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 5a51561d7..8ee563b7e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 97c9ed0bc..691c55578 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 0e25c97b8..d1a2d5670 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index 869ad6f10..ffd498055 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index afcf90234..80bbc52c7 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 ff5160680..203a66b6d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 a9a56ad14..99809a049 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 6be61656b..38233af3f 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index b65cf9e9e..86d1031db 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable 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 818509972..98079e77b 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index bd8c2e749..dfe8a9afd 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/abi-gen", + "name": "@0x/abi-gen", "version": "1.0.13", "engines": { "node": ">=6.12" @@ -31,8 +31,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", "dependencies": { - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", "chalk": "^2.3.0", "ethereum-types": "^1.0.11", "glob": "^7.1.2", @@ -45,7 +45,7 @@ "yargs": "^10.0.3" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/glob": "5.0.35", "@types/handlebars": "^4.0.36", "@types/mkdirp": "^0.5.1", diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts index f5283b97a..5bad920ca 100644 --- a/packages/abi-gen/src/index.ts +++ b/packages/abi-gen/src/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { abiUtils, logUtils } from '@0xproject/utils'; +import { abiUtils, logUtils } from '@0x/utils'; import chalk from 'chalk'; import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types'; import { sync as globSync } from 'glob'; diff --git a/packages/assert/package.json b/packages/assert/package.json index 3cd09e307..ea5f89b0b 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/assert", + "name": "@0x/assert", "version": "1.0.13", "engines": { "node": ">=6.12" @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -44,9 +44,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", + "@0x/json-schemas": "^1.0.7", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", "lodash": "^4.17.5", "valid-url": "^1.0.9" }, diff --git a/packages/assert/src/index.ts b/packages/assert/src/index.ts index ccf2c9ad8..2d28d51e1 100644 --- a/packages/assert/src/index.ts +++ b/packages/assert/src/index.ts @@ -1,5 +1,5 @@ -import { Schema, SchemaValidator } from '@0xproject/json-schemas'; -import { addressUtils, BigNumber } from '@0xproject/utils'; +import { Schema, SchemaValidator } from '@0x/json-schemas'; +import { addressUtils, BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as validUrl from 'valid-url'; diff --git a/packages/assert/test/assert_test.ts b/packages/assert/test/assert_test.ts index cbbfe39db..9266496ac 100644 --- a/packages/assert/test/assert_test.ts +++ b/packages/assert/test/assert_test.ts @@ -1,5 +1,5 @@ -import { schemas } from '@0xproject/json-schemas'; -import { BigNumber } from '@0xproject/utils'; +import { schemas } from '@0x/json-schemas'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as dirtyChai from 'dirty-chai'; import 'mocha'; diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index 850fce873..b454ca147 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/asset-buyer", + "name": "@0x/asset-buyer", "version": "2.0.0", "engines": { "node": ">=6.12" @@ -36,21 +36,21 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/connect": "^3.0.1", - "@0xproject/contract-wrappers": "^2.0.2", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.13", + "@0x/connect": "^3.0.1", + "@0x/contract-wrappers": "^2.0.2", + "@0x/json-schemas": "^1.0.7", + "@0x/order-utils": "^1.0.7", + "@0x/subproviders": "^2.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", "lodash": "^4.17.10" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "^4.14.116", "@types/mocha": "^2.2.42", "@types/node": "*", diff --git a/packages/asset-buyer/src/asset_buyer.ts b/packages/asset-buyer/src/asset_buyer.ts index 4739e5a29..2fe8f6deb 100644 --- a/packages/asset-buyer/src/asset_buyer.ts +++ b/packages/asset-buyer/src/asset_buyer.ts @@ -1,9 +1,9 @@ -import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { schemas } from '@0xproject/json-schemas'; -import { SignedOrder } from '@0xproject/order-utils'; -import { ObjectMap } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ContractWrappers } from '@0x/contract-wrappers'; +import { schemas } from '@0x/json-schemas'; +import { SignedOrder } from '@0x/order-utils'; +import { ObjectMap } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/asset-buyer/src/constants.ts b/packages/asset-buyer/src/constants.ts index e095dee06..55effdb23 100644 --- a/packages/asset-buyer/src/constants.ts +++ b/packages/asset-buyer/src/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import { AssetBuyerOpts, BuyQuoteExecutionOpts, BuyQuoteRequestOpts } from './types'; diff --git a/packages/asset-buyer/src/index.ts b/packages/asset-buyer/src/index.ts index 9ac3c0b8a..8418edb42 100644 --- a/packages/asset-buyer/src/index.ts +++ b/packages/asset-buyer/src/index.ts @@ -5,8 +5,8 @@ export { JSONRPCErrorCallback, Provider, } from 'ethereum-types'; -export { SignedOrder } from '@0xproject/types'; -export { BigNumber } from '@0xproject/utils'; +export { SignedOrder } from '@0x/types'; +export { BigNumber } from '@0x/utils'; export { AssetBuyer } from './asset_buyer'; export { BasicOrderProvider } from './order_providers/basic_order_provider'; diff --git a/packages/asset-buyer/src/order_providers/basic_order_provider.ts b/packages/asset-buyer/src/order_providers/basic_order_provider.ts index 9bb2d90ac..68406f19b 100644 --- a/packages/asset-buyer/src/order_providers/basic_order_provider.ts +++ b/packages/asset-buyer/src/order_providers/basic_order_provider.ts @@ -1,5 +1,5 @@ -import { schemas } from '@0xproject/json-schemas'; -import { SignedOrder } from '@0xproject/types'; +import { schemas } from '@0x/json-schemas'; +import { SignedOrder } from '@0x/types'; import * as _ from 'lodash'; import { OrderProvider, OrderProviderRequest, OrderProviderResponse } from '../types'; diff --git a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts index 31942c25b..91682b089 100644 --- a/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts +++ b/packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts @@ -1,5 +1,5 @@ -import { HttpClient } from '@0xproject/connect'; -import { APIOrder, OrderbookResponse } from '@0xproject/types'; +import { HttpClient } from '@0x/connect'; +import { APIOrder, OrderbookResponse } from '@0x/types'; import * as _ from 'lodash'; import { diff --git a/packages/asset-buyer/src/types.ts b/packages/asset-buyer/src/types.ts index 6218f4ba4..0d8e732d7 100644 --- a/packages/asset-buyer/src/types.ts +++ b/packages/asset-buyer/src/types.ts @@ -1,5 +1,5 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; /** * makerAssetData: The assetData representing the desired makerAsset. diff --git a/packages/asset-buyer/src/utils/assert.ts b/packages/asset-buyer/src/utils/assert.ts index d43b71fee..e8cb7f763 100644 --- a/packages/asset-buyer/src/utils/assert.ts +++ b/packages/asset-buyer/src/utils/assert.ts @@ -1,6 +1,6 @@ -import { assert as sharedAssert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; -import { SignedOrder } from '@0xproject/types'; +import { assert as sharedAssert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; +import { SignedOrder } from '@0x/types'; import * as _ from 'lodash'; import { BuyQuote, BuyQuoteInfo, OrderProvider, OrderProviderRequest } from '../types'; diff --git a/packages/asset-buyer/src/utils/asset_data_utils.ts b/packages/asset-buyer/src/utils/asset_data_utils.ts index f54462a23..70f646902 100644 --- a/packages/asset-buyer/src/utils/asset_data_utils.ts +++ b/packages/asset-buyer/src/utils/asset_data_utils.ts @@ -1,5 +1,5 @@ -import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { assetDataUtils as sharedAssetDataUtils } from '@0xproject/order-utils'; +import { ContractWrappers } from '@0x/contract-wrappers'; +import { assetDataUtils as sharedAssetDataUtils } from '@0x/order-utils'; import * as _ from 'lodash'; export const assetDataUtils = { diff --git a/packages/asset-buyer/src/utils/buy_quote_calculator.ts b/packages/asset-buyer/src/utils/buy_quote_calculator.ts index a1d334eef..b0cb4a547 100644 --- a/packages/asset-buyer/src/utils/buy_quote_calculator.ts +++ b/packages/asset-buyer/src/utils/buy_quote_calculator.ts @@ -1,5 +1,5 @@ -import { marketUtils, rateUtils } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { marketUtils, rateUtils } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { constants } from '../constants'; diff --git a/packages/asset-buyer/src/utils/order_provider_response_processor.ts b/packages/asset-buyer/src/utils/order_provider_response_processor.ts index 74eec162d..81464d945 100644 --- a/packages/asset-buyer/src/utils/order_provider_response_processor.ts +++ b/packages/asset-buyer/src/utils/order_provider_response_processor.ts @@ -1,8 +1,8 @@ -import { OrderAndTraderInfo, OrderStatus, OrderValidatorWrapper } from '@0xproject/contract-wrappers'; -import { sortingUtils } from '@0xproject/order-utils'; -import { RemainingFillableCalculator } from '@0xproject/order-utils/lib/src/remaining_fillable_calculator'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { OrderAndTraderInfo, OrderStatus, OrderValidatorWrapper } from '@0x/contract-wrappers'; +import { sortingUtils } from '@0x/order-utils'; +import { RemainingFillableCalculator } from '@0x/order-utils/lib/src/remaining_fillable_calculator'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { constants } from '../constants'; diff --git a/packages/asset-buyer/src/utils/order_utils.ts b/packages/asset-buyer/src/utils/order_utils.ts index cfc13a8a1..ff47eb7c5 100644 --- a/packages/asset-buyer/src/utils/order_utils.ts +++ b/packages/asset-buyer/src/utils/order_utils.ts @@ -1,5 +1,5 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { constants } from '../constants'; diff --git a/packages/asset-buyer/test/buy_quote_calculator_test.ts b/packages/asset-buyer/test/buy_quote_calculator_test.ts index fda6958cd..0f516a0f7 100644 --- a/packages/asset-buyer/test/buy_quote_calculator_test.ts +++ b/packages/asset-buyer/test/buy_quote_calculator_test.ts @@ -1,5 +1,5 @@ -import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory'; -import { BigNumber } from '@0xproject/utils'; +import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 3758dd1a7..37328fbbf 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/base-contract", + "name": "@0x/base-contract", "version": "3.0.1", "engines": { "node": ">=6.12" @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "chai": "^4.0.1", "make-promises-safe": "^1.1.0", @@ -40,9 +40,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/base-contract/src/index.ts b/packages/base-contract/src/index.ts index 73550ffd4..fbb8478b7 100644 --- a/packages/base-contract/src/index.ts +++ b/packages/base-contract/src/index.ts @@ -1,5 +1,5 @@ -import { abiUtils, BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { abiUtils, BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { AbiDefinition, AbiType, diff --git a/packages/base-contract/test/utils_test.ts b/packages/base-contract/test/utils_test.ts index c083704f4..0608b72a2 100644 --- a/packages/base-contract/test/utils_test.ts +++ b/packages/base-contract/test/utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/connect/package.json b/packages/connect/package.json index 591db0f83..73c6d38f6 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/connect", + "name": "@0x/connect", "version": "3.0.1", "engines": { "node": ">=6.12" @@ -44,12 +44,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", + "@0x/assert": "^1.0.13", + "@0x/json-schemas": "^1.0.7", + "@0x/order-utils": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", "lodash": "^4.17.5", "query-string": "^5.0.1", "sinon": "^4.0.0", @@ -57,7 +57,7 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/fetch-mock": "^6.0.3", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts index bbd0d2042..b6c031fa8 100644 --- a/packages/connect/src/http_client.ts +++ b/packages/connect/src/http_client.ts @@ -1,5 +1,5 @@ -import { assert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; +import { assert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; import { APIOrder, AssetPairsRequestOpts, @@ -14,8 +14,8 @@ import { PagedRequestOpts, RequestOpts, SignedOrder, -} from '@0xproject/types'; -import { fetchAsync } from '@0xproject/utils'; +} from '@0x/types'; +import { fetchAsync } from '@0x/utils'; import * as _ from 'lodash'; import * as queryString from 'query-string'; diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts index 0ec5a0f68..f319d63cb 100644 --- a/packages/connect/src/index.ts +++ b/packages/connect/src/index.ts @@ -17,4 +17,4 @@ export { PaginatedCollection, RequestOpts, SignedOrder, -} from '@0xproject/types'; +} from '@0x/types'; diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts index 4bb0ae534..08a4506ac 100644 --- a/packages/connect/src/types.ts +++ b/packages/connect/src/types.ts @@ -12,7 +12,7 @@ import { PagedRequestOpts, PaginatedCollection, SignedOrder, -} from '@0xproject/types'; +} from '@0x/types'; export interface Client { getAssetPairsAsync: ( diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts index 4e2202d2e..de7536ffe 100644 --- a/packages/connect/src/utils/assert.ts +++ b/packages/connect/src/utils/assert.ts @@ -1,11 +1,11 @@ -import { assert as sharedAssert } from '@0xproject/assert'; +import { assert as sharedAssert } from '@0x/assert'; // HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here // tslint:disable-next-line:no-unused-variable -import { Schema, schemas } from '@0xproject/json-schemas'; +import { Schema, schemas } from '@0x/json-schemas'; // tslint:disable-next-line:no-unused-variable -import { ECSignature } from '@0xproject/types'; +import { ECSignature } from '@0x/types'; // tslint:disable-next-line:no-unused-variable -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; export const assert = { diff --git a/packages/connect/src/utils/orders_channel_message_parser.ts b/packages/connect/src/utils/orders_channel_message_parser.ts index 943d7802e..1306a74b1 100644 --- a/packages/connect/src/utils/orders_channel_message_parser.ts +++ b/packages/connect/src/utils/orders_channel_message_parser.ts @@ -1,8 +1,8 @@ -import { assert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; +import { assert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; import * as _ from 'lodash'; -import { OrdersChannelMessage, OrdersChannelMessageTypes } from '@0xproject/types'; +import { OrdersChannelMessage, OrdersChannelMessageTypes } from '@0x/types'; import { relayerResponseJsonParsers } from './relayer_response_json_parsers'; diff --git a/packages/connect/src/utils/relayer_response_json_parsers.ts b/packages/connect/src/utils/relayer_response_json_parsers.ts index 356e2dde6..2b1a658d1 100644 --- a/packages/connect/src/utils/relayer_response_json_parsers.ts +++ b/packages/connect/src/utils/relayer_response_json_parsers.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; -import { orderParsingUtils } from '@0xproject/order-utils'; +import { assert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; +import { orderParsingUtils } from '@0x/order-utils'; import { APIOrder, @@ -9,7 +9,7 @@ import { OrderbookResponse, OrderConfigResponse, OrdersResponse, -} from '@0xproject/types'; +} from '@0x/types'; import { typeConverters } from './type_converters'; diff --git a/packages/connect/src/utils/type_converters.ts b/packages/connect/src/utils/type_converters.ts index 99760cf74..b262a516b 100644 --- a/packages/connect/src/utils/type_converters.ts +++ b/packages/connect/src/utils/type_converters.ts @@ -1,7 +1,7 @@ -import { orderParsingUtils } from '@0xproject/order-utils'; +import { orderParsingUtils } from '@0x/order-utils'; import * as _ from 'lodash'; -import { APIOrder } from '@0xproject/types'; +import { APIOrder } from '@0x/types'; export const typeConverters = { convertOrderbookStringFieldsToBigNumber(orderbook: any): any { diff --git a/packages/connect/src/ws_orders_channel.ts b/packages/connect/src/ws_orders_channel.ts index bf5e8508d..70a357c61 100644 --- a/packages/connect/src/ws_orders_channel.ts +++ b/packages/connect/src/ws_orders_channel.ts @@ -1,4 +1,4 @@ -import { OrdersChannelMessageTypes, OrdersChannelSubscriptionOpts } from '@0xproject/types'; +import { OrdersChannelMessageTypes, OrdersChannelSubscriptionOpts } from '@0x/types'; import * as _ from 'lodash'; import { v4 as uuid } from 'uuid'; import * as WebSocket from 'websocket'; diff --git a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts index 27216e421..3ceeffdc8 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; -import { AssetPairsResponse } from '@0xproject/types'; +import { AssetPairsResponse } from '@0x/types'; export const assetDataPairsResponse: AssetPairsResponse = { total: 43, diff --git a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts index 6f544e9d3..694433128 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts @@ -1,4 +1,4 @@ -import { FeeRecipientsResponse } from '@0xproject/types'; +import { FeeRecipientsResponse } from '@0x/types'; export const feeRecipientsResponse: FeeRecipientsResponse = { total: 3, diff --git a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts index c8a669b3b..3d2fbdba8 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const orderResponse = { order: { diff --git a/packages/connect/test/fixtures/standard_relayer_api/order_config.ts b/packages/connect/test/fixtures/standard_relayer_api/order_config.ts index 56a4ac550..2290c39c0 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/order_config.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/order_config.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; -import { OrderConfigResponse } from '@0xproject/types'; +import { OrderConfigResponse } from '@0x/types'; export const orderConfigResponse: OrderConfigResponse = { senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32', diff --git a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts b/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts index 21d51da74..de2d4eaea 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/orderbook.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; -import { OrderbookResponse } from '@0xproject/types'; +import { OrderbookResponse } from '@0x/types'; export const orderbookResponse: OrderbookResponse = { bids: { diff --git a/packages/connect/test/fixtures/standard_relayer_api/orders.ts b/packages/connect/test/fixtures/standard_relayer_api/orders.ts index fb85990d0..ed1f588df 100644 --- a/packages/connect/test/fixtures/standard_relayer_api/orders.ts +++ b/packages/connect/test/fixtures/standard_relayer_api/orders.ts @@ -1,6 +1,6 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; -import { OrdersResponse } from '@0xproject/types'; +import { OrdersResponse } from '@0x/types'; export const ordersResponse: OrdersResponse = { total: 984, diff --git a/packages/connect/test/http_client_test.ts b/packages/connect/test/http_client_test.ts index e9fc9372e..f799ca849 100644 --- a/packages/connect/test/http_client_test.ts +++ b/packages/connect/test/http_client_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; import * as dirtyChai from 'dirty-chai'; diff --git a/packages/contract-addresses/package.json b/packages/contract-addresses/package.json index 60642224f..809fc1fc9 100644 --- a/packages/contract-addresses/package.json +++ b/packages/contract-addresses/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/contract-addresses", + "name": "@0x/contract-addresses", "version": "1.0.0", "engines": { "node": ">=6.12" diff --git a/packages/contract-artifacts/package.json b/packages/contract-artifacts/package.json index 3e1696695..9ff836c65 100644 --- a/packages/contract-artifacts/package.json +++ b/packages/contract-artifacts/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/contract-artifacts", + "name": "@0x/contract-artifacts", "version": "1.0.0", "engines": { "node": ">=6.12" diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index ef19057cd..b1611808f 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/contract-wrappers", + "name": "@0x/contract-wrappers", "version": "2.0.2", "description": "Smart TS wrappers for 0x smart contracts", "keywords": [ @@ -37,10 +37,10 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/migrations": "^1.0.14", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/migrations": "^1.0.14", + "@0x/subproviders": "^2.0.7", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "*", @@ -65,17 +65,17 @@ "web3-provider-engine": "14.0.6" }, "dependencies": { - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/assert": "^1.0.13", - "@0xproject/contract-addresses": "^1.0.0", - "@0xproject/contract-artifacts": "^1.0.0", - "@0xproject/fill-scenarios": "^1.0.7", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/assert": "^1.0.13", + "@0x/contract-addresses": "^1.0.0", + "@0x/contract-artifacts": "^1.0.0", + "@0x/fill-scenarios": "^1.0.7", + "@0x/json-schemas": "^1.0.7", + "@0x/order-utils": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", diff --git a/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts index 1f139f1ef..b095c8e79 100644 --- a/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts +++ b/packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export abstract class AbstractBalanceAndProxyAllowanceLazyStore { public abstract async getBalanceAsync(tokenAddress: string, userAddress: string): Promise; diff --git a/packages/contract-wrappers/src/contract_wrappers.ts b/packages/contract-wrappers/src/contract_wrappers.ts index 36381c623..0c535bd5c 100644 --- a/packages/contract-wrappers/src/contract_wrappers.ts +++ b/packages/contract-wrappers/src/contract_wrappers.ts @@ -7,8 +7,8 @@ import { Forwarder, OrderValidator, WETH9, -} from '@0xproject/contract-artifacts'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/contract-artifacts'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts index e03e4188b..7b11f35bc 100644 --- a/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts @@ -1,5 +1,5 @@ -import { AbiDecoder, intervalUtils, logUtils } from '@0xproject/utils'; -import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { AbiDecoder, intervalUtils, logUtils } from '@0x/utils'; +import { marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { BlockParamLiteral, ContractAbi, diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index e59b2c20b..adf8c7614 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -1,7 +1,7 @@ -import { ERC20ProxyContract } from '@0xproject/abi-gen-wrappers'; -import { ERC20Proxy } from '@0xproject/contract-artifacts'; -import { AssetProxyId } from '@0xproject/types'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ERC20ProxyContract } from '@0x/abi-gen-wrappers'; +import { ERC20Proxy } from '@0x/contract-artifacts'; +import { AssetProxyId } from '@0x/types'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts index 192eaf0a7..f5fc63b42 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts @@ -1,8 +1,8 @@ -import { ERC20TokenContract, ERC20TokenEventArgs, ERC20TokenEvents } from '@0xproject/abi-gen-wrappers'; -import { ERC20Token } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ERC20TokenContract, ERC20TokenEventArgs, ERC20TokenEvents } from '@0x/abi-gen-wrappers'; +import { ERC20Token } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index adee3e3ab..9f3a6930b 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -1,7 +1,7 @@ -import { ERC721ProxyContract } from '@0xproject/abi-gen-wrappers'; -import { ERC721Proxy } from '@0xproject/contract-artifacts'; -import { AssetProxyId } from '@0xproject/types'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ERC721ProxyContract } from '@0x/abi-gen-wrappers'; +import { ERC721Proxy } from '@0x/contract-artifacts'; +import { AssetProxyId } from '@0x/types'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts index d92d7087c..1c4b61c0b 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts @@ -1,8 +1,8 @@ -import { ERC721TokenContract, ERC721TokenEventArgs, ERC721TokenEvents } from '@0xproject/abi-gen-wrappers'; -import { ERC721Token } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ERC721TokenContract, ERC721TokenEventArgs, ERC721TokenEvents } from '@0x/abi-gen-wrappers'; +import { ERC721Token } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts index d5775208e..d4a08da86 100644 --- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts @@ -1,8 +1,8 @@ -import { WETH9Contract, WETH9EventArgs, WETH9Events } from '@0xproject/abi-gen-wrappers'; -import { WETH9 } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { WETH9Contract, WETH9EventArgs, WETH9Events } from '@0x/abi-gen-wrappers'; +import { WETH9 } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index 9063e0e40..907d25aa0 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -1,15 +1,15 @@ -import { ExchangeContract, ExchangeEventArgs, ExchangeEvents } from '@0xproject/abi-gen-wrappers'; -import { Exchange } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; +import { ExchangeContract, ExchangeEventArgs, ExchangeEvents } from '@0x/abi-gen-wrappers'; +import { Exchange } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; import { assetDataUtils, BalanceAndProxyAllowanceLazyStore, ExchangeTransferSimulator, OrderValidationUtils, -} from '@0xproject/order-utils'; -import { AssetProxyId, Order, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/order-utils'; +import { AssetProxyId, Order, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { BlockParamLiteral, ContractAbi, LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts index b6fc071ea..9463a6849 100644 --- a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts @@ -1,9 +1,9 @@ -import { ForwarderContract } from '@0xproject/abi-gen-wrappers'; -import { Forwarder } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { AssetProxyId, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ForwarderContract } from '@0x/abi-gen-wrappers'; +import { Forwarder } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { AssetProxyId, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts index 2ae1a158b..c186e080e 100644 --- a/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts @@ -1,9 +1,9 @@ -import { OrderValidatorContract } from '@0xproject/abi-gen-wrappers'; -import { OrderValidator } from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { OrderValidatorContract } from '@0x/abi-gen-wrappers'; +import { OrderValidator } from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts b/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts index 023cd5ac3..d10cffe57 100644 --- a/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts +++ b/packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts @@ -1,7 +1,7 @@ // tslint:disable:no-unnecessary-type-assertion -import { AbstractBalanceAndProxyAllowanceFetcher, assetDataUtils } from '@0xproject/order-utils'; -import { AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { AbstractBalanceAndProxyAllowanceFetcher, assetDataUtils } from '@0x/order-utils'; +import { AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { BlockParamLiteral } from 'ethereum-types'; import { ERC20TokenWrapper } from '../contract_wrappers/erc20_token_wrapper'; diff --git a/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts b/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts index 7a252aed3..acf7038fa 100644 --- a/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts +++ b/packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts @@ -1,6 +1,6 @@ // tslint:disable:no-unnecessary-type-assertion -import { AbstractOrderFilledCancelledFetcher } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { AbstractOrderFilledCancelledFetcher } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import { BlockParamLiteral } from 'ethereum-types'; import { ExchangeWrapper } from '../contract_wrappers/exchange_wrapper'; diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts index f24828153..a38bd122b 100644 --- a/packages/contract-wrappers/src/index.ts +++ b/packages/contract-wrappers/src/index.ts @@ -1,4 +1,4 @@ -export { ContractAddresses } from '@0xproject/contract-addresses'; +export { ContractAddresses } from '@0x/contract-addresses'; export { WETH9Events, @@ -23,7 +23,7 @@ export { ExchangeCancelEventArgs, ExchangeEventArgs, ExchangeEvents, -} from '@0xproject/abi-gen-wrappers'; +} from '@0x/abi-gen-wrappers'; export { ContractWrappers } from './contract_wrappers'; export { ERC20TokenWrapper } from './contract_wrappers/erc20_token_wrapper'; @@ -55,7 +55,7 @@ export { ValidateOrderFillableOpts, } from './types'; -export { Order, SignedOrder, AssetProxyId } from '@0xproject/types'; +export { Order, SignedOrder, AssetProxyId } from '@0x/types'; export { BlockParamLiteral, @@ -81,7 +81,7 @@ export { StateMutability, } from 'ethereum-types'; -export { AbstractBalanceAndProxyAllowanceFetcher, AbstractOrderFilledCancelledFetcher } from '@0xproject/order-utils'; +export { AbstractBalanceAndProxyAllowanceFetcher, AbstractOrderFilledCancelledFetcher } from '@0x/order-utils'; export { AssetBalanceAndProxyAllowanceFetcher } from './fetchers/asset_balance_and_proxy_allowance_fetcher'; export { OrderFilledCancelledFetcher } from './fetchers/order_filled_cancelled_fetcher'; diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index 895a47cc1..60750179f 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -7,10 +7,10 @@ import { ExchangeEvents, WETH9EventArgs, WETH9Events, -} from '@0xproject/abi-gen-wrappers'; -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { OrderState, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +} from '@0x/abi-gen-wrappers'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { OrderState, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { BlockParam, ContractEventArg, DecodedLogArgs, LogEntryEvent, LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts index 30726c546..3f02ed052 100644 --- a/packages/contract-wrappers/src/utils/assert.ts +++ b/packages/contract-wrappers/src/utils/assert.ts @@ -1,10 +1,10 @@ -import { assert as sharedAssert } from '@0xproject/assert'; +import { assert as sharedAssert } from '@0x/assert'; // HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here -import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable -import { assetDataUtils, signatureUtils } from '@0xproject/order-utils'; -import { Order } from '@0xproject/types'; // tslint:disable-line:no-unused-variable -import { BigNumber } from '@0xproject/utils'; // tslint:disable-line:no-unused-variable -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Schema } from '@0x/json-schemas'; // tslint:disable-line:no-unused-variable +import { assetDataUtils, signatureUtils } from '@0x/order-utils'; +import { Order } from '@0x/types'; // tslint:disable-line:no-unused-variable +import { BigNumber } from '@0x/utils'; // tslint:disable-line:no-unused-variable +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts b/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts index 3172cf531..bee7acaa7 100644 --- a/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts +++ b/packages/contract-wrappers/src/utils/calldata_optimization_utils.ts @@ -1,4 +1,4 @@ -import { SignedOrder } from '@0xproject/types'; +import { SignedOrder } from '@0x/types'; import * as _ from 'lodash'; import { constants } from './constants'; diff --git a/packages/contract-wrappers/src/utils/constants.ts b/packages/contract-wrappers/src/utils/constants.ts index 78441decf..9ff61f62a 100644 --- a/packages/contract-wrappers/src/utils/constants.ts +++ b/packages/contract-wrappers/src/utils/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', diff --git a/packages/contract-wrappers/src/utils/contract_addresses.ts b/packages/contract-wrappers/src/utils/contract_addresses.ts index 98967c52d..dc156e017 100644 --- a/packages/contract-wrappers/src/utils/contract_addresses.ts +++ b/packages/contract-wrappers/src/utils/contract_addresses.ts @@ -1,4 +1,4 @@ -import { ContractAddresses, getContractAddressesForNetworkOrThrow, NetworkId } from '@0xproject/contract-addresses'; +import { ContractAddresses, getContractAddressesForNetworkOrThrow, NetworkId } from '@0x/contract-addresses'; import * as _ from 'lodash'; /** diff --git a/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts b/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts index a7c4a238f..f374d509b 100644 --- a/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts +++ b/packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts @@ -1,5 +1,5 @@ -import { ExchangeContractErrs } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { ExchangeContractErrs } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { AbstractBalanceAndProxyAllowanceLazyStore } from '../abstract/abstract_balance_and_proxy_allowance_lazy_store'; import { TradeSide, TransferType } from '../types'; diff --git a/packages/contract-wrappers/src/utils/transaction_encoder.ts b/packages/contract-wrappers/src/utils/transaction_encoder.ts index d179fa07e..0cf08a8fe 100644 --- a/packages/contract-wrappers/src/utils/transaction_encoder.ts +++ b/packages/contract-wrappers/src/utils/transaction_encoder.ts @@ -1,9 +1,9 @@ -import { ExchangeContract } from '@0xproject/abi-gen-wrappers'; +import { ExchangeContract } from '@0x/abi-gen-wrappers'; -import { schemas } from '@0xproject/json-schemas'; -import { eip712Utils } from '@0xproject/order-utils'; -import { Order, SignedOrder } from '@0xproject/types'; -import { BigNumber, signTypedDataUtils } from '@0xproject/utils'; +import { schemas } from '@0x/json-schemas'; +import { eip712Utils } from '@0x/order-utils'; +import { Order, SignedOrder } from '@0x/types'; +import { BigNumber, signTypedDataUtils } from '@0x/utils'; import _ = require('lodash'); import { assert } from './assert'; diff --git a/packages/contract-wrappers/src/utils/utils.ts b/packages/contract-wrappers/src/utils/utils.ts index f7949ec34..fbacdaa28 100644 --- a/packages/contract-wrappers/src/utils/utils.ts +++ b/packages/contract-wrappers/src/utils/utils.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { constants } from './constants'; diff --git a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts index 94e55bffa..6cb8a669e 100644 --- a/packages/contract-wrappers/test/calldata_optimization_utils_test.ts +++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts @@ -1,4 +1,4 @@ -import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory'; +import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts index c065f4d63..15d3a9ead 100644 --- a/packages/contract-wrappers/test/erc20_wrapper_test.ts +++ b/packages/contract-wrappers/test/erc20_wrapper_test.ts @@ -1,8 +1,8 @@ -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; -import { DoneCallback } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0x/subproviders'; +import { DoneCallback } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { Provider } from 'ethereum-types'; import 'mocha'; diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts index 1efbb37c7..a7f1e4c41 100644 --- a/packages/contract-wrappers/test/erc721_wrapper_test.ts +++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; -import { DoneCallback } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0x/subproviders'; +import { DoneCallback } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { Provider } from 'ethereum-types'; import 'mocha'; diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts index 74d030e1d..e3efef19d 100644 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts @@ -1,8 +1,8 @@ -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { DoneCallback } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { DoneCallback } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index 4d0176349..0e537bd83 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { DoneCallback, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { DoneCallback, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { BlockParamLiteral } from 'ethereum-types'; import 'mocha'; diff --git a/packages/contract-wrappers/test/forwarder_wrapper_test.ts b/packages/contract-wrappers/test/forwarder_wrapper_test.ts index 730658884..ff4ff8b67 100644 --- a/packages/contract-wrappers/test/forwarder_wrapper_test.ts +++ b/packages/contract-wrappers/test/forwarder_wrapper_test.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/contract-wrappers/test/order_validator_wrapper_test.ts b/packages/contract-wrappers/test/order_validator_wrapper_test.ts index 636aa9a50..da3f99e72 100644 --- a/packages/contract-wrappers/test/order_validator_wrapper_test.ts +++ b/packages/contract-wrappers/test/order_validator_wrapper_test.ts @@ -1,9 +1,9 @@ -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; diff --git a/packages/contract-wrappers/test/revert_validation_test.ts b/packages/contract-wrappers/test/revert_validation_test.ts index f5f8be6c3..efd5dd61f 100644 --- a/packages/contract-wrappers/test/revert_validation_test.ts +++ b/packages/contract-wrappers/test/revert_validation_test.ts @@ -1,10 +1,10 @@ -import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { runMigrationsAsync } from '@0xproject/migrations'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle, devConstants, web3Factory } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { runMigrationsAsync } from '@0x/migrations'; +import { assetDataUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/contract-wrappers/test/subscription_test.ts b/packages/contract-wrappers/test/subscription_test.ts index 40921bce8..0fa6af40d 100644 --- a/packages/contract-wrappers/test/subscription_test.ts +++ b/packages/contract-wrappers/test/subscription_test.ts @@ -1,5 +1,5 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { DoneCallback } from '@0xproject/types'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { DoneCallback } from '@0x/types'; import * as _ from 'lodash'; import 'mocha'; import * as Sinon from 'sinon'; diff --git a/packages/contract-wrappers/test/transaction_encoder_test.ts b/packages/contract-wrappers/test/transaction_encoder_test.ts index 300f2a330..ef9eb2cf3 100644 --- a/packages/contract-wrappers/test/transaction_encoder_test.ts +++ b/packages/contract-wrappers/test/transaction_encoder_test.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils, signatureUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils, signatureUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import 'mocha'; import { ContractWrappers } from '../src'; diff --git a/packages/contract-wrappers/test/utils/constants.ts b/packages/contract-wrappers/test/utils/constants.ts index f38728b77..ca6c574e4 100644 --- a/packages/contract-wrappers/test/utils/constants.ts +++ b/packages/contract-wrappers/test/utils/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', diff --git a/packages/contract-wrappers/test/utils/migrate.ts b/packages/contract-wrappers/test/utils/migrate.ts index 53319a383..665ce0faa 100644 --- a/packages/contract-wrappers/test/utils/migrate.ts +++ b/packages/contract-wrappers/test/utils/migrate.ts @@ -1,6 +1,6 @@ -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { devConstants } from '@0xproject/dev-utils'; -import { runMigrationsOnceAsync } from '@0xproject/migrations'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { devConstants } from '@0x/dev-utils'; +import { runMigrationsOnceAsync } from '@0x/migrations'; import { provider } from './web3_wrapper'; diff --git a/packages/contract-wrappers/test/utils/token_utils.ts b/packages/contract-wrappers/test/utils/token_utils.ts index c9e1e7434..f8a88637f 100644 --- a/packages/contract-wrappers/test/utils/token_utils.ts +++ b/packages/contract-wrappers/test/utils/token_utils.ts @@ -1,7 +1,7 @@ -import { DummyERC721TokenContract } from '@0xproject/abi-gen-wrappers'; -import { DummyERC721Token } from '@0xproject/contract-artifacts'; -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { DummyERC721TokenContract } from '@0x/abi-gen-wrappers'; +import { DummyERC721Token } from '@0x/contract-artifacts'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import { provider, txDefaults, web3Wrapper } from './web3_wrapper'; diff --git a/packages/contract-wrappers/test/utils/web3_wrapper.ts b/packages/contract-wrappers/test/utils/web3_wrapper.ts index 02c8c5918..4e86ebeba 100644 --- a/packages/contract-wrappers/test/utils/web3_wrapper.ts +++ b/packages/contract-wrappers/test/utils/web3_wrapper.ts @@ -1,5 +1,5 @@ -import { devConstants, web3Factory } from '@0xproject/dev-utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { devConstants, web3Factory } from '@0x/dev-utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; const txDefaults = { diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 33ae3db9a..72a23fc9b 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -45,12 +45,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { - "@0xproject/abi-gen": "^1.0.13", - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/sol-compiler": "^1.1.7", - "@0xproject/sol-cov": "^2.1.7", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/tslint-config": "^1.0.8", + "@0x/abi-gen": "^1.0.13", + "@0x/dev-utils": "^1.0.12", + "@0x/sol-compiler": "^1.1.7", + "@0x/sol-cov": "^2.1.7", + "@0x/subproviders": "^2.0.7", + "@0x/tslint-config": "^1.0.8", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", "@types/lodash": "4.14.104", @@ -71,12 +71,12 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0xproject/base-contract": "^3.0.1", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/base-contract": "^3.0.1", + "@0x/order-utils": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", "ethereum-types": "^1.0.11", diff --git a/packages/contracts/test/asset_proxy/authorizable.ts b/packages/contracts/test/asset_proxy/authorizable.ts index a37a865fe..e21af9b81 100644 --- a/packages/contracts/test/asset_proxy/authorizable.ts +++ b/packages/contracts/test/asset_proxy/authorizable.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/asset_proxy/proxies.ts b/packages/contracts/test/asset_proxy/proxies.ts index a46a580d1..b8305993e 100644 --- a/packages/contracts/test/asset_proxy/proxies.ts +++ b/packages/contracts/test/asset_proxy/proxies.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils } from '@0x/order-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/exchange/core.ts b/packages/contracts/test/exchange/core.ts index a47240efc..fc8dc5346 100644 --- a/packages/contracts/test/exchange/core.ts +++ b/packages/contracts/test/exchange/core.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { RevertReason, SignatureType, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); diff --git a/packages/contracts/test/exchange/dispatcher.ts b/packages/contracts/test/exchange/dispatcher.ts index 2967ed4e8..3d3aa42c2 100644 --- a/packages/contracts/test/exchange/dispatcher.ts +++ b/packages/contracts/test/exchange/dispatcher.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { AssetProxyId, RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils } from '@0x/order-utils'; +import { AssetProxyId, RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/exchange/fill_order.ts b/packages/contracts/test/exchange/fill_order.ts index b1e08324f..37efaad2b 100644 --- a/packages/contracts/test/exchange/fill_order.ts +++ b/packages/contracts/test/exchange/fill_order.ts @@ -1,4 +1,4 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; import * as _ from 'lodash'; import { chaiSetup } from '../utils/chai_setup'; diff --git a/packages/contracts/test/exchange/internal.ts b/packages/contracts/test/exchange/internal.ts index a1a14d56c..109be29c6 100644 --- a/packages/contracts/test/exchange/internal.ts +++ b/packages/contracts/test/exchange/internal.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { Order, RevertReason, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { Order, RevertReason, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/exchange/libs.ts b/packages/contracts/test/exchange/libs.ts index 9d5aebcd2..503ef0e0f 100644 --- a/packages/contracts/test/exchange/libs.ts +++ b/packages/contracts/test/exchange/libs.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { TestConstantsContract } from '../../generated-wrappers/test_constants'; diff --git a/packages/contracts/test/exchange/match_orders.ts b/packages/contracts/test/exchange/match_orders.ts index d20b6227f..eea9992d9 100644 --- a/packages/contracts/test/exchange/match_orders.ts +++ b/packages/contracts/test/exchange/match_orders.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils } from '@0x/order-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts index 6b9cc87f4..756c72766 100644 --- a/packages/contracts/test/exchange/signature_validator.ts +++ b/packages/contracts/test/exchange/signature_validator.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, orderHashUtils, signatureUtils } from '@0xproject/order-utils'; -import { RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, orderHashUtils, signatureUtils } from '@0x/order-utils'; +import { RevertReason, SignatureType, SignedOrder } from '@0x/types'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index c440770c1..1b5eef295 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils'; +import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/exchange/wrapper.ts b/packages/contracts/test/exchange/wrapper.ts index 1ddb018ba..6b660aac5 100644 --- a/packages/contracts/test/exchange/wrapper.ts +++ b/packages/contracts/test/exchange/wrapper.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { RevertReason, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { RevertReason, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/extensions/forwarder.ts b/packages/contracts/test/extensions/forwarder.ts index f6d1303b0..b76624fa9 100644 --- a/packages/contracts/test/extensions/forwarder.ts +++ b/packages/contracts/test/extensions/forwarder.ts @@ -1,8 +1,8 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { RevertReason, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils } from '@0x/order-utils'; +import { RevertReason, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { TransactionReceiptWithDecodedLogs } from 'ethereum-types'; diff --git a/packages/contracts/test/extensions/order_validator.ts b/packages/contracts/test/extensions/order_validator.ts index 5c01de020..37bd1b0e2 100644 --- a/packages/contracts/test/extensions/order_validator.ts +++ b/packages/contracts/test/extensions/order_validator.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/global_hooks.ts b/packages/contracts/test/global_hooks.ts index cf7c52efd..2e9ac9e21 100644 --- a/packages/contracts/test/global_hooks.ts +++ b/packages/contracts/test/global_hooks.ts @@ -1,4 +1,4 @@ -import { env, EnvVars } from '@0xproject/dev-utils'; +import { env, EnvVars } from '@0x/dev-utils'; import { coverage } from './utils/coverage'; import { profiler } from './utils/profiler'; diff --git a/packages/contracts/test/libraries/lib_bytes.ts b/packages/contracts/test/libraries/lib_bytes.ts index 8e8ed7ede..b1a389f00 100644 --- a/packages/contracts/test/libraries/lib_bytes.ts +++ b/packages/contracts/test/libraries/lib_bytes.ts @@ -1,7 +1,7 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import BN = require('bn.js'); import * as chai from 'chai'; import ethUtil = require('ethereumjs-util'); diff --git a/packages/contracts/test/multisig/asset_proxy_owner.ts b/packages/contracts/test/multisig/asset_proxy_owner.ts index d866b392e..087152316 100644 --- a/packages/contracts/test/multisig/asset_proxy_owner.ts +++ b/packages/contracts/test/multisig/asset_proxy_owner.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts index 60787ac50..1c0cb0515 100644 --- a/packages/contracts/test/multisig/multi_sig_with_time_lock.ts +++ b/packages/contracts/test/multisig/multi_sig_with_time_lock.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/tokens/erc721_token.ts b/packages/contracts/test/tokens/erc721_token.ts index fe10e060a..72407748f 100644 --- a/packages/contracts/test/tokens/erc721_token.ts +++ b/packages/contracts/test/tokens/erc721_token.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/contracts/test/tokens/unlimited_allowance_token.ts b/packages/contracts/test/tokens/unlimited_allowance_token.ts index ec00e43ab..ea5a50522 100644 --- a/packages/contracts/test/tokens/unlimited_allowance_token.ts +++ b/packages/contracts/test/tokens/unlimited_allowance_token.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { RevertReason } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { RevertReason } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { DummyERC20TokenContract } from '../../generated-wrappers/dummy_erc20_token'; diff --git a/packages/contracts/test/tokens/weth9.ts b/packages/contracts/test/tokens/weth9.ts index 25463ac62..9a31dc3f2 100644 --- a/packages/contracts/test/tokens/weth9.ts +++ b/packages/contracts/test/tokens/weth9.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { WETH9Contract } from '../../generated-wrappers/weth9'; diff --git a/packages/contracts/test/tokens/zrx_token.ts b/packages/contracts/test/tokens/zrx_token.ts index 8881aca77..cab62c205 100644 --- a/packages/contracts/test/tokens/zrx_token.ts +++ b/packages/contracts/test/tokens/zrx_token.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { ZRXTokenContract } from '../../generated-wrappers/zrx_token'; diff --git a/packages/contracts/test/tutorials/arbitrage.ts b/packages/contracts/test/tutorials/arbitrage.ts index 6851483cc..78e0bc238 100644 --- a/packages/contracts/test/tutorials/arbitrage.ts +++ b/packages/contracts/test/tutorials/arbitrage.ts @@ -1,8 +1,8 @@ // import { ECSignature, SignedOrder, ZeroEx } from '0x.js'; -// import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils'; +// import { BlockchainLifecycle, devConstants, web3Factory } from '@0x/dev-utils'; // import { ExchangeContractErrs } from 'ethereum-types'; -// import { BigNumber } from '@0xproject/utils'; -// import { Web3Wrapper } from '@0xproject/web3-wrapper'; +// import { BigNumber } from '@0x/utils'; +// import { Web3Wrapper } from '@0x/web3-wrapper'; // import * as chai from 'chai'; // import ethUtil = require('ethereumjs-util'); // import * as Web3 from 'web3'; diff --git a/packages/contracts/test/utils/address_utils.ts b/packages/contracts/test/utils/address_utils.ts index 3cf8ec786..634da0c16 100644 --- a/packages/contracts/test/utils/address_utils.ts +++ b/packages/contracts/test/utils/address_utils.ts @@ -1,5 +1,5 @@ -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { crypto } from '@0xproject/order-utils/lib/src/crypto'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { crypto } from '@0x/order-utils/lib/src/crypto'; export const addressUtils = { generatePseudoRandomAddress(): string { diff --git a/packages/contracts/test/utils/assertions.ts b/packages/contracts/test/utils/assertions.ts index 3361a751a..5b1cedfcc 100644 --- a/packages/contracts/test/utils/assertions.ts +++ b/packages/contracts/test/utils/assertions.ts @@ -1,6 +1,6 @@ -import { RevertReason } from '@0xproject/types'; -import { logUtils } from '@0xproject/utils'; -import { NodeType } from '@0xproject/web3-wrapper'; +import { RevertReason } from '@0x/types'; +import { logUtils } from '@0x/utils'; +import { NodeType } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { TransactionReceipt, TransactionReceiptStatus, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/asset_wrapper.ts b/packages/contracts/test/utils/asset_wrapper.ts index e3a4800c6..4e7696066 100644 --- a/packages/contracts/test/utils/asset_wrapper.ts +++ b/packages/contracts/test/utils/asset_wrapper.ts @@ -1,6 +1,6 @@ -import { assetDataUtils } from '@0xproject/order-utils'; -import { AssetProxyId } from '@0xproject/types'; -import { BigNumber, errorUtils } from '@0xproject/utils'; +import { assetDataUtils } from '@0x/order-utils'; +import { AssetProxyId } from '@0x/types'; +import { BigNumber, errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import { AbstractAssetWrapper } from './abstract_asset_wrapper'; diff --git a/packages/contracts/test/utils/combinatorial_utils.ts b/packages/contracts/test/utils/combinatorial_utils.ts index d72b41f8a..bb1b55b4d 100644 --- a/packages/contracts/test/utils/combinatorial_utils.ts +++ b/packages/contracts/test/utils/combinatorial_utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as combinatorics from 'js-combinatorics'; import { testWithReferenceFuncAsync } from './test_with_reference'; diff --git a/packages/contracts/test/utils/constants.ts b/packages/contracts/test/utils/constants.ts index b9ba8ccb9..cd21330e9 100644 --- a/packages/contracts/test/utils/constants.ts +++ b/packages/contracts/test/utils/constants.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/coverage.ts b/packages/contracts/test/utils/coverage.ts index de29a3ecc..5becfa1b6 100644 --- a/packages/contracts/test/utils/coverage.ts +++ b/packages/contracts/test/utils/coverage.ts @@ -1,5 +1,5 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov'; +import { devConstants } from '@0x/dev-utils'; +import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; import * as _ from 'lodash'; let coverageSubprovider: CoverageSubprovider; diff --git a/packages/contracts/test/utils/erc20_wrapper.ts b/packages/contracts/test/utils/erc20_wrapper.ts index 05eaed52b..c281a2abf 100644 --- a/packages/contracts/test/utils/erc20_wrapper.ts +++ b/packages/contracts/test/utils/erc20_wrapper.ts @@ -1,6 +1,6 @@ -import { assetDataUtils } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { assetDataUtils } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/erc721_wrapper.ts b/packages/contracts/test/utils/erc721_wrapper.ts index cdc8f4af6..3ef4e701d 100644 --- a/packages/contracts/test/utils/erc721_wrapper.ts +++ b/packages/contracts/test/utils/erc721_wrapper.ts @@ -1,6 +1,6 @@ -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/exchange_wrapper.ts b/packages/contracts/test/utils/exchange_wrapper.ts index 00014f660..29dba690a 100644 --- a/packages/contracts/test/utils/exchange_wrapper.ts +++ b/packages/contracts/test/utils/exchange_wrapper.ts @@ -1,6 +1,6 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import { ExchangeContract } from '../../generated-wrappers/exchange'; diff --git a/packages/contracts/test/utils/fill_order_combinatorial_utils.ts b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts index f7c35c469..81bb33318 100644 --- a/packages/contracts/test/utils/fill_order_combinatorial_utils.ts +++ b/packages/contracts/test/utils/fill_order_combinatorial_utils.ts @@ -5,10 +5,10 @@ import { orderHashUtils, OrderStateUtils, OrderValidationUtils, -} from '@0xproject/order-utils'; -import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0xproject/types'; -import { BigNumber, errorUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/order-utils'; +import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0x/types'; +import { BigNumber, errorUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/formatters.ts b/packages/contracts/test/utils/formatters.ts index 32e4787d6..813eb45db 100644 --- a/packages/contracts/test/utils/formatters.ts +++ b/packages/contracts/test/utils/formatters.ts @@ -1,5 +1,5 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { constants } from './constants'; diff --git a/packages/contracts/test/utils/forwarder_wrapper.ts b/packages/contracts/test/utils/forwarder_wrapper.ts index 07527bc2e..f1a64d47d 100644 --- a/packages/contracts/test/utils/forwarder_wrapper.ts +++ b/packages/contracts/test/utils/forwarder_wrapper.ts @@ -1,6 +1,6 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/log_decoder.ts b/packages/contracts/test/utils/log_decoder.ts index 10ddbdcba..05b0a9204 100644 --- a/packages/contracts/test/utils/log_decoder.ts +++ b/packages/contracts/test/utils/log_decoder.ts @@ -1,5 +1,5 @@ -import { AbiDecoder, BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { AbiDecoder, BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { AbiDefinition, ContractArtifact, diff --git a/packages/contracts/test/utils/match_order_tester.ts b/packages/contracts/test/utils/match_order_tester.ts index e0c55b834..6c2c84959 100644 --- a/packages/contracts/test/utils/match_order_tester.ts +++ b/packages/contracts/test/utils/match_order_tester.ts @@ -1,6 +1,6 @@ -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { AssetProxyId, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { AssetProxyId, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/multi_sig_wrapper.ts b/packages/contracts/test/utils/multi_sig_wrapper.ts index 953d1004e..74fd3b4d6 100644 --- a/packages/contracts/test/utils/multi_sig_wrapper.ts +++ b/packages/contracts/test/utils/multi_sig_wrapper.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/contracts/test/utils/order_factory.ts b/packages/contracts/test/utils/order_factory.ts index 63a893695..2449d1a8a 100644 --- a/packages/contracts/test/utils/order_factory.ts +++ b/packages/contracts/test/utils/order_factory.ts @@ -1,6 +1,6 @@ -import { generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils'; -import { Order, SignatureType, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils'; +import { Order, SignatureType, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { getLatestBlockTimestampAsync } from './block_timestamp'; import { constants } from './constants'; diff --git a/packages/contracts/test/utils/order_factory_from_scenario.ts b/packages/contracts/test/utils/order_factory_from_scenario.ts index 2ffb2d620..60c8606c4 100644 --- a/packages/contracts/test/utils/order_factory_from_scenario.ts +++ b/packages/contracts/test/utils/order_factory_from_scenario.ts @@ -1,6 +1,6 @@ -import { assetDataUtils, generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { Order } from '@0xproject/types'; -import { BigNumber, errorUtils } from '@0xproject/utils'; +import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils'; +import { Order } from '@0x/types'; +import { BigNumber, errorUtils } from '@0x/utils'; import { DummyERC721TokenContract } from '../../generated-wrappers/dummy_erc721_token'; diff --git a/packages/contracts/test/utils/order_utils.ts b/packages/contracts/test/utils/order_utils.ts index 444e27c44..4f7a34011 100644 --- a/packages/contracts/test/utils/order_utils.ts +++ b/packages/contracts/test/utils/order_utils.ts @@ -1,5 +1,5 @@ -import { OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { OrderWithoutExchangeAddress, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { constants } from './constants'; import { CancelOrder, MatchOrder } from './types'; diff --git a/packages/contracts/test/utils/profiler.ts b/packages/contracts/test/utils/profiler.ts index 85ee24f22..2c7c1d66c 100644 --- a/packages/contracts/test/utils/profiler.ts +++ b/packages/contracts/test/utils/profiler.ts @@ -1,5 +1,5 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov'; +import { devConstants } from '@0x/dev-utils'; +import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; import * as _ from 'lodash'; let profilerSubprovider: ProfilerSubprovider; diff --git a/packages/contracts/test/utils/revert_trace.ts b/packages/contracts/test/utils/revert_trace.ts index 0bf8384bc..3f74fd28b 100644 --- a/packages/contracts/test/utils/revert_trace.ts +++ b/packages/contracts/test/utils/revert_trace.ts @@ -1,5 +1,5 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { RevertTraceSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov'; +import { devConstants } from '@0x/dev-utils'; +import { RevertTraceSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; import * as _ from 'lodash'; let revertTraceSubprovider: RevertTraceSubprovider; diff --git a/packages/contracts/test/utils/signing_utils.ts b/packages/contracts/test/utils/signing_utils.ts index 9c711c72c..21f864bfa 100644 --- a/packages/contracts/test/utils/signing_utils.ts +++ b/packages/contracts/test/utils/signing_utils.ts @@ -1,4 +1,4 @@ -import { SignatureType } from '@0xproject/types'; +import { SignatureType } from '@0x/types'; import * as ethUtil from 'ethereumjs-util'; export const signingUtils = { diff --git a/packages/contracts/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts b/packages/contracts/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts index 598ee6d29..64b7dedbe 100644 --- a/packages/contracts/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts +++ b/packages/contracts/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts @@ -1,5 +1,5 @@ -import { AbstractBalanceAndProxyAllowanceFetcher } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { AbstractBalanceAndProxyAllowanceFetcher } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import { AssetWrapper } from './asset_wrapper'; diff --git a/packages/contracts/test/utils/simple_order_filled_cancelled_fetcher.ts b/packages/contracts/test/utils/simple_order_filled_cancelled_fetcher.ts index ed69ecc63..5f5575c7b 100644 --- a/packages/contracts/test/utils/simple_order_filled_cancelled_fetcher.ts +++ b/packages/contracts/test/utils/simple_order_filled_cancelled_fetcher.ts @@ -1,5 +1,5 @@ -import { AbstractOrderFilledCancelledFetcher } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { AbstractOrderFilledCancelledFetcher } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import { ExchangeWrapper } from './exchange_wrapper'; diff --git a/packages/contracts/test/utils/transaction_factory.ts b/packages/contracts/test/utils/transaction_factory.ts index 9ed4c5a31..dbab3ade4 100644 --- a/packages/contracts/test/utils/transaction_factory.ts +++ b/packages/contracts/test/utils/transaction_factory.ts @@ -1,6 +1,6 @@ -import { eip712Utils, generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { SignatureType } from '@0xproject/types'; -import { signTypedDataUtils } from '@0xproject/utils'; +import { eip712Utils, generatePseudoRandomSalt } from '@0x/order-utils'; +import { SignatureType } from '@0x/types'; +import { signTypedDataUtils } from '@0x/utils'; import * as ethUtil from 'ethereumjs-util'; import { signingUtils } from './signing_utils'; diff --git a/packages/contracts/test/utils/type_encoding_utils.ts b/packages/contracts/test/utils/type_encoding_utils.ts index 75307b9bd..bfd9c9ef5 100644 --- a/packages/contracts/test/utils/type_encoding_utils.ts +++ b/packages/contracts/test/utils/type_encoding_utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import BN = require('bn.js'); import ethUtil = require('ethereumjs-util'); diff --git a/packages/contracts/test/utils/types.ts b/packages/contracts/test/utils/types.ts index 598fb5393..9fc9e1570 100644 --- a/packages/contracts/test/utils/types.ts +++ b/packages/contracts/test/utils/types.ts @@ -1,5 +1,5 @@ -import { OrderWithoutExchangeAddress } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { OrderWithoutExchangeAddress } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { AbiDefinition } from 'ethereum-types'; export interface ERC20BalancesByOwner { diff --git a/packages/contracts/test/utils/web3_wrapper.ts b/packages/contracts/test/utils/web3_wrapper.ts index d1cd3d387..f7b1a732a 100644 --- a/packages/contracts/test/utils/web3_wrapper.ts +++ b/packages/contracts/test/utils/web3_wrapper.ts @@ -1,7 +1,7 @@ -import { devConstants, env, EnvVars, web3Factory } from '@0xproject/dev-utils'; -import { prependSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; -import { logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { devConstants, env, EnvVars, web3Factory } from '@0x/dev-utils'; +import { prependSubprovider, Web3ProviderEngine } from '@0x/subproviders'; +import { logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { coverage } from './coverage'; diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json index f73260544..e4d02bdaf 100644 --- a/packages/dev-tools-pages/package.json +++ b/packages/dev-tools-pages/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/dev-tools-pages", + "name": "@0x/dev-tools-pages", "version": "0.0.1", "engines": { "node": ">=6.12" @@ -16,7 +16,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@0xproject/react-shared": "^1.0.15", + "@0x/react-shared": "^1.0.15", "basscss": "^8.0.3", "bowser": "^1.9.3", "less": "^2.7.2", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index 9d054e6bf..da20d008b 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/dev-utils", + "name": "@0x/dev-utils", "version": "1.0.12", "engines": { "node": ">=6.12" @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "make-promises-safe": "^1.1.0", @@ -41,11 +41,11 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/subproviders": "^2.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/subproviders": "^2.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", "ethereum-types": "^1.0.11", diff --git a/packages/dev-utils/src/blockchain_lifecycle.ts b/packages/dev-utils/src/blockchain_lifecycle.ts index a48cb0856..e9687787f 100644 --- a/packages/dev-utils/src/blockchain_lifecycle.ts +++ b/packages/dev-utils/src/blockchain_lifecycle.ts @@ -1,5 +1,5 @@ -import { logUtils } from '@0xproject/utils'; -import { NodeType, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { logUtils } from '@0x/utils'; +import { NodeType, Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; // HACK(albrow): 🐉 We have to do this so that debug.setHead works correctly. diff --git a/packages/dev-utils/src/callback_error_reporter.ts b/packages/dev-utils/src/callback_error_reporter.ts index e69ce1c05..b993bf22a 100644 --- a/packages/dev-utils/src/callback_error_reporter.ts +++ b/packages/dev-utils/src/callback_error_reporter.ts @@ -1,7 +1,7 @@ import * as chai from 'chai'; import * as _ from 'lodash'; -import { DoneCallback } from '@0xproject/types'; +import { DoneCallback } from '@0x/types'; const expect = chai.expect; diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts index 7c86d3df4..b22bcc88b 100644 --- a/packages/dev-utils/src/web3_factory.ts +++ b/packages/dev-utils/src/web3_factory.ts @@ -4,7 +4,7 @@ import { GanacheSubprovider, RPCSubprovider, Web3ProviderEngine, -} from '@0xproject/subproviders'; +} from '@0x/subproviders'; import * as fs from 'fs'; import * as _ from 'lodash'; diff --git a/packages/dev-utils/test/blockchain_lifecycle_test.ts b/packages/dev-utils/test/blockchain_lifecycle_test.ts index 7d5e15fbe..d7e54f0e8 100644 --- a/packages/dev-utils/test/blockchain_lifecycle_test.ts +++ b/packages/dev-utils/test/blockchain_lifecycle_test.ts @@ -1,4 +1,4 @@ -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/dev-utils/test/rpc_test.ts b/packages/dev-utils/test/rpc_test.ts index dfbc0f7b2..f8cea4580 100644 --- a/packages/dev-utils/test/rpc_test.ts +++ b/packages/dev-utils/test/rpc_test.ts @@ -1,4 +1,4 @@ -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import { BlockParamLiteral } from 'ethereum-types'; import 'mocha'; diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json index 954b047e7..994631559 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/ethereum-types/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index fc30f11dc..d54293699 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/fill-scenarios", + "name": "@0x/fill-scenarios", "version": "1.0.7", "description": "0x order fill scenario generator", "main": "lib/index.js", @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/lodash": "4.14.104", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", @@ -28,14 +28,14 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/contract-artifacts": "^1.0.0", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/base-contract": "^3.0.1", + "@0x/contract-artifacts": "^1.0.0", + "@0x/order-utils": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/fill-scenarios/src/fill_scenarios.ts b/packages/fill-scenarios/src/fill_scenarios.ts index 131828e8d..0154bcd0a 100644 --- a/packages/fill-scenarios/src/fill_scenarios.ts +++ b/packages/fill-scenarios/src/fill_scenarios.ts @@ -1,10 +1,10 @@ -import { DummyERC20TokenContract, DummyERC721TokenContract, ExchangeContract } from '@0xproject/abi-gen-wrappers'; -import * as artifacts from '@0xproject/contract-artifacts'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory'; -import { AssetProxyId, ERC721AssetData, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { DummyERC20TokenContract, DummyERC721TokenContract, ExchangeContract } from '@0x/abi-gen-wrappers'; +import * as artifacts from '@0x/contract-artifacts'; +import { assetDataUtils } from '@0x/order-utils'; +import { orderFactory } from '@0x/order-utils/lib/src/order_factory'; +import { AssetProxyId, ERC721AssetData, OrderWithoutExchangeAddress, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/instant/package.json b/packages/instant/package.json index 5c4436c52..224683dc5 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/instant", + "name": "@0x/instant", "version": "0.0.2", "engines": { "node": ">=6.12" @@ -43,11 +43,11 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0xproject/asset-buyer": "^2.0.0", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^2.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/asset-buyer": "^2.0.0", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^2.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", "lodash": "^4.17.10", "polished": "^2.2.0", @@ -60,7 +60,7 @@ "ts-optchain": "^0.1.1" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/enzyme": "^3.1.14", "@types/enzyme-adapter-react-16": "^1.0.3", "@types/jest": "^23.3.5", diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 1fd321c5a..5d5341f9c 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const BIG_NUMBER_ZERO = new BigNumber(0); export const sraApiUrl = 'https://api.radarrelay.com/0x/v2/'; export const zrxAssetData = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498'; diff --git a/packages/instant/src/containers/latest_buy_quote_order_details.ts b/packages/instant/src/containers/latest_buy_quote_order_details.ts index b354c78fa..597bf3088 100644 --- a/packages/instant/src/containers/latest_buy_quote_order_details.ts +++ b/packages/instant/src/containers/latest_buy_quote_order_details.ts @@ -1,5 +1,5 @@ -import { BuyQuoteInfo } from '@0xproject/asset-buyer'; -import { BigNumber } from '@0xproject/utils'; +import { BuyQuoteInfo } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; diff --git a/packages/instant/src/containers/selected_asset_amount_input.ts b/packages/instant/src/containers/selected_asset_amount_input.ts index 0873f1ab6..0810b093a 100644 --- a/packages/instant/src/containers/selected_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_asset_amount_input.ts @@ -1,6 +1,6 @@ -import { BuyQuote } from '@0xproject/asset-buyer'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BuyQuote } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; diff --git a/packages/instant/src/containers/selected_asset_buy_button.ts b/packages/instant/src/containers/selected_asset_buy_button.ts index 7d3919468..4a8e31525 100644 --- a/packages/instant/src/containers/selected_asset_buy_button.ts +++ b/packages/instant/src/containers/selected_asset_buy_button.ts @@ -1,4 +1,4 @@ -import { BuyQuote } from '@0xproject/asset-buyer'; +import { BuyQuote } from '@0x/asset-buyer'; import * as _ from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; diff --git a/packages/instant/src/containers/selected_asset_instant_heading.ts b/packages/instant/src/containers/selected_asset_instant_heading.ts index be31527f1..0509db5da 100644 --- a/packages/instant/src/containers/selected_asset_instant_heading.ts +++ b/packages/instant/src/containers/selected_asset_instant_heading.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; diff --git a/packages/instant/src/data/asset_meta_data.ts b/packages/instant/src/data/asset_meta_data.ts index e4d3e8f73..ae0d32e4b 100644 --- a/packages/instant/src/data/asset_meta_data.ts +++ b/packages/instant/src/data/asset_meta_data.ts @@ -1,4 +1,4 @@ -import { AssetProxyId, ObjectMap } from '@0xproject/types'; +import { AssetProxyId, ObjectMap } from '@0x/types'; import { zrxAssetData } from '../constants'; import { AssetMetaData } from '../types'; diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts index bec847742..9c154c66f 100644 --- a/packages/instant/src/redux/actions.ts +++ b/packages/instant/src/redux/actions.ts @@ -1,5 +1,5 @@ -import { BuyQuote } from '@0xproject/asset-buyer'; -import { BigNumber } from '@0xproject/utils'; +import { BuyQuote } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { ActionsUnion, AsyncProcessState } from '../types'; diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts index 54290483b..05aa37420 100644 --- a/packages/instant/src/redux/reducer.ts +++ b/packages/instant/src/redux/reducer.ts @@ -1,5 +1,5 @@ -import { BuyQuote } from '@0xproject/asset-buyer'; -import { BigNumber } from '@0xproject/utils'; +import { BuyQuote } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { zrxAssetData } from '../constants'; diff --git a/packages/instant/src/style/util.ts b/packages/instant/src/style/util.ts index c9df0f834..3e38c4a7d 100644 --- a/packages/instant/src/style/util.ts +++ b/packages/instant/src/style/util.ts @@ -1,4 +1,4 @@ -import { ObjectMap } from '@0xproject/types'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; export const cssRuleIfExists = (props: ObjectMap, rule: string): string => { diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index f0ffb893b..8e3bb9b37 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -1,4 +1,4 @@ -import { AssetProxyId, ObjectMap } from '@0xproject/types'; +import { AssetProxyId, ObjectMap } from '@0x/types'; // Reusable export enum AsyncProcessState { diff --git a/packages/instant/src/util/asset_buyer.ts b/packages/instant/src/util/asset_buyer.ts index 27d66d600..6855fbcab 100644 --- a/packages/instant/src/util/asset_buyer.ts +++ b/packages/instant/src/util/asset_buyer.ts @@ -1,4 +1,4 @@ -import { AssetBuyer } from '@0xproject/asset-buyer'; +import { AssetBuyer } from '@0x/asset-buyer'; import { sraApiUrl } from '../constants'; diff --git a/packages/instant/src/util/asset_data.ts b/packages/instant/src/util/asset_data.ts index f7c5b78cd..fea2e2b19 100644 --- a/packages/instant/src/util/asset_data.ts +++ b/packages/instant/src/util/asset_data.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; -import { AssetProxyId } from '@0xproject/types'; +import { AssetProxyId } from '@0x/types'; import { assetMetaData } from '../data/asset_meta_data'; diff --git a/packages/instant/src/util/coinbase_api.ts b/packages/instant/src/util/coinbase_api.ts index 94a5d3c80..080421f98 100644 --- a/packages/instant/src/util/coinbase_api.ts +++ b/packages/instant/src/util/coinbase_api.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; const baseEndpoint = 'https://api.coinbase.com/v2'; export const coinbaseApi = { diff --git a/packages/instant/src/util/error.ts b/packages/instant/src/util/error.ts index 48cb131a9..c9b13ef83 100644 --- a/packages/instant/src/util/error.ts +++ b/packages/instant/src/util/error.ts @@ -1,4 +1,4 @@ -import { AssetBuyerError } from '@0xproject/asset-buyer'; +import { AssetBuyerError } from '@0x/asset-buyer'; import { Dispatch } from 'redux'; import { Action, actions } from '../redux/actions'; diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts index 09eb880b2..8482b1526 100644 --- a/packages/instant/src/util/format.ts +++ b/packages/instant/src/util/format.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { ethDecimals } from '../constants'; diff --git a/packages/instant/src/util/web3_wrapper.ts b/packages/instant/src/util/web3_wrapper.ts index d7e43521f..24dcd9076 100644 --- a/packages/instant/src/util/web3_wrapper.ts +++ b/packages/instant/src/util/web3_wrapper.ts @@ -1,4 +1,4 @@ -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { getProvider } from './provider'; diff --git a/packages/instant/test/util/error.test.ts b/packages/instant/test/util/error.test.ts index 56f3a1e86..78b742f06 100644 --- a/packages/instant/test/util/error.test.ts +++ b/packages/instant/test/util/error.test.ts @@ -1,4 +1,4 @@ -import { AssetBuyerError } from '@0xproject/asset-buyer'; +import { AssetBuyerError } from '@0x/asset-buyer'; import { errorUtil } from '../../src/util/error'; diff --git a/packages/instant/test/util/format.test.ts b/packages/instant/test/util/format.test.ts index 073b86b19..141df9275 100644 --- a/packages/instant/test/util/format.test.ts +++ b/packages/instant/test/util/format.test.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { ethDecimals } from '../../src/constants'; import { format } from '../../src/util/format'; diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 20d2e48ce..41226a7c4 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/json-schemas", + "name": "@0x/json-schemas", "version": "1.0.7", "engines": { "node": ">=6.12" @@ -39,14 +39,14 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md", "dependencies": { - "@0xproject/typescript-typings": "^3.0.2", + "@0x/typescript-typings": "^3.0.2", "@types/node": "*", "jsonschema": "^1.2.0", "lodash.values": "^4.3.0" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", - "@0xproject/utils": "^2.0.2", + "@0x/tslint-config": "^1.0.8", + "@0x/utils": "^2.0.2", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts index 4e0f66ef5..795261ef2 100644 --- a/packages/json-schemas/test/schema_test.ts +++ b/packages/json-schemas/test/schema_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as dirtyChai from 'dirty-chai'; import forEach = require('lodash.foreach'); diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 58fc0b848..376e6f204 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/metacoin", + "name": "@0x/metacoin", "version": "0.0.23", "engines": { "node": ">=6.12" @@ -29,15 +29,15 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@0xproject/abi-gen": "^1.0.13", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/sol-cov": "^2.1.7", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/tslint-config": "^1.0.8", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen": "^1.0.13", + "@0x/base-contract": "^3.0.1", + "@0x/sol-cov": "^2.1.7", + "@0x/subproviders": "^2.0.7", + "@0x/tslint-config": "^1.0.8", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", "ethereum-types": "^1.0.11", @@ -46,8 +46,8 @@ "run-s": "^0.0.0" }, "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/sol-compiler": "^1.1.7", + "@0x/dev-utils": "^1.0.12", + "@0x/sol-compiler": "^1.1.7", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", diff --git a/packages/metacoin/test/global_hooks.ts b/packages/metacoin/test/global_hooks.ts index 7328531e4..437061b46 100644 --- a/packages/metacoin/test/global_hooks.ts +++ b/packages/metacoin/test/global_hooks.ts @@ -1,4 +1,4 @@ -import { env, EnvVars } from '@0xproject/dev-utils'; +import { env, EnvVars } from '@0x/dev-utils'; import { coverage } from './utils/coverage'; import { profiler } from './utils/profiler'; diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts index 6c16a2d39..a8ba85814 100644 --- a/packages/metacoin/test/metacoin_test.ts +++ b/packages/metacoin/test/metacoin_test.ts @@ -1,5 +1,5 @@ -import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils'; -import { BigNumber } from '@0xproject/utils'; +import { BlockchainLifecycle, devConstants } from '@0x/dev-utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { ContractArtifact, LogWithDecodedArgs } from 'ethereum-types'; diff --git a/packages/metacoin/test/utils/config.ts b/packages/metacoin/test/utils/config.ts index c26fe5f25..05f524d52 100644 --- a/packages/metacoin/test/utils/config.ts +++ b/packages/metacoin/test/utils/config.ts @@ -1,4 +1,4 @@ -import { devConstants } from '@0xproject/dev-utils'; +import { devConstants } from '@0x/dev-utils'; export const config = { networkId: 50, diff --git a/packages/metacoin/test/utils/coverage.ts b/packages/metacoin/test/utils/coverage.ts index 945afb0a7..31275a163 100644 --- a/packages/metacoin/test/utils/coverage.ts +++ b/packages/metacoin/test/utils/coverage.ts @@ -1,5 +1,5 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov'; +import { devConstants } from '@0x/dev-utils'; +import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; import * as _ from 'lodash'; import { config } from './config'; diff --git a/packages/metacoin/test/utils/profiler.ts b/packages/metacoin/test/utils/profiler.ts index 701337451..e7c373d20 100644 --- a/packages/metacoin/test/utils/profiler.ts +++ b/packages/metacoin/test/utils/profiler.ts @@ -1,5 +1,5 @@ -import { devConstants } from '@0xproject/dev-utils'; -import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0xproject/sol-cov'; +import { devConstants } from '@0x/dev-utils'; +import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-cov'; import * as _ from 'lodash'; import { config } from './config'; diff --git a/packages/metacoin/test/utils/web3_wrapper.ts b/packages/metacoin/test/utils/web3_wrapper.ts index 36bd6343f..258cf560f 100644 --- a/packages/metacoin/test/utils/web3_wrapper.ts +++ b/packages/metacoin/test/utils/web3_wrapper.ts @@ -1,7 +1,7 @@ -import { env, EnvVars } from '@0xproject/dev-utils'; -import { GanacheSubprovider, prependSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; -import { errorUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { env, EnvVars } from '@0x/dev-utils'; +import { GanacheSubprovider, prependSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders'; +import { errorUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as fs from 'fs'; import { config } from './config'; diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 44737e227..f3719f910 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/migrations", + "name": "@0x/migrations", "version": "1.0.14", "engines": { "node": ">=6.12" @@ -17,9 +17,9 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", - "@0xproject/types": "^1.1.4", + "@0x/dev-utils": "^1.0.12", + "@0x/tslint-config": "^1.0.8", + "@0x/types": "^1.1.4", "@types/yargs": "^10.0.0", "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", @@ -29,16 +29,16 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/contract-addresses": "^1.0.0", - "@0xproject/contract-artifacts": "^1.0.0", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/sol-compiler": "^1.1.7", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/base-contract": "^3.0.1", + "@0x/contract-addresses": "^1.0.0", + "@0x/contract-artifacts": "^1.0.0", + "@0x/order-utils": "^1.0.7", + "@0x/sol-compiler": "^1.1.7", + "@0x/subproviders": "^2.0.7", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@ledgerhq/hw-app-eth": "^4.3.0", "ethereum-types": "^1.0.11", "ethers": "~4.0.4", diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts index 27f36ba34..d7a76d2f8 100644 --- a/packages/migrations/src/migrate.ts +++ b/packages/migrations/src/migrate.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { devConstants, web3Factory } from '@0xproject/dev-utils'; -import { logUtils } from '@0xproject/utils'; +import { devConstants, web3Factory } from '@0x/dev-utils'; +import { logUtils } from '@0x/utils'; import { Provider } from 'ethereum-types'; import { runMigrationsAsync } from './migration'; diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 0ee5b6975..86c76a54b 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -1,9 +1,9 @@ -import * as wrappers from '@0xproject/abi-gen-wrappers'; -import { ContractAddresses } from '@0xproject/contract-addresses'; -import * as artifacts from '@0xproject/contract-artifacts'; -import { assetDataUtils } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import * as wrappers from '@0x/abi-gen-wrappers'; +import { ContractAddresses } from '@0x/contract-addresses'; +import * as artifacts from '@0x/contract-artifacts'; +import { assetDataUtils } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider, TxData } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/migrations/src/types.ts b/packages/migrations/src/types.ts index 65f685797..87e66f356 100644 --- a/packages/migrations/src/types.ts +++ b/packages/migrations/src/types.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export interface ERC20Token { address?: string; diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts index 63898ac02..8b16a0520 100644 --- a/packages/migrations/src/utils/constants.ts +++ b/packages/migrations/src/utils/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const constants = { ASSET_PROXY_OWNER_OWNERS: [ diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts index e7e00a039..8017b672a 100644 --- a/packages/migrations/src/utils/provider_factory.ts +++ b/packages/migrations/src/utils/provider_factory.ts @@ -1,4 +1,4 @@ -import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0xproject/subproviders'; +import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders'; import Eth from '@ledgerhq/hw-app-eth'; // tslint:disable:no-implicit-dependencies import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; diff --git a/packages/migrations/src/utils/token_info.ts b/packages/migrations/src/utils/token_info.ts index 200f94896..6e0411f60 100644 --- a/packages/migrations/src/utils/token_info.ts +++ b/packages/migrations/src/utils/token_info.ts @@ -1,4 +1,4 @@ -import { BigNumber, NULL_BYTES } from '@0xproject/utils'; +import { BigNumber, NULL_BYTES } from '@0x/utils'; import { ERC20Token, ERC721Token } from '../types'; diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 57e8bc147..3a783af9b 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "@0xproject/monorepo-scripts", + "name": "@0x/monorepo-scripts", "version": "1.0.11", "engines": { "node": ">=6.12" diff --git a/packages/monorepo-scripts/src/find_unused_dependencies.ts b/packages/monorepo-scripts/src/find_unused_dependencies.ts index 4bb4b7dc5..42b4b7890 100644 --- a/packages/monorepo-scripts/src/find_unused_dependencies.ts +++ b/packages/monorepo-scripts/src/find_unused_dependencies.ts @@ -7,7 +7,7 @@ import { constants } from './constants'; import { utils } from './utils/utils'; // For some reason, `depcheck` hangs on some packages. Add them here. -const IGNORE_PACKAGES = ['@0xproject/sol-compiler']; +const IGNORE_PACKAGES = ['@0x/sol-compiler']; (async () => { utils.log('*** NOTE: Not all deps listed here are actually not required. ***'); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 646818c58..c1a6b9d7f 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -18,7 +18,7 @@ import { DocGenerateAndUploadUtils } from './utils/doc_generate_and_upload_utils import { publishReleaseNotesAsync } from './utils/github_release_utils'; import { utils } from './utils/utils'; -const NPM_NAMESPACE = '@0xproject/'; +const NPM_NAMESPACE = '@0x/'; const TODAYS_TIMESTAMP = moment().unix(); async function confirmAsync(message: string): Promise { @@ -96,7 +96,7 @@ function getPackagesWithDocs(allUpdatedPackages: Package[]): Package[] { const packagesWithDocPages = packagesWithDocPagesStringIfExist.split(' '); const updatedPackagesWithDocPages: Package[] = []; _.each(allUpdatedPackages, pkg => { - const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); + const nameWithoutPrefix = pkg.packageJson.name.replace('@0x/', ''); if (_.includes(packagesWithDocPages, nameWithoutPrefix)) { updatedPackagesWithDocPages.push(pkg); } @@ -110,7 +110,7 @@ async function generateAndUploadDocJsonsAsync( shouldUploadDocs: boolean, ): Promise { for (const pkg of packagesWithDocs) { - const nameWithoutPrefix = pkg.packageJson.name.replace('@0xproject/', ''); + const nameWithoutPrefix = pkg.packageJson.name.replace('@0x/', ''); const docGenerateAndUploadUtils = new DocGenerateAndUploadUtils(nameWithoutPrefix, isStaging, shouldUploadDocs); await docGenerateAndUploadUtils.generateAndUploadDocsAsync(); } @@ -130,7 +130,7 @@ async function confirmDocPagesRenderAsync(packagesWithDocs: Package[]): Promise< _.each(packagesWithDocs, pkg => { const name = pkg.packageJson.name; - const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0xproject/')[1] : name; + const nameWithoutPrefix = _.startsWith(name, NPM_NAMESPACE) ? name.split('@0x/')[1] : name; const link = `${constants.stagingWebsite}/docs/${nameWithoutPrefix}`; // tslint:disable-next-line:no-floating-promises opn(link); diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 6090498e0..297eb3d50 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -15,7 +15,7 @@ const args = yargs 'Space-separated list of packages to generated release notes for. If not supplied, it does all `Lerna updated` packages.', type: 'string', }) - .example('$0 --isDryRun true --packages "0x.js @0xproject/web3-wrapper"', 'Full usage example').argv; + .example('$0 --isDryRun true --packages "0x.js @0x/web3-wrapper"', 'Full usage example').argv; (async () => { const isDryRun = args.isDryRun; diff --git a/packages/monorepo-scripts/src/test_installation.ts b/packages/monorepo-scripts/src/test_installation.ts index 459f70839..96875d0f9 100644 --- a/packages/monorepo-scripts/src/test_installation.ts +++ b/packages/monorepo-scripts/src/test_installation.ts @@ -12,7 +12,7 @@ import { Package } from './types'; import { utils } from './utils/utils'; // Packages might not be runnable if they are command-line tools or only run in browsers. -const UNRUNNABLE_PACKAGES = ['@0xproject/abi-gen', '@0xproject/react-shared', '@0xproject/react-docs']; +const UNRUNNABLE_PACKAGES = ['@0x/abi-gen', '@0x/react-shared', '@0x/react-docs']; const mkdirpAsync = promisify(mkdirp); const rimrafAsync = promisify(rimraf); @@ -116,7 +116,7 @@ async function testInstallPackageAsync( await writeFileAsync(indexFilePath, `import * as Package from '${packageName}';\nconsole.log(Package);\n`); const tsConfig = { compilerOptions: { - typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'], + typeRoots: ['node_modules/@0x/typescript-typings/types', 'node_modules/@types'], module: 'commonjs', target: 'es5', lib: ['es2017', 'dom'], diff --git a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts index 547b65eeb..1a4294e9c 100644 --- a/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts +++ b/packages/monorepo-scripts/src/utils/doc_generate_and_upload_utils.ts @@ -402,7 +402,7 @@ export class DocGenerateAndUploadUtils { sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; return sanitizedExportPath; } - const monorepoPrefix = '@0xproject/'; + const monorepoPrefix = '@0x/'; if (_.startsWith(exportPath, monorepoPrefix)) { const sanitizedExportPath = exportPath.split(monorepoPrefix)[1]; sanitizedExportPathToExportPath[sanitizedExportPath] = exportPath; @@ -478,7 +478,7 @@ export class DocGenerateAndUploadUtils { }); }); - // @0xproject/types & ethereum-types are examples of packages where their index.ts exports types + // @0x/types & ethereum-types are examples of packages where their index.ts exports types // directly, meaning no internal paths will exist to follow. Other packages also have direct exports // in their index.ts, so we always add it to the source files passed to TypeDoc if (typeDocSourceIncludes.size === 0) { diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 0f3485de0..43c52ec2d 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -93,7 +93,7 @@ function adjustAssetPaths(assets: string[]): string[] { } function getReleaseNotesForPackage(packageName: string, version: string): string { - const packageNameWithoutNamespace = packageName.replace('@0xproject/', ''); + const packageNameWithoutNamespace = packageName.replace('@0x/', ''); const changelogJSONPath = path.join( constants.monorepoRootPath, 'packages', diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 09eef849f..c5d800b00 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/order-utils", + "name": "@0x/order-utils", "version": "1.0.7", "engines": { "node": ">=6.12" @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/tslint-config": "^1.0.8", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", "chai": "^4.0.1", @@ -53,15 +53,15 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/assert": "^1.0.13", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/contract-artifacts": "^1.0.0", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/assert": "^1.0.13", + "@0x/base-contract": "^3.0.1", + "@0x/contract-artifacts": "^1.0.0", + "@0x/json-schemas": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/node": "*", "bn.js": "^4.11.8", "ethereum-types": "^1.0.11", diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts index c7f06abad..13fbf1736 100644 --- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; /** * An abstract class to be implemented in order to use OrderStateUtils. The class that diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts index 38e08b7fe..0a73e92bd 100644 --- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts +++ b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export abstract class AbstractBalanceAndProxyAllowanceLazyStore { public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise; diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts index fbc1c4718..de096b7d9 100644 --- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts +++ b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; /** * An abstract class to be implemented in order to use OrderStateUtils. The class that diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts index 617bcb224..d9e66db06 100644 --- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts +++ b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export abstract class AbstractOrderFilledCancelledLazyStore { public abstract async getFilledTakerAmountAsync(orderHash: string): Promise; diff --git a/packages/order-utils/src/assert.ts b/packages/order-utils/src/assert.ts index f8db7ac63..2f73f58c4 100644 --- a/packages/order-utils/src/assert.ts +++ b/packages/order-utils/src/assert.ts @@ -1,10 +1,10 @@ -import { assert as sharedAssert } from '@0xproject/assert'; +import { assert as sharedAssert } from '@0x/assert'; // HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here // tslint:disable:no-unused-variable -import { Schema } from '@0xproject/json-schemas'; -import { ECSignature, SignatureType } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Schema } from '@0x/json-schemas'; +import { ECSignature, SignatureType } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; // tslint:enable:no-unused-variable import * as _ from 'lodash'; diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts index 12c11bce9..9bbef3a23 100644 --- a/packages/order-utils/src/asset_data_utils.ts +++ b/packages/order-utils/src/asset_data_utils.ts @@ -1,5 +1,5 @@ -import { AssetData, AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { AssetData, AssetProxyId, ERC20AssetData, ERC721AssetData } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import ethAbi = require('ethereumjs-abi'); import ethUtil = require('ethereumjs-util'); diff --git a/packages/order-utils/src/constants.ts b/packages/order-utils/src/constants.ts index 7de20a696..10029dcc3 100644 --- a/packages/order-utils/src/constants.ts +++ b/packages/order-utils/src/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const constants = { NULL_ADDRESS: '0x0000000000000000000000000000000000000000', diff --git a/packages/order-utils/src/eip712_utils.ts b/packages/order-utils/src/eip712_utils.ts index 56f736500..385fda989 100644 --- a/packages/order-utils/src/eip712_utils.ts +++ b/packages/order-utils/src/eip712_utils.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; -import { EIP712Object, EIP712TypedData, EIP712Types, Order, ZeroExTransaction } from '@0xproject/types'; +import { assert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; +import { EIP712Object, EIP712TypedData, EIP712Types, Order, ZeroExTransaction } from '@0x/types'; import * as _ from 'lodash'; import { constants } from './constants'; diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts index 81c849c64..7a38b35df 100644 --- a/packages/order-utils/src/exchange_transfer_simulator.ts +++ b/packages/order-utils/src/exchange_transfer_simulator.ts @@ -1,5 +1,5 @@ -import { ExchangeContractErrs } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { ExchangeContractErrs } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { AbstractBalanceAndProxyAllowanceLazyStore } from './abstract/abstract_balance_and_proxy_allowance_lazy_store'; import { constants } from './constants'; diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts index 50b8a88a8..e70d43efb 100644 --- a/packages/order-utils/src/index.ts +++ b/packages/order-utils/src/index.ts @@ -48,7 +48,7 @@ export { EIP712Object, EIP712ObjectValue, ZeroExTransaction, -} from '@0xproject/types'; +} from '@0x/types'; export { OrderError, TradeSide, diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index ed6af7d85..fa32f1413 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -1,6 +1,6 @@ -import { schemas } from '@0xproject/json-schemas'; -import { Order } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { schemas } from '@0x/json-schemas'; +import { Order } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { assert } from './assert'; diff --git a/packages/order-utils/src/order_factory.ts b/packages/order-utils/src/order_factory.ts index 0f0cd6046..f7b855bfb 100644 --- a/packages/order-utils/src/order_factory.ts +++ b/packages/order-utils/src/order_factory.ts @@ -1,5 +1,5 @@ -import { Order, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { Order, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts index b523a3523..c8e9be71e 100644 --- a/packages/order-utils/src/order_hash.ts +++ b/packages/order-utils/src/order_hash.ts @@ -1,6 +1,6 @@ -import { schemas, SchemaValidator } from '@0xproject/json-schemas'; -import { Order, SignedOrder } from '@0xproject/types'; -import { signTypedDataUtils } from '@0xproject/utils'; +import { schemas, SchemaValidator } from '@0x/json-schemas'; +import { Order, SignedOrder } from '@0x/types'; +import { signTypedDataUtils } from '@0x/utils'; import * as _ from 'lodash'; import { assert } from './assert'; diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts index 9b21ef6e9..159aeeb09 100644 --- a/packages/order-utils/src/order_state_utils.ts +++ b/packages/order-utils/src/order_state_utils.ts @@ -5,8 +5,8 @@ import { OrderStateInvalid, OrderStateValid, SignedOrder, -} from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +} from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher'; import { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher'; diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index 8227fb07c..a40069f63 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -1,5 +1,5 @@ -import { RevertReason, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { RevertReason, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/order-utils/src/parsing_utils.ts b/packages/order-utils/src/parsing_utils.ts index 232c54b7b..98c6899fe 100644 --- a/packages/order-utils/src/parsing_utils.ts +++ b/packages/order-utils/src/parsing_utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; export const orderParsingUtils = { diff --git a/packages/order-utils/src/rate_utils.ts b/packages/order-utils/src/rate_utils.ts index c9ca72c59..416e00c67 100644 --- a/packages/order-utils/src/rate_utils.ts +++ b/packages/order-utils/src/rate_utils.ts @@ -1,6 +1,6 @@ -import { schemas } from '@0xproject/json-schemas'; -import { Order } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { schemas } from '@0x/json-schemas'; +import { Order } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { assert } from './assert'; import { constants } from './constants'; diff --git a/packages/order-utils/src/remaining_fillable_calculator.ts b/packages/order-utils/src/remaining_fillable_calculator.ts index 7022aa979..052eafa1d 100644 --- a/packages/order-utils/src/remaining_fillable_calculator.ts +++ b/packages/order-utils/src/remaining_fillable_calculator.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export class RemainingFillableCalculator { private readonly _isTraderAssetZRX: boolean; diff --git a/packages/order-utils/src/salt.ts b/packages/order-utils/src/salt.ts index 90a4197c0..ff47ab5d2 100644 --- a/packages/order-utils/src/salt.ts +++ b/packages/order-utils/src/salt.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; const MAX_DIGITS_IN_UNSIGNED_256_INT = 78; diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index d755846ad..96d90e21a 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -1,8 +1,8 @@ -import { ExchangeContract, IValidatorContract, IWalletContract } from '@0xproject/abi-gen-wrappers'; -import * as artifacts from '@0xproject/contract-artifacts'; -import { schemas } from '@0xproject/json-schemas'; -import { ECSignature, Order, SignatureType, SignedOrder, ValidatorSignature } from '@0xproject/types'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ExchangeContract, IValidatorContract, IWalletContract } from '@0x/abi-gen-wrappers'; +import * as artifacts from '@0x/contract-artifacts'; +import { schemas } from '@0x/json-schemas'; +import { ECSignature, Order, SignatureType, SignedOrder, ValidatorSignature } from '@0x/types'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; diff --git a/packages/order-utils/src/sorting_utils.ts b/packages/order-utils/src/sorting_utils.ts index cd5163cf6..1de24264f 100644 --- a/packages/order-utils/src/sorting_utils.ts +++ b/packages/order-utils/src/sorting_utils.ts @@ -1,6 +1,6 @@ -import { schemas } from '@0xproject/json-schemas'; -import { Order } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { schemas } from '@0x/json-schemas'; +import { Order } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { assert } from './assert'; diff --git a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts index 8a65178b0..f42a76d0c 100644 --- a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts +++ b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts @@ -1,5 +1,5 @@ -import { AssetProxyId } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { AssetProxyId } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { AbstractBalanceAndProxyAllowanceFetcher } from '../abstract/abstract_balance_and_proxy_allowance_fetcher'; diff --git a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts b/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts index 6155c2064..1d84ffdaa 100644 --- a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts +++ b/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import { AbstractOrderFilledCancelledFetcher } from '../abstract/abstract_order_filled_cancelled_fetcher'; diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts index 5b13dd754..55ec553db 100644 --- a/packages/order-utils/src/types.ts +++ b/packages/order-utils/src/types.ts @@ -1,8 +1,8 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export enum OrderError { InvalidSignature = 'INVALID_SIGNATURE', - InvalidMetamaskSigner = "MetaMask provider must be wrapped in a MetamaskSubprovider (from the '@0xproject/subproviders' package) in order to work with this method.", + InvalidMetamaskSigner = "MetaMask provider must be wrapped in a MetamaskSubprovider (from the '@0x/subproviders' package) in order to work with this method.", } export enum TradeSide { @@ -27,7 +27,7 @@ export interface CreateOrderOpts { /** * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter. - * You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values. + * You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values. * Defaults to `makerAssetAmount` values from the orders param. * slippageBufferAmount: An additional amount of makerAsset to be covered by the result in case of trade collisions or partial fills. * Defaults to 0 @@ -39,10 +39,10 @@ export interface FindOrdersThatCoverMakerAssetFillAmountOpts { /** * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter. - * You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values. + * You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values. * Defaults to `makerAssetAmount` values from the orders param. * remainingFillableFeeAmounts: An array of BigNumbers corresponding to the feeOrders parameter. - * You can use OrderStateUtils @0xproject/order-utils to perform blockchain lookups for these values. + * You can use OrderStateUtils @0x/order-utils to perform blockchain lookups for these values. * Defaults to `makerAssetAmount` values from the feeOrders param. * slippageBufferAmount: An additional amount of fee to be covered by the result in case of trade collisions or partial fills. * Defaults to 0 diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts index 0ff05e8ed..6b2261001 100644 --- a/packages/order-utils/src/utils.ts +++ b/packages/order-utils/src/utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const utils = { getSignatureTypeIndexIfExists(signature: string): number { diff --git a/packages/order-utils/test/eip712_utils_test.ts b/packages/order-utils/test/eip712_utils_test.ts index d65cabe9c..a54e49958 100644 --- a/packages/order-utils/test/eip712_utils_test.ts +++ b/packages/order-utils/test/eip712_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/exchange_transfer_simulator_test.ts b/packages/order-utils/test/exchange_transfer_simulator_test.ts index c2367fd7f..c26eb1907 100644 --- a/packages/order-utils/test/exchange_transfer_simulator_test.ts +++ b/packages/order-utils/test/exchange_transfer_simulator_test.ts @@ -1,8 +1,8 @@ -import { DummyERC20TokenContract, ERC20ProxyContract, ERC20TokenContract } from '@0xproject/abi-gen-wrappers'; -import * as artifacts from '@0xproject/contract-artifacts'; -import { BlockchainLifecycle, devConstants } from '@0xproject/dev-utils'; -import { ExchangeContractErrs } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { DummyERC20TokenContract, ERC20ProxyContract, ERC20TokenContract } from '@0x/abi-gen-wrappers'; +import * as artifacts from '@0x/contract-artifacts'; +import { BlockchainLifecycle, devConstants } from '@0x/dev-utils'; +import { ExchangeContractErrs } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { assetDataUtils } from '../src/asset_data_utils'; diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts index 31986ba1a..42ea195bb 100644 --- a/packages/order-utils/test/market_utils_test.ts +++ b/packages/order-utils/test/market_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts index fe44218d6..a85d4c81a 100644 --- a/packages/order-utils/test/order_hash_test.ts +++ b/packages/order-utils/test/order_hash_test.ts @@ -1,5 +1,5 @@ -import { Order } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { Order } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/order_state_utils_test.ts b/packages/order-utils/test/order_state_utils_test.ts index ea88027ae..39c4c362f 100644 --- a/packages/order-utils/test/order_state_utils_test.ts +++ b/packages/order-utils/test/order_state_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/order_validation_utils_test.ts b/packages/order-utils/test/order_validation_utils_test.ts index d3133c0a6..d4d12a6a7 100644 --- a/packages/order-utils/test/order_validation_utils_test.ts +++ b/packages/order-utils/test/order_validation_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/rate_utils_test.ts b/packages/order-utils/test/rate_utils_test.ts index 2e299c209..b13878bb5 100644 --- a/packages/order-utils/test/rate_utils_test.ts +++ b/packages/order-utils/test/rate_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/remaining_fillable_calculator_test.ts b/packages/order-utils/test/remaining_fillable_calculator_test.ts index a5a3b7fc6..c55a76def 100644 --- a/packages/order-utils/test/remaining_fillable_calculator_test.ts +++ b/packages/order-utils/test/remaining_fillable_calculator_test.ts @@ -1,6 +1,6 @@ -import { SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index f2d6790fb..84e5559a9 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -1,5 +1,5 @@ -import { Order, SignatureType } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { Order, SignatureType } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import { JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; diff --git a/packages/order-utils/test/sorting_utils_test.ts b/packages/order-utils/test/sorting_utils_test.ts index 016432505..0b8757496 100644 --- a/packages/order-utils/test/sorting_utils_test.ts +++ b/packages/order-utils/test/sorting_utils_test.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import 'mocha'; diff --git a/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts index d00a25031..d3ea8b456 100644 --- a/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts +++ b/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts @@ -1,5 +1,5 @@ -import { ERC20TokenContract } from '@0xproject/abi-gen-wrappers'; -import { BigNumber } from '@0xproject/utils'; +import { ERC20TokenContract } from '@0x/abi-gen-wrappers'; +import { BigNumber } from '@0x/utils'; import { AbstractBalanceAndProxyAllowanceFetcher } from '../../src/abstract/abstract_balance_and_proxy_allowance_fetcher'; diff --git a/packages/order-utils/test/utils/test_order_factory.ts b/packages/order-utils/test/utils/test_order_factory.ts index 69184f129..145332674 100644 --- a/packages/order-utils/test/utils/test_order_factory.ts +++ b/packages/order-utils/test/utils/test_order_factory.ts @@ -1,4 +1,4 @@ -import { Order, SignedOrder } from '@0xproject/types'; +import { Order, SignedOrder } from '@0x/types'; import * as _ from 'lodash'; import { constants } from '../../src/constants'; diff --git a/packages/order-utils/test/utils/web3_wrapper.ts b/packages/order-utils/test/utils/web3_wrapper.ts index ab801fa7f..accfcb7fe 100644 --- a/packages/order-utils/test/utils/web3_wrapper.ts +++ b/packages/order-utils/test/utils/web3_wrapper.ts @@ -1,5 +1,5 @@ -import { web3Factory } from '@0xproject/dev-utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { web3Factory } from '@0x/dev-utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true }); diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index a3f7b1fc7..4f1c977b3 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/order-watcher", + "name": "@0x/order-watcher", "version": "2.1.1", "description": "An order watcher daemon that watches for order validity", "keywords": [ @@ -33,9 +33,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/migrations": "^1.0.14", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/migrations": "^1.0.14", + "@0x/tslint-config": "^1.0.8", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -57,19 +57,19 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/abi-gen-wrappers": "^1.0.0", - "@0xproject/assert": "^1.0.13", - "@0xproject/base-contract": "^3.0.1", - "@0xproject/contract-addresses": "^1.0.0", - "@0xproject/contract-artifacts": "^1.0.0", - "@0xproject/contract-wrappers": "^2.0.2", - "@0xproject/fill-scenarios": "^1.0.7", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.0", + "@0x/assert": "^1.0.13", + "@0x/base-contract": "^3.0.1", + "@0x/contract-addresses": "^1.0.0", + "@0x/contract-artifacts": "^1.0.0", + "@0x/contract-wrappers": "^2.0.2", + "@0x/fill-scenarios": "^1.0.7", + "@0x/json-schemas": "^1.0.7", + "@0x/order-utils": "^1.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "bintrees": "^1.0.2", "ethereum-types": "^1.0.11", "ethereumjs-blockstream": "6.0.0", diff --git a/packages/order-watcher/src/index.ts b/packages/order-watcher/src/index.ts index 6e862a427..5eeba3e87 100644 --- a/packages/order-watcher/src/index.ts +++ b/packages/order-watcher/src/index.ts @@ -8,12 +8,12 @@ export { ExchangeContractErrs, OrderRelevantState, Stats, -} from '@0xproject/types'; +} from '@0x/types'; export { OnOrderStateChangeCallback, OrderWatcherConfig } from './types'; -export { ContractAddresses } from '@0xproject/contract-addresses'; -export { SignedOrder } from '@0xproject/types'; +export { ContractAddresses } from '@0x/contract-addresses'; +export { SignedOrder } from '@0x/types'; export { JSONRPCRequestPayload, JSONRPCErrorCallback, diff --git a/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts b/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts index e13663c7a..2ea796947 100644 --- a/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts +++ b/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts @@ -1,4 +1,4 @@ -import { AbiDecoder } from '@0xproject/utils'; +import { AbiDecoder } from '@0x/utils'; import { ContractAbi, DecodedLogArgs, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types'; const TOKEN_TYPE_COLLISION = `Token can't be marked as ERC20 and ERC721 at the same time`; diff --git a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts index cc70bd5d7..dbcc25186 100644 --- a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts +++ b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts @@ -1,7 +1,7 @@ // tslint:disable:no-unnecessary-type-assertion -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { AssetProxyId, ERC20AssetData, ERC721AssetData, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { AssetProxyId, ERC20AssetData, ERC721AssetData, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; export interface OrderHashesByMakerAddress { diff --git a/packages/order-watcher/src/order_watcher/event_watcher.ts b/packages/order-watcher/src/order_watcher/event_watcher.ts index 9ea301815..3149d858b 100644 --- a/packages/order-watcher/src/order_watcher/event_watcher.ts +++ b/packages/order-watcher/src/order_watcher/event_watcher.ts @@ -1,5 +1,5 @@ -import { intervalUtils, logUtils } from '@0xproject/utils'; -import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { intervalUtils, logUtils } from '@0x/utils'; +import { marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { BlockParamLiteral, FilterObject, LogEntry, Provider, RawLogEntry } from 'ethereum-types'; import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream'; import * as _ from 'lodash'; diff --git a/packages/order-watcher/src/order_watcher/expiration_watcher.ts b/packages/order-watcher/src/order_watcher/expiration_watcher.ts index 6eadf14c7..ad20a6e3f 100644 --- a/packages/order-watcher/src/order_watcher/expiration_watcher.ts +++ b/packages/order-watcher/src/order_watcher/expiration_watcher.ts @@ -1,4 +1,4 @@ -import { BigNumber, intervalUtils } from '@0xproject/utils'; +import { BigNumber, intervalUtils } from '@0x/utils'; import { RBTree } from 'bintrees'; import * as _ from 'lodash'; diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts index 2f0dd2f2d..96c5ca7b4 100644 --- a/packages/order-watcher/src/order_watcher/order_watcher.ts +++ b/packages/order-watcher/src/order_watcher/order_watcher.ts @@ -1,6 +1,6 @@ // tslint:disable:no-unnecessary-type-assertion -import { ContractAddresses } from '@0xproject/contract-addresses'; -import * as artifacts from '@0xproject/contract-artifacts'; +import { ContractAddresses } from '@0x/contract-addresses'; +import * as artifacts from '@0x/contract-artifacts'; import { AssetBalanceAndProxyAllowanceFetcher, ContractWrappers, @@ -23,17 +23,17 @@ import { WETH9EventArgs, WETH9Events, WETH9WithdrawalEventArgs, -} from '@0xproject/contract-wrappers'; -import { schemas } from '@0xproject/json-schemas'; +} from '@0x/contract-wrappers'; +import { schemas } from '@0x/json-schemas'; import { assetDataUtils, BalanceAndProxyAllowanceLazyStore, OrderFilledCancelledLazyStore, orderHashUtils, OrderStateUtils, -} from '@0xproject/order-utils'; -import { AssetProxyId, ExchangeContractErrs, OrderState, SignedOrder, Stats } from '@0xproject/types'; -import { errorUtils, intervalUtils } from '@0xproject/utils'; +} from '@0x/order-utils'; +import { AssetProxyId, ExchangeContractErrs, OrderState, SignedOrder, Stats } from '@0x/types'; +import { errorUtils, intervalUtils } from '@0x/utils'; import { BlockParamLiteral, LogEntryEvent, LogWithDecodedArgs, Provider } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/order-watcher/src/types.ts b/packages/order-watcher/src/types.ts index 27d892985..8078dd971 100644 --- a/packages/order-watcher/src/types.ts +++ b/packages/order-watcher/src/types.ts @@ -1,4 +1,4 @@ -import { OrderState } from '@0xproject/types'; +import { OrderState } from '@0x/types'; import { LogEntryEvent } from 'ethereum-types'; export enum OrderWatcherError { diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts index e4a1e2c7b..ccfc7325c 100644 --- a/packages/order-watcher/src/utils/assert.ts +++ b/packages/order-watcher/src/utils/assert.ts @@ -1,13 +1,13 @@ -import { assert as sharedAssert } from '@0xproject/assert'; +import { assert as sharedAssert } from '@0x/assert'; // HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here // tslint:disable:no-unused-variable -import { Schema } from '@0xproject/json-schemas'; -import { ECSignature } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { Schema } from '@0x/json-schemas'; +import { ECSignature } from '@0x/types'; +import { BigNumber } from '@0x/utils'; // tslint:enable:no-unused-variable import { Provider } from 'ethereum-types'; -import { signatureUtils } from '@0xproject/order-utils'; +import { signatureUtils } from '@0x/order-utils'; export const assert = { ...sharedAssert, diff --git a/packages/order-watcher/src/utils/utils.ts b/packages/order-watcher/src/utils/utils.ts index 087fc635e..a7d10aaf9 100644 --- a/packages/order-watcher/src/utils/utils.ts +++ b/packages/order-watcher/src/utils/utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const utils = { getCurrentUnixTimestampSec(): BigNumber { diff --git a/packages/order-watcher/test/expiration_watcher_test.ts b/packages/order-watcher/test/expiration_watcher_test.ts index 17be625bc..fb5ea2a27 100644 --- a/packages/order-watcher/test/expiration_watcher_test.ts +++ b/packages/order-watcher/test/expiration_watcher_test.ts @@ -1,9 +1,9 @@ -import { tokenUtils } from '@0xproject/contract-wrappers/lib/test/utils/token_utils'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { DoneCallback } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { tokenUtils } from '@0x/contract-wrappers/lib/test/utils/token_utils'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { DoneCallback } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; diff --git a/packages/order-watcher/test/order_watcher_test.ts b/packages/order-watcher/test/order_watcher_test.ts index e13d44396..271e5dec5 100644 --- a/packages/order-watcher/test/order_watcher_test.ts +++ b/packages/order-watcher/test/order_watcher_test.ts @@ -1,9 +1,9 @@ // tslint:disable:no-unnecessary-type-assertion -import { ContractWrappers } from '@0xproject/contract-wrappers'; -import { tokenUtils } from '@0xproject/contract-wrappers/lib/test/utils/token_utils'; -import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils'; -import { FillScenarios } from '@0xproject/fill-scenarios'; -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; +import { ContractWrappers } from '@0x/contract-wrappers'; +import { tokenUtils } from '@0x/contract-wrappers/lib/test/utils/token_utils'; +import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils'; +import { FillScenarios } from '@0x/fill-scenarios'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; import { DoneCallback, ExchangeContractErrs, @@ -11,9 +11,9 @@ import { OrderStateInvalid, OrderStateValid, SignedOrder, -} from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as chai from 'chai'; import * as _ from 'lodash'; import 'mocha'; diff --git a/packages/order-watcher/test/utils/migrate.ts b/packages/order-watcher/test/utils/migrate.ts index 53319a383..665ce0faa 100644 --- a/packages/order-watcher/test/utils/migrate.ts +++ b/packages/order-watcher/test/utils/migrate.ts @@ -1,6 +1,6 @@ -import { ContractAddresses } from '@0xproject/contract-addresses'; -import { devConstants } from '@0xproject/dev-utils'; -import { runMigrationsOnceAsync } from '@0xproject/migrations'; +import { ContractAddresses } from '@0x/contract-addresses'; +import { devConstants } from '@0x/dev-utils'; +import { runMigrationsOnceAsync } from '@0x/migrations'; import { provider } from './web3_wrapper'; diff --git a/packages/order-watcher/test/utils/web3_wrapper.ts b/packages/order-watcher/test/utils/web3_wrapper.ts index ab801fa7f..accfcb7fe 100644 --- a/packages/order-watcher/test/utils/web3_wrapper.ts +++ b/packages/order-watcher/test/utils/web3_wrapper.ts @@ -1,5 +1,5 @@ -import { web3Factory } from '@0xproject/dev-utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { web3Factory } from '@0x/dev-utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { Provider } from 'ethereum-types'; const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true }); diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 6830a2101..aeb3fb9ae 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/react-docs", + "name": "@0x/react-docs", "version": "1.0.13", "engines": { "node": ">=6.12" @@ -24,8 +24,8 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/tslint-config": "^1.0.8", "@types/compare-versions": "^3.0.0", "@types/styled-components": "^4.0.0", "make-promises-safe": "^1.1.0", @@ -34,9 +34,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/react-shared": "^1.0.15", - "@0xproject/types": "^1.1.4", - "@0xproject/utils": "^2.0.2", + "@0x/react-shared": "^1.0.15", + "@0x/types": "^1.1.4", + "@0x/utils": "^2.0.2", "@types/lodash": "4.14.104", "@types/material-ui": "^0.20.0", "@types/node": "*", diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 08e7703df..4f2225acb 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,5 +1,5 @@ -import { ALink, utils as sharedUtils } from '@0xproject/react-shared'; -import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0xproject/types'; +import { MenuSubsectionsBySection } from '@0x/react-shared'; +import { DocAgnosticFormat, TypeDefinitionByName } from '@0x/types'; import * as _ from 'lodash'; import { diff --git a/packages/react-docs/src/index.ts b/packages/react-docs/src/index.ts index 504091b34..a5ed788b1 100644 --- a/packages/react-docs/src/index.ts +++ b/packages/react-docs/src/index.ts @@ -1,4 +1,4 @@ -export { DocAgnosticFormat, GeneratedDocJson } from '@0xproject/types'; +export { DocAgnosticFormat, GeneratedDocJson } from '@0x/types'; // Exported to give users of this library added flexibility if they want to build // a docs page from scratch using the individual components. diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 05c9dae55..f74ec3e28 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -16,8 +16,8 @@ import { TypeParameter, TypescriptFunction, TypescriptMethod, -} from '@0xproject/types'; -import { errorUtils } from '@0xproject/utils'; +} from '@0x/types'; +import { errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import { DocsInfo } from '../docs_info'; diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 847946eb1..fc16dca3e 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/react-shared", + "name": "@0x/react-shared", "version": "1.0.15", "engines": { "node": ">=6.12" @@ -25,8 +25,8 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/tslint-config": "^1.0.8", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "^5.9.1", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 828ce1dbc..6259b637f 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/sol-compiler", + "name": "@0x/sol-compiler", "version": "1.1.7", "engines": { "node": ">=6.12" @@ -42,8 +42,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.12", + "@0x/tslint-config": "^1.0.8", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", "@types/semver": "^5.5.0", @@ -65,13 +65,13 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/sol-resolver": "^1.0.14", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.13", + "@0x/json-schemas": "^1.0.7", + "@0x/sol-resolver": "^1.0.14", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", "ethereum-types": "^1.0.11", diff --git a/packages/sol-compiler/src/cli.ts b/packages/sol-compiler/src/cli.ts index 83dadc7ca..0a9db6e05 100644 --- a/packages/sol-compiler/src/cli.ts +++ b/packages/sol-compiler/src/cli.ts @@ -1,7 +1,7 @@ #!/usr/bin/env node // We need the above pragma since this script will be run as a command-line tool. -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import * as _ from 'lodash'; import 'source-map-support/register'; import * as yargs from 'yargs'; diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts index 7eefc1474..8ee7fa4a9 100644 --- a/packages/sol-compiler/src/compiler.ts +++ b/packages/sol-compiler/src/compiler.ts @@ -1,4 +1,4 @@ -import { assert } from '@0xproject/assert'; +import { assert } from '@0x/assert'; import { FallthroughResolver, FSResolver, @@ -7,8 +7,8 @@ import { RelativeFSResolver, Resolver, URLResolver, -} from '@0xproject/sol-resolver'; -import { fetchAsync, logUtils } from '@0xproject/utils'; +} from '@0x/sol-resolver'; +import { fetchAsync, logUtils } from '@0x/utils'; import chalk from 'chalk'; import { CompilerOptions, ContractArtifact, ContractVersionData, StandardOutput } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts index c153beb0f..cda67a414 100644 --- a/packages/sol-compiler/src/utils/compiler.ts +++ b/packages/sol-compiler/src/utils/compiler.ts @@ -1,5 +1,5 @@ -import { ContractSource } from '@0xproject/sol-resolver'; -import { logUtils } from '@0xproject/utils'; +import { ContractSource } from '@0x/sol-resolver'; +import { logUtils } from '@0x/utils'; import { ContractArtifact } from 'ethereum-types'; import * as _ from 'lodash'; import * as path from 'path'; diff --git a/packages/sol-compiler/src/utils/fs_wrapper.ts b/packages/sol-compiler/src/utils/fs_wrapper.ts index 8d6800276..a52b50963 100644 --- a/packages/sol-compiler/src/utils/fs_wrapper.ts +++ b/packages/sol-compiler/src/utils/fs_wrapper.ts @@ -1,4 +1,4 @@ -import { promisify } from '@0xproject/utils'; +import { promisify } from '@0x/utils'; import * as fs from 'fs'; import * as mkdirp from 'mkdirp'; diff --git a/packages/sol-compiler/test/util/constants.ts b/packages/sol-compiler/test/util/constants.ts index 88d6db550..a74ea1b68 100644 --- a/packages/sol-compiler/test/util/constants.ts +++ b/packages/sol-compiler/test/util/constants.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export const constants = { networkId: 0, diff --git a/packages/sol-compiler/test/util/provider.ts b/packages/sol-compiler/test/util/provider.ts index cc372b2eb..4561a1699 100644 --- a/packages/sol-compiler/test/util/provider.ts +++ b/packages/sol-compiler/test/util/provider.ts @@ -1,4 +1,4 @@ -import { web3Factory } from '@0xproject/dev-utils'; +import { web3Factory } from '@0x/dev-utils'; import { Provider } from 'ethereum-types'; const providerConfigs = { shouldUseInProcessGanache: true }; diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 49473f6c8..5bdc10155 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/sol-cov", + "name": "@0x/sol-cov", "version": "2.1.7", "engines": { "node": ">=6.12" @@ -42,12 +42,12 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", "dependencies": { - "@0xproject/dev-utils": "^1.0.12", - "@0xproject/sol-compiler": "^1.1.7", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/dev-utils": "^1.0.12", + "@0x/sol-compiler": "^1.1.7", + "@0x/subproviders": "^2.0.7", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@types/solidity-parser-antlr": "^0.2.0", "ethereum-types": "^1.0.11", "ethereumjs-util": "^5.1.1", @@ -61,7 +61,7 @@ "solidity-parser-antlr": "^0.2.12" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/istanbul": "^0.4.30", "@types/loglevel": "^1.5.3", "@types/mkdirp": "^0.5.1", diff --git a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts index 8a74022bf..57391abbe 100644 --- a/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/sol_compiler_artifact_adapter.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import { CompilerOptions, ContractArtifact } from 'ethereum-types'; import * as fs from 'fs'; import * as glob from 'glob'; diff --git a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts index b4d1aa7ba..f064911d3 100644 --- a/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts +++ b/packages/sol-cov/src/artifact_adapters/truffle_artifact_adapter.ts @@ -1,4 +1,4 @@ -import { Compiler, CompilerOptions } from '@0xproject/sol-compiler'; +import { Compiler, CompilerOptions } from '@0x/sol-compiler'; import * as fs from 'fs'; import * as glob from 'glob'; import * as path from 'path'; diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts index 612d0869a..348e0fc9b 100644 --- a/packages/sol-cov/src/index.ts +++ b/packages/sol-cov/src/index.ts @@ -22,4 +22,4 @@ export { ErrorCallback, OnNextCompleted, Callback, -} from '@0xproject/subproviders'; +} from '@0x/subproviders'; diff --git a/packages/sol-cov/src/revert_trace.ts b/packages/sol-cov/src/revert_trace.ts index a78d1afa8..d60c6e7d9 100644 --- a/packages/sol-cov/src/revert_trace.ts +++ b/packages/sol-cov/src/revert_trace.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import { OpCode, StructLog } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/sol-cov/src/trace.ts b/packages/sol-cov/src/trace.ts index 635019fc0..b38dbdce0 100644 --- a/packages/sol-cov/src/trace.ts +++ b/packages/sol-cov/src/trace.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import { OpCode, StructLog } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-cov/src/trace_collection_subprovider.ts index a69bccb07..25e38768d 100644 --- a/packages/sol-cov/src/trace_collection_subprovider.ts +++ b/packages/sol-cov/src/trace_collection_subprovider.ts @@ -1,6 +1,6 @@ -import { BlockchainLifecycle } from '@0xproject/dev-utils'; -import { Callback, ErrorCallback, NextCallback, Subprovider } from '@0xproject/subproviders'; -import { CallDataRPC, marshaller, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BlockchainLifecycle } from '@0x/dev-utils'; +import { Callback, ErrorCallback, NextCallback, Subprovider } from '@0x/subproviders'; +import { CallDataRPC, marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { JSONRPCRequestPayload, Provider, TxData } from 'ethereum-types'; import * as _ from 'lodash'; import { Lock } from 'semaphore-async-await'; diff --git a/packages/sol-cov/src/trace_collector.ts b/packages/sol-cov/src/trace_collector.ts index 3e2ae3516..44cffc238 100644 --- a/packages/sol-cov/src/trace_collector.ts +++ b/packages/sol-cov/src/trace_collector.ts @@ -1,4 +1,4 @@ -import { promisify } from '@0xproject/utils'; +import { promisify } from '@0x/utils'; import { stripHexPrefix } from 'ethereumjs-util'; import * as fs from 'fs'; import { Collector } from 'istanbul'; diff --git a/packages/sol-cov/src/utils.ts b/packages/sol-cov/src/utils.ts index b696bd463..d8bc65e73 100644 --- a/packages/sol-cov/src/utils.ts +++ b/packages/sol-cov/src/utils.ts @@ -1,4 +1,4 @@ -import { addressUtils, BigNumber } from '@0xproject/utils'; +import { addressUtils, BigNumber } from '@0x/utils'; import { OpCode, StructLog } from 'ethereum-types'; import { addHexPrefix } from 'ethereumjs-util'; import * as _ from 'lodash'; diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index b9fe9f56d..69089878f 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/sol-doc", + "name": "@0x/sol-doc", "version": "1.0.2", "description": "Solidity documentation generator", "main": "lib/src/index.js", @@ -25,16 +25,16 @@ "author": "F. Eugene Aumson", "license": "Apache-2.0", "dependencies": { - "@0xproject/sol-compiler": "^1.1.7", - "@0xproject/types": "^1.1.4", - "@0xproject/utils": "^2.0.2", + "@0x/sol-compiler": "^1.1.7", + "@0x/types": "^1.1.4", + "@0x/utils": "^2.0.2", "ethereum-types": "^1.0.11", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.10", "yargs": "^12.0.2" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "chai": "^4.1.2", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.2", diff --git a/packages/sol-doc/src/cli.ts b/packages/sol-doc/src/cli.ts index a1847e868..6da132d56 100644 --- a/packages/sol-doc/src/cli.ts +++ b/packages/sol-doc/src/cli.ts @@ -1,7 +1,7 @@ import 'source-map-support/register'; import * as yargs from 'yargs'; -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import { SolDoc } from './sol_doc'; diff --git a/packages/sol-doc/src/sol_doc.ts b/packages/sol-doc/src/sol_doc.ts index 686e9ca34..e2cfb39e2 100644 --- a/packages/sol-doc/src/sol_doc.ts +++ b/packages/sol-doc/src/sol_doc.ts @@ -14,7 +14,7 @@ import { import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; -import { Compiler, CompilerOptions } from '@0xproject/sol-compiler'; +import { Compiler, CompilerOptions } from '@0x/sol-compiler'; import { CustomType, CustomTypeChild, @@ -27,7 +27,7 @@ import { SolidityMethod, Type, TypeDocTypes, -} from '@0xproject/types'; +} from '@0x/types'; export class SolDoc { private _customTypeHashToName: ObjectMap | undefined; diff --git a/packages/sol-doc/test/solidity_doc_generator_test.ts b/packages/sol-doc/test/solidity_doc_generator_test.ts index f166fb143..a49f29d02 100644 --- a/packages/sol-doc/test/solidity_doc_generator_test.ts +++ b/packages/sol-doc/test/solidity_doc_generator_test.ts @@ -3,7 +3,7 @@ import * as _ from 'lodash'; import * as chai from 'chai'; import 'mocha'; -import { DocAgnosticFormat, Event, SolidityMethod } from '@0xproject/types'; +import { DocAgnosticFormat, Event, SolidityMethod } from '@0x/types'; import { SolDoc } from '../src/sol_doc'; diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json index 2c86d556a..a8df0f750 100644 --- a/packages/sol-resolver/package.json +++ b/packages/sol-resolver/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/sol-resolver", + "name": "@0x/sol-resolver", "version": "1.0.14", "engines": { "node": ">=6.12" @@ -23,15 +23,15 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/resolver/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", "typescript": "3.0.1" }, "dependencies": { - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index c3ddde36e..8cbb3cc9f 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/sra-spec", + "name": "@0x/sra-spec", "version": "1.0.6", "engines": { "node": ">=6.12" @@ -35,11 +35,11 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0xproject/json-schemas": "^1.0.7", + "@0x/json-schemas": "^1.0.7", "@loopback/openapi-v3-types": "^0.8.2" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/mocha": "^2.2.42", "@types/node": "^10.5.3", "chai": "^4.0.1", diff --git a/packages/sra-spec/src/json-schemas.ts b/packages/sra-spec/src/json-schemas.ts index 47cca9b04..9eb32de59 100644 --- a/packages/sra-spec/src/json-schemas.ts +++ b/packages/sra-spec/src/json-schemas.ts @@ -1,4 +1,4 @@ -import { schemas as jsonSchemas } from '@0xproject/json-schemas'; +import { schemas as jsonSchemas } from '@0x/json-schemas'; // Only include schemas we actually need const { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 1fe1ee4ad..e88c0c239 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/subproviders", + "name": "@0x/subproviders", "version": "2.0.7", "engines": { "node": ">=6.12" @@ -29,11 +29,11 @@ } }, "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.13", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "@ledgerhq/hw-app-eth": "^4.3.0", "@ledgerhq/hw-transport-u2f": "^4.3.0", "@types/eth-lightwallet": "^3.0.0", @@ -54,7 +54,7 @@ "web3-provider-engine": "14.0.6" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/bip39": "^2.4.0", "@types/bn.js": "^4.11.0", "@types/ethereumjs-tx": "^1.0.0", diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 9f4dac58b..8f02210c9 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -55,7 +55,7 @@ export { EIP712TypedData, EIP712Types, EIP712Parameter, -} from '@0xproject/types'; +} from '@0x/types'; export { JSONRPCRequestPayload, diff --git a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts index 409a0d330..e9d104074 100644 --- a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts @@ -1,5 +1,5 @@ -import { assert } from '@0xproject/assert'; -import { addressUtils } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { addressUtils } from '@0x/utils'; import { JSONRPCRequestPayload, JSONRPCResponsePayload } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts index a1d93ac49..15cd713af 100644 --- a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts @@ -1,4 +1,4 @@ -import { EIP712TypedData } from '@0xproject/types'; +import { EIP712TypedData } from '@0x/types'; import * as lightwallet from 'eth-lightwallet'; import { PartialTxParams } from '../types'; diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts index ee8edde92..28e348f90 100644 --- a/packages/subproviders/src/subproviders/ledger.ts +++ b/packages/subproviders/src/subproviders/ledger.ts @@ -1,5 +1,5 @@ -import { assert } from '@0xproject/assert'; -import { addressUtils } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { addressUtils } from '@0x/utils'; import EthereumTx = require('ethereumjs-tx'); import ethUtil = require('ethereumjs-util'); import HDNode = require('hdkey'); diff --git a/packages/subproviders/src/subproviders/metamask_subprovider.ts b/packages/subproviders/src/subproviders/metamask_subprovider.ts index 46fc2a9cd..ba207d4cc 100644 --- a/packages/subproviders/src/subproviders/metamask_subprovider.ts +++ b/packages/subproviders/src/subproviders/metamask_subprovider.ts @@ -1,4 +1,4 @@ -import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { JSONRPCRequestPayload, Provider } from 'ethereum-types'; import * as ethUtil from 'ethereumjs-util'; diff --git a/packages/subproviders/src/subproviders/mnemonic_wallet.ts b/packages/subproviders/src/subproviders/mnemonic_wallet.ts index 04a11c7be..140e3d515 100644 --- a/packages/subproviders/src/subproviders/mnemonic_wallet.ts +++ b/packages/subproviders/src/subproviders/mnemonic_wallet.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { EIP712TypedData } from '@0xproject/types'; -import { addressUtils } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { EIP712TypedData } from '@0x/types'; +import { addressUtils } from '@0x/utils'; import * as bip39 from 'bip39'; import HDNode = require('hdkey'); import * as _ from 'lodash'; diff --git a/packages/subproviders/src/subproviders/private_key_wallet.ts b/packages/subproviders/src/subproviders/private_key_wallet.ts index e89c4c186..dca7e6810 100644 --- a/packages/subproviders/src/subproviders/private_key_wallet.ts +++ b/packages/subproviders/src/subproviders/private_key_wallet.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { EIP712TypedData } from '@0xproject/types'; -import { signTypedDataUtils } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { EIP712TypedData } from '@0x/types'; +import { signTypedDataUtils } from '@0x/utils'; import EthereumTx = require('ethereumjs-tx'); import * as ethUtil from 'ethereumjs-util'; import * as _ from 'lodash'; diff --git a/packages/subproviders/src/subproviders/redundant_subprovider.ts b/packages/subproviders/src/subproviders/redundant_subprovider.ts index 59a2986f8..58312f203 100644 --- a/packages/subproviders/src/subproviders/redundant_subprovider.ts +++ b/packages/subproviders/src/subproviders/redundant_subprovider.ts @@ -1,4 +1,4 @@ -import { promisify } from '@0xproject/utils'; +import { promisify } from '@0x/utils'; import { JSONRPCRequestPayload } from 'ethereum-types'; import * as _ from 'lodash'; diff --git a/packages/subproviders/src/subproviders/rpc_subprovider.ts b/packages/subproviders/src/subproviders/rpc_subprovider.ts index 18d6da307..437518e12 100644 --- a/packages/subproviders/src/subproviders/rpc_subprovider.ts +++ b/packages/subproviders/src/subproviders/rpc_subprovider.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { StatusCodes } from '@0xproject/types'; -import { fetchAsync } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { StatusCodes } from '@0x/types'; +import { fetchAsync } from '@0x/utils'; import { JSONRPCRequestPayload } from 'ethereum-types'; import JsonRpcError = require('json-rpc-error'); diff --git a/packages/subproviders/src/subproviders/signer.ts b/packages/subproviders/src/subproviders/signer.ts index eda7db42e..9bd5cbdf1 100644 --- a/packages/subproviders/src/subproviders/signer.ts +++ b/packages/subproviders/src/subproviders/signer.ts @@ -1,4 +1,4 @@ -import { marshaller, Web3Wrapper } from '@0xproject/web3-wrapper'; +import { marshaller, Web3Wrapper } from '@0x/web3-wrapper'; import { JSONRPCRequestPayload, Provider } from 'ethereum-types'; import { Callback, ErrorCallback } from '../types'; diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts index dcf880c79..cd6780e0c 100644 --- a/packages/subproviders/src/subproviders/subprovider.ts +++ b/packages/subproviders/src/subproviders/subprovider.ts @@ -1,4 +1,4 @@ -import { promisify } from '@0xproject/utils'; +import { promisify } from '@0x/utils'; import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from 'ethereum-types'; import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../types'; diff --git a/packages/subproviders/src/types.ts b/packages/subproviders/src/types.ts index e8a47ad34..ed3aea176 100644 --- a/packages/subproviders/src/types.ts +++ b/packages/subproviders/src/types.ts @@ -1,4 +1,4 @@ -import { ECSignature } from '@0xproject/types'; +import { ECSignature } from '@0x/types'; import { JSONRPCRequestPayload } from 'ethereum-types'; import HDNode = require('hdkey'); diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts index 527ee5b22..b072e611b 100644 --- a/packages/subproviders/test/integration/ledger_subprovider_test.ts +++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts @@ -1,5 +1,5 @@ -import { DoneCallback } from '@0xproject/types'; -import { promisify } from '@0xproject/utils'; +import { DoneCallback } from '@0x/types'; +import { promisify } from '@0x/utils'; import Eth from '@ledgerhq/hw-app-eth'; // HACK: This dependency is optional and tslint skips optional dependencies // tslint:disable-next-line:no-implicit-dependencies diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts index 05f213cf5..a5cef30dc 100644 --- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts +++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts @@ -1,7 +1,7 @@ import * as chai from 'chai'; import FixtureSubprovider = require('web3-provider-engine/subproviders/fixture'); -import { promisify } from '@0xproject/utils'; +import { promisify } from '@0x/utils'; import EthereumTx = require('ethereumjs-tx'); import { NonceTrackerSubprovider, Web3ProviderEngine } from '../../src'; diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts index e30d2f74e..fb4e43f9e 100644 --- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts +++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts @@ -1,4 +1,4 @@ -import { DoneCallback } from '@0xproject/types'; +import { DoneCallback } from '@0x/types'; import * as chai from 'chai'; import { JSONRPCResponsePayload } from 'ethereum-types'; import * as Sinon from 'sinon'; diff --git a/packages/subproviders/test/utils/report_callback_errors.ts b/packages/subproviders/test/utils/report_callback_errors.ts index eaefea7c3..6eb7420c3 100644 --- a/packages/subproviders/test/utils/report_callback_errors.ts +++ b/packages/subproviders/test/utils/report_callback_errors.ts @@ -1,4 +1,4 @@ -import { DoneCallback } from '@0xproject/types'; +import { DoneCallback } from '@0x/types'; export const reportCallbackErrors = (done: DoneCallback) => { return (f: (...args: any[]) => void) => { diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index a113889cc..6208cdd8a 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -1,6 +1,6 @@ { "private": true, - "name": "@0xproject/testnet-faucets", + "name": "@0x/testnet-faucets", "version": "1.0.51", "engines": { "node": ">=6.12" @@ -19,10 +19,10 @@ "license": "Apache-2.0", "dependencies": { "0x.js": "^1.0.8", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/subproviders": "^2.0.7", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "body-parser": "^1.17.1", "ethereum-types": "^1.0.11", "ethereumjs-tx": "^1.3.5", @@ -32,7 +32,7 @@ "rollbar": "^0.6.5" }, "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/body-parser": "^1.16.1", "@types/express": "^4.0.35", "@types/lodash": "4.14.104", diff --git a/packages/testnet-faucets/src/ts/dispatch_queue.ts b/packages/testnet-faucets/src/ts/dispatch_queue.ts index 0a13df7c9..3d0958fbf 100644 --- a/packages/testnet-faucets/src/ts/dispatch_queue.ts +++ b/packages/testnet-faucets/src/ts/dispatch_queue.ts @@ -1,4 +1,4 @@ -import { intervalUtils, logUtils } from '@0xproject/utils'; +import { intervalUtils, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import { errorReporter } from './error_reporter'; diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts index fa63ab63e..32f5cb623 100644 --- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts +++ b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts @@ -1,6 +1,6 @@ import { ERC20TokenWrapper } from '0x.js'; -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { configs } from './configs'; diff --git a/packages/testnet-faucets/src/ts/error_reporter.ts b/packages/testnet-faucets/src/ts/error_reporter.ts index 49c37b6eb..d5358aed0 100644 --- a/packages/testnet-faucets/src/ts/error_reporter.ts +++ b/packages/testnet-faucets/src/ts/error_reporter.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import * as express from 'express'; import rollbar = require('rollbar'); diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts index 5cc52e489..2dfa3c3af 100644 --- a/packages/testnet-faucets/src/ts/handler.ts +++ b/packages/testnet-faucets/src/ts/handler.ts @@ -11,9 +11,9 @@ import { SignedOrder, Web3ProviderEngine, } from '0x.js'; -import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0xproject/subproviders'; -import { logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0x/subproviders'; +import { logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as express from 'express'; import * as _ from 'lodash'; diff --git a/packages/testnet-faucets/src/ts/parameter_transformer.ts b/packages/testnet-faucets/src/ts/parameter_transformer.ts index 7320b1d1c..bed8eb99e 100644 --- a/packages/testnet-faucets/src/ts/parameter_transformer.ts +++ b/packages/testnet-faucets/src/ts/parameter_transformer.ts @@ -1,4 +1,4 @@ -import { addressUtils } from '@0xproject/utils'; +import { addressUtils } from '@0x/utils'; import { NextFunction, Request, Response } from 'express'; import * as _ from 'lodash'; diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 9cd2ef88c..6b35b9f27 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/tslint-config", + "name": "@0x/tslint-config", "version": "1.0.8", "engines": { "node": ">=6.12" diff --git a/packages/types/package.json b/packages/types/package.json index 104f22178..c5522ac88 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/types", + "name": "@0x/types", "version": "1.1.4", "engines": { "node": ">=6.12" @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index e03d78d51..77115cc03 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/typescript-typings", + "name": "@0x/typescript-typings", "version": "3.0.2", "engines": { "node": ">=6.12" diff --git a/packages/utils/package.json b/packages/utils/package.json index f365cf97f..43844e535 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/utils", + "name": "@0x/utils", "version": "2.0.2", "engines": { "node": ">=6.12" @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/utils/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/detect-node": "2.0.0", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -41,8 +41,8 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", "@types/node": "*", "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", diff --git a/packages/utils/src/sign_typed_data_utils.ts b/packages/utils/src/sign_typed_data_utils.ts index cd5bcb42f..6963b9084 100644 --- a/packages/utils/src/sign_typed_data_utils.ts +++ b/packages/utils/src/sign_typed_data_utils.ts @@ -2,7 +2,7 @@ import * as ethUtil from 'ethereumjs-util'; import * as ethers from 'ethers'; import * as _ from 'lodash'; -import { EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types } from '@0xproject/types'; +import { EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types } from '@0x/types'; export const signTypedDataUtils = { /** diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 4d033e130..b1687f48a 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/web3-wrapper", + "name": "@0x/web3-wrapper", "version": "3.0.3", "engines": { "node": ">=6.12" @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md", "devDependencies": { - "@0xproject/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.8", "@types/ganache-core": "^2.1.0", "@types/lodash": "4.14.104", "chai": "^4.0.1", @@ -53,10 +53,10 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/assert": "^1.0.13", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", + "@0x/assert": "^1.0.13", + "@0x/json-schemas": "^1.0.7", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", "ethereum-types": "^1.0.11", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index 9bef06fd4..679563a2b 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -1,7 +1,7 @@ export { Web3Wrapper } from './web3_wrapper'; export { marshaller } from './marshaller'; -export { AbiDecoder } from '@0xproject/utils'; +export { AbiDecoder } from '@0x/utils'; export { BlockParam, diff --git a/packages/web3-wrapper/src/marshaller.ts b/packages/web3-wrapper/src/marshaller.ts index 572a322d6..299c6a64c 100644 --- a/packages/web3-wrapper/src/marshaller.ts +++ b/packages/web3-wrapper/src/marshaller.ts @@ -1,4 +1,4 @@ -import { addressUtils } from '@0xproject/utils'; +import { addressUtils } from '@0x/utils'; import { BlockParam, BlockParamLiteral, diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts index 0b568aac5..c68587632 100644 --- a/packages/web3-wrapper/src/utils.ts +++ b/packages/web3-wrapper/src/utils.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; export const utils = { diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index 726246f1a..3ba153680 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -1,6 +1,6 @@ -import { assert } from '@0xproject/assert'; -import { schemas } from '@0xproject/json-schemas'; -import { AbiDecoder, addressUtils, BigNumber, intervalUtils, promisify } from '@0xproject/utils'; +import { assert } from '@0x/assert'; +import { schemas } from '@0x/json-schemas'; +import { AbiDecoder, addressUtils, BigNumber, intervalUtils, promisify } from '@0x/utils'; import { BlockParam, BlockParamLiteral, @@ -145,7 +145,7 @@ export class Web3Wrapper { if (_.isUndefined((provider as any).sendAsync)) { // Web3@1.0 provider doesn't support synchronous http requests, // so it only has an async `send` method, instead of a `send` and `sendAsync` in web3@0.x.x` - // We re-assign the send method so that Web3@1.0 providers work with @0xproject/web3-wrapper + // We re-assign the send method so that Web3@1.0 providers work with @0x/web3-wrapper (provider as any).sendAsync = (provider as any).send; } this.abiDecoder = new AbiDecoder([]); diff --git a/packages/website/package.json b/packages/website/package.json index 4af556b5f..090d4cd72 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,5 +1,5 @@ { - "name": "@0xproject/website", + "name": "@0x/website", "version": "0.0.54", "engines": { "node": ">=6.12" @@ -20,16 +20,16 @@ "license": "Apache-2.0", "dependencies": { "0x.js": "^0.38.6", - "@0xproject/contract-wrappers": "^2.0.2", - "@0xproject/json-schemas": "^1.0.7", - "@0xproject/order-utils": "^1.0.7", - "@0xproject/react-docs": "^1.0.13", - "@0xproject/react-shared": "^1.0.15", - "@0xproject/subproviders": "^2.0.7", - "@0xproject/types": "^1.1.4", - "@0xproject/typescript-typings": "^3.0.2", - "@0xproject/utils": "^2.0.2", - "@0xproject/web3-wrapper": "^3.0.3", + "@0x/contract-wrappers": "^2.0.2", + "@0x/json-schemas": "^1.0.7", + "@0x/order-utils": "^1.0.7", + "@0x/react-docs": "^1.0.13", + "@0x/react-shared": "^1.0.15", + "@0x/subproviders": "^2.0.7", + "@0x/types": "^1.1.4", + "@0x/typescript-typings": "^3.0.2", + "@0x/utils": "^2.0.2", + "@0x/web3-wrapper": "^3.0.3", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 8955bbc30..4d5213aef 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -8,9 +8,9 @@ import { ExchangeEvents, ExchangeFillEventArgs, IndexedFilterValues, -} from '@0xproject/contract-wrappers'; -import { assetDataUtils, orderHashUtils, signatureUtils } from '@0xproject/order-utils'; -import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; +} from '@0x/contract-wrappers'; +import { assetDataUtils, orderHashUtils, signatureUtils } from '@0x/order-utils'; +import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; import { ledgerEthereumBrowserClientFactoryAsync, LedgerSubprovider, @@ -19,10 +19,10 @@ import { RPCSubprovider, SignerSubprovider, Web3ProviderEngine, -} from '@0xproject/subproviders'; -import { SignedOrder, Token as ZeroExToken } from '@0xproject/types'; -import { BigNumber, intervalUtils, logUtils, promisify } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/subproviders'; +import { SignedOrder, Token as ZeroExToken } from '@0x/types'; +import { BigNumber, intervalUtils, logUtils, promisify } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import { BlockParam, LogWithDecodedArgs, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types'; import * as _ from 'lodash'; import * as moment from 'moment'; diff --git a/packages/website/ts/blockchain_watcher.ts b/packages/website/ts/blockchain_watcher.ts index 39ed8b08b..835932dcd 100644 --- a/packages/website/ts/blockchain_watcher.ts +++ b/packages/website/ts/blockchain_watcher.ts @@ -1,5 +1,5 @@ -import { BigNumber, intervalUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, intervalUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { Dispatcher } from 'ts/redux/dispatcher'; diff --git a/packages/website/ts/containers/asset_buyer_documentation.ts b/packages/website/ts/containers/asset_buyer_documentation.ts index 13a597ea3..c93b9332d 100644 --- a/packages/website/ts/containers/asset_buyer_documentation.ts +++ b/packages/website/ts/containers/asset_buyer_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -22,7 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.AssetBuyer, - packageName: '@0xproject/asset-buyer', + packageName: '@0x/asset-buyer', type: SupportedDocJson.TypeDoc, displayName: 'AssetBuyer', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 7c86357c5..074839385 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -21,7 +21,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Connect, - packageName: '@0xproject/connect', + packageName: '@0x/connect', type: SupportedDocJson.TypeDoc, displayName: '0x Connect', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index f7e5f17eb..5bf2a4e1f 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -20,7 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.ContractWrappers, - packageName: '@0xproject/contract-wrappers', + packageName: '@0x/contract-wrappers', type: SupportedDocJson.TypeDoc, displayName: 'Contract Wrappers', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 3cab885b4..9d1df1d1f 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -1,4 +1,4 @@ -import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { constants as docConstants, DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; diff --git a/packages/website/ts/containers/generate_order_form.ts b/packages/website/ts/containers/generate_order_form.ts index bc9d6f524..98b2831ce 100644 --- a/packages/website/ts/containers/generate_order_form.ts +++ b/packages/website/ts/containers/generate_order_form.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as React from 'react'; import { connect } from 'react-redux'; import { Blockchain } from 'ts/blockchain'; diff --git a/packages/website/ts/containers/inputs/eth_amount_input.ts b/packages/website/ts/containers/inputs/eth_amount_input.ts index 9ef903b55..45d3ddebd 100644 --- a/packages/website/ts/containers/inputs/eth_amount_input.ts +++ b/packages/website/ts/containers/inputs/eth_amount_input.ts @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as React from 'react'; import { connect } from 'react-redux'; import { State } from 'ts/redux/reducer'; diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 4b3200203..38cdc909a 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -25,7 +25,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.JSONSchemas, - packageName: '@0xproject/json-schemas', + packageName: '@0x/json-schemas', type: SupportedDocJson.TypeDoc, displayName: 'JSON Schemas', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 77204b480..ea083e6a6 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -20,7 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderUtils, - packageName: '@0xproject/order-utils', + packageName: '@0x/order-utils', type: SupportedDocJson.TypeDoc, displayName: 'Order utils', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 1b0c1ec91..83caf29ed 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -20,7 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.OrderWatcher, - packageName: '@0xproject/order-watcher', + packageName: '@0x/order-watcher', type: SupportedDocJson.TypeDoc, displayName: 'OrderWatcher', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/portal.ts b/packages/website/ts/containers/portal.ts index 4d7ff2f55..5661e0a97 100644 --- a/packages/website/ts/containers/portal.ts +++ b/packages/website/ts/containers/portal.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { connect } from 'react-redux'; diff --git a/packages/website/ts/containers/portal_onboarding_flow.ts b/packages/website/ts/containers/portal_onboarding_flow.ts index a813205b1..66473733c 100644 --- a/packages/website/ts/containers/portal_onboarding_flow.ts +++ b/packages/website/ts/containers/portal_onboarding_flow.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index 0989a7d0e..fc34b5f61 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -1,5 +1,5 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; -import { Networks } from '@0xproject/react-shared'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import { Networks } from '@0x/react-shared'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index b84974d69..03da8a25f 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -22,7 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCompiler, - packageName: '@0xproject/sol-compiler', + packageName: '@0x/sol-compiler', type: SupportedDocJson.TypeDoc, displayName: 'Solidity Compiler', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index f9c428f8e..5943be009 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -22,7 +22,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.SolCov, - packageName: '@0xproject/sol-cov', + packageName: '@0x/sol-cov', type: SupportedDocJson.TypeDoc, displayName: 'Sol-cov', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index 1588c7d46..b00551a79 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -22,7 +22,7 @@ const docSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Subproviders, - packageName: '@0xproject/subproviders', + packageName: '@0x/subproviders', type: SupportedDocJson.TypeDoc, displayName: 'Subproviders', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index 0154c05b9..f064a1567 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; @@ -20,7 +20,7 @@ const markdownSections = { const docsInfoConfig: DocsInfoConfig = { id: DocPackages.Web3Wrapper, - packageName: '@0xproject/web3-wrapper', + packageName: '@0x/web3-wrapper', type: SupportedDocJson.TypeDoc, displayName: 'Web3Wrapper', packageUrl: 'https://github.com/0xProject/0x-monorepo', diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 459d8390a..9c0de32a8 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -1,4 +1,4 @@ -import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0xproject/react-docs'; +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; import * as React from 'react'; import { connect } from 'react-redux'; import { Dispatch } from 'redux'; diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts index c418cab3f..e85afd3b1 100644 --- a/packages/website/ts/redux/dispatcher.ts +++ b/packages/website/ts/redux/dispatcher.ts @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import { Dispatch } from 'redux'; import { State } from 'ts/redux/reducer'; import { diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts index f54801639..51c77ba47 100644 --- a/packages/website/ts/redux/reducer.ts +++ b/packages/website/ts/redux/reducer.ts @@ -1,5 +1,5 @@ -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as moment from 'moment'; import { diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts index 3fd013002..128d943e1 100644 --- a/packages/website/ts/schemas/validator.ts +++ b/packages/website/ts/schemas/validator.ts @@ -1,4 +1,4 @@ -import { SchemaValidator } from '@0xproject/json-schemas'; +import { SchemaValidator } from '@0x/json-schemas'; import { orderMetadataSchema } from 'ts/schemas/metadata_schema'; import { portalOrderSchema } from 'ts/schemas/portal_order_schema'; import { portalTokenMetadataSchema } from 'ts/schemas/portal_token_metadata'; diff --git a/packages/website/ts/style/colors.ts b/packages/website/ts/style/colors.ts index 349845a09..0620bae0f 100644 --- a/packages/website/ts/style/colors.ts +++ b/packages/website/ts/style/colors.ts @@ -1,4 +1,4 @@ -import { colors as sharedColors } from '@0xproject/react-shared'; +import { colors as sharedColors } from '@0x/react-shared'; const appColors = { walletBoxShadow: 'rgba(0, 0, 0, 0.05)', diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 84be4d3b0..f85317c7b 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -1,6 +1,6 @@ -import { ALink } from '@0xproject/react-shared'; -import { ObjectMap, SignedOrder } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; +import { ALink } from '@0x/react-shared'; +import { ObjectMap, SignedOrder } from '@0x/types'; +import { BigNumber } from '@0x/utils'; import { Provider } from 'ethereum-types'; import * as React from 'react'; diff --git a/packages/website/ts/utils/analytics.ts b/packages/website/ts/utils/analytics.ts index 3aae317b0..e990b4fc7 100644 --- a/packages/website/ts/utils/analytics.ts +++ b/packages/website/ts/utils/analytics.ts @@ -1,5 +1,5 @@ -import { assetDataUtils } from '@0xproject/order-utils'; -import { ObjectMap } from '@0xproject/types'; +import { assetDataUtils } from '@0x/order-utils'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import { PortalOrder } from 'ts/types'; import { utils } from 'ts/utils/utils'; diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts index e76d40bd3..0a8a86c50 100644 --- a/packages/website/ts/utils/constants.ts +++ b/packages/website/ts/utils/constants.ts @@ -1,5 +1,5 @@ -import { ALink } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; +import { ALink } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; import { Key, WebsitePaths } from 'ts/types'; const URL_FORUM = 'https://forum.0xproject.com'; diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts index 0e1d9ea6e..e0b883ace 100644 --- a/packages/website/ts/utils/doc_utils.ts +++ b/packages/website/ts/utils/doc_utils.ts @@ -1,5 +1,5 @@ -import { DocAgnosticFormat, GeneratedDocJson } from '@0xproject/react-docs'; -import { fetchAsync, logUtils } from '@0xproject/utils'; +import { DocAgnosticFormat, GeneratedDocJson } from '@0x/react-docs'; +import { fetchAsync, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import { S3FileObject, VersionToFilePath } from 'ts/types'; import convert = require('xml-js'); diff --git a/packages/website/ts/utils/error_reporter.ts b/packages/website/ts/utils/error_reporter.ts index bec92e829..6fc1216c3 100644 --- a/packages/website/ts/utils/error_reporter.ts +++ b/packages/website/ts/utils/error_reporter.ts @@ -1,4 +1,4 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import Rollbar = require('rollbar'); import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; diff --git a/packages/website/ts/utils/fetch_utils.ts b/packages/website/ts/utils/fetch_utils.ts index e9a88b6b3..9afc5904d 100644 --- a/packages/website/ts/utils/fetch_utils.ts +++ b/packages/website/ts/utils/fetch_utils.ts @@ -1,4 +1,4 @@ -import { fetchAsync, logUtils } from '@0xproject/utils'; +import { fetchAsync, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as queryString from 'query-string'; diff --git a/packages/website/ts/utils/mui_theme.ts b/packages/website/ts/utils/mui_theme.ts index f677b4625..3f32254de 100644 --- a/packages/website/ts/utils/mui_theme.ts +++ b/packages/website/ts/utils/mui_theme.ts @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import { getMuiTheme } from 'material-ui/styles'; export const muiTheme = getMuiTheme({ diff --git a/packages/website/ts/utils/order_parser.ts b/packages/website/ts/utils/order_parser.ts index 816200e3b..8938fbc53 100644 --- a/packages/website/ts/utils/order_parser.ts +++ b/packages/website/ts/utils/order_parser.ts @@ -1,5 +1,5 @@ -import { orderParsingUtils } from '@0xproject/order-utils'; -import { logUtils } from '@0xproject/utils'; +import { orderParsingUtils } from '@0x/order-utils'; +import { logUtils } from '@0x/utils'; import * as _ from 'lodash'; import { portalOrderSchema } from 'ts/schemas/portal_order_schema'; diff --git a/packages/website/ts/utils/token_address_overrides.ts b/packages/website/ts/utils/token_address_overrides.ts index e7e916273..5e7275964 100644 --- a/packages/website/ts/utils/token_address_overrides.ts +++ b/packages/website/ts/utils/token_address_overrides.ts @@ -1,4 +1,4 @@ -import { ObjectMap } from '@0xproject/types'; +import { ObjectMap } from '@0x/types'; import { constants } from 'ts/utils/constants'; // Map of networkId -> tokenSymbol -> tokenAddress diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index d1628bc52..d4ad5f611 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -1,9 +1,9 @@ -import { ContractWrappersError } from '@0xproject/contract-wrappers'; -import { assetDataUtils, OrderError } from '@0xproject/order-utils'; -import { constants as sharedConstants, Networks } from '@0xproject/react-shared'; -import { ExchangeContractErrs } from '@0xproject/types'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { ContractWrappersError } from '@0x/contract-wrappers'; +import { assetDataUtils, OrderError } from '@0x/order-utils'; +import { constants as sharedConstants, Networks } from '@0x/react-shared'; +import { ExchangeContractErrs } from '@0x/types'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as bowser from 'bowser'; import deepEqual = require('deep-equal'); import * as _ from 'lodash'; -- cgit From 88c929a408d17d8d1f4604187f8b1b04e94dab73 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 22:01:04 +1100 Subject: chore: change tslint.json from 0xproject to 0x --- packages/0x.js/tslint.json | 2 +- packages/abi-gen-wrappers/package.json | 1 + packages/abi-gen-wrappers/tslint.json | 2 +- packages/abi-gen/tslint.json | 2 +- packages/assert/tslint.json | 2 +- packages/asset-buyer/tslint.json | 2 +- packages/base-contract/tslint.json | 2 +- packages/connect/tslint.json | 2 +- packages/contract-addresses/tslint.json | 2 +- packages/contract-artifacts/tslint.json | 2 +- packages/contract-wrappers/tslint.json | 2 +- packages/contracts/tslint.json | 2 +- packages/dev-tools-pages/tslint.json | 2 +- packages/dev-utils/tslint.json | 2 +- packages/ethereum-types/tslint.json | 2 +- packages/fill-scenarios/tslint.json | 2 +- packages/instant/tslint.json | 2 +- packages/json-schemas/tslint.json | 2 +- packages/metacoin/tslint.json | 2 +- packages/migrations/tslint.json | 2 +- packages/order-utils/tslint.json | 2 +- packages/order-watcher/tslint.json | 2 +- packages/react-docs/tslint.json | 2 +- packages/react-shared/tslint.json | 2 +- packages/sol-compiler/tslint.json | 2 +- packages/sol-cov/tslint.json | 2 +- packages/sol-doc/tslint.json | 2 +- packages/sol-resolver/tslint.json | 2 +- packages/sra-spec/tslint.json | 2 +- packages/subproviders/tslint.json | 2 +- packages/testnet-faucets/tslint.json | 2 +- packages/types/tslint.json | 2 +- packages/utils/tslint.json | 2 +- packages/web3-wrapper/tslint.json | 2 +- packages/website/tslint.json | 2 +- 35 files changed, 35 insertions(+), 34 deletions(-) diff --git a/packages/0x.js/tslint.json b/packages/0x.js/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/0x.js/tslint.json +++ b/packages/0x.js/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 01a577702..689147f71 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -34,6 +34,7 @@ "@0x/tslint-config": "^1.0.8", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", + "ethereum-types": "^1.6.0", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" diff --git a/packages/abi-gen-wrappers/tslint.json b/packages/abi-gen-wrappers/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/abi-gen-wrappers/tslint.json +++ b/packages/abi-gen-wrappers/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/abi-gen/tslint.json b/packages/abi-gen/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/abi-gen/tslint.json +++ b/packages/abi-gen/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/assert/tslint.json b/packages/assert/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/assert/tslint.json +++ b/packages/assert/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/asset-buyer/tslint.json b/packages/asset-buyer/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/asset-buyer/tslint.json +++ b/packages/asset-buyer/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/base-contract/tslint.json b/packages/base-contract/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/base-contract/tslint.json +++ b/packages/base-contract/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/connect/tslint.json b/packages/connect/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/connect/tslint.json +++ b/packages/connect/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/contract-addresses/tslint.json b/packages/contract-addresses/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/contract-addresses/tslint.json +++ b/packages/contract-addresses/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/contract-artifacts/tslint.json b/packages/contract-artifacts/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/contract-artifacts/tslint.json +++ b/packages/contract-artifacts/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/contract-wrappers/tslint.json b/packages/contract-wrappers/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/contract-wrappers/tslint.json +++ b/packages/contract-wrappers/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/contracts/tslint.json b/packages/contracts/tslint.json index 1ab924e47..1bb3ac2a2 100644 --- a/packages/contracts/tslint.json +++ b/packages/contracts/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "custom-no-magic-numbers": false } diff --git a/packages/dev-tools-pages/tslint.json b/packages/dev-tools-pages/tslint.json index b55ffe90f..50f5be4f6 100644 --- a/packages/dev-tools-pages/tslint.json +++ b/packages/dev-tools-pages/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "no-implicit-dependencies": false, "no-object-literal-type-assertion": false, diff --git a/packages/dev-utils/tslint.json b/packages/dev-utils/tslint.json index 015dce851..631f46bca 100644 --- a/packages/dev-utils/tslint.json +++ b/packages/dev-utils/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "completed-docs": false } diff --git a/packages/ethereum-types/tslint.json b/packages/ethereum-types/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/ethereum-types/tslint.json +++ b/packages/ethereum-types/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/fill-scenarios/tslint.json b/packages/fill-scenarios/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/fill-scenarios/tslint.json +++ b/packages/fill-scenarios/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/instant/tslint.json b/packages/instant/tslint.json index f71532e5d..abe874a6d 100644 --- a/packages/instant/tslint.json +++ b/packages/instant/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "custom-no-magic-numbers": false, "semicolon": [true, "always", "ignore-bound-class-methods"] diff --git a/packages/json-schemas/tslint.json b/packages/json-schemas/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/json-schemas/tslint.json +++ b/packages/json-schemas/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/metacoin/tslint.json b/packages/metacoin/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/metacoin/tslint.json +++ b/packages/metacoin/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/migrations/tslint.json b/packages/migrations/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/migrations/tslint.json +++ b/packages/migrations/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/order-utils/tslint.json b/packages/order-utils/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/order-utils/tslint.json +++ b/packages/order-utils/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/order-watcher/tslint.json b/packages/order-watcher/tslint.json index 059573ce7..4ade3b924 100644 --- a/packages/order-watcher/tslint.json +++ b/packages/order-watcher/tslint.json @@ -2,5 +2,5 @@ "rules": { "prefer-readonly": true }, - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/react-docs/tslint.json b/packages/react-docs/tslint.json index c78434416..c3f6d9cae 100644 --- a/packages/react-docs/tslint.json +++ b/packages/react-docs/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "no-object-literal-type-assertion": false, "completed-docs": false, diff --git a/packages/react-shared/tslint.json b/packages/react-shared/tslint.json index c78434416..c3f6d9cae 100644 --- a/packages/react-shared/tslint.json +++ b/packages/react-shared/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "no-object-literal-type-assertion": false, "completed-docs": false, diff --git a/packages/sol-compiler/tslint.json b/packages/sol-compiler/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/sol-compiler/tslint.json +++ b/packages/sol-compiler/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/sol-cov/tslint.json b/packages/sol-cov/tslint.json index 015dce851..631f46bca 100644 --- a/packages/sol-cov/tslint.json +++ b/packages/sol-cov/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "completed-docs": false } diff --git a/packages/sol-doc/tslint.json b/packages/sol-doc/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/sol-doc/tslint.json +++ b/packages/sol-doc/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/sol-resolver/tslint.json b/packages/sol-resolver/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/sol-resolver/tslint.json +++ b/packages/sol-resolver/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/sra-spec/tslint.json b/packages/sra-spec/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/sra-spec/tslint.json +++ b/packages/sra-spec/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/subproviders/tslint.json b/packages/subproviders/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/subproviders/tslint.json +++ b/packages/subproviders/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/testnet-faucets/tslint.json b/packages/testnet-faucets/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/testnet-faucets/tslint.json +++ b/packages/testnet-faucets/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/types/tslint.json b/packages/types/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/types/tslint.json +++ b/packages/types/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/utils/tslint.json b/packages/utils/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/utils/tslint.json +++ b/packages/utils/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/web3-wrapper/tslint.json b/packages/web3-wrapper/tslint.json index ffaefe83a..dd9053357 100644 --- a/packages/web3-wrapper/tslint.json +++ b/packages/web3-wrapper/tslint.json @@ -1,3 +1,3 @@ { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } diff --git a/packages/website/tslint.json b/packages/website/tslint.json index b55ffe90f..50f5be4f6 100644 --- a/packages/website/tslint.json +++ b/packages/website/tslint.json @@ -1,5 +1,5 @@ { - "extends": ["@0xproject/tslint-config"], + "extends": ["@0x/tslint-config"], "rules": { "no-implicit-dependencies": false, "no-object-literal-type-assertion": false, -- cgit From 2735fb4fa6901dc528aea5f642512c161b842efd Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 22:03:47 +1100 Subject: chore: change README.md from 0xproject to 0x --- README.md | 68 +++++++++++++++++------------------ packages/0x.js/README.md | 2 +- packages/abi-gen-wrappers/README.md | 14 ++++---- packages/abi-gen/README.md | 6 ++-- packages/assert/README.md | 12 +++---- packages/asset-buyer/README.md | 14 ++++---- packages/base-contract/README.md | 12 +++---- packages/connect/README.md | 10 +++--- packages/contract-addresses/README.md | 10 +++--- packages/contract-artifacts/README.md | 10 +++--- packages/contract-wrappers/README.md | 12 +++---- packages/contract_templates/README.md | 4 +-- packages/contracts/README.md | 2 +- packages/dev-tools-pages/README.md | 2 +- packages/dev-utils/README.md | 8 ++--- packages/fill-scenarios/README.md | 10 +++--- packages/instant/README.md | 14 ++++---- packages/json-schemas/README.md | 14 ++++---- packages/metacoin/README.md | 6 ++-- packages/migrations/README.md | 4 +-- packages/monorepo-scripts/README.md | 4 +-- packages/order-utils/README.md | 10 +++--- packages/order-watcher/README.md | 10 +++--- packages/react-docs/README.md | 10 +++--- packages/react-shared/README.md | 10 +++--- packages/sol-compiler/README.md | 16 ++++----- packages/sol-cov/README.md | 12 +++---- packages/sol-resolver/README.md | 12 +++---- packages/sra-spec/README.md | 8 ++--- packages/subproviders/README.md | 10 +++--- packages/testnet-faucets/README.md | 6 ++-- packages/tslint-config/README.md | 10 +++--- packages/types/README.md | 12 +++---- packages/typescript-typings/README.md | 10 +++--- packages/utils/README.md | 12 +++---- packages/web3-wrapper/README.md | 10 +++--- packages/website/README.md | 4 +-- 37 files changed, 200 insertions(+), 200 deletions(-) diff --git a/README.md b/README.md index 52e14de98..0be459d81 100644 --- a/README.md +++ b/README.md @@ -20,38 +20,38 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t ### Published 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) | A Javascript library for interacting with the 0x protocol | -| [`@0xproject/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0xproject/abi-gen.svg)](https://www.npmjs.com/package/@0xproject/abi-gen) | Tool to generate TS wrappers from smart contract ABIs | -| [`@0xproject/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0xproject/assert.svg)](https://www.npmjs.com/package/@0xproject/assert) | Type and schema assertions used by our packages | -| [`@0xproject/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0xproject/asset-buyer.svg)](https://www.npmjs.com/package/@0xproject/asset-buyer) | Convenience package for discovering and buying assets with Ether. | -| [`@0xproject/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0xproject/base-contract.svg)](https://www.npmjs.com/package/@0xproject/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts | -| [`@0xproject/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0xproject/connect.svg)](https://www.npmjs.com/package/@0xproject/connect) | A Javascript library for interacting with the Standard Relayer API | -| [`@0xproject/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/dev-utils.svg)](https://www.npmjs.com/package/@0xproject/dev-utils) | Dev utils to be shared across 0x projects and packages | -| [`@0xproject/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0xproject/json-schemas.svg)](https://www.npmjs.com/package/@0xproject/json-schemas) | 0x-related json schemas | -| [`@0xproject/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0xproject/monorepo-scripts.svg)](https://www.npmjs.com/package/@0xproject/monorepo-scripts) | Monorepo scripts | -| [`@0xproject/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0xproject/order-utils.svg)](https://www.npmjs.com/package/@0xproject/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders. | -| [`@0xproject/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0xproject/react-docs.svg)](https://www.npmjs.com/package/@0xproject/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON | -| [`@0xproject/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0xproject/react-shared.svg)](https://www.npmjs.com/package/@0xproject/react-shared) | 0x shared react components | -| [`@0xproject/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-compiler.svg)](https://www.npmjs.com/package/@0xproject/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties. | -| [`@0xproject/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0xproject/sol-cov.svg)](https://www.npmjs.com/package/@0xproject/sol-cov) | Solidity test coverage tool | -| [`@0xproject/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0xproject/sra-spec.svg)](https://www.npmjs.com/package/@0xproject/sra-spec) | OpenAPI specification for the standard relayer API | | -| [`@0xproject/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0xproject/subproviders.svg)](https://www.npmjs.com/package/@0xproject/subproviders) | Useful web3 subproviders (e.g LedgerSubprovider) | -| [`@0xproject/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0xproject/tslint-config.svg)](https://www.npmjs.com/package/@0xproject/tslint-config) | Custom 0x development TSLint rules | -| [`@0xproject/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0xproject/types.svg)](https://www.npmjs.com/package/@0xproject/types) | Shared type declarations | -| [`@0xproject/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0xproject/typescript-typings.svg)](https://www.npmjs.com/package/@0xproject/typescript-typings) | Repository of types for external packages | -| [`@0xproject/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0xproject/utils.svg)](https://www.npmjs.com/package/@0xproject/utils) | Shared utilities | -| [`@0xproject/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0xproject/web3-wrapper.svg)](https://www.npmjs.com/package/@0xproject/web3-wrapper) | Web3 wrapper | +| 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/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/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/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/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0x/monorepo-scripts.svg)](https://www.npmjs.com/package/@0x/monorepo-scripts) | Monorepo scripts | +| [`@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/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/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 | ### Private Packages -| Package | Description | -| --------------------------------------------------------------- | ---------------------------------------------------------------- | -| [`@0xproject/contracts`](/packages/contracts) | 0x solidity smart contracts & tests | -| [`@0xproject/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0xproject/react-docs` | -| [`@0xproject/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | -| [`@0xproject/website`](/packages/website) | 0x website & Portal DApp | +| 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 | ## Usage @@ -70,10 +70,10 @@ Dedicated documentation pages: Node version >= 6.12 is required. Most of the packages require additional typings for external dependencies. -You can include those by prepending the `@0xproject/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config. +You can include those by prepending the `@0x/typescript-typings` package to your [`typeRoots`](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) config. ```json -"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], +"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], ``` ## Contributing @@ -103,7 +103,7 @@ yarn build To build a specific package: ```bash -PKG=@0xproject/web3-wrapper yarn build +PKG=@0x/web3-wrapper yarn build ``` ### Watch @@ -120,7 +120,7 @@ To watch a specific package and all it's dependent packages: PKG=[NPM_PACKAGE_NAME] yarn watch e.g -PKG=@0xproject/web3-wrapper yarn watch +PKG=@0x/web3-wrapper yarn watch ``` ### Clean @@ -176,5 +176,5 @@ yarn test Run a specific package's test: ```bash -PKG=@0xproject/web3-wrapper yarn test +PKG=@0x/web3-wrapper yarn test ``` diff --git a/packages/0x.js/README.md b/packages/0x.js/README.md index 329037324..5b7a2308c 100644 --- a/packages/0x.js/README.md +++ b/packages/0x.js/README.md @@ -33,7 +33,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` diff --git a/packages/abi-gen-wrappers/README.md b/packages/abi-gen-wrappers/README.md index f904f9af8..bcf58ae06 100644 --- a/packages/abi-gen-wrappers/README.md +++ b/packages/abi-gen-wrappers/README.md @@ -1,29 +1,29 @@ -## @0xproject/abi-gen-wrappers +## @0x/abi-gen-wrappers -Low-level 0x smart contract wrappers generated using @0xproject/abi-gen. These +Low-level 0x smart contract wrappers generated using @0x/abi-gen. These low-level wrappers are imported by other packages in the 0x monorepo and application developers are not expected to import this package directly. You may also be interested in the -[@0xproject/contract-wrappers](../contract-wrappers/README.md) package which +[@0x/contract-wrappers](../contract-wrappers/README.md) package which includes some higher-level features. ## Installation ```bash -yarn add @0xproject/abi-gen-wrappers +yarn add @0x/abi-gen-wrappers ``` **Import** ```typescript -import * as wrappers from '@0xproject/abi-gen-wrappers'; +import * as wrappers from '@0x/abi-gen-wrappers'; ``` or ```javascript -var wrappers = require('@0xproject/abi-gen-wrappers'); +var wrappers = require('@0x/abi-gen-wrappers'); ``` ## Contributing @@ -51,7 +51,7 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/abi-gen-wrappers yarn build +PKG=@0x/abi-gen-wrappers yarn build ``` ### Clean diff --git a/packages/abi-gen/README.md b/packages/abi-gen/README.md index b6dd37cd1..20b9d4f30 100644 --- a/packages/abi-gen/README.md +++ b/packages/abi-gen/README.md @@ -8,7 +8,7 @@ You can write your custom handlebars templates which will allow you to seamlessl ## Installation -`yarn add -g @0xproject/abi-gen` +`yarn add -g @0x/abi-gen` ## Usage @@ -82,13 +82,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/abi-gen yarn build +PKG=@0x/abi-gen yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/abi-gen yarn watch +PKG=@0x/abi-gen yarn watch ``` ### Clean diff --git a/packages/assert/README.md b/packages/assert/README.md index 1f2139d47..647586f15 100644 --- a/packages/assert/README.md +++ b/packages/assert/README.md @@ -1,17 +1,17 @@ -## @0xproject/assert +## @0x/assert Standard type and schema assertions to be used across all 0x projects and packages ## Installation ```bash -yarn add @0xproject/assert +yarn add @0x/assert ``` ## Usage ```typescript -import { assert } from '@0xproject/assert'; +import { assert } from '@0x/assert'; assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount); ``` @@ -20,7 +20,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -49,13 +49,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/assert yarn build +PKG=@0x/assert yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/assert yarn watch +PKG=@0x/assert yarn watch ``` ### Clean diff --git a/packages/asset-buyer/README.md b/packages/asset-buyer/README.md index 81c7e1e85..383a3836a 100644 --- a/packages/asset-buyer/README.md +++ b/packages/asset-buyer/README.md @@ -1,4 +1,4 @@ -## @0xproject/asset-buyer +## @0x/asset-buyer **Warning: In Beta, has not been extensively tested.** @@ -9,26 +9,26 @@ In its more advanced and useful form, it integrates with the [Standard Relayer A ## Installation ```bash -yarn add @0xproject/asset-buyer +yarn add @0x/asset-buyer ``` **Import** ```typescript -import { AssetBuyer } from '@0xproject/asset-buyer'; +import { AssetBuyer } from '@0x/asset-buyer'; ``` or ```javascript -var AssetBuyer = require('@0xproject/asset-buyer').AssetBuyer; +var AssetBuyer = require('@0x/asset-buyer').AssetBuyer; ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -57,13 +57,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/asset-buyer yarn build +PKG=@0x/asset-buyer yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/asset-buyer yarn watch +PKG=@0x/asset-buyer yarn watch ``` ### Clean diff --git a/packages/base-contract/README.md b/packages/base-contract/README.md index 4f2426c2e..b6ea05b74 100644 --- a/packages/base-contract/README.md +++ b/packages/base-contract/README.md @@ -1,25 +1,25 @@ -## @0xproject/base-contract +## @0x/base-contract BaseContract to derive all auto-generated wrappers from ## Installation ```bash -yarn add @0xproject/base-contract +yarn add @0x/base-contract ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` ## Usage ```javascript -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; ``` ## Contributing @@ -47,13 +47,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/base-contract yarn build +PKG=@0x/base-contract yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/base-contract yarn watch +PKG=@0x/base-contract yarn watch ``` ### Lint diff --git a/packages/connect/README.md b/packages/connect/README.md index 9d8cb9215..6d3ee66a0 100644 --- a/packages/connect/README.md +++ b/packages/connect/README.md @@ -1,18 +1,18 @@ -## @0xproject/connect +## @0x/connect This repository contains a Javascript library that makes it easy to interact with Relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api) ## Installation ```bash -yarn add @0xproject/connect +yarn add @0x/connect ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -46,13 +46,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/connect yarn build +PKG=@0x/connect yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/connect yarn watch +PKG=@0x/connect yarn watch ``` ### Clean diff --git a/packages/contract-addresses/README.md b/packages/contract-addresses/README.md index 6c615c422..3631bb968 100644 --- a/packages/contract-addresses/README.md +++ b/packages/contract-addresses/README.md @@ -1,4 +1,4 @@ -## @0xproject/contract-addresses +## @0x/contract-addresses A tiny utility library for getting known deployed contract addresses for a particular network. @@ -6,19 +6,19 @@ particular network. ## Installation ```bash -yarn add @0xproject/contract-addresses +yarn add @0x/contract-addresses ``` **Import** ```typescript -import { getContractAddressesForNetworkOrThrow } from '@0xproject/contract-addresses'; +import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; ``` or ```javascript -var getContractAddressesForNetworkOrThrow = require('@0xproject/contract-addresses') +var getContractAddressesForNetworkOrThrow = require('@0x/contract-addresses') .getContractAddressesForNetworkOrThrow; ``` @@ -47,7 +47,7 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/contract-addresses yarn build +PKG=@0x/contract-addresses yarn build ``` ### Clean diff --git a/packages/contract-artifacts/README.md b/packages/contract-artifacts/README.md index f8901266d..5a382c308 100644 --- a/packages/contract-artifacts/README.md +++ b/packages/contract-artifacts/README.md @@ -1,23 +1,23 @@ -## @0xproject/contract-artifacts +## @0x/contract-artifacts Smart contract compilation artifacts for the latest version of the 0x Protocol. ## Installation ```bash -yarn add @0xproject/contract-artifacts +yarn add @0x/contract-artifacts ``` **Import** ```typescript -import * as artifacts from '@0xproject/contract-artifacts'; +import * as artifacts from '@0x/contract-artifacts'; ``` or ```javascript -var artifacts = require('@0xproject/contract-artifacts'); +var artifacts = require('@0x/contract-artifacts'); ``` ## Contributing @@ -45,7 +45,7 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/contract-artifacts yarn build +PKG=@0x/contract-artifacts yarn build ``` ### Clean diff --git a/packages/contract-wrappers/README.md b/packages/contract-wrappers/README.md index 6153f798e..36f2f48fb 100644 --- a/packages/contract-wrappers/README.md +++ b/packages/contract-wrappers/README.md @@ -1,4 +1,4 @@ -## @0xproject/contract-wrappers +## @0x/contract-wrappers Smart TS wrappers for 0x smart contracts. The wrappers have simplified interfaces, perform client-side validation on transactions and throw helpful error messages. @@ -9,20 +9,20 @@ Smart TS wrappers for 0x smart contracts. The wrappers have simplified interface **Install** ```bash -npm install @0xproject/contract-wrappers --save +npm install @0x/contract-wrappers --save ``` **Import** ```javascript -import { ContractWrappers } from '@0xproject/contract-wrappers'; +import { ContractWrappers } from '@0x/contract-wrappers'; ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -51,13 +51,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/contract-wrappers yarn build +PKG=@0x/contract-wrappers yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/contract-wrappers yarn watch +PKG=@0x/contract-wrappers yarn watch ``` ```bash diff --git a/packages/contract_templates/README.md b/packages/contract_templates/README.md index e5f4b09d1..c6cc3b1b3 100644 --- a/packages/contract_templates/README.md +++ b/packages/contract_templates/README.md @@ -2,7 +2,7 @@ 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 @0xproject/base-contract @0xproject/sol-compiler @0xproject/utils @0xproject/web3-wrapper ethereum-types ethers lodash` +* 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: @@ -10,7 +10,7 @@ To successfully compile the generated TypeScript contract wrappers, you must: "compilerOptions": { "lib": ["ES2015"], "typeRoots": [ - "node_modules/@0xproject/typescript-typings/types", + "node_modules/@0x/typescript-typings/types", "node_modules/@types" ] } diff --git a/packages/contracts/README.md b/packages/contracts/README.md index 33cbdae26..11579cf47 100644 --- a/packages/contracts/README.md +++ b/packages/contracts/README.md @@ -107,7 +107,7 @@ TEST_PROVIDER=geth yarn test ###### Code coverage -In order to see the Solidity code coverage output generated by `@0xproject/sol-cov`, run: +In order to see the Solidity code coverage output generated by `@0x/sol-cov`, run: ``` yarn test:coverage diff --git a/packages/dev-tools-pages/README.md b/packages/dev-tools-pages/README.md index 39fe70a25..cbc459be7 100644 --- a/packages/dev-tools-pages/README.md +++ b/packages/dev-tools-pages/README.md @@ -19,7 +19,7 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/dev-tools-pages yarn build +PKG=@0x/dev-tools-pages yarn build ``` Note: Ignore the `WARNING in asset size limit` and `WARNING in entrypoint size limit` warnings. diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md index 1c3bd3a3f..73b0b8816 100644 --- a/packages/dev-utils/README.md +++ b/packages/dev-utils/README.md @@ -16,14 +16,14 @@ Boolean env variables should be either `true` or `false`. Defaults to `false` if ## Install ```bash -yarn add @0xproject/dev-utils +yarn add @0x/dev-utils ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -52,13 +52,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/dev-utils yarn build +PKG=@0x/dev-utils yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/dev-utils yarn watch +PKG=@0x/dev-utils yarn watch ``` ### Clean diff --git a/packages/fill-scenarios/README.md b/packages/fill-scenarios/README.md index 67df0941f..794b70e56 100644 --- a/packages/fill-scenarios/README.md +++ b/packages/fill-scenarios/README.md @@ -1,18 +1,18 @@ -## @0xproject/fill-scenarios +## @0x/fill-scenarios 0x order fill scenario generator ## Installation ```bash -yarn add @0xproject/fill-scenarios +yarn add @0x/fill-scenarios ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -41,13 +41,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/fill-scenarios yarn build +PKG=@0x/fill-scenarios yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/fill-scenarios yarn watch +PKG=@0x/fill-scenarios yarn watch ``` ### Clean diff --git a/packages/instant/README.md b/packages/instant/README.md index 25aca9d3b..55b4404e7 100644 --- a/packages/instant/README.md +++ b/packages/instant/README.md @@ -1,9 +1,9 @@ -## @0xproject/instant +## @0x/instant ## Installation ```bash -yarn add @0xproject/instant +yarn add @0x/instant ``` **Import** @@ -11,20 +11,20 @@ yarn add @0xproject/instant **CommonJS module** ```typescript -import { ZeroExInstant } from '@0xproject/instant'; +import { ZeroExInstant } from '@0x/instant'; ``` or ```javascript -var ZeroExInstant = require('@0xproject/instant').ZeroExInstant; +var ZeroExInstant = require('@0x/instant').ZeroExInstant; ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -71,13 +71,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/instant yarn build +PKG=@0x/instant yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/instant yarn watch +PKG=@0x/instant yarn watch ``` ### Clean diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md index ab57833be..f50382f4b 100644 --- a/packages/json-schemas/README.md +++ b/packages/json-schemas/README.md @@ -1,4 +1,4 @@ -## @0xproject/json-schemas +## @0x/json-schemas Contains 0x-related json schemas @@ -7,26 +7,26 @@ Contains 0x-related json schemas ## Installation ```bash -yarn add @0xproject/json-schemas +yarn add @0x/json-schemas ``` **Import** ```typescript -import { SchemaValidator, ValidatorResult, schemas } from '@0xproject/json-schemas'; +import { SchemaValidator, ValidatorResult, schemas } from '@0x/json-schemas'; ``` or ```javascript -var schemas = require('@0xproject/json-schemas').schemas; +var schemas = require('@0x/json-schemas').schemas; ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -55,13 +55,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/json-schemas yarn build +PKG=@0x/json-schemas yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/json-schemas yarn watch +PKG=@0x/json-schemas yarn watch ``` ### Clean diff --git a/packages/metacoin/README.md b/packages/metacoin/README.md index 15816cc67..4f9609dde 100644 --- a/packages/metacoin/README.md +++ b/packages/metacoin/README.md @@ -1,4 +1,4 @@ -## @0xproject/metacoin +## @0x/metacoin 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: @@ -35,13 +35,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/metacoin yarn build +PKG=@0x/metacoin yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/metacoin yarn watch +PKG=@0x/metacoin yarn watch ``` ### Clean diff --git a/packages/migrations/README.md b/packages/migrations/README.md index f4715cfa1..926654cd8 100644 --- a/packages/migrations/README.md +++ b/packages/migrations/README.md @@ -27,13 +27,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/migrations yarn build +PKG=@0x/migrations yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/migrations yarn watch +PKG=@0x/migrations yarn watch ``` ### Clean diff --git a/packages/monorepo-scripts/README.md b/packages/monorepo-scripts/README.md index d979e27dc..0673098b5 100644 --- a/packages/monorepo-scripts/README.md +++ b/packages/monorepo-scripts/README.md @@ -47,13 +47,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/monorepo-scripts yarn build +PKG=@0x/monorepo-scripts yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/monorepo-scripts yarn watch +PKG=@0x/monorepo-scripts yarn watch ``` ### Clean diff --git a/packages/order-utils/README.md b/packages/order-utils/README.md index 33df1d4b0..4a8287098 100644 --- a/packages/order-utils/README.md +++ b/packages/order-utils/README.md @@ -1,4 +1,4 @@ -## @0xproject/order-utils +## @0x/order-utils 0x order-related utilities for those developing on top of 0x protocol. @@ -7,14 +7,14 @@ ## Installation ```bash -yarn add @0xproject/order-utils +yarn add @0x/order-utils ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -43,13 +43,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/order-utils yarn build +PKG=@0x/order-utils yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/order-utils yarn watch +PKG=@0x/order-utils yarn watch ``` ### Clean diff --git a/packages/order-watcher/README.md b/packages/order-watcher/README.md index de64a70e7..c0b99b272 100644 --- a/packages/order-watcher/README.md +++ b/packages/order-watcher/README.md @@ -9,20 +9,20 @@ An order watcher daemon that watches for order validity. **Install** ```bash -npm install @0xproject/order-watcher --save +npm install @0x/order-watcher --save ``` **Import** ```javascript -import { OrderWatcher } from '@0xproject/order-watcher'; +import { OrderWatcher } from '@0x/order-watcher'; ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -51,13 +51,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/order-watcher yarn build +PKG=@0x/order-watcher yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/order-watcher yarn watch +PKG=@0x/order-watcher yarn watch ``` ### Clean diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md index 51e949967..19c092e4d 100644 --- a/packages/react-docs/README.md +++ b/packages/react-docs/README.md @@ -1,4 +1,4 @@ -## @0xproject/react-docs +## @0x/react-docs #### WARNING: Alpha software. Expect things to break when trying to use. @@ -24,7 +24,7 @@ A full-page React component for rendering beautiful documentation for Solidity a ## Installation ```bash -yarn add @0xproject/react-docs +yarn add @0x/react-docs ``` ## Usage @@ -37,7 +37,7 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -74,13 +74,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/react-docs yarn build +PKG=@0x/react-docs yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/react-docs yarn watch +PKG=@0x/react-docs yarn watch ``` ### Clean diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md index 88e6f18ae..7ff9a94d9 100644 --- a/packages/react-shared/README.md +++ b/packages/react-shared/README.md @@ -1,18 +1,18 @@ -## @0xproject/react-shared +## @0x/react-shared Contains React components & frontend types/utils shared between 0x projects. ## Installation ```bash -yarn add @0xproject/react-shared +yarn add @0x/react-shared ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -41,13 +41,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/react-shared yarn build +PKG=@0x/react-shared yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/react-shared yarn watch +PKG=@0x/react-shared yarn watch ``` ### Clean diff --git a/packages/sol-compiler/README.md b/packages/sol-compiler/README.md index 3a6ca130b..445aea315 100644 --- a/packages/sol-compiler/README.md +++ b/packages/sol-compiler/README.md @@ -1,4 +1,4 @@ -## @0xproject/sol-compiler +## @0x/sol-compiler Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: @@ -15,33 +15,33 @@ Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) t #### CLI Installation ```bash -yarn global add @0xproject/sol-compiler +yarn global add @0x/sol-compiler ``` #### API Installation ```bash -yarn add @0xproject/sol-compiler +yarn add @0x/sol-compiler ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` **Import** ```typescript -import { Compiler } from '@0xproject/sol-compiler'; +import { Compiler } from '@0x/sol-compiler'; ``` or ```javascript -var Compiler = require('@0xproject/sol-compiler').Compiler; +var Compiler = require('@0x/sol-compiler').Compiler; ``` ## Contributing @@ -69,13 +69,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/sol-compiler yarn build +PKG=@0x/sol-compiler yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/sol-compiler yarn watch +PKG=@0x/sol-compiler yarn watch ``` ### Clean diff --git a/packages/sol-cov/README.md b/packages/sol-cov/README.md index 0a63ac06e..31d73dc63 100644 --- a/packages/sol-cov/README.md +++ b/packages/sol-cov/README.md @@ -1,4 +1,4 @@ -## @0xproject/sol-cov +## @0x/sol-cov A Solidity code coverage tool. @@ -7,19 +7,19 @@ A Solidity code coverage tool. ## Installation ```bash -yarn add @0xproject/sol-cov +yarn add @0x/sol-cov ``` **Import** ```javascript -import { CoverageSubprovider } from '@0xproject/sol-cov'; +import { CoverageSubprovider } from '@0x/sol-cov'; ``` or ```javascript -var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; +var CoverageSubprovider = require('@0x/sol-cov').CoverageSubprovider; ``` ## Contributing @@ -47,13 +47,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/sol-cov yarn build +PKG=@0x/sol-cov yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/sol-cov yarn watch +PKG=@0x/sol-cov yarn watch ``` ### Clean diff --git a/packages/sol-resolver/README.md b/packages/sol-resolver/README.md index 8487947f0..2ab336bc9 100644 --- a/packages/sol-resolver/README.md +++ b/packages/sol-resolver/README.md @@ -1,23 +1,23 @@ -## @0xproject/sol-resolver +## @0x/sol-resolver A Solidity import resolver used by [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler). ## Installation ```bash -yarn add @0xproject/sol-resolver +yarn add @0x/sol-resolver ``` **Import** ```javascript -import { Resolver } from '@0xproject/sol-resolver'; +import { Resolver } from '@0x/sol-resolver'; ``` or ```javascript -var Resolver = require('@0xproject/sol-resolver').Resolver; +var Resolver = require('@0x/sol-resolver').Resolver; ``` ## Contributing @@ -45,13 +45,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/sol-resolver yarn build +PKG=@0x/sol-resolver yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/sol-resolver yarn watch +PKG=@0x/sol-resolver yarn watch ``` ### Clean diff --git a/packages/sra-spec/README.md b/packages/sra-spec/README.md index 7eee6396b..4575aaf66 100644 --- a/packages/sra-spec/README.md +++ b/packages/sra-spec/README.md @@ -1,4 +1,4 @@ -## @0xproject/sra-spec +## @0x/sra-spec Contains the Standard Relayer API [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification). @@ -9,7 +9,7 @@ A deployed [ReDoc](https://github.com/Rebilly/ReDoc) static site with the API ca ## Usage ``` -import { api } from '@0xproject/sra-spec'; +import { api } from '@0x/sra-spec'; ``` ## Installation @@ -53,13 +53,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/sra-spec yarn build +PKG=@0x/sra-spec yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/sra-spec yarn watch +PKG=@0x/sra-spec yarn watch ``` ### Static Site diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md index 90c9b7bbe..6f97d760e 100644 --- a/packages/subproviders/README.md +++ b/packages/subproviders/README.md @@ -1,4 +1,4 @@ -## @0xproject/subproviders +## @0x/subproviders A few useful web3 subproviders including a LedgerSubprovider useful for adding Ledger Nano S support. @@ -9,14 +9,14 @@ We have written up a [Wiki](https://0xproject.com/wiki#Web3-Provider-Examples) a ## Installation ``` -yarn add @0xproject/subproviders +yarn add @0x/subproviders ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -45,13 +45,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/subproviders yarn build +PKG=@0x/subproviders yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/subproviders yarn watch +PKG=@0x/subproviders yarn watch ``` ### Clean diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md index a92b93fc0..8b85e3517 100644 --- a/packages/testnet-faucets/README.md +++ b/packages/testnet-faucets/README.md @@ -1,4 +1,4 @@ -## @0xproject/testnet-faucets +## @0x/testnet-faucets This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZRX every 5 seconds. It has a max queue size of 1000. @@ -31,13 +31,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/testnet-faucets yarn build +PKG=@0x/testnet-faucets yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/testnet-faucets yarn watch +PKG=@0x/testnet-faucets yarn watch ``` ### Clean diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index d630ec84d..5614e5e54 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -1,11 +1,11 @@ -## @0xproject/tslint-config +## @0x/tslint-config TSLint configuration and custom linter rules used by 0xProject. ## Installation ```bash -yarn add --dev @0xproject/tslint-config +yarn add --dev @0x/tslint-config ``` ## Usage @@ -14,7 +14,7 @@ Add the following to your `tslint.json` file ```json { - "extends": ["@0xproject/tslint-config"] + "extends": ["@0x/tslint-config"] } ``` @@ -43,13 +43,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/tslint-config yarn build +PKG=@0x/tslint-config yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/tslint-config yarn watch +PKG=@0x/tslint-config yarn watch ``` ### Clean diff --git a/packages/types/README.md b/packages/types/README.md index c091b8302..136eb1940 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,25 +1,25 @@ -## @0xproject/types +## @0x/types Typescript types shared across 0x projects and packages ## Installation ```bash -yarn add -D @0xproject/types +yarn add -D @0x/types ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` ## Usage ```javascript -import { TransactionReceipt, TxData, TxDataPayable } from '@0xproject/types'; +import { TransactionReceipt, TxData, TxDataPayable } from '@0x/types'; ``` ## Contributing @@ -47,13 +47,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/types yarn build +PKG=@0x/types yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/types yarn watch +PKG=@0x/types yarn watch ``` ### Clean diff --git a/packages/typescript-typings/README.md b/packages/typescript-typings/README.md index 439cb6484..e3b4c044f 100644 --- a/packages/typescript-typings/README.md +++ b/packages/typescript-typings/README.md @@ -1,11 +1,11 @@ -## @0xproject/typescript-typings +## @0x/typescript-typings Type repository for external packages used by 0x. This is like our small version of [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) ## Installation ```bash -yarn add -D @0xproject/typescript-typings +yarn add -D @0x/typescript-typings ``` ## Usage @@ -13,7 +13,7 @@ yarn add -D @0xproject/typescript-typings Add the following line within an `compilerOptions` section of your `tsconfig.json` ```json -"typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"] +"typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"] ``` This will allow the TS compiler to first look into that repo and then fallback to DT types. @@ -43,13 +43,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/typescript-typings yarn build +PKG=@0x/typescript-typings yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/typescript-typings yarn watch +PKG=@0x/typescript-typings yarn watch ``` ### Clean diff --git a/packages/utils/README.md b/packages/utils/README.md index c9a2f5846..0b15f00c5 100644 --- a/packages/utils/README.md +++ b/packages/utils/README.md @@ -1,25 +1,25 @@ -## @0xproject/utils +## @0x/utils Utils to be shared across 0x projects and packages ## Installation ```bash -yarn add @0xproject/utils +yarn add @0x/utils ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` ## Usage ```javascript -import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0xproject/utils'; +import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0x/utils'; ``` ## Troubleshooting @@ -62,13 +62,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/utils yarn build +PKG=@0x/utils yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/utils yarn watch +PKG=@0x/utils yarn watch ``` ### Clean diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md index 06c788101..4402de19c 100644 --- a/packages/web3-wrapper/README.md +++ b/packages/web3-wrapper/README.md @@ -1,4 +1,4 @@ -## @0xproject/web3-wrapper +## @0x/web3-wrapper Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript. @@ -7,14 +7,14 @@ Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternat ## Installation ```bash -yarn add @0xproject/web3-wrapper +yarn add @0x/web3-wrapper ``` If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: ```json "compilerOptions": { - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], } ``` @@ -43,13 +43,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/web3-wrapper yarn build +PKG=@0x/web3-wrapper yarn build ``` Or continuously rebuild on change: ```bash -PKG=@0xproject/web3-wrapper yarn watch +PKG=@0x/web3-wrapper yarn watch ``` ### Clean diff --git a/packages/website/README.md b/packages/website/README.md index 2edc17cd9..d82d045a6 100644 --- a/packages/website/README.md +++ b/packages/website/README.md @@ -33,13 +33,13 @@ yarn install To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory: ```bash -PKG=@0xproject/website yarn build +PKG=@0x/website yarn build ``` ### Run dev server ```bash -PKG=@0xproject/website yarn watch +PKG=@0x/website yarn watch ``` Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser. -- cgit From 56ef712d264042f325a1591e0c7df4befe82acb2 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 22:05:54 +1100 Subject: chore: change circleci config from 0xproject to 0x --- .circleci/config.yml | 688 +++++++++++++++++++++++++-------------------------- 1 file changed, 344 insertions(+), 344 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bb1ad393c..897fca3c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,350 +1,350 @@ version: 2 jobs: - build: - resource_class: medium+ - docker: - - image: circleci/node:9 - environment: - CONTRACTS_COMMIT_HASH: '9ed05f5' - working_directory: ~/repo - steps: - - checkout - - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV - - run: - name: install-yarn - command: sudo npm install --global yarn@1.9.4 - - run: - name: yarn - command: yarn --frozen-lockfile install || yarn --frozen-lockfile install - - run: yarn build:ci:no_website - - save_cache: - key: repo-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo - build-website: - resource_class: medium+ - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: cd packages/website && yarn build - test-contracts-ganache: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci contracts - test-contracts-geth: - docker: - - image: circleci/node:9 - - image: 0xorg/devnet - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is - # initialized - - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts - test-publish: - resource_class: medium+ - docker: - - image: circleci/node:9 - - image: 0xorg/verdaccio - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:publish:circleci - test-doc-generation: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn test:generate_docs:circleci - test-rest: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn wsrun test:circleci @0xproject/abi-gen - - run: yarn wsrun test:circleci @0xproject/assert - - run: yarn wsrun test:circleci @0xproject/base-contract - - run: yarn wsrun test:circleci @0xproject/connect - - run: yarn wsrun test:circleci @0xproject/contract-wrappers - - run: yarn wsrun test:circleci @0xproject/dev-utils - - run: yarn wsrun test:circleci @0xproject/json-schemas - - run: yarn wsrun test:circleci @0xproject/metacoin - - run: yarn wsrun test:circleci @0xproject/order-utils - - run: yarn wsrun test:circleci @0xproject/order-watcher - - run: yarn wsrun test:circleci @0xproject/sol-compiler - - run: yarn wsrun test:circleci @0xproject/sol-cov - - run: yarn wsrun test:circleci @0xproject/sol-doc - - run: yarn wsrun test:circleci @0xproject/subproviders - - run: yarn wsrun test:circleci @0xproject/web3-wrapper - - run: yarn wsrun test:circleci @0xproject/utils - - run: yarn wsrun test:circleci @0xproject/instant - - save_cache: - key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/abi-gen/coverage/lcov.info - - save_cache: - key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/assert/coverage/lcov.info - - save_cache: - key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/base-contract/coverage/lcov.info - - save_cache: - key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/connect/coverage/lcov.info - - save_cache: - key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/contract-wrappers/coverage/lcov.info - - save_cache: - key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/dev-utils/coverage/lcov.info - - save_cache: - key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/json-schemas/coverage/lcov.info - - save_cache: - key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/metacoin/coverage/lcov.info - - save_cache: - key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-utils/coverage/lcov.info - - save_cache: - key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/order-watcher/coverage/lcov.info - - save_cache: - key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-compiler/coverage/lcov.info - - save_cache: - key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-cov/coverage/lcov.info - - save_cache: - key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/sol-doc/coverage/lcov.info - - save_cache: - key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/subproviders/coverage/lcov.info - - save_cache: - key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/packages/web3-wrapper/coverage/lcov.info - test-python: - working_directory: ~/repo - docker: - - image: circleci/python - steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages - - restore_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - - run: - command: | - cd python-packages/order_utils - python -m ensurepip - python -m pip install -e .[dev] - - save_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - paths: - - "/usr/local/bin" - - "/usr/local/lib/python3.7/site-packages" - - ".eggs" - - ".mypy_cache" - - ".pytest_cache" - - ".tox" - - run: - command: | - cd python-packages/order_utils - coverage run setup.py test - - save_cache: - key: coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }} - paths: - - ~/repo/python-packages/order_utils/.coverage - test-rest-python: - working_directory: ~/repo - docker: - - image: circleci/python - steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages - - restore_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - - run: - command: | - cd python-packages/order_utils - python -m ensurepip - python -m pip install -e .[dev] - - save_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - paths: - - "/usr/local/bin" - - "/usr/local/lib/python3.7/site-packages" - - ".eggs" - - ".mypy_cache" - - ".pytest_cache" - - ".tox" - - run: - command: | - cd python-packages/order_utils - tox - static-tests-python: - working_directory: ~/repo - docker: - - image: circleci/python - steps: - - checkout - - run: sudo chown -R circleci:circleci /usr/local/bin - - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages - - restore_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - - run: - command: | - cd python-packages/order_utils - python -m ensurepip - python -m pip install -e .[dev] - - save_cache: - key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} - paths: - - "/usr/local/bin" - - "/usr/local/lib/python3.7/site-packages" - - run: - command: | - cd python-packages/order_utils - python setup.py lint - static-tests: - working_directory: ~/repo - docker: - - image: circleci/node:9 - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn lerna run lint - - run: yarn prettier:ci - - run: cd packages/0x.js && yarn build:umd:prod - - run: yarn bundlewatch - submit-coverage: - docker: - - image: circleci/node:9 - working_directory: ~/repo - steps: - - restore_cache: - keys: - - repo-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} - - restore_cache: - keys: - - coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }} - - run: yarn report_coverage + build: + resource_class: medium+ + docker: + - image: circleci/node:9 + environment: + CONTRACTS_COMMIT_HASH: '9ed05f5' + working_directory: ~/repo + steps: + - checkout + - run: echo 'export PATH=$HOME/CIRCLE_PROJECT_REPONAME/node_modules/.bin:$PATH' >> $BASH_ENV + - run: + name: install-yarn + command: sudo npm install --global yarn@1.9.4 + - run: + name: yarn + command: yarn --frozen-lockfile install || yarn --frozen-lockfile install + - run: yarn build:ci:no_website + - save_cache: + key: repo-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo + build-website: + resource_class: medium+ + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: cd packages/website && yarn build + test-contracts-ganache: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci contracts + test-contracts-geth: + docker: + - image: circleci/node:9 + - image: 0xorg/devnet + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + # HACK(albrow): we need to sleep 10 seconds to ensure the devnet is + # initialized + - run: sleep 10 && TEST_PROVIDER=geth yarn wsrun test contracts + test-publish: + resource_class: medium+ + docker: + - image: circleci/node:9 + - image: 0xorg/verdaccio + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:publish:circleci + test-doc-generation: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn test:generate_docs:circleci + test-rest: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn wsrun test:circleci @0x/abi-gen + - run: yarn wsrun test:circleci @0x/assert + - run: yarn wsrun test:circleci @0x/base-contract + - run: yarn wsrun test:circleci @0x/connect + - run: yarn wsrun test:circleci @0x/contract-wrappers + - run: yarn wsrun test:circleci @0x/dev-utils + - run: yarn wsrun test:circleci @0x/json-schemas + - run: yarn wsrun test:circleci @0x/metacoin + - 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-doc + - run: yarn wsrun test:circleci @0x/subproviders + - run: yarn wsrun test:circleci @0x/web3-wrapper + - run: yarn wsrun test:circleci @0x/utils + - run: yarn wsrun test:circleci @0x/instant + - save_cache: + key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/abi-gen/coverage/lcov.info + - save_cache: + key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/assert/coverage/lcov.info + - save_cache: + key: coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/base-contract/coverage/lcov.info + - save_cache: + key: coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/connect/coverage/lcov.info + - save_cache: + key: coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/contract-wrappers/coverage/lcov.info + - save_cache: + key: coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/dev-utils/coverage/lcov.info + - save_cache: + key: coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/json-schemas/coverage/lcov.info + - save_cache: + key: coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/metacoin/coverage/lcov.info + - save_cache: + key: coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-utils/coverage/lcov.info + - save_cache: + key: coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/order-watcher/coverage/lcov.info + - save_cache: + key: coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-compiler/coverage/lcov.info + - save_cache: + key: coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-cov/coverage/lcov.info + - save_cache: + key: coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/sol-doc/coverage/lcov.info + - save_cache: + key: coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/subproviders/coverage/lcov.info + - save_cache: + key: coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/packages/web3-wrapper/coverage/lcov.info + test-python: + working_directory: ~/repo + docker: + - image: circleci/python + steps: + - checkout + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages + - restore_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + - run: + command: | + cd python-packages/order_utils + python -m ensurepip + python -m pip install -e .[dev] + - save_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + paths: + - '/usr/local/bin' + - '/usr/local/lib/python3.7/site-packages' + - '.eggs' + - '.mypy_cache' + - '.pytest_cache' + - '.tox' + - run: + command: | + cd python-packages/order_utils + coverage run setup.py test + - save_cache: + key: coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }} + paths: + - ~/repo/python-packages/order_utils/.coverage + test-rest-python: + working_directory: ~/repo + docker: + - image: circleci/python + steps: + - checkout + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages + - restore_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + - run: + command: | + cd python-packages/order_utils + python -m ensurepip + python -m pip install -e .[dev] + - save_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + paths: + - '/usr/local/bin' + - '/usr/local/lib/python3.7/site-packages' + - '.eggs' + - '.mypy_cache' + - '.pytest_cache' + - '.tox' + - run: + command: | + cd python-packages/order_utils + tox + static-tests-python: + working_directory: ~/repo + docker: + - image: circleci/python + steps: + - checkout + - run: sudo chown -R circleci:circleci /usr/local/bin + - run: sudo chown -R circleci:circleci /usr/local/lib/python3.7/site-packages + - restore_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + - run: + command: | + cd python-packages/order_utils + python -m ensurepip + python -m pip install -e .[dev] + - save_cache: + key: deps9-{{ .Branch }}-{{ .Environment.CIRCLE_SHA1 }} + paths: + - '/usr/local/bin' + - '/usr/local/lib/python3.7/site-packages' + - run: + command: | + cd python-packages/order_utils + python setup.py lint + static-tests: + working_directory: ~/repo + docker: + - image: circleci/node:9 + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn lerna run lint + - run: yarn prettier:ci + - run: cd packages/0x.js && yarn build:umd:prod + - run: yarn bundlewatch + submit-coverage: + docker: + - image: circleci/node:9 + working_directory: ~/repo + steps: + - restore_cache: + keys: + - repo-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-assert-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-base-contract-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-connect-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contract-wrappers-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-dev-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-json-schemas-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-metacoin-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-order-watcher-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-compiler-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-cov-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-sol-doc-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-subproviders-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-web3-wrapper-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-contracts-{{ .Environment.CIRCLE_SHA1 }} + - restore_cache: + keys: + - coverage-python-order-utils-{{ .Environment.CIRCLE_SHA1 }} + - run: yarn report_coverage workflows: - version: 2 - main: - jobs: - - build - - build-website: - requires: + version: 2 + main: + jobs: - build - - test-contracts-ganache: - requires: - - build - - test-contracts-geth: - requires: - - build - - test-rest: - requires: - - build - - static-tests: - requires: - - build - - test-publish: - requires: - - build - - test-doc-generation: - requires: - - build - - submit-coverage: - requires: - - test-rest + - build-website: + requires: + - build + - test-contracts-ganache: + requires: + - build + - test-contracts-geth: + requires: + - build + - test-rest: + requires: + - build + - static-tests: + requires: + - build + - test-publish: + requires: + - build + - test-doc-generation: + requires: + - build + - submit-coverage: + requires: + - test-rest + - test-python - test-python - - test-python - - static-tests-python - # skip python tox run for now, as we don't yet have multiple test environments to support. - #- test-rest-python + - static-tests-python + # skip python tox run for now, as we don't yet have multiple test environments to support. + #- test-rest-python -- cgit From 10ff723287cb38fb457b13e58fe0a464aba23db9 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 22:19:22 +1100 Subject: chore: change abi-gen-wrappers ethereum-types version --- packages/abi-gen-wrappers/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 689147f71..468620eb9 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -34,7 +34,7 @@ "@0x/tslint-config": "^1.0.8", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.6.0", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" -- cgit From ff99f84f15a8292e946a2063b54aa4e667c6bc92 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 22:51:59 +1100 Subject: chore: update yarn.lock --- packages/abi-gen-wrappers/package.json | 2 +- packages/instant/package.json | 2 +- yarn.lock | 1433 +++++++++++++++++++++----------- 3 files changed, 942 insertions(+), 495 deletions(-) diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 468620eb9..89a15661b 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -34,7 +34,7 @@ "@0x/tslint-config": "^1.0.8", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.0.11", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" diff --git a/packages/instant/package.json b/packages/instant/package.json index 224683dc5..342669b57 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -45,7 +45,7 @@ "dependencies": { "@0x/asset-buyer": "^2.0.0", "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^2.0.2", + "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "ethereum-types": "^1.0.11", diff --git a/yarn.lock b/yarn.lock index dc71a98d3..8251fa262 100644 --- a/yarn.lock +++ b/yarn.lock @@ -19,10 +19,6 @@ ethers "3.0.22" lodash "4.17.10" -"8fold-marked@0.3.9": - version "0.3.9" - resolved "https://registry.yarnpkg.com/8fold-marked/-/8fold-marked-0.3.9.tgz#bb89c645612f8ccfaffac1ca6e3c11f168c9cf59" - "@0x-lerna-fork/add@^3.0.0-beta.22": version "3.0.0-beta.22" resolved "https://registry.yarnpkg.com/@0x-lerna-fork/add/-/add-3.0.0-beta.22.tgz#b69d7cbf6a28af6abb3aabb47fb617e7c6c7ac2c" @@ -514,20 +510,6 @@ ethers "3.0.22" lodash "4.17.10" -"@0xproject/connect@1.0.4": - version "1.0.4" - resolved "https://registry.npmjs.org/@0xproject/connect/-/connect-1.0.4.tgz#1d5f27f4aa69920dde50178ed7179240f81d1c54" - dependencies: - "@0xproject/assert" "^0.2.14" - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^1.0.3" - "@0xproject/utils" "^1.0.4" - lodash "^4.17.4" - query-string "^5.0.1" - sinon "^4.0.0" - websocket "^1.0.25" - "@0xproject/contract-wrappers@^0.1.1": version "0.1.1" resolved "https://registry.yarnpkg.com/@0xproject/contract-wrappers/-/contract-wrappers-0.1.1.tgz#8108d7ec051f202ef0cfa77c91c4ef994bf89881" @@ -646,7 +628,7 @@ "@0xproject/types@^0.5.0": version "0.5.0" - resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05" + resolved "http://registry.npmjs.org/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05" dependencies: bignumber.js "~4.1.0" @@ -657,9 +639,17 @@ "@types/node" "9.6.0" bignumber.js "~4.1.0" +"@0xproject/types@^1.1.2": + version "1.1.4" + resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-1.1.4.tgz#3ffd65e670d6a21dab19ee0ffd5fad0056291b8e" + dependencies: + "@types/node" "*" + bignumber.js "~4.1.0" + ethereum-types "^1.0.11" + "@0xproject/typescript-typings@^0.0.3": version "0.0.3" - resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-0.0.3.tgz#3272080bde00ade0a970b0d236686b483b08a1d0" + resolved "http://registry.npmjs.org/@0xproject/typescript-typings/-/typescript-typings-0.0.3.tgz#3272080bde00ade0a970b0d236686b483b08a1d0" dependencies: "@0xproject/types" "^0.5.0" bignumber.js "~4.1.0" @@ -672,26 +662,6 @@ bignumber.js "~4.1.0" ethereum-types "^0.0.2" -"@0xproject/typescript-typings@^1.0.3": - version "1.0.5" - resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-1.0.5.tgz#a808443419f26a7b90d63d1afd3efbfb48644184" - dependencies: - "@types/bn.js" "^4.11.0" - "@types/react" "*" - bignumber.js "~4.1.0" - ethereum-types "^1.0.5" - popper.js "1.14.3" - -"@0xproject/typescript-typings@^2.0.2": - version "2.0.2" - resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-2.0.2.tgz#1812f64e341f1d24c09b8b5a951cbde0e5fff9c2" - dependencies: - "@types/bn.js" "^4.11.0" - "@types/react" "*" - bignumber.js "~4.1.0" - ethereum-types "^1.0.8" - popper.js "1.14.3" - "@0xproject/utils@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.7.3.tgz#ffa7c6da9bf0dd3e13694f185dcfc48a8981ff05" @@ -706,23 +676,6 @@ lodash "4.17.10" web3 "0.20.6" -"@0xproject/utils@^1.0.4": - version "1.0.11" - resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-1.0.11.tgz#5b53e7d9d4dbe68e219049218c9db04e97c37429" - dependencies: - "@0xproject/types" "^1.1.1" - "@0xproject/typescript-typings" "^2.0.2" - "@types/node" "*" - abortcontroller-polyfill "^1.1.9" - bignumber.js "~4.1.0" - detect-node "2.0.3" - ethereum-types "^1.0.8" - ethereumjs-util "^5.1.1" - ethers "3.0.22" - isomorphic-fetch "^2.2.1" - js-sha3 "^0.7.0" - lodash "^4.17.5" - "@0xproject/web3-wrapper@^0.7.3": version "0.7.3" resolved "https://registry.yarnpkg.com/@0xproject/web3-wrapper/-/web3-wrapper-0.7.3.tgz#9bd50b034b92fd505b6766b6e225f014b6d08b08" @@ -786,6 +739,21 @@ dependencies: events "^2.0.0" +"@lerna/add@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-3.4.1.tgz#d41068317e30f530df48220d256b5e79690b1877" + dependencies: + "@lerna/bootstrap" "^3.4.1" + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/npm-conf" "^3.4.1" + "@lerna/validation-error" "^3.0.0" + dedent "^0.7.0" + npm-package-arg "^6.0.0" + p-map "^1.2.0" + pacote "^9.1.0" + semver "^5.5.0" + "@lerna/batch-packages@^3.0.0-beta.18": version "3.0.0-beta.18" resolved "http://registry.yarnpkg.com/@lerna%2fbatch-packages/-/batch-packages-3.0.0-beta.18.tgz#69d5e3f5003e454a1615c38d9f0b65b10853625a" @@ -794,6 +762,326 @@ "@lerna/validation-error" "^3.0.0-beta.10" npmlog "^4.1.2" +"@lerna/batch-packages@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@lerna/batch-packages/-/batch-packages-3.1.2.tgz#74b5312a01a8916204cbc71237ffbe93144b99df" + dependencies: + "@lerna/package-graph" "^3.1.2" + "@lerna/validation-error" "^3.0.0" + npmlog "^4.1.2" + +"@lerna/bootstrap@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-3.4.1.tgz#10635e9b547fb7d685949ac78e0923f73da2f52a" + dependencies: + "@lerna/batch-packages" "^3.1.2" + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/has-npm-version" "^3.3.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/npm-install" "^3.3.0" + "@lerna/rimraf-dir" "^3.3.0" + "@lerna/run-lifecycle" "^3.4.1" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/symlink-binary" "^3.3.0" + "@lerna/symlink-dependencies" "^3.3.0" + "@lerna/validation-error" "^3.0.0" + dedent "^0.7.0" + get-port "^3.2.0" + multimatch "^2.1.0" + npm-package-arg "^6.0.0" + npmlog "^4.1.2" + p-finally "^1.0.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + read-package-tree "^5.1.6" + semver "^5.5.0" + +"@lerna/changed@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-3.4.1.tgz#84a049359a53b8812c3a07a664bd41b1768f5938" + dependencies: + "@lerna/collect-updates" "^3.3.2" + "@lerna/command" "^3.3.0" + "@lerna/listable" "^3.0.0" + "@lerna/output" "^3.0.0" + "@lerna/version" "^3.4.1" + +"@lerna/check-working-tree@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-3.3.0.tgz#2118f301f28ccb530812e5b27a341b1e6b3c84e2" + dependencies: + "@lerna/describe-ref" "^3.3.0" + "@lerna/validation-error" "^3.0.0" + +"@lerna/child-process@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-3.3.0.tgz#71184a763105b6c8ece27f43f166498d90fe680f" + dependencies: + chalk "^2.3.1" + execa "^1.0.0" + strong-log-transformer "^2.0.0" + +"@lerna/clean@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-3.3.2.tgz#9a7e8a1e400e580de260fa124945b2939a025069" + dependencies: + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/prompt" "^3.3.1" + "@lerna/rimraf-dir" "^3.3.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + p-waterfall "^1.0.0" + +"@lerna/cli@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-3.2.0.tgz#3ed25bcbc0b8f0878bc6a102ee0296f01476cfdf" + dependencies: + "@lerna/global-options" "^3.1.3" + dedent "^0.7.0" + npmlog "^4.1.2" + yargs "^12.0.1" + +"@lerna/collect-updates@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-3.3.2.tgz#54df5ce59ca05e8aa04ff8a9299f89cc253a9304" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/describe-ref" "^3.3.0" + minimatch "^3.0.4" + npmlog "^4.1.2" + slash "^1.0.0" + +"@lerna/command@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-3.3.0.tgz#e81c4716a676b02dbe9d3f548d5f45b4ba32c25a" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/package-graph" "^3.1.2" + "@lerna/project" "^3.0.0" + "@lerna/validation-error" "^3.0.0" + "@lerna/write-log-file" "^3.0.0" + dedent "^0.7.0" + execa "^1.0.0" + is-ci "^1.0.10" + lodash "^4.17.5" + npmlog "^4.1.2" + +"@lerna/conventional-commits@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-3.4.1.tgz#0b47f9fc0c4a10951883e949d939188da1b527bc" + dependencies: + "@lerna/validation-error" "^3.0.0" + conventional-changelog-angular "^5.0.1" + conventional-changelog-core "^3.1.0" + conventional-recommended-bump "^4.0.1" + fs-extra "^7.0.0" + get-stream "^4.0.0" + npm-package-arg "^6.0.0" + npmlog "^4.1.2" + semver "^5.5.0" + +"@lerna/create-symlink@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-3.3.0.tgz#91de00fd576018ba4251f0c6a5b4b7f768f22a82" + dependencies: + cmd-shim "^2.0.2" + fs-extra "^7.0.0" + npmlog "^4.1.2" + +"@lerna/create@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-3.4.1.tgz#7cad78a5701d7666a0f5d0fe0e325acd8d8f5b63" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.3.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/validation-error" "^3.0.0" + camelcase "^4.1.0" + dedent "^0.7.0" + fs-extra "^7.0.0" + globby "^8.0.1" + init-package-json "^1.10.3" + npm-package-arg "^6.0.0" + pify "^3.0.0" + semver "^5.5.0" + slash "^1.0.0" + validate-npm-package-license "^3.0.3" + validate-npm-package-name "^3.0.0" + whatwg-url "^7.0.0" + +"@lerna/describe-ref@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-3.3.0.tgz#d373adb530d5428ab91e303ccbfcf51a98374a3a" + dependencies: + "@lerna/child-process" "^3.3.0" + npmlog "^4.1.2" + +"@lerna/diff@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-3.3.0.tgz#c8130a5f508b47fad5fec81404498bc3acdf9cb5" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.3.0" + "@lerna/validation-error" "^3.0.0" + npmlog "^4.1.2" + +"@lerna/exec@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-3.3.2.tgz#95ecaca617fd85abdb91e9a378ed06ec1763d665" + dependencies: + "@lerna/batch-packages" "^3.1.2" + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/validation-error" "^3.0.0" + +"@lerna/filter-options@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-3.3.2.tgz#ac90702b7876ff4980dcdeaeac049c433dd01773" + dependencies: + "@lerna/collect-updates" "^3.3.2" + "@lerna/filter-packages" "^3.0.0" + dedent "^0.7.0" + +"@lerna/filter-packages@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-3.0.0.tgz#5eb25ad1610f3e2ab845133d1f8d7d40314e838f" + dependencies: + "@lerna/validation-error" "^3.0.0" + multimatch "^2.1.0" + npmlog "^4.1.2" + +"@lerna/get-npm-exec-opts@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-3.0.0.tgz#8fc7866e8d8e9a2f2dc385287ba32eb44de8bdeb" + dependencies: + npmlog "^4.1.2" + +"@lerna/global-options@^3.1.3": + version "3.1.3" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-3.1.3.tgz#cf85e24655a91d04d4efc9a80c1f83fc768d08ae" + +"@lerna/has-npm-version@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-3.3.0.tgz#8a73c2c437a0e1e68a19ccbd0dd3c014d4d39135" + dependencies: + "@lerna/child-process" "^3.3.0" + semver "^5.5.0" + +"@lerna/import@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-3.3.1.tgz#deca8c93c9cc03c5844b975c6da9937dd7530440" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.3.0" + "@lerna/prompt" "^3.3.1" + "@lerna/validation-error" "^3.0.0" + dedent "^0.7.0" + fs-extra "^7.0.0" + p-map-series "^1.0.0" + +"@lerna/init@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-3.3.0.tgz#998f3497da3d891867c593b808b6db4b8fc4ccb9" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/command" "^3.3.0" + fs-extra "^7.0.0" + p-map "^1.2.0" + write-json-file "^2.3.0" + +"@lerna/link@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-3.3.0.tgz#c0c05ff52d0f0c659fcf221627edfcd58e477a5c" + dependencies: + "@lerna/command" "^3.3.0" + "@lerna/package-graph" "^3.1.2" + "@lerna/symlink-dependencies" "^3.3.0" + p-map "^1.2.0" + slash "^1.0.0" + +"@lerna/list@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-3.3.2.tgz#1412b3cce2a83b1baa4ff6fb962d50b46c28ec98" + dependencies: + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/listable" "^3.0.0" + "@lerna/output" "^3.0.0" + +"@lerna/listable@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-3.0.0.tgz#27209b1382c87abdbc964220e75c247d803d4199" + dependencies: + chalk "^2.3.1" + columnify "^1.5.4" + +"@lerna/log-packed@^3.0.4": + version "3.0.4" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-3.0.4.tgz#6d1f6ce5ca68b9971f2a27f0ecf3c50684be174a" + dependencies: + byte-size "^4.0.3" + columnify "^1.5.4" + has-unicode "^2.0.1" + npmlog "^4.1.2" + +"@lerna/npm-conf@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-3.4.1.tgz#859e931b0bc9a5eed86309cc09508810c1e7d121" + dependencies: + config-chain "^1.1.11" + pify "^3.0.0" + +"@lerna/npm-dist-tag@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-3.3.0.tgz#e1c5ab67674216d901266a16846b21cc81ff6afd" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.0.0" + npmlog "^4.1.2" + +"@lerna/npm-install@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-3.3.0.tgz#16d00ffd668d11b2386b3ac68bdac2cf8320e533" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.0.0" + fs-extra "^7.0.0" + npm-package-arg "^6.0.0" + npmlog "^4.1.2" + signal-exit "^3.0.2" + write-pkg "^3.1.0" + +"@lerna/npm-publish@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-3.3.1.tgz#30384665d7ee387343332ece62ca231207bbabea" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.0.0" + "@lerna/has-npm-version" "^3.3.0" + "@lerna/log-packed" "^3.0.4" + fs-extra "^7.0.0" + npmlog "^4.1.2" + p-map "^1.2.0" + +"@lerna/npm-run-script@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-3.3.0.tgz#3c79601c27c67121155b20e039be53130217db72" + dependencies: + "@lerna/child-process" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.0.0" + npmlog "^4.1.2" + +"@lerna/output@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-3.0.0.tgz#4ed4a30ed2f311046b714b3840a090990ba3ce35" + dependencies: + npmlog "^4.1.2" + "@lerna/package-graph@^3.0.0-beta.18": version "3.0.0-beta.18" resolved "http://registry.yarnpkg.com/@lerna%2fpackage-graph/-/package-graph-3.0.0-beta.18.tgz#8c33a6a10453d310e14fc9d317dc51e845e11963" @@ -801,12 +1089,188 @@ npm-package-arg "^6.0.0" semver "^5.5.0" +"@lerna/package-graph@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.1.2.tgz#b70298a3a8c82e12090da33233bf242223a38f20" + dependencies: + "@lerna/validation-error" "^3.0.0" + npm-package-arg "^6.0.0" + semver "^5.5.0" + +"@lerna/package@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-3.0.0.tgz#14afc9a6cb1f7f7b23c1d7c7aa81bdac7d44c0e5" + dependencies: + npm-package-arg "^6.0.0" + write-pkg "^3.1.0" + +"@lerna/project@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-3.0.0.tgz#4320d2a2b4080cabcf95161d9c48475217d8a545" + dependencies: + "@lerna/package" "^3.0.0" + "@lerna/validation-error" "^3.0.0" + cosmiconfig "^5.0.2" + dedent "^0.7.0" + dot-prop "^4.2.0" + glob-parent "^3.1.0" + globby "^8.0.1" + load-json-file "^4.0.0" + npmlog "^4.1.2" + p-map "^1.2.0" + resolve-from "^4.0.0" + write-json-file "^2.3.0" + +"@lerna/prompt@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-3.3.1.tgz#ec53f9034a7a02a671627241682947f65078ab88" + dependencies: + inquirer "^6.2.0" + npmlog "^4.1.2" + +"@lerna/publish@^3.4.3": + version "3.4.3" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-3.4.3.tgz#fb956ca2a871729982022889f90d0e8eb8528340" + dependencies: + "@lerna/batch-packages" "^3.1.2" + "@lerna/check-working-tree" "^3.3.0" + "@lerna/child-process" "^3.3.0" + "@lerna/collect-updates" "^3.3.2" + "@lerna/command" "^3.3.0" + "@lerna/describe-ref" "^3.3.0" + "@lerna/get-npm-exec-opts" "^3.0.0" + "@lerna/npm-conf" "^3.4.1" + "@lerna/npm-dist-tag" "^3.3.0" + "@lerna/npm-publish" "^3.3.1" + "@lerna/output" "^3.0.0" + "@lerna/prompt" "^3.3.1" + "@lerna/run-lifecycle" "^3.4.1" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/validation-error" "^3.0.0" + "@lerna/version" "^3.4.1" + fs-extra "^7.0.0" + libnpmaccess "^3.0.0" + npm-package-arg "^6.0.0" + npm-registry-fetch "^3.8.0" + npmlog "^4.1.2" + p-finally "^1.0.0" + p-map "^1.2.0" + p-pipe "^1.2.0" + p-reduce "^1.0.0" + semver "^5.5.0" + +"@lerna/resolve-symlink@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-3.3.0.tgz#c5d99a60cb17e2ea90b3521a0ba445478d194a44" + dependencies: + fs-extra "^7.0.0" + npmlog "^4.1.2" + read-cmd-shim "^1.0.1" + +"@lerna/rimraf-dir@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-3.3.0.tgz#687e9bb3668a9e540e281302a52d9a573860f5db" + dependencies: + "@lerna/child-process" "^3.3.0" + npmlog "^4.1.2" + path-exists "^3.0.0" + rimraf "^2.6.2" + +"@lerna/run-lifecycle@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-3.4.1.tgz#6d7e44eada31cb4ec78b18ef050da0d86f6c892b" + dependencies: + "@lerna/npm-conf" "^3.4.1" + npm-lifecycle "^2.0.0" + npmlog "^4.1.2" + +"@lerna/run-parallel-batches@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/run-parallel-batches/-/run-parallel-batches-3.0.0.tgz#468704934084c74991d3124d80607857d4dfa840" + dependencies: + p-map "^1.2.0" + p-map-series "^1.0.0" + +"@lerna/run@^3.3.2": + version "3.3.2" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-3.3.2.tgz#f521f4a22585c90758f34a584cb1871f8bb2a83e" + dependencies: + "@lerna/batch-packages" "^3.1.2" + "@lerna/command" "^3.3.0" + "@lerna/filter-options" "^3.3.2" + "@lerna/npm-run-script" "^3.3.0" + "@lerna/output" "^3.0.0" + "@lerna/run-parallel-batches" "^3.0.0" + "@lerna/validation-error" "^3.0.0" + p-map "^1.2.0" + +"@lerna/symlink-binary@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-3.3.0.tgz#99ea570b21baabd61ecab27582eeb1d7b2c5f9cf" + dependencies: + "@lerna/create-symlink" "^3.3.0" + "@lerna/package" "^3.0.0" + fs-extra "^7.0.0" + p-map "^1.2.0" + read-pkg "^3.0.0" + +"@lerna/symlink-dependencies@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-3.3.0.tgz#13bcaed3e37986ab01b13498a459c7f609397dc3" + dependencies: + "@lerna/create-symlink" "^3.3.0" + "@lerna/resolve-symlink" "^3.3.0" + "@lerna/symlink-binary" "^3.3.0" + fs-extra "^7.0.0" + p-finally "^1.0.0" + p-map "^1.2.0" + p-map-series "^1.0.0" + +"@lerna/validation-error@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.0.0.tgz#a27e90051c3ba71995e2a800a43d94ad04b3e3f4" + dependencies: + npmlog "^4.1.2" + "@lerna/validation-error@^3.0.0-beta.10": version "3.0.0-beta.10" resolved "http://registry.yarnpkg.com/@lerna%2fvalidation-error/-/validation-error-3.0.0-beta.10.tgz#cf5cbc39c4d27b89c6080e326de745f6fb7451ab" dependencies: npmlog "^4.1.2" +"@lerna/version@^3.4.1": + version "3.4.1" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.4.1.tgz#029448cccd3ccefb4d5f666933bd13cfb37edab0" + dependencies: + "@lerna/batch-packages" "^3.1.2" + "@lerna/check-working-tree" "^3.3.0" + "@lerna/child-process" "^3.3.0" + "@lerna/collect-updates" "^3.3.2" + "@lerna/command" "^3.3.0" + "@lerna/conventional-commits" "^3.4.1" + "@lerna/output" "^3.0.0" + "@lerna/prompt" "^3.3.1" + "@lerna/run-lifecycle" "^3.4.1" + "@lerna/validation-error" "^3.0.0" + chalk "^2.3.1" + dedent "^0.7.0" + minimatch "^3.0.4" + npmlog "^4.1.2" + p-map "^1.2.0" + p-pipe "^1.2.0" + p-reduce "^1.0.0" + p-waterfall "^1.0.0" + semver "^5.5.0" + slash "^1.0.0" + temp-write "^3.4.0" + +"@lerna/write-log-file@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-3.0.0.tgz#2f95fee80c6821fe1ee6ccf8173d2b4079debbd2" + dependencies: + npmlog "^4.1.2" + write-file-atomic "^2.3.0" + "@loopback/dist-util@^0.3.6": version "0.3.6" resolved "https://registry.npmjs.org/@loopback/dist-util/-/dist-util-0.3.6.tgz#bd1d5887aa0f2bec41722f1d74fc19319d04e975" @@ -1109,7 +1573,7 @@ dependencies: "@types/node" "*" -"@types/mocha@^2.2.42", "@types/mocha@^2.2.48": +"@types/mocha@^2.2.42": version "2.2.48" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab" @@ -1117,16 +1581,6 @@ version "5.2.3" resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.3.tgz#11f3a5629d67cd444fa6c94536576244e6a52ea9" -"@types/newman@^3.9.0": - version "3.9.0" - resolved "https://registry.npmjs.org/@types/newman/-/newman-3.9.0.tgz#f46427e8f633545dd94e8df0c251e22145f88227" - -"@types/nock@^9.1.2": - version "9.1.3" - resolved "https://registry.yarnpkg.com/@types/nock/-/nock-9.1.3.tgz#1d445679375b9e25afd449dc56585f81729454e8" - dependencies: - "@types/node" "*" - "@types/node@*": version "9.6.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d" @@ -1494,6 +1948,13 @@ JSONStream@^1.0.4: jsonparse "^1.2.0" through ">=2.2.7 <3" +JSONStream@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" + dependencies: + jsonparse "^1.2.0" + through ">=2.2.7 <3" + abab@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f" @@ -1602,6 +2063,18 @@ aes-js@^0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-0.2.4.tgz#94b881ab717286d015fa219e08fb66709dda5a3d" +agent-base@4, agent-base@^4.1.0, agent-base@~4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" + dependencies: + es6-promisify "^5.0.0" + +agentkeepalive@^3.4.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.1.tgz#4eba75cf2ad258fc09efd506cdb8d8c2971d35a4" + dependencies: + humanize-ms "^1.2.1" + ajv-errors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59" @@ -1751,6 +2224,10 @@ aproba@^1.0.3, aproba@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" +aproba@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc" + archy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" @@ -1936,16 +2413,16 @@ async@1.x, async@^1.4.0, async@^1.4.2, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@2.6.0, async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.0: +async@^0.9.0, async@~0.9.0: + version "0.9.2" + resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" + +async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: lodash "^4.14.0" -async@^0.9.0, async@~0.9.0: - version "0.9.2" - resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d" - async@^2.1.4: version "2.6.1" resolved "https://registry.npmjs.org/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" @@ -2014,10 +2491,6 @@ aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" -aws4@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" - aws4@^1.2.1, aws4@^1.6.0: version "1.7.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.7.0.tgz#d4d0e9b9dbfca77bf08eeb0a8a471550fe39e289" @@ -2780,7 +3253,7 @@ blockies@^0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/blockies/-/blockies-0.0.2.tgz#22ad58da4f6b382bc79bf4386c5820c70047e4ed" -bluebird@^2.6.2, bluebird@^2.9.24, bluebird@^2.9.34: +bluebird@^2.9.24, bluebird@^2.9.34: version "2.11.0" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1" @@ -3031,10 +3504,6 @@ bser@^2.0.0: dependencies: node-int64 "^0.4.0" -btoa@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.1.2.tgz#3e40b81663f81d2dd6596a4cb714a8dc16cfabe0" - buffer-compare@=1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-compare/-/buffer-compare-1.1.1.tgz#5be7be853af89198d1f4ddc090d1d66a48aef596" @@ -3131,6 +3600,10 @@ byline@^5.0.0: version "5.0.0" resolved "http://registry.yarnpkg.com/byline/-/byline-5.0.0.tgz#741c5216468eadc457b03410118ad77de8c1ddb1" +byte-size@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/byte-size/-/byte-size-4.0.3.tgz#b7c095efc68eadf82985fccd9a2df43a74fa2ccd" + bytes@3.0.0, bytes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" @@ -3166,7 +3639,7 @@ cacache@^10.0.4: unique-filename "^1.1.0" y18n "^4.0.0" -cacache@^11.0.2, cacache@^11.2.0: +cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0: version "11.2.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965" dependencies: @@ -3349,7 +3822,7 @@ chalk@2.3.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" dependencies: @@ -3418,9 +3891,9 @@ chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" -charset@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/charset/-/charset-1.0.1.tgz#8d59546c355be61049a8fa9164747793319852bd" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" check-error@^1.0.1, check-error@^1.0.2: version "1.0.2" @@ -3508,10 +3981,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: inherits "^2.0.1" safe-buffer "^5.0.1" -circular-json@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d" - circular-json@^0.3.1: version "0.3.3" resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66" @@ -3555,25 +4024,10 @@ cli-cursor@^2.1.0: dependencies: restore-cursor "^2.0.0" -cli-progress@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/cli-progress/-/cli-progress-1.7.0.tgz#401cdfeacc1a34afc281b4bdf88829236724c92f" - dependencies: - colors "^1.1.2" - cli-spinners@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c" -cli-table2@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/cli-table2/-/cli-table2-0.2.0.tgz#2d1ef7f218a0e786e214540562d4bd177fe32d97" - dependencies: - lodash "^3.10.1" - string-width "^1.0.1" - optionalDependencies: - colors "^1.1.2" - cli-truncate@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574" @@ -3736,14 +4190,14 @@ colors@1.0.x: version "1.0.3" resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b" -colors@1.1.2, colors@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" - colors@^1.1.2: version "1.2.1" resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.1.tgz#f4a3d302976aaf042356ba1ade3b1a2c62d9d794" +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + columnify@^1.5.4: version "1.5.4" resolved "http://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -3761,14 +4215,6 @@ commander@2.11.0: version "2.11.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.11.0.tgz#157152fd1e7a6c8d98a5b715cf376df928004563" -commander@2.12.2: - version "2.12.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555" - -commander@2.13.0, commander@~2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" - commander@2.15.1, commander@^2.12.1, commander@^2.8.1: version "2.15.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" @@ -3781,6 +4227,10 @@ commander@^2.7.1, commander@~2.17.1: version "2.17.1" resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" +commander@~2.13.0: + version "2.13.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c" + commander@~2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" @@ -3907,6 +4357,13 @@ conventional-changelog-angular@^1.6.6: compare-func "^1.3.1" q "^1.5.1" +conventional-changelog-angular@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-angular/-/conventional-changelog-angular-5.0.1.tgz#f96431b76de453333a909decd02b15cb5bd2d364" + dependencies: + compare-func "^1.3.1" + q "^1.5.1" + conventional-changelog-core@^2.0.5: version "2.0.11" resolved "http://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-2.0.11.tgz#19b5fbd55a9697773ed6661f4e32030ed7e30287" @@ -3925,10 +4382,32 @@ conventional-changelog-core@^2.0.5: read-pkg-up "^1.0.1" through2 "^2.0.0" +conventional-changelog-core@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-3.1.0.tgz#96a81bb3301b4b2a3dc2851cc54c5fb674ac1942" + dependencies: + conventional-changelog-writer "^4.0.0" + conventional-commits-parser "^3.0.0" + dateformat "^3.0.0" + get-pkg-repo "^1.0.0" + git-raw-commits "^2.0.0" + git-remote-origin-url "^2.0.0" + git-semver-tags "^2.0.0" + lodash "^4.2.1" + normalize-package-data "^2.3.5" + q "^1.5.1" + read-pkg "^1.1.0" + read-pkg-up "^1.0.1" + through2 "^2.0.0" + conventional-changelog-preset-loader@^1.1.8: version "1.1.8" resolved "http://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-1.1.8.tgz#40bb0f142cd27d16839ec6c74ee8db418099b373" +conventional-changelog-preset-loader@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-2.0.1.tgz#d134734e0cc1b91b88b30586c5991f31442029f1" + conventional-changelog-writer@^3.0.9: version "3.0.9" resolved "http://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-3.0.9.tgz#4aecdfef33ff2a53bb0cf3b8071ce21f0e994634" @@ -3944,6 +4423,21 @@ conventional-changelog-writer@^3.0.9: split "^1.0.0" through2 "^2.0.0" +conventional-changelog-writer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/conventional-changelog-writer/-/conventional-changelog-writer-4.0.0.tgz#3ed983c8ef6a3aa51fe44e82c9c75e86f1b5aa42" + dependencies: + compare-func "^1.3.1" + conventional-commits-filter "^2.0.0" + dateformat "^3.0.0" + handlebars "^4.0.2" + json-stringify-safe "^5.0.1" + lodash "^4.2.1" + meow "^4.0.0" + semver "^5.5.0" + split "^1.0.0" + through2 "^2.0.0" + conventional-commits-filter@^1.1.6: version "1.1.6" resolved "http://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-1.1.6.tgz#4389cd8e58fe89750c0b5fb58f1d7f0cc8ad3831" @@ -3951,6 +4445,13 @@ conventional-commits-filter@^1.1.6: is-subset "^0.1.1" modify-values "^1.0.0" +conventional-commits-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-filter/-/conventional-commits-filter-2.0.0.tgz#a0ce1d1ff7a1dd7fab36bee8e8256d348d135651" + dependencies: + is-subset "^0.1.1" + modify-values "^1.0.0" + conventional-commits-parser@^2.1.7: version "2.1.7" resolved "http://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-2.1.7.tgz#eca45ed6140d72ba9722ee4132674d639e644e8e" @@ -3963,6 +4464,18 @@ conventional-commits-parser@^2.1.7: through2 "^2.0.0" trim-off-newlines "^1.0.0" +conventional-commits-parser@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/conventional-commits-parser/-/conventional-commits-parser-3.0.0.tgz#7f604549a50bd8f60443fbe515484b1c2f06a5c4" + dependencies: + JSONStream "^1.0.4" + is-text-path "^1.0.0" + lodash "^4.2.1" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + trim-off-newlines "^1.0.0" + conventional-recommended-bump@^2.0.6: version "2.0.9" resolved "http://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-2.0.9.tgz#7392421e7d0e3515f3df2040572a23cc73a68a93" @@ -3976,6 +4489,19 @@ conventional-recommended-bump@^2.0.6: meow "^4.0.0" q "^1.5.1" +conventional-recommended-bump@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/conventional-recommended-bump/-/conventional-recommended-bump-4.0.1.tgz#304a45a412cfec050a10ea2e7e4a89320eaf3991" + dependencies: + concat-stream "^1.6.0" + conventional-changelog-preset-loader "^2.0.1" + conventional-commits-filter "^2.0.0" + conventional-commits-parser "^3.0.0" + git-raw-commits "^2.0.0" + git-semver-tags "^2.0.0" + meow "^4.0.0" + q "^1.5.1" + convert-source-map@^1.4.0: version "1.6.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" @@ -4164,14 +4690,14 @@ crypto-browserify@3.12.0, crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" -crypto-js@3.1.9-1, crypto-js@^3.1.9-1: - version "3.1.9-1" - resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8" - crypto-js@^3.1.4, crypto-js@^3.1.5: version "3.1.8" resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.8.tgz#715f070bf6014f2ae992a98b3929258b713f08d5" +crypto-js@^3.1.9-1: + version "3.1.9-1" + resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8" + crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e" @@ -4315,10 +4841,6 @@ csstype@^2.2.0: version "2.4.2" resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.4.2.tgz#158e36c69566bf968da63d0ba14eda1c20e8643a" -csv-parse@1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-1.2.4.tgz#cbf676e355226625888c6432400b83f07e75cc2e" - currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -4379,10 +4901,6 @@ dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" -dbug@~0.4.2: - version "0.4.2" - resolved "https://registry.yarnpkg.com/dbug/-/dbug-0.4.2.tgz#32b4b3105e8861043a6f9ac755d80e542d365b31" - debounce@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" @@ -4514,7 +5032,7 @@ deep-eql@^3.0.0: dependencies: type-detect "^4.0.0" -deep-equal@^1.0.0, deep-equal@^1.0.1, deep-equal@~1.0.1: +deep-equal@^1.0.1, deep-equal@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -5053,6 +5571,10 @@ enzyme@^3.6.0: rst-selector-parser "^2.2.3" string.prototype.trim "^1.1.2" +err-code@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960" + errno@^0.1.1, errno@^0.1.3, errno@~0.1.1, errno@~0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618" @@ -5136,7 +5658,7 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.1: d "1" es5-ext "~0.10.14" -escape-html@1.0.3, escape-html@~1.0.3: +escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -5658,10 +6180,6 @@ eventemitter3@1.x.x: version "1.2.0" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508" -eventemitter3@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-3.0.0.tgz#fc29ecf233bd19fbd527bb4089bbf665dc90c1e3" - eventemitter3@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163" @@ -5729,6 +6247,18 @@ execa@^0.9.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exenv@^1.2.1: version "1.2.2" resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d" @@ -5850,6 +6380,14 @@ external-editor@^2.0.4, external-editor@^2.1.0: iconv-lite "^0.4.17" tmp "^0.0.33" +external-editor@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -5971,7 +6509,7 @@ fetch-ponyfill@^4.0.0: dependencies: node-fetch "~1.7.1" -figgy-pudding@^3.1.0, figgy-pudding@^3.5.1: +figgy-pudding@^3.1.0, figgy-pudding@^3.2.1, figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -5995,7 +6533,7 @@ file-entry-cache@^2.0.0: flat-cache "^1.2.1" object-assign "^4.0.1" -file-type@3.9.0, file-type@^3.6.0, file-type@^3.8.0: +file-type@^3.6.0, file-type@^3.8.0: version "3.9.0" resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" @@ -6018,10 +6556,6 @@ fileset@^2.0.2: glob "^7.0.3" minimatch "^3.0.3" -filesize@3.5.11: - version "3.5.11" - resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.5.11.tgz#1919326749433bb3cf77368bd158caabcc19e9ee" - fill-range@^2.1.0: version "2.2.3" resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" @@ -6385,7 +6919,7 @@ ganache-core@0xProject/ganache-core#monorepo-dep: ethereumjs-tx "0xProject/ethereumjs-tx#fake-tx-include-signature-by-default" ethereumjs-util "^5.2.0" ethereumjs-vm "2.3.5" - ethereumjs-wallet "~0.6.0" + ethereumjs-wallet "0.6.0" fake-merkle-patricia-tree "~1.0.1" heap "~0.2.6" js-scrypt "^0.2.0" @@ -6479,6 +7013,10 @@ generic-pool@~2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/generic-pool/-/generic-pool-2.0.4.tgz#f9718deda82fa125ed5c43e341c9a215a766d9a3" +genfun@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1" + get-caller-file@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" @@ -6520,6 +7058,12 @@ get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -6540,9 +7084,19 @@ ghauth@^2.0.0: read "~1.0.5" xtend "~4.0.0" -git-raw-commits@^1.3.6: - version "1.3.6" - resolved "http://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" +git-raw-commits@^1.3.6: + version "1.3.6" + resolved "http://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-1.3.6.tgz#27c35a32a67777c1ecd412a239a6c19d71b95aff" + dependencies: + dargs "^4.0.1" + lodash.template "^4.0.2" + meow "^4.0.0" + split2 "^2.0.0" + through2 "^2.0.0" + +git-raw-commits@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.0.tgz#d92addf74440c14bcc5c83ecce3fb7f8a79118b5" dependencies: dargs "^4.0.1" lodash.template "^4.0.2" @@ -6564,6 +7118,13 @@ git-semver-tags@^1.3.6: meow "^4.0.0" semver "^5.5.0" +git-semver-tags@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/git-semver-tags/-/git-semver-tags-2.0.0.tgz#c218fd895bdf8e8e02f6bde555b2c3893ac73cd7" + dependencies: + meow "^4.0.0" + semver "^5.5.0" + gitconfiglocal@^1.0.0: version "1.0.0" resolved "http://registry.yarnpkg.com/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz#41d045f3851a5ea88f03f24ca1c6178114464b9b" @@ -6903,7 +7464,7 @@ handle-thing@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" -handlebars@4.0.11, handlebars@^4.0.1, handlebars@^4.0.11, handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.6: +handlebars@^4.0.1, handlebars@^4.0.11, handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.6: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" dependencies: @@ -6928,7 +7489,7 @@ har-validator@~4.2.1: ajv "^4.9.1" har-schema "^1.0.5" -har-validator@~5.0.2, har-validator@~5.0.3: +har-validator@~5.0.3: version "5.0.3" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" dependencies: @@ -6984,7 +7545,7 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" -has-unicode@^2.0.0: +has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -7173,7 +7734,7 @@ html-entities@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" -htmlparser2@^3.9.0, htmlparser2@^3.9.1: +htmlparser2@^3.9.1: version "3.9.2" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338" dependencies: @@ -7184,6 +7745,10 @@ htmlparser2@^3.9.0, htmlparser2@^3.9.1: inherits "^2.0.1" readable-stream "^2.0.2" +http-cache-semantics@^3.8.1: + version "3.8.1" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" + http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87" @@ -7214,6 +7779,13 @@ http-parser-js@>=0.4.0: version "0.4.11" resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.11.tgz#5b720849c650903c27e521633d94696ee95f3529" +http-proxy-agent@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" + dependencies: + agent-base "4" + debug "3.1.0" + http-proxy-middleware@~0.18.0: version "0.18.0" resolved "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" @@ -7230,10 +7802,6 @@ http-proxy@^1.16.2: eventemitter3 "1.x.x" requires-port "1.x.x" -http-reasons@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/http-reasons/-/http-reasons-0.1.0.tgz#a953ca670078669dde142ce899401b9d6e85d3b4" - http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -7250,21 +7818,23 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" -httpntlm@1.7.5: - version "1.7.5" - resolved "https://registry.yarnpkg.com/httpntlm/-/httpntlm-1.7.5.tgz#cd1558ed93125418ece5bf824c1335675feedecc" - dependencies: - httpreq ">=0.4.22" - underscore "~1.7.0" - -httpreq@>=0.4.22: - version "0.4.24" - resolved "https://registry.yarnpkg.com/httpreq/-/httpreq-0.4.24.tgz#4335ffd82cd969668a39465c929ac61d6393627f" - https-browserify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" +https-proxy-agent@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" + dependencies: + agent-base "^4.1.0" + debug "^3.1.0" + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/humanize-ms/-/humanize-ms-1.2.1.tgz#c46e3159a293f6b896da29316d8b6fe8bb79bbed" + dependencies: + ms "^2.0.0" + humble-localstorage@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/humble-localstorage/-/humble-localstorage-1.4.2.tgz#d05ab0d526c4edbddbf7c6a60df6ff5805283469" @@ -7291,9 +7861,9 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@0.4.24: +iconv-lite@0.4.24, iconv-lite@^0.4.24: version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" dependencies: safer-buffer ">= 2.1.2 < 3" @@ -7494,16 +8064,23 @@ inquirer@^5.1.0: strip-ansi "^4.0.0" through "^2.3.6" -intel@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/intel/-/intel-1.2.0.tgz#11d1147eb6b3f4582bdf5337b37d541584e9e41e" +inquirer@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8" dependencies: - chalk "^1.1.0" - dbug "~0.4.2" - stack-trace "~0.0.9" - strftime "~0.10.0" - symbol "~0.3.1" - utcstring "~0.1.0" + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.0" + figures "^2.0.0" + lodash "^4.17.10" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.1.0" + string-width "^2.1.0" + strip-ansi "^4.0.0" + through "^2.3.6" internal-ip@^3.0.1: version "3.0.1" @@ -7546,10 +8123,6 @@ ipaddr.js@^1.5.2: version "1.8.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.1.tgz#fa4b79fa47fd3def5e3b159825161c0a519c9427" -irregular-plurals@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.4.0.tgz#2ca9b033651111855412f16be5d77c62a458a766" - is-absolute-url@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" @@ -8518,7 +9091,7 @@ jsesc@~0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" -json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: +json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -8821,6 +9394,28 @@ left-pad@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e" +lerna@^3.0.0-beta.25: + version "3.4.3" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.4.3.tgz#501454efb453c65c305802d370ee337f7298787e" + dependencies: + "@lerna/add" "^3.4.1" + "@lerna/bootstrap" "^3.4.1" + "@lerna/changed" "^3.4.1" + "@lerna/clean" "^3.3.2" + "@lerna/cli" "^3.2.0" + "@lerna/create" "^3.4.1" + "@lerna/diff" "^3.3.0" + "@lerna/exec" "^3.3.2" + "@lerna/import" "^3.3.1" + "@lerna/init" "^3.3.0" + "@lerna/link" "^3.3.0" + "@lerna/list" "^3.3.2" + "@lerna/publish" "^3.4.3" + "@lerna/run" "^3.3.2" + "@lerna/version" "^3.4.1" + import-local "^1.0.0" + npmlog "^4.1.2" + less-loader@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.1.0.tgz#2c1352c5b09a4f84101490274fd51674de41363e" @@ -8927,6 +9522,15 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +libnpmaccess@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.0.tgz#33cc9c8a5cb53e87d06bf2e547c2eba974f619af" + dependencies: + aproba "^2.0.0" + get-stream "^4.0.0" + npm-package-arg "^6.1.0" + npm-registry-fetch "^3.8.0" + liftoff@^2.1.0: version "2.5.0" resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec" @@ -8940,10 +9544,6 @@ liftoff@^2.1.0: rechoir "^0.6.2" resolve "^1.1.7" -liquid-json@0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/liquid-json/-/liquid-json-0.3.1.tgz#9155a18136d8a6b2615e5f16f9a2448ab6b50eea" - listr-silent-renderer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e" @@ -9147,10 +9747,6 @@ lodash.escape@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98" -lodash.escaperegexp@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/lodash.escaperegexp/-/lodash.escaperegexp-4.1.2.tgz#64762c48618082518ac3df4ccf5d5886dae20347" - lodash.find@^4.3.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1" @@ -9283,15 +9879,11 @@ lodash@4.17.10, lodash@^4.17.10: version "4.17.10" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" -lodash@4.17.2: - version "4.17.2" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42" - -lodash@4.17.4, lodash@=4.17.4: +lodash@=4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" -lodash@^3.10.1, lodash@^3.3.1, lodash@^3.6.0, lodash@^3.7.0: +lodash@^3.3.1, lodash@^3.6.0, lodash@^3.7.0: version "3.10.1" resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6" @@ -9401,7 +9993,7 @@ lru-cache@^4.0.1, lru-cache@^4.1.1: pseudomap "^1.0.2" yallist "^2.1.2" -lru-cache@^4.1.3: +lru-cache@^4.1.2, lru-cache@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.3.tgz#a1175cf3496dfc8436c156c334b4955992bce69c" dependencies: @@ -9442,6 +10034,22 @@ make-error@^1.1.1: version "1.3.4" resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535" +make-fetch-happen@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083" + dependencies: + agentkeepalive "^3.4.1" + cacache "^11.0.1" + http-cache-semantics "^3.8.1" + http-proxy-agent "^2.1.0" + https-proxy-agent "^2.2.1" + lru-cache "^4.1.2" + mississippi "^3.0.0" + node-fetch-npm "^2.0.2" + promise-retry "^1.1.1" + socks-proxy-agent "^4.0.0" + ssri "^6.0.0" + make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" @@ -9700,26 +10308,10 @@ miller-rabin@^4.0.0: version "1.33.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db" -mime-db@~1.30.0: - version "1.30.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" - mime-db@~1.35.0: version "1.35.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.35.0.tgz#0569d657466491283709663ad379a99b90d9ab47" -mime-format@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/mime-format/-/mime-format-2.0.0.tgz#e29f8891e284d78270246f0050d6834bdbbe1332" - dependencies: - charset "^1.0.0" - -mime-types@2.1.17: - version "2.1.17" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.17.tgz#09d7a393f03e995a79f8af857b70a9e0ab16557a" - dependencies: - mime-db "~1.30.0" - mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.7: version "2.1.18" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.18.tgz#6f323f60a83d11146f831ff11fd66e2fe5503bb8" @@ -9955,6 +10547,10 @@ ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" +ms@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -10060,33 +10656,6 @@ neo-async@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee" -newman@^3.9.3: - version "3.9.3" - resolved "https://registry.yarnpkg.com/newman/-/newman-3.9.3.tgz#939356026942474ba15482bd37a15c60bb200ca0" - dependencies: - async "2.6.0" - cli-progress "1.7.0" - cli-table2 "0.2.0" - colors "1.1.2" - commander "2.13.0" - csv-parse "1.2.4" - eventemitter3 "3.0.0" - filesize "3.5.11" - handlebars "4.0.11" - lodash "4.17.2" - mkdirp "0.5.1" - parse-json "3.0.0" - postman-collection "3.0.7" - postman-collection-transformer "2.5.4" - postman-request "2.81.1-postman.4" - postman-runtime "7.1.3" - pretty-ms "3.1.0" - semver "5.5.0" - serialised-error "1.1.2" - shelljs "0.8.0" - word-wrap "1.2.3" - xmlbuilder "9.0.4" - next-tick@1: version "1.0.0" resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" @@ -10111,26 +10680,20 @@ no-case@^2.2.0, no-case@^2.3.2: dependencies: lower-case "^1.1.1" -nock@^9.2.3: - version "9.2.5" - resolved "https://registry.yarnpkg.com/nock/-/nock-9.2.5.tgz#c131fc8d3c4723f386be0269739638be84733f2f" - dependencies: - chai "^4.1.2" - debug "^3.1.0" - deep-equal "^1.0.0" - json-stringify-safe "^5.0.1" - lodash "^4.17.5" - mkdirp "^0.5.0" - propagate "^1.0.0" - qs "^6.5.1" - semver "^5.5.0" - node-abi@^2.2.0: version "2.3.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.3.0.tgz#f3d554d6ac72a9ee16f0f4dc9548db7c08de4986" dependencies: semver "^5.4.1" +node-fetch-npm@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.2.tgz#7258c9046182dca345b4208eda918daf33697ff7" + dependencies: + encoding "^0.1.11" + json-parse-better-errors "^1.0.0" + safe-buffer "^5.1.1" + node-fetch@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.1.tgz#369ca70b82f50c86496104a6c776d274f4e4a2d4" @@ -10212,12 +10775,6 @@ node-notifier@^5.2.1: shellwords "^0.1.1" which "^1.3.0" -node-oauth1@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/node-oauth1/-/node-oauth1-1.2.2.tgz#fffb2813a88c2770711332ad0e5487b4927644a4" - dependencies: - crypto-js "3.1.9-1" - node-pre-gyp@^0.10.0: version "0.10.3" resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc" @@ -10249,10 +10806,6 @@ node-pre-gyp@^0.6.39: tar "^2.2.1" tar-pack "^3.4.0" -node-uuid@^1.4.7: - version "1.4.8" - resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907" - nodemon@^1.11.0: version "1.17.3" resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.17.3.tgz#3b0bbc2ee05ccb43b1aef15ba05c63c7bc9b8530" @@ -10305,7 +10858,7 @@ nopt@~1.0.10: dependencies: abbrev "1" -normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, "normalize-package-data@~1.0.1 || ^2.0.0": +normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0": version "2.4.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f" dependencies: @@ -10367,7 +10920,7 @@ npm-lifecycle@^2.0.0: hosted-git-info "^2.1.5" semver "^5.1.0" -"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0: +"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0: version "6.1.0" resolved "http://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1" dependencies: @@ -10376,6 +10929,13 @@ npm-lifecycle@^2.0.0: semver "^5.5.0" validate-npm-package-name "^3.0.0" +npm-packlist@^1.1.10: + version "1.1.12" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.12.tgz#22bde2ebc12e72ca482abd67afc51eb49377243a" + dependencies: + ignore-walk "^3.0.1" + npm-bundled "^1.0.1" + npm-packlist@^1.1.6: version "1.1.11" resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" @@ -10383,6 +10943,13 @@ npm-packlist@^1.1.6: ignore-walk "^3.0.1" npm-bundled "^1.0.1" +npm-pick-manifest@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.1.0.tgz#dc381bdd670c35d81655e1d5a94aa3dd4d87fce5" + dependencies: + npm-package-arg "^6.0.0" + semver "^5.4.1" + npm-registry-client@7.0.9: version "7.0.9" resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-7.0.9.tgz#1baf86ee5285c4e6d38d4556208ded56049231bb" @@ -10402,6 +10969,17 @@ npm-registry-client@7.0.9: optionalDependencies: npmlog "~2.0.0" +npm-registry-fetch@^3.0.0, npm-registry-fetch@^3.8.0: + version "3.8.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-3.8.0.tgz#aa7d9a7c92aff94f48dba0984bdef4bd131c88cc" + dependencies: + JSONStream "^1.3.4" + bluebird "^3.5.1" + figgy-pudding "^3.4.1" + lru-cache "^4.1.3" + make-fetch-happen "^4.0.1" + npm-package-arg "^6.1.0" + npm-run-all@^4.1.2, npm-run-all@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.3.tgz#49f15b55a66bb4101664ce270cb18e7103f8f185" @@ -10524,10 +11102,6 @@ object-copy@^0.1.0: define-property "^0.2.5" kind-of "^3.0.3" -object-hash@^1.1.2: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-1.3.0.tgz#76d9ba6ff113cf8efc0d996102851fe6723963e2" - object-inspect@^1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" @@ -10848,6 +11422,10 @@ p-map@^1.1.1, p-map@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" +p-pipe@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.2.0.tgz#4b1a11399a11520a67790ee5a0c1d5881d6befe9" + p-reduce@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-reduce/-/p-reduce-1.0.0.tgz#18c2b0dd936a4690a529f8231f58a0fdb6a47dfa" @@ -10881,6 +11459,38 @@ package-json@^4.0.0, package-json@^4.0.1: registry-url "^3.0.3" semver "^5.1.0" +pacote@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.1.0.tgz#59810859bbd72984dcb267269259375d32f391e5" + dependencies: + bluebird "^3.5.1" + cacache "^11.0.2" + figgy-pudding "^3.2.1" + get-stream "^3.0.0" + glob "^7.1.2" + lru-cache "^4.1.3" + make-fetch-happen "^4.0.1" + minimatch "^3.0.4" + minipass "^2.3.3" + mississippi "^3.0.0" + mkdirp "^0.5.1" + normalize-package-data "^2.4.0" + npm-package-arg "^6.1.0" + npm-packlist "^1.1.10" + npm-pick-manifest "^2.1.0" + npm-registry-fetch "^3.0.0" + osenv "^0.1.5" + promise-inflight "^1.0.1" + promise-retry "^1.1.1" + protoduck "^5.0.0" + rimraf "^2.6.2" + safe-buffer "^5.1.2" + semver "^5.5.0" + ssri "^6.0.0" + tar "^4.4.3" + unique-filename "^1.1.0" + which "^1.3.0" + pako@~1.0.5: version "1.0.6" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258" @@ -10948,12 +11558,6 @@ parse-headers@^2.0.0: for-each "^0.3.2" trim "0.0.1" -parse-json@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-3.0.0.tgz#fa6f47b18e23826ead32f263e744d0e1e847fb13" - dependencies: - error-ex "^1.3.1" - parse-json@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" @@ -10967,10 +11571,6 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" -parse-ms@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/parse-ms/-/parse-ms-1.0.1.tgz#56346d4749d78f23430ca0c713850aef91aa361d" - parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -11160,12 +11760,6 @@ pkginfo@0.x.x: version "0.4.1" resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" -plur@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" - dependencies: - irregular-plurals "^1.0.0" - pluralize@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" @@ -11450,117 +12044,6 @@ postcss@^6.0.1: source-map "^0.6.1" supports-color "^5.3.0" -postman-collection-transformer@2.5.4: - version "2.5.4" - resolved "https://registry.yarnpkg.com/postman-collection-transformer/-/postman-collection-transformer-2.5.4.tgz#4e715a9913340621a9fc0e9a5a0373b22e9a9d9a" - dependencies: - commander "2.12.2" - inherits "2.0.3" - intel "1.2.0" - lodash "4.17.4" - semver "5.4.1" - strip-json-comments "2.0.1" - -postman-collection@3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/postman-collection/-/postman-collection-3.0.6.tgz#3bc2307158a783964a473cac82f20d26ffdf5500" - dependencies: - "8fold-marked" "0.3.9" - escape-html "1.0.3" - file-type "3.9.0" - http-reasons "0.1.0" - iconv-lite "0.4.19" - liquid-json "0.3.1" - lodash "4.17.4" - mime-format "2.0.0" - mime-types "2.1.17" - postman-url-encoder "1.0.1" - sanitize-html "1.15.0" - semver "5.4.1" - uuid "3.1.0" - -postman-collection@3.0.7: - version "3.0.7" - resolved "https://registry.yarnpkg.com/postman-collection/-/postman-collection-3.0.7.tgz#699496583ff61443da8a4e0314e58ee6d10442a3" - dependencies: - "8fold-marked" "0.3.9" - escape-html "1.0.3" - file-type "3.9.0" - http-reasons "0.1.0" - iconv-lite "0.4.19" - liquid-json "0.3.1" - lodash "4.17.4" - mime-format "2.0.0" - mime-types "2.1.17" - postman-url-encoder "1.0.1" - sanitize-html "1.15.0" - semver "5.4.1" - uuid "3.1.0" - -postman-request@2.81.1-postman.4: - version "2.81.1-postman.4" - resolved "https://registry.yarnpkg.com/postman-request/-/postman-request-2.81.1-postman.4.tgz#be8f60541539da13739d77b670b9fca6f1aecf83" - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.2.1" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.0" - forever-agent "~0.6.1" - form-data "~2.1.1" - har-validator "~5.0.2" - hawk "~3.1.3" - http-signature "~1.1.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.7" - oauth-sign "~0.8.1" - performance-now "^0.2.0" - postman-url-encoder "1.0.1" - qs "~6.4.0" - safe-buffer "^5.0.1" - stream-length "^1.0.2" - stringstream "~0.0.4" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.0.0" - -postman-runtime@7.1.3: - version "7.1.3" - resolved "https://registry.yarnpkg.com/postman-runtime/-/postman-runtime-7.1.3.tgz#e0c5dfc40dd7d39a2f71519705c97afde35d6f8c" - dependencies: - async "2.6.0" - aws4 "1.6.0" - btoa "1.1.2" - crypto-js "3.1.9-1" - eventemitter3 "3.0.0" - hawk "3.1.3" - http-reasons "0.1.0" - httpntlm "1.7.5" - inherits "2.0.3" - lodash "4.17.4" - node-oauth1 "1.2.2" - postman-collection "3.0.6" - postman-request "2.81.1-postman.4" - postman-sandbox "3.0.4" - resolve-from "4.0.0" - serialised-error "1.1.2" - uuid "3.1.0" - -postman-sandbox@3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/postman-sandbox/-/postman-sandbox-3.0.4.tgz#d011b50d3ec8a8075405d219e1659dbdec354997" - dependencies: - inherits "2.0.3" - lodash "4.17.4" - uuid "3.1.0" - uvm "1.7.0" - -postman-url-encoder@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/postman-url-encoder/-/postman-url-encoder-1.0.1.tgz#a094a42e9415ff0bbfdce0eaa8e6011d449ee83c" - prebuild-install@^2.2.2: version "2.5.3" resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-2.5.3.tgz#9f65f242782d370296353710e9bc843490c19f69" @@ -11625,13 +12108,6 @@ pretty-hrtime@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1" -pretty-ms@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pretty-ms/-/pretty-ms-3.1.0.tgz#e9cac9c76bf6ee52fe942dd9c6c4213153b12881" - dependencies: - parse-ms "^1.0.0" - plur "^2.1.2" - prismjs@^1.15.0: version "1.15.0" resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9" @@ -11669,6 +12145,13 @@ promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" +promise-retry@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/promise-retry/-/promise-retry-1.1.1.tgz#6739e968e3051da20ce6497fb2b50f6911df3d6d" + dependencies: + err-code "^1.0.0" + retry "^0.10.0" + promise-to-callback@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" @@ -11725,14 +12208,16 @@ prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, loose-envify "^1.3.1" object-assign "^4.1.1" -propagate@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/propagate/-/propagate-1.0.0.tgz#00c2daeedda20e87e3782b344adba1cddd6ad709" - proto-list@~1.2.1: version "1.2.4" resolved "http://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" +protoduck@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.0.tgz#752145e6be0ad834cb25716f670a713c860dce70" + dependencies: + genfun "^4.0.1" + proxy-addr@~2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341" @@ -11886,7 +12371,7 @@ q@^1.1.2, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" -qs@6.5.1, qs@^6.5.1, qs@~6.5.1: +qs@6.5.1, qs@~6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" @@ -12820,10 +13305,6 @@ resolve-dir@^1.0.0, resolve-dir@^1.0.1: expand-tilde "^2.0.0" global-modules "^1.0.0" -resolve-from@4.0.0, resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" - resolve-from@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226" @@ -12836,6 +13317,10 @@ resolve-from@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + resolve-options@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/resolve-options/-/resolve-options-1.1.0.tgz#32bb9e39c06d67338dc9378c0d6d6074566ad131" @@ -12890,6 +13375,10 @@ ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" +retry@^0.10.0: + version "0.10.1" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" + retry@^0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.8.0.tgz#2367628dc0edb247b1eab649dc53ac8628ac2d5f" @@ -13022,6 +13511,12 @@ rxjs@^5.5.2: dependencies: symbol-observable "1.0.1" +rxjs@^6.1.0: + version "6.3.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.3.3.tgz#3c6a7fa420e844a81390fb1158a9ec614f4bad55" + dependencies: + tslib "^1.9.0" + safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853" @@ -13059,15 +13554,6 @@ sane@^2.0.0: optionalDependencies: fsevents "^1.2.3" -sanitize-html@1.15.0: - version "1.15.0" - resolved "https://registry.yarnpkg.com/sanitize-html/-/sanitize-html-1.15.0.tgz#d101a62c9fe0347486badc6cd6ed72daa0a82ced" - dependencies: - htmlparser2 "^3.9.0" - lodash.escaperegexp "^4.1.2" - srcset "^1.0.0" - xtend "^4.0.0" - sax@1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a" @@ -13201,7 +13687,7 @@ semver-sort@0.0.4: version "5.5.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" -"semver@2 || 3 || 4 || 5", semver@5.4.1, semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@~5.4.1: +"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@~5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" @@ -13250,14 +13736,6 @@ sequencify@~0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c" -serialised-error@1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/serialised-error/-/serialised-error-1.1.2.tgz#b5c3822196f873feb0c76587e1d6dfa6790ade97" - dependencies: - node-uuid "^1.4.7" - object-hash "^1.1.2" - stack-trace "0.0.9" - serialize-javascript@^1.4.0: version "1.5.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" @@ -13379,14 +13857,6 @@ shell-quote@^1.4.3, shell-quote@^1.6.1: array-reduce "~0.0.0" jsonify "~0.0.0" -shelljs@0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.0.tgz#12f561c52ec5d0d3315af15616c011a18ff80d59" - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shelljs@^0.7.3: version "0.7.8" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" @@ -13487,6 +13957,10 @@ slugify@^1.2.1: version "1.3.1" resolved "https://registry.npmjs.org/slugify/-/slugify-1.3.1.tgz#f572127e8535329fbc6c1edb74ab856b61ad7de2" +smart-buffer@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3" + snake-case@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f" @@ -13550,6 +14024,20 @@ sockjs@0.3.19: faye-websocket "^0.10.0" uuid "^3.0.1" +socks-proxy-agent@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473" + dependencies: + agent-base "~4.2.0" + socks "~2.2.0" + +socks@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.2.1.tgz#68ad678b3642fbc5d99c64c165bc561eab0215f9" + dependencies: + ip "^1.1.5" + smart-buffer "^4.0.1" + solc@0.4.23, solc@^0.4.23: version "0.4.23" resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.23.tgz#54a0ff4015827b32fddb62c0a418b5247310a58e" @@ -13774,13 +14262,6 @@ sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" -srcset@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/srcset/-/srcset-1.0.0.tgz#a5669de12b42f3b1d5e83ed03c71046fc48f41ef" - dependencies: - array-uniq "^1.0.2" - number-is-nan "^1.0.0" - sshpk@^1.7.0: version "1.14.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb" @@ -13807,11 +14288,7 @@ ssri@^6.0.0: dependencies: figgy-pudding "^3.5.1" -stack-trace@0.0.9: - version "0.0.9" - resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.9.tgz#a8f6eaeca90674c333e7c43953f275b451510695" - -stack-trace@0.0.x, stack-trace@~0.0.9: +stack-trace@0.0.x: version "0.0.10" resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" @@ -13884,12 +14361,6 @@ stream-http@^2.7.2: to-arraybuffer "^1.0.0" xtend "^4.0.0" -stream-length@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/stream-length/-/stream-length-1.0.2.tgz#8277f3cbee49a4daabcfdb4e2f4a9b5e9f2c9f00" - dependencies: - bluebird "^2.6.2" - stream-shift@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" @@ -13905,10 +14376,6 @@ stream-to-pull-stream@^1.7.1: looper "^3.0.0" pull-stream "^3.2.3" -strftime@~0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/strftime/-/strftime-0.10.0.tgz#b3f0fa419295202a5a289f6d6be9f4909a617193" - strict-uri-encode@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" @@ -14036,7 +14503,7 @@ strip-indent@^2.0.0: version "2.0.0" resolved "http://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68" -strip-json-comments@2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" @@ -14050,6 +14517,15 @@ strong-log-transformer@^1.0.6: moment "^2.6.0" through "^2.3.4" +strong-log-transformer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.0.0.tgz#fa6d8e0a9e62b3c168c3cad5ae5d00dc97ba26cc" + dependencies: + byline "^5.0.0" + duplexer "^0.1.1" + minimist "^1.2.0" + through "^2.3.4" + style-loader@0.23.x: version "0.23.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.0.tgz#8377fefab68416a2e05f1cabd8c3a3acfcce74f1" @@ -14220,10 +14696,6 @@ symbol-tree@^3.2.2: version "3.2.2" resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -symbol@~0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/symbol/-/symbol-0.3.1.tgz#b6f9a900d496a57f02408f22198c109dda063041" - table@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" @@ -14310,9 +14782,9 @@ tar@^2.0.0, tar@^2.1.1, tar@^2.2.1: fstream "^1.0.2" inherits "2" -tar@^4: +tar@^4, tar@^4.4.3: version "4.4.6" - resolved "https://registry.npmjs.org/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" @@ -14996,10 +15468,6 @@ underscore@~1.4.4: version "1.4.4" resolved "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604" -underscore@~1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.7.0.tgz#6bbaf0877500d36be34ecaa584e0db9fef035209" - unherit@^1.0.4: version "1.1.0" resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.0.tgz#6b9aaedfbf73df1756ad9e316dd981885840cd7d" @@ -15205,10 +15673,6 @@ user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" -utcstring@~0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/utcstring/-/utcstring-0.1.0.tgz#430fd510ab7fc95b5d5910c902d79880c208436b" - utf8@2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.1.tgz#2e01db02f7d8d0944f77104f1609eb0c304cf768" @@ -15253,7 +15717,7 @@ uuid@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" -uuid@3.0.1, uuid@3.0.x, uuid@~3.0.0: +uuid@3.0.x, uuid@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" @@ -15273,15 +15737,6 @@ uuid@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" -uvm@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/uvm/-/uvm-1.7.0.tgz#685d3a149ec7118fb73a73dfdc158ab46b0f0634" - dependencies: - circular-json "0.3.1" - inherits "2.0.3" - lodash "4.17.4" - uuid "3.0.1" - v8-compile-cache@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c" @@ -16054,10 +16509,6 @@ winston@2.1.x: pkginfo "0.3.x" stack-trace "0.0.x" -word-wrap@1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - wordwrap@0.0.2: version "0.0.2" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" @@ -16219,10 +16670,6 @@ xml2js@0.4.19: sax ">=0.6.0" xmlbuilder "~9.0.1" -xmlbuilder@9.0.4: - version "9.0.4" - resolved "https://registry.yarnpkg.com/xmlbuilder/-/xmlbuilder-9.0.4.tgz#519cb4ca686d005a8420d3496f3f0caeecca580f" - xmlbuilder@~9.0.1: version "9.0.7" resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" -- cgit From aa4a474e1dc79ec4da299663b20e56f6cf01518a Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Thu, 18 Oct 2018 23:11:56 +1100 Subject: chore: update ethers import in utils --- packages/utils/src/abi_decoder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts index c0b2c7950..2da46db35 100644 --- a/packages/utils/src/abi_decoder.ts +++ b/packages/utils/src/abi_decoder.ts @@ -9,7 +9,7 @@ import { RawLog, SolidityTypes, } from 'ethereum-types'; -import { ethers } from 'ethers'; +import * as ethers from 'ethers'; import * as _ from 'lodash'; import { addressUtils } from './address_utils'; -- cgit From 745d36813033ed9305361d5d25cc6a4c529d9ced Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 13:50:03 +0100 Subject: Remove old 0x.js from website --- packages/website/package.json | 1 - packages/website/ts/blockchain.ts | 16 +- packages/website/ts/utils/fake_token_registry.ts | 872 +++++++++++++++++++++++ 3 files changed, 877 insertions(+), 12 deletions(-) create mode 100644 packages/website/ts/utils/fake_token_registry.ts diff --git a/packages/website/package.json b/packages/website/package.json index 090d4cd72..2f3b338a8 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -19,7 +19,6 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^0.38.6", "@0x/contract-wrappers": "^2.0.2", "@0x/json-schemas": "^1.0.7", "@0x/order-utils": "^1.0.7", diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts index 4d5213aef..efb5aef23 100644 --- a/packages/website/ts/blockchain.ts +++ b/packages/website/ts/blockchain.ts @@ -1,4 +1,3 @@ -import { ZeroEx } from '0x.js'; import { BlockRange, ContractWrappers, @@ -53,6 +52,7 @@ import { backendClient } from 'ts/utils/backend_client'; import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { errorReporter } from 'ts/utils/error_reporter'; +import { fakeTokenRegistry } from 'ts/utils/fake_token_registry'; import { tokenAddressOverrides } from 'ts/utils/token_address_overrides'; import { utils } from 'ts/utils/utils'; import FilterSubprovider = require('web3-provider-engine/subproviders/filters'); @@ -74,7 +74,6 @@ export class Blockchain { public networkId: number; public nodeVersion: string; private _contractWrappers: ContractWrappers; - private _zeroEx: ZeroEx; private readonly _dispatcher: Dispatcher; private _web3Wrapper?: Web3Wrapper; private _blockchainWatcher?: BlockchainWatcher; @@ -228,8 +227,9 @@ export class Blockchain { } } public async isAddressInTokenRegistryAsync(tokenAddress: string): Promise { - utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.'); - const tokenIfExists = await this._zeroEx.tokenRegistry.getTokenIfExistsAsync(tokenAddress); + const tokens = fakeTokenRegistry[this.networkId]; + const tokenIfExists = _.find(tokens, { address: tokenAddress }); + // HACK: Override token addresses on testnets const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId]; let isTokenAddressInOverrides = false; @@ -768,8 +768,7 @@ export class Blockchain { if (this.networkId === constants.NETWORK_ID_MAINNET) { tokenRegistryTokens = await backendClient.getTokenInfosAsync(); } else { - utils.assert(!_.isUndefined(this._zeroEx), 'ZeroEx must be instantiated.'); - tokenRegistryTokens = await this._zeroEx.tokenRegistry.getTokensAsync(); + tokenRegistryTokens = fakeTokenRegistry[this.networkId]; const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId]; if (!_.isUndefined(tokenAddressOverrides)) { // HACK: Override token addresses on testnets @@ -865,11 +864,6 @@ export class Blockchain { networkId, }; this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig); - if (!_.isUndefined(this._zeroEx)) { - this._zeroEx.setProvider(provider, networkId); - } else { - this._zeroEx = new ZeroEx(provider, { networkId }); - } if (!_.isUndefined(this._blockchainWatcher)) { this._blockchainWatcher.destroy(); } diff --git a/packages/website/ts/utils/fake_token_registry.ts b/packages/website/ts/utils/fake_token_registry.ts new file mode 100644 index 000000000..1cb529102 --- /dev/null +++ b/packages/website/ts/utils/fake_token_registry.ts @@ -0,0 +1,872 @@ +export const fakeTokenRegistry = { + '1': [ + { + address: '0xe41d2489571d322189246dafa5ebde1f4699f498', + name: '0x Protocol Token', + symbol: 'ZRX', + decimals: 18, + }, + { + address: '0x4156d3342d5c385a87d264f90653733592000581', + name: 'Salt', + symbol: 'SALT', + decimals: 8, + }, + { + address: '0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27', + name: 'Zilliqa', + symbol: 'ZIL', + decimals: 12, + }, + { + address: '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a', + name: 'Digix DAO Token', + symbol: 'DGD', + decimals: 9, + }, + { + address: '0xfa05a73ffe78ef8f1a739473e462c54bae6567d9', + name: 'Lunyr', + symbol: 'LUN', + decimals: 18, + }, + { + address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', + name: 'Wrapped Ether', + symbol: 'WETH', + decimals: 18, + }, + { + address: '0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1', + name: 'Melon Token', + symbol: 'MLN', + decimals: 18, + }, + { + address: '0x9a642d6b3368ddc662ca244badf32cda716005bc', + name: 'Qtum', + symbol: 'QTUM', + decimals: 18, + }, + { + address: '0xd26114cd6ee289accf82350c8d8487fedb8a0c07', + name: 'OmiseGO', + symbol: 'OMG', + decimals: 18, + }, + { + address: '0xb97048628db6b661d4c2aa833e95dbe1a905b280', + name: 'TenXPay', + symbol: 'PAY', + decimals: 18, + }, + { + address: '0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0', + name: 'Eos', + symbol: 'EOS', + decimals: 18, + }, + { + address: '0x888666ca69e0f178ded6d75b5726cee99a87d698', + name: 'Iconomi', + symbol: 'ICN', + decimals: 18, + }, + { + address: '0x744d70fdbe2ba4cf95131626614a1763df805b9e', + name: 'StatusNetwork', + symbol: 'SNT', + decimals: 18, + }, + { + address: '0x6810e776880c02933d47db1b9fc05908e5386b96', + name: 'Gnosis', + symbol: 'GNO', + decimals: 18, + }, + { + address: '0x0d8775f648430679a709e98d2b0cb6250d2887ef', + name: 'Basic Attention Token', + symbol: 'BAT', + decimals: 18, + }, + { + address: '0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac', + name: 'Storj', + symbol: 'STORJ', + decimals: 8, + }, + { + address: '0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c', + name: 'Bancor', + symbol: 'BNT', + decimals: 18, + }, + { + address: '0x960b236a07cf122663c4303350609a66a7b288c0', + name: 'Aragon', + symbol: 'ANT', + decimals: 18, + }, + { + address: '0x0abdace70d3790235af448c88547603b945604ea', + name: 'district0x', + symbol: 'DNT', + decimals: 18, + }, + { + address: '0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009', + name: 'SingularDTV', + symbol: 'SNGLS', + decimals: 0, + }, + { + address: '0x419d0d8bdd9af5e606ae2232ed285aff190e711b', + name: 'FunFair', + symbol: 'FUN', + decimals: 8, + }, + { + address: '0xaf30d2a7e90d7dc361c8c4585e9bb7d2f6f15bc7', + name: 'FirstBlood', + symbol: '1ST', + decimals: 18, + }, + { + address: '0x08711d3b02c8758f2fb3ab4e80228418a7f8e39c', + name: 'Edgeless', + symbol: 'EDG', + decimals: 0, + }, + { + address: '0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec', + name: 'Polymath', + symbol: 'POLY', + decimals: 18, + }, + { + address: '0x607f4c5bb672230e8672085532f7e901544a7375', + name: 'iExec', + symbol: 'RLC', + decimals: 9, + }, + { + address: '0x667088b212ce3d06a1b553a7221e1fd19000d9af', + name: 'Wings', + symbol: 'WINGS', + decimals: 18, + }, + { + address: '0x41e5560054824ea6b0732e656e3ad64e20e94e45', + name: 'Civic', + symbol: 'CVC', + decimals: 8, + }, + { + address: '0xb63b606ac810a52cca15e44bb630fd42d8d1d83d', + name: 'Monaco', + symbol: 'MCO', + decimals: 8, + }, + { + address: '0xf433089366899d83a9f26a773d59ec7ecf30355e', + name: 'Metal', + symbol: 'MTL', + decimals: 8, + }, + { + address: '0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e', + name: 'Cofoundit', + symbol: 'CFI', + decimals: 18, + }, + { + address: '0xaaaf91d9b90df800df4f55c205fd6989c977e73a', + name: 'Monolith TKN', + symbol: 'TKN', + decimals: 8, + }, + { + address: '0xe7775a6e9bcf904eb39da2b68c5efb4f9360e08c', + name: 'Token-as-a-Service', + symbol: 'TAAS', + decimals: 6, + }, + { + address: '0x2e071d2966aa7d8decb1005885ba1977d6038a65', + name: 'DICE', + symbol: 'ROL', + decimals: 16, + }, + { + address: '0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b', + name: 'Trustcoin', + symbol: 'TRST', + decimals: 6, + }, + { + address: '0x1776e1f26f98b1a5df9cd347953a26dd3cb46671', + name: 'Numeraire', + symbol: 'NMR', + decimals: 18, + }, + { + address: '0x7c5a0ce9267ed19b22f8cae653f198e3e8daf098', + name: 'Santiment Network Token', + symbol: 'SAN', + decimals: 18, + }, + { + address: '0xdd974d5c2e2928dea5f71b9825b8b646686bd200', + name: 'Kyber Network Crystal', + symbol: 'KNC', + decimals: 18, + }, + { + address: '0xb7cb1c96db6b22b0d3d9536e0108d062bd488f74', + name: 'Walton', + symbol: 'WTC', + decimals: 18, + }, + { + address: '0xd0d6d6c5fe4a677d343cc433536bb717bae167dd', + name: 'adToken', + symbol: 'ADT', + decimals: 9, + }, + { + address: '0x42d6622dece394b54999fbd73d108123806f6a18', + name: 'SpankChain', + symbol: 'SPANK', + decimals: 18, + }, + { + address: '0x701c244b988a513c945973defa05de933b23fe1d', + name: 'openANX', + symbol: 'OAX', + decimals: 18, + }, + { + address: '0x514910771af9ca656af840dff83e8264ecf986ca', + name: 'ChainLink', + symbol: 'LINK', + decimals: 18, + }, + { + address: '0x8f8221afbb33998d8584a2b05749ba73c37a938a', + name: 'Request Network', + symbol: 'REQ', + decimals: 18, + }, + { + address: '0x27054b13b1b798b345b591a4d22e6562d47ea75a', + name: 'AirSwap', + symbol: 'AST', + decimals: 4, + }, + { + address: '0xf0ee6b27b759c9893ce4f094b49ad28fd15a23e4', + name: 'Enigma', + symbol: 'ENG', + decimals: 8, + }, + { + address: '0x818fc6c2ec5986bc6e2cbf00939d90556ab12ce5', + name: 'Kin', + symbol: 'KIN', + decimals: 18, + }, + { + address: '0x27dce1ec4d3f72c3e457cc50354f1f975ddef488', + name: 'AirToken', + symbol: 'AIR', + decimals: 8, + }, + { + address: '0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a', + name: 'Substratum', + symbol: 'SUB', + decimals: 2, + }, + { + address: '0x0e8d6b471e332f140e7d9dbb99e5e3822f728da6', + name: 'ABYSS', + symbol: 'ABYSS', + decimals: 18, + }, + { + address: '0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466', + name: 'AION', + symbol: 'AION', + decimals: 8, + }, + { + address: '0xd8912c10681d8b21fd3742244f44658dba12264e', + name: 'Pluton', + symbol: 'PLU', + decimals: 18, + }, + { + address: '0x1a7a8bd9106f2b8d977e08582dc7d24c723ab0db', + name: 'AppCoins', + symbol: 'APPC', + decimals: 18, + }, + { + address: '0xba5f11b16b155792cf3b2e6880e8706859a8aeb6', + name: 'Aeron', + symbol: 'ARN', + decimals: 8, + }, + { + address: '0xfec0cf7fe078a500abf15f1284958f22049c2c7e', + name: 'Maecenas ART Token', + symbol: 'ART', + decimals: 18, + }, + { + address: '0x0f5d2fb29fb7d3cfee444a200298f468908cc942', + name: 'Decentraland', + symbol: 'MANA', + decimals: 18, + }, + { + address: '0x1c4481750daa5ff521a2a7490d9981ed46465dbd', + name: 'BlockMason Credit Protocol Token', + symbol: 'BCPT', + decimals: 18, + }, + { + address: '0x55296f69f40ea6d20e478533c15a6b08b654e758', + name: 'XY Oracle', + symbol: 'XYO', + decimals: 18, + }, + { + address: '0xd7732e3783b0047aa251928960063f863ad022d8', + name: 'BrahmaOS', + symbol: 'BRM', + decimals: 18, + }, + { + address: '0x7d4b8cce0591c9044a22ee543533b72e976e36c3', + name: 'Change Coin', + symbol: 'CAG', + decimals: 18, + }, + { + address: '0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0', + name: 'CanYaCoin', + symbol: 'CAN', + decimals: 6, + }, + { + address: '0x1234567461d3f8db7496581774bd869c83d51c93', + name: 'BitClave', + symbol: 'CAT', + decimals: 18, + }, + { + address: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359', + name: 'Dai Stablecoin v1.0', + symbol: 'DAI', + decimals: 18, + }, + { + address: '0x0cf0ee63788a0849fe5297f3407f701e122cc023', + name: 'Streamr DATAcoin', + symbol: 'DATA', + decimals: 18, + }, + { + address: '0x151202c9c18e495656f372281f493eb7698961d5', + name: 'DEBITUM', + symbol: 'DEB', + decimals: 18, + }, + { + address: '0xba2184520a1cc49a6159c57e61e1844e085615b6', + name: 'HelloGold Token', + symbol: 'HGT', + decimals: 8, + }, + { + address: '0x13f11c9905a08ca76e3e853be63d4f0944326c72', + name: 'Divi Exchange Token', + symbol: 'DIVX', + decimals: 18, + }, + { + address: '0x5b26c5d0772e5bbac8b3182ae9a13f9bb2d03765', + name: 'EDU Token', + symbol: 'EDU', + decimals: 8, + }, + { + address: '0xd49ff13661451313ca1553fd6954bd1d9b6e02b9', + name: 'ElectrifyAsia', + symbol: 'ELEC', + decimals: 18, + }, + { + address: '0x95daaab98046846bf4b2853e23cba236fa394a31', + name: 'EtheremonToken', + symbol: 'EMONT', + decimals: 8, + }, + { + address: '0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3', + name: 'Hut34 Entropy Token', + symbol: 'ENTR', + decimals: 18, + }, + { + address: '0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c', + name: 'Devery.io', + symbol: 'EVE', + decimals: 18, + }, + { + address: '0xf8e386eda857484f5a12e4b5daa9984e06e73705', + name: 'Indorse Token', + symbol: 'IND', + decimals: 18, + }, + { + address: '0x4f4f0db4de903b88f2b1a2847971e231d54f8fd3', + name: 'Geens Platform Token', + symbol: 'GEE', + decimals: 8, + }, + { + address: '0x543ff227f64aa17ea132bf9886cab5db55dcaddf', + name: 'DAOstack', + symbol: 'GEN', + decimals: 18, + }, + { + address: '0x8a854288a5976036a725879164ca3e91d30c6a1b', + name: 'Guaranteed Entrance Token', + symbol: 'GET', + decimals: 18, + }, + { + address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2', + name: 'Maker', + symbol: 'MKR', + decimals: 18, + }, + { + address: '0x9af839687f6c94542ac5ece2e317daae355493a1', + name: 'Hydro Protocol Token', + symbol: 'HOT', + decimals: 18, + }, + { + address: '0x0d262e5dc4a06a0f1c90ce79c7a60c09dfc884e4', + name: 'JET8 Token', + symbol: 'J8T', + decimals: 8, + }, + { + address: '0x8727c112c712c4a03371ac87a74dd6ab104af768', + name: 'Jetcoin Institute Token', + symbol: 'JET', + decimals: 18, + }, + { + address: '0xa4e8c3ec456107ea67d3075bf9e3df3a75823db0', + name: 'Loom Network Token', + symbol: 'LOOM', + decimals: 18, + }, + { + address: '0x957c30ab0426e0c93cd8241e2c60392d08c6ac8e', + name: 'Modum Token', + symbol: 'MOD', + decimals: 0, + }, + { + address: '0x2ef27bf41236bd859a95209e17a43fbd26851f92', + name: 'MORPH', + symbol: 'MORPH', + decimals: 4, + }, + { + address: '0x263c618480dbe35c300d8d5ecda19bbb986acaed', + name: 'MOT', + symbol: 'MOT', + decimals: 18, + }, + { + address: '0xffe02ee4c69edf1b340fcad64fbd6b37a7b9e265', + name: 'NANJCOIN', + symbol: 'NANJ', + decimals: 8, + }, + { + address: '0xc15a399c4ea7815fe36857c9e290ee452a5d6b21', + name: 'BoatPilot Token', + symbol: 'NAVI', + decimals: 18, + }, + { + address: '0x9e46a38f5daabe8683e10793b06749eef7d733d1', + name: 'PolySwarm Nectar', + symbol: 'NCT', + decimals: 18, + }, + { + address: '0xa54ddc7b3cce7fc8b1e3fa0256d0db80d2c10970', + name: 'NEVERDIE Coin', + symbol: 'NDC', + decimals: 18, + }, + { + address: '0xb62132e35a6c13ee1ee0f84dc5d40bad8d815206', + name: 'Nexo', + symbol: 'NEXO', + decimals: 18, + }, + { + address: '0x0235fe624e044a05eed7a43e16e3083bc8a4287a', + name: 'Original Crypto Coin', + symbol: 'OCC', + decimals: 18, + }, + { + address: '0xb5dbc6d3cf380079df3b27135664b6bcf45d1869', + name: 'Omix', + symbol: 'OMX', + decimals: 8, + }, + { + address: '0xfedae5642668f8636a11987ff386bfd215f942ee', + name: 'PolicyPal Network Token', + symbol: 'PAL', + decimals: 18, + }, + { + address: '0x2604fa406be957e542beb89e6754fcde6815e83f', + name: 'Playkey Token', + symbol: 'PKT', + decimals: 18, + }, + { + address: '0xe477292f1b3268687a29376116b0ed27a9c76170', + name: 'Herocoin', + symbol: 'PLAY', + decimals: 18, + }, + { + address: '0x1985365e9f78359a9b6ad760e32412f4a445e862', + name: 'Augur', + symbol: 'REP', + decimals: 18, + }, + { + address: '0x408e41876cccdc0f92210600ef50372656052a38', + name: 'Republic Protocol', + symbol: 'REN', + decimals: 18, + }, + { + address: '0xd0929d411954c47438dc1d871dd6081f5c5e149c', + name: 'Refereum', + symbol: 'RFR', + decimals: 4, + }, + { + address: '0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244', + name: 'Rivetz', + symbol: 'RVT', + decimals: 18, + }, + { + address: '0x6888a16ea9792c15a4dcf2f6c623d055c8ede792', + name: 'Spectiv Signal Token', + symbol: 'SIG', + decimals: 18, + }, + { + address: '0x20f7a3ddf244dc9299975b4da1c39f8d5d75f05a', + name: 'Sapien Network Token', + symbol: 'SPN', + decimals: 6, + }, + { + address: '0xbbff862d906e348e9946bfb2132ecb157da3d4b4', + name: 'Sharder', + symbol: 'SS', + decimals: 18, + }, + { + address: '0x12b306fa98f4cbb8d4457fdff3a0a0a56f07ccdf', + name: 'Spectre.ai D-Token', + symbol: 'SXDT', + decimals: 18, + }, + { + address: '0xff3519eeeea3e76f1f699ccce5e23ee0bdda41ac', + name: 'Blockchain Capital', + symbol: 'BCAP', + decimals: 0, + }, + { + address: '0xced1a8529125d1bd06b54a7b01210df357d00885', + name: 'Too Real Badge', + symbol: 'TRL', + decimals: 0, + }, + { + address: '0xc86d054809623432210c107af2e3f619dcfbf652', + name: 'SENTINEL PROTOCOL', + symbol: 'UPP', + decimals: 18, + }, + { + address: '0x27f610bf36eca0939093343ac28b1534a721dbb4', + name: 'Wand Token', + symbol: 'WAND', + decimals: 18, + }, + { + address: '0x056017c55ae7ae32d12aef7c679df83a85ca75ff', + name: 'WyvernToken', + symbol: 'WYV', + decimals: 18, + }, + { + address: '0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d', + name: 'Aeternity', + symbol: 'AE', + decimals: 18, + }, + { + address: '0xbc86727e770de68b1060c91f6bb6945c73e10388', + name: 'Ink Protocol', + symbol: 'XNK', + decimals: 18, + }, + { + address: '0x0f513ffb4926ff82d7f60a05069047aca295c413', + name: 'CrowdstartCoin', + symbol: 'XSC', + decimals: 18, + }, + { + address: '0xb9e7f8568e08d5659f5d29c4997173d84cdf2607', + name: 'Swarm City Token', + symbol: 'SWT', + decimals: 18, + }, + { + address: '0x6531f133e6deebe7f2dce5a0441aa7ef330b4e53', + name: 'Chronobank TIME', + symbol: 'TIME', + decimals: 8, + }, + { + address: '0xf230b790e05390fc8295f4d3f60332c93bed42e2', + name: 'Tronix', + symbol: 'TRX', + decimals: 6, + }, + { + address: '0x5c543e7ae0a1104f78406c340e9c64fd9fce5170', + name: 'vSlice', + symbol: 'VSL', + decimals: 0, + }, + { + address: '0x4df812f6064def1e5e029f1ca858777cc98d2d81', + name: 'Xaurum', + symbol: 'XAUR', + decimals: 8, + }, + ], + '42': [ + { + address: '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570', + name: '0x Protocol Token', + symbol: 'ZRX', + decimals: 18, + }, + { + address: '0x323b5d4c32345ced77393b3530b1eed0f346429d', + name: 'Melon Token', + symbol: 'MLN', + decimals: 18, + }, + { + address: '0x1dad4783cf3fe3085c1426157ab175a6119a04ba', + name: 'Maker DAO', + symbol: 'MKR', + decimals: 18, + }, + { + address: '0xeee3870657e4716670f185df08652dd848fe8f7e', + name: 'Digix DAO Token', + symbol: 'DGD', + decimals: 18, + }, + { + address: '0xb18845c260f680d5b9d84649638813e342e4f8c9', + name: 'Augur Reputation Token', + symbol: 'REP', + decimals: 18, + }, + { + address: '0xef7fff64389b814a946f3e92105513705ca6b990', + name: 'Golem Network Token', + symbol: 'GNT', + decimals: 18, + }, + { + address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c', + name: 'Wrapped Ether', + symbol: 'WETH', + decimals: 18, + }, + ], + '3': [ + { + address: '0xdf18648f5b4357d6cc1e27f7699af4f77ff44558', + name: 'token0', + symbol: 'TKN0', + decimals: 0, + }, + { + address: '0xd7cdcde4302a60c4d74a11eee21fbf455f476021', + name: 'token1', + symbol: 'TKN1', + decimals: 1, + }, + { + address: '0xf080f68c2113d40ff6a8528863f431908680900a', + name: 'token2', + symbol: 'TKN2', + decimals: 2, + }, + { + address: '0xe982b5c62434c98e27d15fed40447dda6b75c4eb', + name: 'token3', + symbol: 'TKN3', + decimals: 3, + }, + { + address: '0x2427d136751c1ca70480d3b2091261d639090a50', + name: 'token4', + symbol: 'TKN4', + decimals: 4, + }, + { + address: '0x7d3eca8ec55bb32bd0056edb9485b07a53d3fbfd', + name: 'token5', + symbol: 'TKN5', + decimals: 5, + }, + { + address: '0xff3c22e0a9014e9b4b1cf7a54bf39ab3107f6123', + name: 'token6', + symbol: 'TKN6', + decimals: 6, + }, + { + address: '0xdec283d9e188397c841ab59d9d9160fd47bc56f8', + name: 'token7', + symbol: 'TKN7', + decimals: 7, + }, + { + address: '0xedf5fd2f60d8fefbfa8011f2769b39657c54c3fd', + name: 'token8', + symbol: 'TKN8', + decimals: 8, + }, + { + address: '0xcd59fe7fa1a1a0ff536966a599b631d9cd5f2914', + name: 'token9', + symbol: 'TKN9', + decimals: 9, + }, + { + address: '0xaece1ee1813d56a5897f19ad50164565203b459f', + name: 'token10', + symbol: 'TKN10', + decimals: 10, + }, + { + address: '0xaab3f0619e529b1f1823be291daa7fcd38a15927', + name: 'token11', + symbol: 'TKN11', + decimals: 11, + }, + { + address: '0x2c46ad0b19cb1c1f3e51ae90d80654a227b08d30', + name: 'token12', + symbol: 'TKN12', + decimals: 12, + }, + { + address: '0x68977f3286a503f2b3930506f1b3a17dafbd9524', + name: 'token13', + symbol: 'TKN13', + decimals: 13, + }, + { + address: '0xe5c400b9ee56b823c6193a662041389624609db6', + name: 'token14', + symbol: 'TKN14', + decimals: 14, + }, + { + address: '0xf16ea9b23ddbeb6b16d253edf6b595da4009bb8b', + name: 'token16', + symbol: 'TKN16', + decimals: 16, + }, + { + address: '0x739a83860971e900c4bbbb92be6cfb9d459ef94a', + name: 'token15', + symbol: 'TKN15', + decimals: 15, + }, + { + address: '0x5eba21470cf683fe91b594afe7106039e38f3312', + name: 'token17', + symbol: 'TKN17', + decimals: 17, + }, + { + address: '0xc0ddd5df448907bb3f50350f3fe7a1da3fb2a2ee', + name: 'token18', + symbol: 'TKN18', + decimals: 18, + }, + { + address: '0x30fa25e53f8031014166fbd5e4bbeac0cd25df74', + name: 'token19', + symbol: 'TKN19', + decimals: 19, + }, + { + address: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d', + name: '0x Protocol Token', + symbol: 'ZRX', + decimals: 18, + }, + { + address: '0xc778417e063141139fce010982780140aa0cd5ab', + name: 'Ether Token', + symbol: 'WETH', + decimals: 18, + }, + { + address: '0x14823db576c11e4a54ca9e01ca0b28b18d3d1187', + name: 'b0x Protocol Token', + symbol: 'B0X', + decimals: 18, + }, + ], +}; // tslint:disable:max-file-line-count -- cgit From 4bf50a04961ff0e44298d9e353f1b395a3f55990 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 13:59:21 +0100 Subject: update outdated package and tsconfig issue --- packages/react-shared/package.json | 2 +- tsconfig.json | 2 +- yarn.lock | 371 ++++--------------------------------- 3 files changed, 35 insertions(+), 340 deletions(-) diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index fc16dca3e..b19717079 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -33,7 +33,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/types": "^1.1.2", + "@0xproject/types": "^1.1.4", "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", diff --git a/tsconfig.json b/tsconfig.json index 2bed48649..bbcb0a6d2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "noImplicitReturns": true, "pretty": true, "skipLibCheck": true, - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], "strict": true, // These settings are required for TypeScript project references "composite": true, diff --git a/yarn.lock b/yarn.lock index 8251fa262..bd63bbb46 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,23 +2,6 @@ # yarn lockfile v1 -"0x.js@^0.38.6": - version "0.38.6" - resolved "https://registry.yarnpkg.com/0x.js/-/0x.js-0.38.6.tgz#f6cb2b6ef9aea2ff7696c923095e0b794c1d84fc" - dependencies: - "@0xproject/assert" "^0.2.14" - "@0xproject/base-contract" "^0.3.6" - "@0xproject/contract-wrappers" "^0.1.1" - "@0xproject/order-utils" "^0.0.9" - "@0xproject/order-watcher" "^0.0.8" - "@0xproject/sol-compiler" "^0.5.4" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - ethers "3.0.22" - lodash "4.17.10" - "@0x-lerna-fork/add@^3.0.0-beta.22": version "3.0.0-beta.22" resolved "https://registry.yarnpkg.com/@0x-lerna-fork/add/-/add-3.0.0-beta.22.tgz#b69d7cbf6a28af6abb3aabb47fb617e7c6c7ac2c" @@ -489,157 +472,13 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" -"@0xproject/assert@^0.2.14": - version "0.2.14" - resolved "https://registry.yarnpkg.com/@0xproject/assert/-/assert-0.2.14.tgz#7d5a373fedc8eb482716b730f4dddf3ef33bfa29" - dependencies: - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - lodash "4.17.10" - valid-url "1.0.9" - -"@0xproject/base-contract@^0.3.6": - version "0.3.6" - resolved "https://registry.yarnpkg.com/@0xproject/base-contract/-/base-contract-0.3.6.tgz#c6d742ce2904bdd9e77524d99ba2438d3aae8a40" - dependencies: - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - ethers "3.0.22" - lodash "4.17.10" - -"@0xproject/contract-wrappers@^0.1.1": - version "0.1.1" - resolved "https://registry.yarnpkg.com/@0xproject/contract-wrappers/-/contract-wrappers-0.1.1.tgz#8108d7ec051f202ef0cfa77c91c4ef994bf89881" - dependencies: - "@0xproject/assert" "^0.2.14" - "@0xproject/base-contract" "^0.3.6" - "@0xproject/fill-scenarios" "^0.0.6" - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/order-utils" "^0.0.9" - "@0xproject/sol-compiler" "^0.5.4" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - ethereumjs-blockstream "5.0.0" - ethereumjs-util "5.1.5" - ethers "3.0.22" - js-sha3 "0.7.0" - lodash "4.17.10" - uuid "3.2.1" - -"@0xproject/fill-scenarios@^0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@0xproject/fill-scenarios/-/fill-scenarios-0.0.6.tgz#969a2c49122650af5a1bf7fe7c6d286a0e6f2de2" - dependencies: - "@0xproject/base-contract" "^0.3.6" - "@0xproject/order-utils" "^0.0.9" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - ethers "3.0.22" - lodash "4.17.10" - -"@0xproject/json-schemas@^0.8.3": - version "0.8.3" - resolved "https://registry.yarnpkg.com/@0xproject/json-schemas/-/json-schemas-0.8.3.tgz#455e6219a6bd05e990392165192a983a9ab89f26" - dependencies: - "@0xproject/typescript-typings" "^0.4.3" - "@types/node" "9.6.0" - jsonschema "1.2.2" - lodash.values "4.3.0" - "@0xproject/npm-cli-login@^0.0.11": version "0.0.11" resolved "https://registry.yarnpkg.com/@0xproject/npm-cli-login/-/npm-cli-login-0.0.11.tgz#3f1ec06112ce62aad300ff0575358f68aeecde2e" dependencies: npm-registry-client "7.0.9" -"@0xproject/order-utils@^0.0.9": - version "0.0.9" - resolved "https://registry.yarnpkg.com/@0xproject/order-utils/-/order-utils-0.0.9.tgz#75225dfbd87335d18810abf995d8e077b9a84868" - dependencies: - "@0xproject/assert" "^0.2.14" - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - "@types/node" "9.6.0" - bn.js "4.11.7" - ethereumjs-abi "0.6.5" - ethereumjs-util "5.1.5" - lodash "4.17.10" - -"@0xproject/order-watcher@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@0xproject/order-watcher/-/order-watcher-0.0.8.tgz#cfba4c39ca8c5d39e076276479383d0aae022c6d" - dependencies: - "@0xproject/assert" "^0.2.14" - "@0xproject/base-contract" "^0.3.6" - "@0xproject/contract-wrappers" "^0.1.1" - "@0xproject/fill-scenarios" "^0.0.6" - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/order-utils" "^0.0.9" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - bintrees "1.0.2" - ethereum-types "^0.0.2" - ethereumjs-blockstream "5.0.0" - ethers "3.0.22" - lodash "4.17.10" - -"@0xproject/sol-compiler@^0.5.4": - version "0.5.4" - resolved "https://registry.yarnpkg.com/@0xproject/sol-compiler/-/sol-compiler-0.5.4.tgz#3e0b04b0c02c5ec046ebb962b5ed20978c6b4cdd" - dependencies: - "@0xproject/json-schemas" "^0.8.3" - "@0xproject/sol-resolver" "^0.0.8" - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - "@0xproject/web3-wrapper" "^0.7.3" - "@types/yargs" "10.0.2" - chalk "2.3.2" - ethereumjs-util "5.1.5" - isomorphic-fetch "2.2.1" - lodash "4.17.10" - mkdirp "0.5.1" - require-from-string "2.0.1" - semver "5.5.0" - solc "0.4.23" - web3 "0.20.6" - web3-eth-abi "1.0.0-beta.33" - yargs "11.1.0" - -"@0xproject/sol-resolver@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@0xproject/sol-resolver/-/sol-resolver-0.0.8.tgz#5496ccebc9afa9eedfb5b62104f6478aa852bf66" - dependencies: - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.0.3" - lodash "4.17.10" - -"@0xproject/types@^0.5.0": - version "0.5.0" - resolved "http://registry.npmjs.org/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05" - dependencies: - bignumber.js "~4.1.0" - -"@0xproject/types@^0.8.2": - version "0.8.2" - resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.8.2.tgz#6f936b73bfb6f017b5102002d97da0881da92d1b" - dependencies: - "@types/node" "9.6.0" - bignumber.js "~4.1.0" - -"@0xproject/types@^1.1.2": +"@0xproject/types@^1.1.4": version "1.1.4" resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-1.1.4.tgz#3ffd65e670d6a21dab19ee0ffd5fad0056291b8e" dependencies: @@ -647,46 +486,6 @@ bignumber.js "~4.1.0" ethereum-types "^1.0.11" -"@0xproject/typescript-typings@^0.0.3": - version "0.0.3" - resolved "http://registry.npmjs.org/@0xproject/typescript-typings/-/typescript-typings-0.0.3.tgz#3272080bde00ade0a970b0d236686b483b08a1d0" - dependencies: - "@0xproject/types" "^0.5.0" - bignumber.js "~4.1.0" - -"@0xproject/typescript-typings@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@0xproject/typescript-typings/-/typescript-typings-0.4.3.tgz#f99f939a43f2764ad7182fcd78a71212a1d76d96" - dependencies: - "@0xproject/types" "^0.8.2" - bignumber.js "~4.1.0" - ethereum-types "^0.0.2" - -"@0xproject/utils@^0.7.3": - version "0.7.3" - resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.7.3.tgz#ffa7c6da9bf0dd3e13694f185dcfc48a8981ff05" - dependencies: - "@0xproject/typescript-typings" "^0.4.3" - "@types/node" "9.6.0" - bignumber.js "~4.1.0" - ethereum-types "^0.0.2" - ethereumjs-util "^5.1.1" - ethers "3.0.22" - js-sha3 "0.7.0" - lodash "4.17.10" - web3 "0.20.6" - -"@0xproject/web3-wrapper@^0.7.3": - version "0.7.3" - resolved "https://registry.yarnpkg.com/@0xproject/web3-wrapper/-/web3-wrapper-0.7.3.tgz#9bd50b034b92fd505b6766b6e225f014b6d08b08" - dependencies: - "@0xproject/types" "^0.8.2" - "@0xproject/typescript-typings" "^0.4.3" - "@0xproject/utils" "^0.7.3" - ethers "3.0.22" - lodash "4.17.10" - web3 "0.20.6" - "@babel/code-frame@^7.0.0-beta.35": version "7.0.0" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" @@ -1585,10 +1384,6 @@ version "9.6.5" resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d" -"@types/node@9.6.0": - version "9.6.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.0.tgz#d3480ee666df9784b1001a1872a2f6ccefb6c2d7" - "@types/node@^10.3.2": version "10.9.4" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897" @@ -1597,10 +1392,6 @@ version "10.5.7" resolved "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz#960d9feb3ade2233bcc9843c918d740b4f78a7cf" -"@types/node@^8.0.53": - version "8.10.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.8.tgz#794cba23cc9f8d9715f6543fa8827433b5f5cd3b" - "@types/numeral@^0.0.22": version "0.0.22" resolved "https://registry.yarnpkg.com/@types/numeral/-/numeral-0.0.22.tgz#86bef1f0a2d743afdc2ef3168d45f2905e1a0b93" @@ -1800,7 +1591,7 @@ "@types/events" "*" "@types/node" "*" -"@types/yargs@10.0.2", "@types/yargs@^10.0.0": +"@types/yargs@^10.0.0": version "10.0.2" resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-10.0.2.tgz#cc4ea921877874d1261e2c44b89807bc836e1b12" @@ -3176,7 +2967,7 @@ bindings@^1.2.1, bindings@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7" -bintrees@1.0.2, bintrees@^1.0.2: +bintrees@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8" @@ -3814,14 +3605,6 @@ chain-function@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc" -chalk@2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.2.tgz#250dc96b07491bfd601e648d66ddf5f60c7a5c65" - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -5944,13 +5727,6 @@ ethereum-common@^0.0.18: version "0.0.18" resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" -ethereum-types@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-0.0.2.tgz#6ef6faf46a24697cbf66b6c8a0ecf2095ce58c38" - dependencies: - "@types/node" "^8.0.53" - bignumber.js "~4.1.0" - ethereumjs-abi@0.6.5, ethereumjs-abi@^0.6.5: version "0.6.5" resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" @@ -5992,14 +5768,6 @@ ethereumjs-block@~1.2.2: ethereumjs-util "^4.0.1" merkle-patricia-tree "^2.1.2" -ethereumjs-blockstream@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ethereumjs-blockstream/-/ethereumjs-blockstream-5.0.0.tgz#63bfe9185757329a32822d5815562eb1dcd75d71" - dependencies: - immutable "3.8.2" - source-map-support "0.5.6" - uuid "3.2.1" - ethereumjs-blockstream@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/ethereumjs-blockstream/-/ethereumjs-blockstream-6.0.0.tgz#79d726d1f358935eb65195e91d40344c31e87eff" @@ -6022,7 +5790,17 @@ ethereumjs-tx@^1.0.0, ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@ ethereum-common "^0.0.18" ethereumjs-util "^5.0.0" -ethereumjs-util@5.1.5, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5: +ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" + dependencies: + bn.js "^4.8.0" + create-hash "^1.1.2" + keccakjs "^0.2.0" + rlp "^2.0.0" + secp256k1 "^3.0.1" + +ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5: version "5.1.5" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.1.5.tgz#2f02575852627d45622426f25ee4a0b5f377f27a" dependencies: @@ -6034,16 +5812,6 @@ ethereumjs-util@5.1.5, ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumj safe-buffer "^5.1.1" secp256k1 "^3.0.1" -ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumjs-util@^4.4.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.0.tgz#3e9428b317eebda3d7260d854fddda954b1f1bc6" - dependencies: - bn.js "^4.8.0" - create-hash "^1.1.2" - keccakjs "^0.2.0" - rlp "^2.0.0" - secp256k1 "^3.0.1" - ethereumjs-util@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz#3e0c0d1741471acf1036052d048623dee54ad642" @@ -6100,21 +5868,6 @@ ethereumjs-wallet@0.6.0: utf8 "^2.1.1" uuid "^2.0.1" -ethers@3.0.22: - version "3.0.22" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-3.0.22.tgz#7fab1ea16521705837aa43c15831877b2716b436" - dependencies: - aes-js "3.0.0" - bn.js "^4.4.0" - elliptic "6.3.3" - hash.js "^1.0.0" - inherits "2.0.1" - js-sha3 "0.5.7" - scrypt-js "2.0.3" - setimmediate "1.0.4" - uuid "2.0.1" - xmlhttprequest "1.8.0" - ethers@~4.0.4: version "4.0.4" resolved "https://registry.yarnpkg.com/ethers/-/ethers-4.0.4.tgz#d3f85e8b27f4b59537e06526439b0fb15b44dc65" @@ -9011,14 +8764,14 @@ js-sha3@0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" -js-sha3@0.7.0, js-sha3@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.7.0.tgz#0a5c57b36f79882573b2d84051f8bb85dd1bd63a" - js-sha3@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.3.1.tgz#86122802142f0828502a0d1dee1d95e253bb0243" +js-sha3@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.7.0.tgz#0a5c57b36f79882573b2d84051f8bb85dd1bd63a" + js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -9198,10 +8951,6 @@ jsonschema@*, jsonschema@1.2.4, jsonschema@^1.2.0: version "1.2.4" resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.4.tgz#a46bac5d3506a254465bc548876e267c6d0d6464" -jsonschema@1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.2.tgz#83ab9c63d65bf4d596f91d81195e78772f6452bc" - jsprim@^1.2.2: version "1.4.1" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" @@ -9865,7 +9614,7 @@ lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash.values@4.3.0, lodash.values@^4.3.0: +lodash.values@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347" @@ -9875,10 +9624,6 @@ lodash.words@^3.0.0: dependencies: lodash._root "^3.0.0" -lodash@4.17.10, lodash@^4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - lodash@=4.17.4: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -9895,6 +9640,10 @@ lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lo version "4.17.5" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511" +lodash@^4.17.10: + version "4.17.10" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" + lodash@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551" @@ -13261,10 +13010,6 @@ require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" -require-from-string@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.1.tgz#c545233e9d7da6616e9d59adfb39fc9f588676ff" - require-from-string@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" @@ -13594,10 +13339,6 @@ scrypt-async@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/scrypt-async/-/scrypt-async-1.3.1.tgz#a11fd6fac981b4b823ee01dee0221169500ddae9" -scrypt-js@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.3.tgz#bb0040be03043da9a012a2cea9fc9f852cfc87d4" - scrypt-js@2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" @@ -14038,9 +13779,9 @@ socks@~2.2.0: ip "^1.1.5" smart-buffer "^4.0.1" -solc@0.4.23, solc@^0.4.23: - version "0.4.23" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.23.tgz#54a0ff4015827b32fddb62c0a418b5247310a58e" +solc@0.4.24, solc@^0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.24.tgz#354f14b269b38cbaa82a47d1ff151723502b954e" dependencies: fs-extra "^0.30.0" memorystream "^0.3.1" @@ -14048,9 +13789,9 @@ solc@0.4.23, solc@^0.4.23: semver "^5.3.0" yargs "^4.7.1" -solc@0.4.24, solc@^0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.24.tgz#354f14b269b38cbaa82a47d1ff151723502b954e" +solc@^0.4.2: + version "0.4.21" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.21.tgz#6a7ecd505bfa0fc268330d5de6b9ae65c8c68264" dependencies: fs-extra "^0.30.0" memorystream "^0.3.1" @@ -14058,9 +13799,9 @@ solc@0.4.24, solc@^0.4.24: semver "^5.3.0" yargs "^4.7.1" -solc@^0.4.2: - version "0.4.21" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.21.tgz#6a7ecd505bfa0fc268330d5de6b9ae65c8c68264" +solc@^0.4.23: + version "0.4.23" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.23.tgz#54a0ff4015827b32fddb62c0a418b5247310a58e" dependencies: fs-extra "^0.30.0" memorystream "^0.3.1" @@ -15747,7 +15488,7 @@ v8flags@^2.0.2: dependencies: user-home "^1.1.1" -valid-url@1.0.9, valid-url@^1.0.9: +valid-url@^1.0.9: version "1.0.9" resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200" @@ -15953,14 +15694,6 @@ web3-bzz@1.0.0-beta.34: swarm-js "0.1.37" underscore "1.8.3" -web3-core-helpers@1.0.0-beta.33: - version "1.0.0-beta.33" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.33.tgz#2af733e504db05e7c3648c1dacf577b0ec15dc43" - dependencies: - underscore "1.8.3" - web3-eth-iban "1.0.0-beta.33" - web3-utils "1.0.0-beta.33" - web3-core-helpers@1.0.0-beta.34: version "1.0.0-beta.34" resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.0.0-beta.34.tgz#b168da00d3e19e156bc15ae203203dd4dfee2d03" @@ -16013,15 +15746,6 @@ web3-core@1.0.0-beta.34: web3-core-requestmanager "1.0.0-beta.34" web3-utils "1.0.0-beta.34" -web3-eth-abi@1.0.0-beta.33: - version "1.0.0-beta.33" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.33.tgz#2221f7151643660032a4df340f612349168c824a" - dependencies: - bn.js "4.11.6" - underscore "1.8.3" - web3-core-helpers "1.0.0-beta.33" - web3-utils "1.0.0-beta.33" - web3-eth-abi@1.0.0-beta.34, web3-eth-abi@^1.0.0-beta.24: version "1.0.0-beta.34" resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.0.0-beta.34.tgz#034533e3aa2f7e59ff31793eaea685c0ed5af67a" @@ -16059,13 +15783,6 @@ web3-eth-contract@1.0.0-beta.34: web3-eth-abi "1.0.0-beta.34" web3-utils "1.0.0-beta.34" -web3-eth-iban@1.0.0-beta.33: - version "1.0.0-beta.33" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.33.tgz#1d73d0c5288a4565b1754a75b5fb3ea0b77a532f" - dependencies: - bn.js "4.11.6" - web3-utils "1.0.0-beta.33" - web3-eth-iban@1.0.0-beta.34: version "1.0.0-beta.34" resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.0.0-beta.34.tgz#9af458605867ccf74ea979aaf326b38ba6a5ba0c" @@ -16196,18 +15913,6 @@ web3-typescript-typings@^0.10.2: dependencies: bignumber.js "~4.1.0" -web3-utils@1.0.0-beta.33: - version "1.0.0-beta.33" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.33.tgz#e091b7994f09b714b0198a4057d3ad2eb8cbe238" - dependencies: - bn.js "4.11.6" - eth-lib "0.1.27" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randomhex "0.1.5" - underscore "1.8.3" - utf8 "2.1.1" - web3-utils@1.0.0-beta.34: version "1.0.0-beta.34" resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.34.tgz#9411fc39aaef39ca4e06169f762297d9ff020970" @@ -16230,16 +15935,6 @@ web3@0.20.2: xhr2 "*" xmlhttprequest "*" -web3@0.20.6: - version "0.20.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-0.20.6.tgz#3e97306ae024fb24e10a3d75c884302562215120" - dependencies: - bignumber.js "git+https://github.com/frozeman/bignumber.js-nolookahead.git" - crypto-js "^3.1.4" - utf8 "^2.1.1" - xhr2 "*" - xmlhttprequest "*" - web3@^0.18.0: version "0.18.4" resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d" -- cgit From 8c6de7f69dc1d2bc543456782c5e70e105026301 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 13:59:40 +0100 Subject: chore: replace @0xproject with @0x in .tsx files --- packages/instant/src/components/amount_input.tsx | 2 +- .../instant/src/components/asset_amount_input.tsx | 2 +- packages/instant/src/components/buy_button.tsx | 2 +- packages/instant/src/components/order_details.tsx | 4 ++-- packages/react-docs/src/components/badge.tsx | 2 +- packages/react-docs/src/components/custom_enum.tsx | 4 ++-- .../react-docs/src/components/doc_reference.tsx | 4 ++-- .../react-docs/src/components/event_definition.tsx | 4 ++-- packages/react-docs/src/components/interface.tsx | 2 +- .../react-docs/src/components/property_block.tsx | 4 ++-- packages/react-docs/src/components/signature.tsx | 2 +- .../src/components/nested_sidebar_menu.tsx | 2 +- .../components/dialogs/blockchain_err_dialog.tsx | 2 +- .../dialogs/eth_weth_conversion_dialog.tsx | 4 ++-- .../ts/components/dialogs/ledger_config_dialog.tsx | 6 ++--- .../dialogs/portal_disclaimer_dialog.tsx | 2 +- .../website/ts/components/dialogs/send_dialog.tsx | 2 +- .../dialogs/u2f_not_supported_dialog.tsx | 2 +- .../ts/components/documentation/docs_logo.tsx | 2 +- .../ts/components/documentation/docs_top_bar.tsx | 2 +- .../components/documentation/overview_content.tsx | 4 ++-- .../ts/components/documentation/sidebar_header.tsx | 2 +- .../components/documentation/tutorial_button.tsx | 2 +- .../components/documentation/version_drop_down.tsx | 2 +- .../components/dropdowns/developers_drop_down.tsx | 2 +- .../ts/components/dropdowns/network_drop_down.tsx | 2 +- .../ts/components/eth_weth_conversion_button.tsx | 4 ++-- packages/website/ts/components/eth_wrappers.tsx | 6 ++--- packages/website/ts/components/fill_order_json.tsx | 4 ++-- .../website/ts/components/fill_warning_dialog.tsx | 2 +- .../flash_messages/asset_send_completed.tsx | 6 ++--- .../flash_messages/transaction_submitted.tsx | 2 +- .../website/ts/components/forms/subscribe_form.tsx | 2 +- .../generate_order/generate_order_form.tsx | 8 +++---- .../components/generate_order/new_token_form.tsx | 2 +- .../website/ts/components/inputs/address_input.tsx | 4 ++-- .../components/inputs/allowance_state_toggle.tsx | 4 ++-- .../ts/components/inputs/balance_bounded_input.tsx | 4 ++-- .../ts/components/inputs/eth_amount_input.tsx | 4 ++-- .../ts/components/inputs/expiration_input.tsx | 2 +- .../website/ts/components/inputs/hash_input.tsx | 6 ++--- .../website/ts/components/inputs/token_input.tsx | 2 +- .../onboarding/add_eth_onboarding_step.tsx | 2 +- .../onboarding/install_wallet_onboarding_step.tsx | 2 +- .../ts/components/onboarding/onboarding_card.tsx | 2 +- .../onboarding/portal_onboarding_flow.tsx | 2 +- .../onboarding/wrap_eth_onboarding_step.tsx | 4 ++-- packages/website/ts/components/order_json.tsx | 2 +- packages/website/ts/components/portal/portal.tsx | 4 ++-- .../website/ts/components/portal/text_header.tsx | 2 +- .../relayer_index/relayer_top_tokens.tsx | 2 +- packages/website/ts/components/send_button.tsx | 2 +- packages/website/ts/components/token_balances.tsx | 6 ++--- .../ts/components/top_bar/provider_display.tsx | 2 +- .../ts/components/track_token_confirmation.tsx | 2 +- .../trade_history/trade_history_item.tsx | 6 ++--- packages/website/ts/components/ui/alert.tsx | 2 +- .../ts/components/ui/allowance_state_view.tsx | 2 +- packages/website/ts/components/ui/balance.tsx | 2 +- packages/website/ts/components/ui/copy_icon.tsx | 2 +- .../website/ts/components/ui/custom_menu_item.tsx | 2 +- .../website/ts/components/ui/ethereum_address.tsx | 2 +- .../website/ts/components/ui/etherscan_icon.tsx | 2 +- .../website/ts/components/ui/fake_text_field.tsx | 2 +- packages/website/ts/components/ui/icon_button.tsx | 2 +- packages/website/ts/components/ui/input.tsx | 2 +- packages/website/ts/components/ui/input_label.tsx | 2 +- .../ts/components/ui/lifecycle_raised_button.tsx | 4 ++-- packages/website/ts/components/ui/party.tsx | 2 +- packages/website/ts/components/ui/pointer.tsx | 2 +- .../website/ts/components/ui/required_label.tsx | 2 +- packages/website/ts/components/ui/simple_menu.tsx | 2 +- packages/website/ts/components/ui/spinner.tsx | 2 +- packages/website/ts/components/ui/swap_icon.tsx | 2 +- packages/website/ts/components/visual_order.tsx | 2 +- packages/website/ts/components/wallet/wallet.tsx | 4 ++-- .../ts/components/wallet/wrap_ether_item.tsx | 6 ++--- .../ts/local_storage/trade_history_storage.tsx | 2 +- packages/website/ts/pages/about/profile.tsx | 2 +- .../ts/pages/documentation/developers_page.tsx | 2 +- .../website/ts/pages/documentation/docs_home.tsx | 26 +++++++++++----------- packages/website/ts/pages/faq/faq.tsx | 2 +- packages/website/ts/pages/faq/question.tsx | 2 +- packages/website/ts/pages/fullscreen_message.tsx | 2 +- packages/website/ts/pages/jobs/jobs.tsx | 2 +- packages/website/ts/pages/jobs/join_0x.tsx | 2 +- 86 files changed, 132 insertions(+), 132 deletions(-) diff --git a/packages/instant/src/components/amount_input.tsx b/packages/instant/src/components/amount_input.tsx index 7644f5f67..c89fb05ad 100644 --- a/packages/instant/src/components/amount_input.tsx +++ b/packages/instant/src/components/amount_input.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/instant/src/components/asset_amount_input.tsx b/packages/instant/src/components/asset_amount_input.tsx index db3dbe7f3..730e6396f 100644 --- a/packages/instant/src/components/asset_amount_input.tsx +++ b/packages/instant/src/components/asset_amount_input.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx index 0706817c9..d2a8bd07a 100644 --- a/packages/instant/src/components/buy_button.tsx +++ b/packages/instant/src/components/buy_button.tsx @@ -1,4 +1,4 @@ -import { BuyQuote } from '@0xproject/asset-buyer'; +import { BuyQuote } from '@0x/asset-buyer'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx index a15ff411b..ad4a87714 100644 --- a/packages/instant/src/components/order_details.tsx +++ b/packages/instant/src/components/order_details.tsx @@ -1,5 +1,5 @@ -import { BuyQuoteInfo } from '@0xproject/asset-buyer'; -import { BigNumber } from '@0xproject/utils'; +import { BuyQuoteInfo } from '@0x/asset-buyer'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { oc } from 'ts-optchain'; diff --git a/packages/react-docs/src/components/badge.tsx b/packages/react-docs/src/components/badge.tsx index d34f8a0fc..e3d5be273 100644 --- a/packages/react-docs/src/components/badge.tsx +++ b/packages/react-docs/src/components/badge.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as React from 'react'; const styles: Styles = { diff --git a/packages/react-docs/src/components/custom_enum.tsx b/packages/react-docs/src/components/custom_enum.tsx index fa7c43146..e971a012a 100644 --- a/packages/react-docs/src/components/custom_enum.tsx +++ b/packages/react-docs/src/components/custom_enum.tsx @@ -1,8 +1,8 @@ -import { logUtils } from '@0xproject/utils'; +import { logUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; -import { CustomType } from '@0xproject/types'; +import { CustomType } from '@0x/types'; const STRING_ENUM_CODE_PREFIX = ' strEnum('; diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx index 5fdcdd2d9..00b1286a4 100644 --- a/packages/react-docs/src/components/doc_reference.tsx +++ b/packages/react-docs/src/components/doc_reference.tsx @@ -8,7 +8,7 @@ import { Networks, SectionHeader, utils as sharedUtils, -} from '@0xproject/react-shared'; +} from '@0x/react-shared'; import { DocAgnosticFormat, Event, @@ -18,7 +18,7 @@ import { TypeDefinitionByName, TypescriptFunction, TypescriptMethod, -} from '@0xproject/types'; +} from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; import * as semver from 'semver'; diff --git a/packages/react-docs/src/components/event_definition.tsx b/packages/react-docs/src/components/event_definition.tsx index 37236275b..b76769788 100644 --- a/packages/react-docs/src/components/event_definition.tsx +++ b/packages/react-docs/src/components/event_definition.tsx @@ -1,5 +1,5 @@ -import { AnchorTitle, colors, HeaderSizes } from '@0xproject/react-shared'; -import { Event, EventArg } from '@0xproject/types'; +import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared'; +import { Event, EventArg } from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx index cad7d6c46..0df44ca1c 100644 --- a/packages/react-docs/src/components/interface.tsx +++ b/packages/react-docs/src/components/interface.tsx @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import * as React from 'react'; -import { CustomType, TypeDefinitionByName } from '@0xproject/types'; +import { CustomType, TypeDefinitionByName } from '@0x/types'; import { DocsInfo } from '../docs_info'; diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx index 8434e8682..d0bd84802 100644 --- a/packages/react-docs/src/components/property_block.tsx +++ b/packages/react-docs/src/components/property_block.tsx @@ -1,5 +1,5 @@ -import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared'; -import { Property, TypeDefinitionByName } from '@0xproject/types'; +import { AnchorTitle, HeaderSizes } from '@0x/react-shared'; +import { Property, TypeDefinitionByName } from '@0x/types'; import * as React from 'react'; import { DocsInfo } from '../docs_info'; diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx index 1f3dd0ee8..c229999b1 100644 --- a/packages/react-docs/src/components/signature.tsx +++ b/packages/react-docs/src/components/signature.tsx @@ -1,7 +1,7 @@ import * as _ from 'lodash'; import * as React from 'react'; -import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0xproject/types'; +import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0x/types'; import { DocsInfo } from '../docs_info'; diff --git a/packages/react-shared/src/components/nested_sidebar_menu.tsx b/packages/react-shared/src/components/nested_sidebar_menu.tsx index f734dc654..196c91af1 100644 --- a/packages/react-shared/src/components/nested_sidebar_menu.tsx +++ b/packages/react-shared/src/components/nested_sidebar_menu.tsx @@ -1,4 +1,4 @@ -import { ObjectMap } from '@0xproject/types'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import MenuItem from 'material-ui/MenuItem'; import * as React from 'react'; diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx index 18c060991..a0114d898 100644 --- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx +++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx @@ -1,4 +1,4 @@ -import { colors, Networks } from '@0xproject/react-shared'; +import { colors, Networks } from '@0x/react-shared'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx index f2cfb279a..9b9421f1a 100644 --- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx +++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx index fbc6c868b..a9f591150 100644 --- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx +++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx @@ -1,6 +1,6 @@ -import { colors, constants as sharedConstants } from '@0xproject/react-shared'; -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { colors, constants as sharedConstants } from '@0x/react-shared'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; diff --git a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx b/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx index ef295762b..326df2a8c 100644 --- a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx +++ b/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/dialogs/send_dialog.tsx b/packages/website/ts/components/dialogs/send_dialog.tsx index 2754b153f..5f6927cef 100644 --- a/packages/website/ts/components/dialogs/send_dialog.tsx +++ b/packages/website/ts/components/dialogs/send_dialog.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; diff --git a/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx b/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx index afbb30b82..bbec1d649 100644 --- a/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx +++ b/packages/website/ts/components/dialogs/u2f_not_supported_dialog.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx index b727fea36..2840d5960 100644 --- a/packages/website/ts/components/documentation/docs_logo.tsx +++ b/packages/website/ts/components/documentation/docs_logo.tsx @@ -1,4 +1,4 @@ -import { Link } from '@0xproject/react-shared'; +import { Link } from '@0x/react-shared'; import * as React from 'react'; import { WebsitePaths } from 'ts/types'; diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx index 9a9b9a616..2054d0860 100644 --- a/packages/website/ts/components/documentation/docs_top_bar.tsx +++ b/packages/website/ts/components/documentation/docs_top_bar.tsx @@ -1,4 +1,4 @@ -import { ALink, colors, Link } from '@0xproject/react-shared'; +import { ALink, colors, Link } from '@0x/react-shared'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import * as React from 'react'; diff --git a/packages/website/ts/components/documentation/overview_content.tsx b/packages/website/ts/components/documentation/overview_content.tsx index 6999e039a..caabaf874 100644 --- a/packages/website/ts/components/documentation/overview_content.tsx +++ b/packages/website/ts/components/documentation/overview_content.tsx @@ -1,5 +1,5 @@ -import { colors, Link, MarkdownLinkBlock, utils as sharedUtils } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { colors, Link, MarkdownLinkBlock, utils as sharedUtils } from '@0x/react-shared'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; import * as ReactMarkdown from 'react-markdown'; diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx index ec0ada8bd..fece2704b 100644 --- a/packages/website/ts/components/documentation/sidebar_header.tsx +++ b/packages/website/ts/components/documentation/sidebar_header.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { VersionDropDown } from 'ts/components/documentation/version_drop_down'; diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx index dc00bf743..b747ef598 100644 --- a/packages/website/ts/components/documentation/tutorial_button.tsx +++ b/packages/website/ts/components/documentation/tutorial_button.tsx @@ -1,4 +1,4 @@ -import { colors, Link } from '@0xproject/react-shared'; +import { colors, Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx index ec1c99f7b..a1c8b0547 100644 --- a/packages/website/ts/components/documentation/version_drop_down.tsx +++ b/packages/website/ts/components/documentation/version_drop_down.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Button } from 'ts/components/ui/button'; diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index 1db1e89b8..f5d21535a 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -1,4 +1,4 @@ -import { ALink, colors, Link } from '@0xproject/react-shared'; +import { ALink, colors, Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; diff --git a/packages/website/ts/components/dropdowns/network_drop_down.tsx b/packages/website/ts/components/dropdowns/network_drop_down.tsx index 2fd2785d1..df2d72edc 100644 --- a/packages/website/ts/components/dropdowns/network_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/network_drop_down.tsx @@ -1,4 +1,4 @@ -import { constants as sharedConstants } from '@0xproject/react-shared'; +import { constants as sharedConstants } from '@0x/react-shared'; import * as _ from 'lodash'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx index b0091a1c1..536ba924b 100644 --- a/packages/website/ts/components/eth_weth_conversion_button.tsx +++ b/packages/website/ts/components/eth_weth_conversion_button.tsx @@ -1,5 +1,5 @@ -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/eth_wrappers.tsx b/packages/website/ts/components/eth_wrappers.tsx index 0b282b2a1..2af4252bd 100644 --- a/packages/website/ts/components/eth_wrappers.tsx +++ b/packages/website/ts/components/eth_wrappers.tsx @@ -1,6 +1,6 @@ -import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import Divider from 'material-ui/Divider'; import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table'; diff --git a/packages/website/ts/components/fill_order_json.tsx b/packages/website/ts/components/fill_order_json.tsx index 1ecc426bd..41413eac2 100644 --- a/packages/website/ts/components/fill_order_json.tsx +++ b/packages/website/ts/components/fill_order_json.tsx @@ -1,5 +1,5 @@ -import { generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { BigNumber } from '@0xproject/utils'; +import { generatePseudoRandomSalt } from '@0x/order-utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import Paper from 'material-ui/Paper'; import TextField from 'material-ui/TextField'; diff --git a/packages/website/ts/components/fill_warning_dialog.tsx b/packages/website/ts/components/fill_warning_dialog.tsx index 4821aaabe..430abd013 100644 --- a/packages/website/ts/components/fill_warning_dialog.tsx +++ b/packages/website/ts/components/fill_warning_dialog.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import Dialog from 'material-ui/Dialog'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/flash_messages/asset_send_completed.tsx b/packages/website/ts/components/flash_messages/asset_send_completed.tsx index f76e05fe1..b895126dc 100644 --- a/packages/website/ts/components/flash_messages/asset_send_completed.tsx +++ b/packages/website/ts/components/flash_messages/asset_send_completed.tsx @@ -1,6 +1,6 @@ -import { colors } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { colors } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { utils } from 'ts/utils/utils'; diff --git a/packages/website/ts/components/flash_messages/transaction_submitted.tsx b/packages/website/ts/components/flash_messages/transaction_submitted.tsx index 2a6d2a64b..b1d909baa 100644 --- a/packages/website/ts/components/flash_messages/transaction_submitted.tsx +++ b/packages/website/ts/components/flash_messages/transaction_submitted.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/forms/subscribe_form.tsx b/packages/website/ts/components/forms/subscribe_form.tsx index 761db7517..f5560cfa7 100644 --- a/packages/website/ts/components/forms/subscribe_form.tsx +++ b/packages/website/ts/components/forms/subscribe_form.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx index ec153c005..8afbee977 100644 --- a/packages/website/ts/components/generate_order/generate_order_form.tsx +++ b/packages/website/ts/components/generate_order/generate_order_form.tsx @@ -1,7 +1,7 @@ -import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils } from '@0xproject/order-utils'; -import { colors } from '@0xproject/react-shared'; -import { Order as ZeroExOrder } from '@0xproject/types'; -import { BigNumber, logUtils } from '@0xproject/utils'; +import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils'; +import { colors } from '@0x/react-shared'; +import { Order as ZeroExOrder } from '@0x/types'; +import { BigNumber, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import Divider from 'material-ui/Divider'; diff --git a/packages/website/ts/components/generate_order/new_token_form.tsx b/packages/website/ts/components/generate_order/new_token_form.tsx index 3d7eda84c..b8cd88b18 100644 --- a/packages/website/ts/components/generate_order/new_token_form.tsx +++ b/packages/website/ts/components/generate_order/new_token_form.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import TextField from 'material-ui/TextField'; import * as moment from 'moment'; diff --git a/packages/website/ts/components/inputs/address_input.tsx b/packages/website/ts/components/inputs/address_input.tsx index 39ec72f8a..1a71f8081 100644 --- a/packages/website/ts/components/inputs/address_input.tsx +++ b/packages/website/ts/components/inputs/address_input.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { addressUtils } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { addressUtils } from '@0x/utils'; import * as _ from 'lodash'; import TextField from 'material-ui/TextField'; import * as React from 'react'; diff --git a/packages/website/ts/components/inputs/allowance_state_toggle.tsx b/packages/website/ts/components/inputs/allowance_state_toggle.tsx index 39d2e3030..fd7d3b174 100644 --- a/packages/website/ts/components/inputs/allowance_state_toggle.tsx +++ b/packages/website/ts/components/inputs/allowance_state_toggle.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { BigNumber, logUtils } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { BigNumber, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import ReactTooltip = require('react-tooltip'); diff --git a/packages/website/ts/components/inputs/balance_bounded_input.tsx b/packages/website/ts/components/inputs/balance_bounded_input.tsx index eb01e3ea6..83f263842 100644 --- a/packages/website/ts/components/inputs/balance_bounded_input.tsx +++ b/packages/website/ts/components/inputs/balance_bounded_input.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import TextField from 'material-ui/TextField'; import * as React from 'react'; diff --git a/packages/website/ts/components/inputs/eth_amount_input.tsx b/packages/website/ts/components/inputs/eth_amount_input.tsx index 3a7905442..6799e54bf 100644 --- a/packages/website/ts/components/inputs/eth_amount_input.tsx +++ b/packages/website/ts/components/inputs/eth_amount_input.tsx @@ -1,5 +1,5 @@ -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input'; diff --git a/packages/website/ts/components/inputs/expiration_input.tsx b/packages/website/ts/components/inputs/expiration_input.tsx index 5417ce715..3e43c1c07 100644 --- a/packages/website/ts/components/inputs/expiration_input.tsx +++ b/packages/website/ts/components/inputs/expiration_input.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import DatePicker from 'material-ui/DatePicker'; import TimePicker from 'material-ui/TimePicker'; diff --git a/packages/website/ts/components/inputs/hash_input.tsx b/packages/website/ts/components/inputs/hash_input.tsx index 5125ec4de..73b6615d4 100644 --- a/packages/website/ts/components/inputs/hash_input.tsx +++ b/packages/website/ts/components/inputs/hash_input.tsx @@ -1,6 +1,6 @@ -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { Styles } from '@0xproject/react-shared'; -import { Order } from '@0xproject/types'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { Styles } from '@0x/react-shared'; +import { Order } from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; import ReactTooltip = require('react-tooltip'); diff --git a/packages/website/ts/components/inputs/token_input.tsx b/packages/website/ts/components/inputs/token_input.tsx index 0bd36781e..c3c2d8b37 100644 --- a/packages/website/ts/components/inputs/token_input.tsx +++ b/packages/website/ts/components/inputs/token_input.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import Paper from 'material-ui/Paper'; import * as React from 'react'; import { Blockchain } from 'ts/blockchain'; diff --git a/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx b/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx index ca71fcd50..1d21e5a85 100644 --- a/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx +++ b/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as React from 'react'; import { Balance } from 'ts/components/ui/balance'; import { Container } from 'ts/components/ui/container'; diff --git a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx b/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx index 1035d4ad9..173ba9a97 100644 --- a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx +++ b/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; import { Image } from 'ts/components/ui/image'; diff --git a/packages/website/ts/components/onboarding/onboarding_card.tsx b/packages/website/ts/components/onboarding/onboarding_card.tsx index e1b0f304b..384bf7154 100644 --- a/packages/website/ts/components/onboarding/onboarding_card.tsx +++ b/packages/website/ts/components/onboarding/onboarding_card.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import * as _ from 'lodash'; diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx index 522687758..6adcec0b1 100644 --- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx +++ b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx @@ -2,7 +2,7 @@ import * as _ from 'lodash'; import * as React from 'react'; import { RouteComponentProps, withRouter } from 'react-router'; -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import { Blockchain } from 'ts/blockchain'; import { AddEthOnboardingStep } from 'ts/components/onboarding/add_eth_onboarding_step'; import { CongratsOnboardingStep } from 'ts/components/onboarding/congrats_onboarding_step'; diff --git a/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx b/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx index e4332de75..37eef867b 100644 --- a/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx +++ b/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; import * as React from 'react'; import { Balance } from 'ts/components/ui/balance'; import { Container } from 'ts/components/ui/container'; diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx index a2a53a523..f33681835 100644 --- a/packages/website/ts/components/order_json.tsx +++ b/packages/website/ts/components/order_json.tsx @@ -1,4 +1,4 @@ -import { BigNumber, fetchAsync, logUtils } from '@0xproject/utils'; +import { BigNumber, fetchAsync, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import Paper from 'material-ui/Paper'; import TextField from 'material-ui/TextField'; diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index c58dc26bd..2299881c4 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -1,5 +1,5 @@ -import { colors, Link } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; +import { colors, Link } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; diff --git a/packages/website/ts/components/portal/text_header.tsx b/packages/website/ts/components/portal/text_header.tsx index 853da3a29..b6045b832 100644 --- a/packages/website/ts/components/portal/text_header.tsx +++ b/packages/website/ts/components/portal/text_header.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { Text } from 'ts/components/ui/text'; diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx index f3787bd27..558d99855 100644 --- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx +++ b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx @@ -1,4 +1,4 @@ -import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/send_button.tsx b/packages/website/ts/components/send_button.tsx index 107983dee..27438e5d5 100644 --- a/packages/website/ts/components/send_button.tsx +++ b/packages/website/ts/components/send_button.tsx @@ -1,4 +1,4 @@ -import { BigNumber, logUtils } from '@0xproject/utils'; +import { BigNumber, logUtils } from '@0x/utils'; import * as _ from 'lodash'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 5965ad9bd..9ba2bad84 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -4,9 +4,9 @@ import { Networks, Styles, utils as sharedUtils, -} from '@0xproject/react-shared'; -import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +} from '@0x/react-shared'; +import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import Dialog from 'material-ui/Dialog'; import Divider from 'material-ui/Divider'; diff --git a/packages/website/ts/components/top_bar/provider_display.tsx b/packages/website/ts/components/top_bar/provider_display.tsx index 806eaeea5..c88c29b8e 100644 --- a/packages/website/ts/components/top_bar/provider_display.tsx +++ b/packages/website/ts/components/top_bar/provider_display.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet'; diff --git a/packages/website/ts/components/track_token_confirmation.tsx b/packages/website/ts/components/track_token_confirmation.tsx index 294fb8590..e701686b0 100644 --- a/packages/website/ts/components/track_token_confirmation.tsx +++ b/packages/website/ts/components/track_token_confirmation.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Party } from 'ts/components/ui/party'; diff --git a/packages/website/ts/components/trade_history/trade_history_item.tsx b/packages/website/ts/components/trade_history/trade_history_item.tsx index 321a8b0e1..667027dce 100644 --- a/packages/website/ts/components/trade_history/trade_history_item.tsx +++ b/packages/website/ts/components/trade_history/trade_history_item.tsx @@ -1,6 +1,6 @@ -import { colors, EtherscanLinkSuffixes } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { colors, EtherscanLinkSuffixes } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import Paper from 'material-ui/Paper'; import * as moment from 'moment'; diff --git a/packages/website/ts/components/ui/alert.tsx b/packages/website/ts/components/ui/alert.tsx index b571d8c1c..32e0f1be8 100644 --- a/packages/website/ts/components/ui/alert.tsx +++ b/packages/website/ts/components/ui/alert.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { AlertTypes } from 'ts/types'; diff --git a/packages/website/ts/components/ui/allowance_state_view.tsx b/packages/website/ts/components/ui/allowance_state_view.tsx index 93d6b0ebb..fc754421a 100644 --- a/packages/website/ts/components/ui/allowance_state_view.tsx +++ b/packages/website/ts/components/ui/allowance_state_view.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; import { Spinner } from 'ts/components/ui/spinner'; diff --git a/packages/website/ts/components/ui/balance.tsx b/packages/website/ts/components/ui/balance.tsx index 9e5a256b6..a1a8ff89b 100644 --- a/packages/website/ts/components/ui/balance.tsx +++ b/packages/website/ts/components/ui/balance.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as React from 'react'; import { Container } from 'ts/components/ui/container'; import { Text } from 'ts/components/ui/text'; diff --git a/packages/website/ts/components/ui/copy_icon.tsx b/packages/website/ts/components/ui/copy_icon.tsx index 0330d1843..59e398cb6 100644 --- a/packages/website/ts/components/ui/copy_icon.tsx +++ b/packages/website/ts/components/ui/copy_icon.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import * as CopyToClipboard from 'react-copy-to-clipboard'; import * as ReactDOM from 'react-dom'; diff --git a/packages/website/ts/components/ui/custom_menu_item.tsx b/packages/website/ts/components/ui/custom_menu_item.tsx index c25da6be6..87ce32126 100644 --- a/packages/website/ts/components/ui/custom_menu_item.tsx +++ b/packages/website/ts/components/ui/custom_menu_item.tsx @@ -1,4 +1,4 @@ -import { Link } from '@0xproject/react-shared'; +import { Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/ui/ethereum_address.tsx b/packages/website/ts/components/ui/ethereum_address.tsx index f449a8e75..71d98af56 100644 --- a/packages/website/ts/components/ui/ethereum_address.tsx +++ b/packages/website/ts/components/ui/ethereum_address.tsx @@ -1,4 +1,4 @@ -import { EtherscanLinkSuffixes } from '@0xproject/react-shared'; +import { EtherscanLinkSuffixes } from '@0x/react-shared'; import * as React from 'react'; import ReactTooltip = require('react-tooltip'); import { EtherScanIcon } from 'ts/components/ui/etherscan_icon'; diff --git a/packages/website/ts/components/ui/etherscan_icon.tsx b/packages/website/ts/components/ui/etherscan_icon.tsx index 0beb69123..57ab91ba2 100644 --- a/packages/website/ts/components/ui/etherscan_icon.tsx +++ b/packages/website/ts/components/ui/etherscan_icon.tsx @@ -1,4 +1,4 @@ -import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import ReactTooltip = require('react-tooltip'); diff --git a/packages/website/ts/components/ui/fake_text_field.tsx b/packages/website/ts/components/ui/fake_text_field.tsx index ac3c30fec..7c3a482a4 100644 --- a/packages/website/ts/components/ui/fake_text_field.tsx +++ b/packages/website/ts/components/ui/fake_text_field.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as React from 'react'; import { InputLabel } from 'ts/components/ui/input_label'; diff --git a/packages/website/ts/components/ui/icon_button.tsx b/packages/website/ts/components/ui/icon_button.tsx index 13cd239da..9f469ec69 100644 --- a/packages/website/ts/components/ui/icon_button.tsx +++ b/packages/website/ts/components/ui/icon_button.tsx @@ -1,4 +1,4 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors, Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/ui/input.tsx b/packages/website/ts/components/ui/input.tsx index e01a71a53..e5f4f6c70 100644 --- a/packages/website/ts/components/ui/input.tsx +++ b/packages/website/ts/components/ui/input.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { styled } from 'ts/style/theme'; diff --git a/packages/website/ts/components/ui/input_label.tsx b/packages/website/ts/components/ui/input_label.tsx index 8eda45a5d..e7afb5a17 100644 --- a/packages/website/ts/components/ui/input_label.tsx +++ b/packages/website/ts/components/ui/input_label.tsx @@ -1,4 +1,4 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors, Styles } from '@0x/react-shared'; import * as React from 'react'; export interface InputLabelProps { diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx index 0bb99b9d8..a8daf4102 100644 --- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx +++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx @@ -1,5 +1,5 @@ -import { colors } from '@0xproject/react-shared'; -import { errorUtils } from '@0xproject/utils'; +import { colors } from '@0x/react-shared'; +import { errorUtils } from '@0x/utils'; import RaisedButton from 'material-ui/RaisedButton'; import * as React from 'react'; diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx index a25550475..6c0572437 100644 --- a/packages/website/ts/components/ui/party.tsx +++ b/packages/website/ts/components/ui/party.tsx @@ -1,4 +1,4 @@ -import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import ReactTooltip = require('react-tooltip'); diff --git a/packages/website/ts/components/ui/pointer.tsx b/packages/website/ts/components/ui/pointer.tsx index db0a4188d..c97b1e700 100644 --- a/packages/website/ts/components/ui/pointer.tsx +++ b/packages/website/ts/components/ui/pointer.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { styled } from 'ts/style/theme'; diff --git a/packages/website/ts/components/ui/required_label.tsx b/packages/website/ts/components/ui/required_label.tsx index 0f96586ec..5080462fa 100644 --- a/packages/website/ts/components/ui/required_label.tsx +++ b/packages/website/ts/components/ui/required_label.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; export interface RequiredLabelProps { diff --git a/packages/website/ts/components/ui/simple_menu.tsx b/packages/website/ts/components/ui/simple_menu.tsx index bdaf0701e..45ee752e3 100644 --- a/packages/website/ts/components/ui/simple_menu.tsx +++ b/packages/website/ts/components/ui/simple_menu.tsx @@ -1,4 +1,4 @@ -import { Link } from '@0xproject/react-shared'; +import { Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as CopyToClipboard from 'react-copy-to-clipboard'; diff --git a/packages/website/ts/components/ui/spinner.tsx b/packages/website/ts/components/ui/spinner.tsx index e8670cc3e..dc73e74e3 100644 --- a/packages/website/ts/components/ui/spinner.tsx +++ b/packages/website/ts/components/ui/spinner.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; import { styled } from 'ts/style/theme'; diff --git a/packages/website/ts/components/ui/swap_icon.tsx b/packages/website/ts/components/ui/swap_icon.tsx index f1d1ae7d4..406da8fe1 100644 --- a/packages/website/ts/components/ui/swap_icon.tsx +++ b/packages/website/ts/components/ui/swap_icon.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; interface SwapIconProps { diff --git a/packages/website/ts/components/visual_order.tsx b/packages/website/ts/components/visual_order.tsx index a8d18006e..d723757d2 100644 --- a/packages/website/ts/components/visual_order.tsx +++ b/packages/website/ts/components/visual_order.tsx @@ -1,4 +1,4 @@ -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { Party } from 'ts/components/ui/party'; diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 6abaa840b..326cd3cfa 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -1,5 +1,5 @@ -import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0xproject/react-shared'; -import { BigNumber, errorUtils } from '@0xproject/utils'; +import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared'; +import { BigNumber, errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet'; diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index 54ace7ae2..7de3afbf8 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -1,6 +1,6 @@ -import { Styles } from '@0xproject/react-shared'; -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { Styles } from '@0x/react-shared'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import FlatButton from 'material-ui/FlatButton'; import * as React from 'react'; diff --git a/packages/website/ts/local_storage/trade_history_storage.tsx b/packages/website/ts/local_storage/trade_history_storage.tsx index a9b042820..91818b035 100644 --- a/packages/website/ts/local_storage/trade_history_storage.tsx +++ b/packages/website/ts/local_storage/trade_history_storage.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import ethUtil = require('ethereumjs-util'); import * as _ from 'lodash'; import { localStorage } from 'ts/local_storage/local_storage'; diff --git a/packages/website/ts/pages/about/profile.tsx b/packages/website/ts/pages/about/profile.tsx index bcbeb0272..2361c6418 100644 --- a/packages/website/ts/pages/about/profile.tsx +++ b/packages/website/ts/pages/about/profile.tsx @@ -1,4 +1,4 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors, Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { ProfileInfo } from 'ts/types'; diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index e35218a70..934a4cc36 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -1,4 +1,4 @@ -import { colors, constants as sharedConstants } from '@0xproject/react-shared'; +import { colors, constants as sharedConstants } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index f0af78fc1..74fd0135c 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -1,5 +1,5 @@ -import { ALink, colors, Link, NestedSidebarMenu } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { ALink, colors, Link, NestedSidebarMenu } from '@0x/react-shared'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; import { OverviewContent } from 'ts/components/documentation/overview_content'; @@ -68,7 +68,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)', link: { - title: '@0xproject/connect', + title: '@0x/connect', to: WebsitePaths.Connect, }, }, @@ -76,7 +76,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.', link: { - title: '@0xproject/contract-wrappers', + title: '@0x/contract-wrappers', to: WebsitePaths.ContractWrappers, }, }, @@ -84,7 +84,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', link: { - title: '@0xproject/json-schemas', + title: '@0x/json-schemas', to: WebsitePaths.JSONSchemas, }, }, @@ -92,7 +92,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.', link: { - title: '@0xproject/order-utils', + title: '@0x/order-utils', to: WebsitePaths.OrderUtils, }, }, @@ -100,7 +100,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.", link: { - title: '@0xproject/order-watcher', + title: '@0x/order-watcher', to: WebsitePaths.OrderWatcher, }, }, @@ -108,7 +108,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', link: { - title: '@0xproject/sra-spec', + title: '@0x/sra-spec', to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec', shouldOpenInNewTab: true, }, @@ -117,7 +117,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'Convenience package for buying assets represented on the Ethereum blockchain using 0x. In its simplest form, the package helps in the usage of the [0x forwarder contract](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md), which allows users to execute [Wrapped Ether](https://weth.io/) based 0x orders without having to set allowances, wrap Ether or own ZRX, meaning they can buy tokens with Ether alone. Given some liquidity (0x signed orders), it helps estimate the Ether cost of buying a certain asset (giving a range) and then buying that asset.', link: { - title: '@0xproject/asset-buyer', + title: '@0x/asset-buyer', to: WebsitePaths.AssetBuyer, }, }, @@ -144,7 +144,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.', link: { - title: '@0xproject/sol-compiler', + title: '@0x/sol-compiler', to: WebsitePaths.SolCompiler, }, }, @@ -152,7 +152,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A Solidity code coverage tool. Sol-cov uses transaction traces to figure out which lines of your code has been covered by your tests.', link: { - title: '@0xproject/sol-cov', + title: '@0x/sol-cov', to: WebsitePaths.SolCov, }, }, @@ -160,7 +160,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)', link: { - title: '@0xproject/subproviders', + title: '@0x/subproviders', to: WebsitePaths.Subproviders, }, }, @@ -168,7 +168,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { description: 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...', link: { - title: '@0xproject/web3-wrapper', + title: '@0x/web3-wrapper', to: WebsitePaths.Web3Wrapper, }, }, diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx index c9295d806..10d91bae8 100644 --- a/packages/website/ts/pages/faq/faq.tsx +++ b/packages/website/ts/pages/faq/faq.tsx @@ -1,4 +1,4 @@ -import { colors, Styles } from '@0xproject/react-shared'; +import { colors, Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; diff --git a/packages/website/ts/pages/faq/question.tsx b/packages/website/ts/pages/faq/question.tsx index f80985257..413ffb6ce 100644 --- a/packages/website/ts/pages/faq/question.tsx +++ b/packages/website/ts/pages/faq/question.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import { Card, CardHeader, CardText } from 'material-ui/Card'; import * as React from 'react'; diff --git a/packages/website/ts/pages/fullscreen_message.tsx b/packages/website/ts/pages/fullscreen_message.tsx index 6fcf7b32c..675f27a01 100644 --- a/packages/website/ts/pages/fullscreen_message.tsx +++ b/packages/website/ts/pages/fullscreen_message.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as React from 'react'; export interface FullscreenMessageProps { diff --git a/packages/website/ts/pages/jobs/jobs.tsx b/packages/website/ts/pages/jobs/jobs.tsx index cc4b1f04b..728e17f9e 100644 --- a/packages/website/ts/pages/jobs/jobs.tsx +++ b/packages/website/ts/pages/jobs/jobs.tsx @@ -1,4 +1,4 @@ -import { colors, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; diff --git a/packages/website/ts/pages/jobs/join_0x.tsx b/packages/website/ts/pages/jobs/join_0x.tsx index ec8afbd93..e869cd455 100644 --- a/packages/website/ts/pages/jobs/join_0x.tsx +++ b/packages/website/ts/pages/jobs/join_0x.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import * as React from 'react'; -- cgit From 683c6f22af9f2417fbd8288cc7607fb355a1798d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:03:00 +0100 Subject: chore: add missing imports --- packages/react-docs/src/docs_info.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index 4f2225acb..e84050ec9 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,5 +1,5 @@ -import { MenuSubsectionsBySection } from '@0x/react-shared'; -import { DocAgnosticFormat, TypeDefinitionByName } from '@0x/types'; +import { ALink } from '@0x/react-shared'; +import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0x/types'; import * as _ from 'lodash'; import { -- cgit From 1c68bdabaad07c2181c58aa5b0d550d4eb2be447 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:03:09 +0100 Subject: chore: fix dep --- packages/react-shared/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index b19717079..ed0fcb309 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -33,7 +33,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0xproject/types": "^1.1.4", + "@0x/types": "^1.1.4", "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", -- cgit From 0affc7682fa1a7484bb77cc460e9b9d10553980f Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:06:12 +0100 Subject: chore: fix imports --- packages/dev-tools-pages/ts/components/ui/text.tsx | 2 +- packages/instant/src/components/instant_heading.tsx | 2 +- packages/react-docs/src/components/comment.tsx | 2 +- packages/react-docs/src/components/signature_block.tsx | 4 ++-- packages/react-docs/src/components/source_link.tsx | 4 ++-- packages/react-docs/src/components/type.tsx | 6 +++--- packages/react-docs/src/components/type_definition.tsx | 6 +++--- packages/website/ts/components/fill_order.tsx | 8 ++++---- packages/website/ts/components/footer.tsx | 4 ++-- packages/website/ts/components/inputs/token_amount_input.tsx | 6 +++--- packages/website/ts/components/portal/back_button.tsx | 2 +- packages/website/ts/components/portal/drawer_menu.tsx | 2 +- packages/website/ts/components/portal/menu.tsx | 2 +- .../website/ts/components/relayer_index/relayer_grid_tile.tsx | 2 +- packages/website/ts/components/top_bar/top_bar.tsx | 6 +++--- packages/website/ts/components/top_bar/top_bar_menu_item.tsx | 2 +- packages/website/ts/components/ui/button.tsx | 2 +- packages/website/ts/components/ui/text.tsx | 2 +- packages/website/ts/pages/about/about.tsx | 2 +- packages/website/ts/pages/documentation/doc_page.tsx | 6 +++--- packages/website/ts/pages/landing/landing.tsx | 2 +- packages/website/ts/pages/wiki/wiki.tsx | 4 ++-- 22 files changed, 39 insertions(+), 39 deletions(-) diff --git a/packages/dev-tools-pages/ts/components/ui/text.tsx b/packages/dev-tools-pages/ts/components/ui/text.tsx index 8e314beae..b4a61457f 100644 --- a/packages/dev-tools-pages/ts/components/ui/text.tsx +++ b/packages/dev-tools-pages/ts/components/ui/text.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import { darken } from 'polished'; import * as React from 'react'; import styled from 'styled-components'; diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx index f57b59b73..a36d35a93 100644 --- a/packages/instant/src/components/instant_heading.tsx +++ b/packages/instant/src/components/instant_heading.tsx @@ -1,4 +1,4 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/react-docs/src/components/comment.tsx b/packages/react-docs/src/components/comment.tsx index 9c866e62c..4d34f711e 100644 --- a/packages/react-docs/src/components/comment.tsx +++ b/packages/react-docs/src/components/comment.tsx @@ -1,4 +1,4 @@ -import { colors, MarkdownCodeBlock } from '@0xproject/react-shared'; +import { colors, MarkdownCodeBlock } from '@0x/react-shared'; import * as React from 'react'; import * as ReactMarkdown from 'react-markdown'; diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 819311953..0ce32467b 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -1,11 +1,11 @@ -import { AnchorTitle, colors, HeaderSizes, Styles } from '@0xproject/react-shared'; +import { AnchorTitle, colors, HeaderSizes, Styles } from '@0x/react-shared'; import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptFunction, TypescriptMethod, -} from '@0xproject/types'; +} from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/react-docs/src/components/source_link.tsx b/packages/react-docs/src/components/source_link.tsx index c6dd09adb..6459824c2 100644 --- a/packages/react-docs/src/components/source_link.tsx +++ b/packages/react-docs/src/components/source_link.tsx @@ -1,5 +1,5 @@ -import { colors, Link } from '@0xproject/react-shared'; -import { Source } from '@0xproject/types'; +import { colors, Link } from '@0x/react-shared'; +import { Source } from '@0x/types'; import * as React from 'react'; export interface SourceLinkProps { diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index d579449f4..412b99b9d 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -1,6 +1,6 @@ -import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0xproject/react-shared'; -import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0xproject/types'; -import { errorUtils } from '@0xproject/utils'; +import { colors, constants as sharedConstants, Link, utils as sharedUtils } from '@0x/react-shared'; +import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types'; +import { errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; import { Link as ScrollLink } from 'react-scroll'; diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx index 3b64247f2..a1fde51da 100644 --- a/packages/react-docs/src/components/type_definition.tsx +++ b/packages/react-docs/src/components/type_definition.tsx @@ -1,6 +1,6 @@ -import { AnchorTitle, colors, HeaderSizes } from '@0xproject/react-shared'; -import { CustomType, CustomTypeChild, TypeDefinitionByName, TypeDocTypes } from '@0xproject/types'; -import { errorUtils } from '@0xproject/utils'; +import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared'; +import { CustomType, CustomTypeChild, TypeDefinitionByName, TypeDocTypes } from '@0x/types'; +import { errorUtils } from '@0x/utils'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index c1bbadfde..ec73e4199 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -1,7 +1,7 @@ -import { assetDataUtils, orderHashUtils } from '@0xproject/order-utils'; -import { colors, Link } from '@0xproject/react-shared'; -import { BigNumber, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { assetDataUtils, orderHashUtils } from '@0x/order-utils'; +import { colors, Link } from '@0x/react-shared'; +import { BigNumber, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as accounting from 'accounting'; import * as _ from 'lodash'; import { Card, CardHeader, CardText } from 'material-ui/Card'; diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx index db4f57100..dfedcba55 100644 --- a/packages/website/ts/components/footer.tsx +++ b/packages/website/ts/components/footer.tsx @@ -1,5 +1,5 @@ -import { ALink, colors, Link } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { ALink, colors, Link } from '@0x/react-shared'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import DropDownMenu from 'material-ui/DropDownMenu'; import MenuItem from 'material-ui/MenuItem'; diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx index 134d1cc76..fded3a9dd 100644 --- a/packages/website/ts/components/inputs/token_amount_input.tsx +++ b/packages/website/ts/components/inputs/token_amount_input.tsx @@ -1,6 +1,6 @@ -import { colors, Link } from '@0xproject/react-shared'; -import { BigNumber } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { colors, Link } from '@0x/react-shared'; +import { BigNumber } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import * as React from 'react'; import { Blockchain } from 'ts/blockchain'; diff --git a/packages/website/ts/components/portal/back_button.tsx b/packages/website/ts/components/portal/back_button.tsx index 64a332e07..bea69bb95 100644 --- a/packages/website/ts/components/portal/back_button.tsx +++ b/packages/website/ts/components/portal/back_button.tsx @@ -1,4 +1,4 @@ -import { Link, Styles } from '@0xproject/react-shared'; +import { Link, Styles } from '@0x/react-shared'; import * as React from 'react'; import { Island } from 'ts/components/ui/island'; import { colors } from 'ts/style/colors'; diff --git a/packages/website/ts/components/portal/drawer_menu.tsx b/packages/website/ts/components/portal/drawer_menu.tsx index 3a8c69a70..7280a6102 100644 --- a/packages/website/ts/components/portal/drawer_menu.tsx +++ b/packages/website/ts/components/portal/drawer_menu.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/portal/menu.tsx b/packages/website/ts/components/portal/menu.tsx index a3352529c..d59101686 100644 --- a/packages/website/ts/components/portal/menu.tsx +++ b/packages/website/ts/components/portal/menu.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { CustomMenuItem } from 'ts/components/ui/custom_menu_item'; diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx index a81ab107a..7f1b4ebb4 100644 --- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx +++ b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx @@ -1,4 +1,4 @@ -import { Styles } from '@0xproject/react-shared'; +import { Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import { GridTile as PlainGridTile } from 'material-ui/GridList'; import * as React from 'react'; diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx index 7e7247c25..d5967cd1d 100644 --- a/packages/website/ts/components/top_bar/top_bar.tsx +++ b/packages/website/ts/components/top_bar/top_bar.tsx @@ -1,6 +1,6 @@ -import { DocsInfo } from '@0xproject/react-docs'; -import { ALink, colors, Link, Styles } from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +import { DocsInfo } from '@0x/react-docs'; +import { ALink, colors, Link, Styles } from '@0x/react-shared'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import Drawer from 'material-ui/Drawer'; import MenuItem from 'material-ui/MenuItem'; diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx index eff5ba66d..9f15cffbb 100644 --- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx +++ b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx @@ -1,4 +1,4 @@ -import { colors, Link } from '@0xproject/react-shared'; +import { colors, Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx index 2a6a1f477..92f927843 100644 --- a/packages/website/ts/components/ui/button.tsx +++ b/packages/website/ts/components/ui/button.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import { darken, saturate } from 'polished'; import * as React from 'react'; import { styled } from 'ts/style/theme'; diff --git a/packages/website/ts/components/ui/text.tsx b/packages/website/ts/components/ui/text.tsx index 4415962b1..c13e21913 100644 --- a/packages/website/ts/components/ui/text.tsx +++ b/packages/website/ts/components/ui/text.tsx @@ -1,4 +1,4 @@ -import { colors } from '@0xproject/react-shared'; +import { colors } from '@0x/react-shared'; import { darken } from 'polished'; import * as React from 'react'; import { styled } from 'ts/style/theme'; diff --git a/packages/website/ts/pages/about/about.tsx b/packages/website/ts/pages/about/about.tsx index 4d346327b..dfe8926b0 100644 --- a/packages/website/ts/pages/about/about.tsx +++ b/packages/website/ts/pages/about/about.tsx @@ -1,4 +1,4 @@ -import { colors, Link, Styles } from '@0xproject/react-shared'; +import { colors, Link, Styles } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as DocumentTitle from 'react-document-title'; diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 40c728c24..7157abfc9 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -5,8 +5,8 @@ import { GeneratedDocJson, SupportedDocJson, TypeDocUtils, -} from '@0xproject/react-docs'; -import { NestedSidebarMenu } from '@0xproject/react-shared'; +} from '@0x/react-docs'; +import { NestedSidebarMenu } from '@0x/react-shared'; import findVersions = require('find-versions'); import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; @@ -181,7 +181,7 @@ export class DocPage extends React.Component { let tagPrefix = pkg; const packagesWithNamespace = ['connect']; if (_.includes(packagesWithNamespace, pkg)) { - tagPrefix = `@0xproject/${pkg}`; + tagPrefix = `@0x/${pkg}`; } // HACK: The following three lines exist for backward compatibility reasons // Before exporting types from other packages as part of the 0x.js interface, diff --git a/packages/website/ts/pages/landing/landing.tsx b/packages/website/ts/pages/landing/landing.tsx index f7a6fe0ce..c56ed4ebe 100644 --- a/packages/website/ts/pages/landing/landing.tsx +++ b/packages/website/ts/pages/landing/landing.tsx @@ -1,4 +1,4 @@ -import { colors, Link } from '@0xproject/react-shared'; +import { colors, Link } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index 76d52c9bd..fdca61e39 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -7,8 +7,8 @@ import { MarkdownSection, NestedSidebarMenu, utils as sharedUtils, -} from '@0xproject/react-shared'; -import { ObjectMap } from '@0xproject/types'; +} from '@0x/react-shared'; +import { ObjectMap } from '@0x/types'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; -- cgit From 058c88735312bbf75070081a1743e73801211048 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:08:26 +0100 Subject: chore: missing converts --- packages/contract_templates/contract.handlebars | 6 +++--- packages/metacoin/tsconfig.json | 4 ++-- typedoc-tsconfig.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 41e5c8630..9c1952ed4 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -1,10 +1,10 @@ // tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name // tslint:disable:no-unused-variable // tslint:disable:no-unbound-method -import { BaseContract } from '@0xproject/base-contract'; +import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; -import { BigNumber, classUtils, logUtils } from '@0xproject/utils'; -import { Web3Wrapper } from '@0xproject/web3-wrapper'; +import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; // tslint:enable:no-unused-variable diff --git a/packages/metacoin/tsconfig.json b/packages/metacoin/tsconfig.json index 3065396ff..163465cf5 100644 --- a/packages/metacoin/tsconfig.json +++ b/packages/metacoin/tsconfig.json @@ -5,10 +5,10 @@ "rootDir": ".", "typeRoots": [ "comment: for building within 0x-monorepo:", - "../../node_modules/@0xproject/typescript-typings/types", + "../../node_modules/@0x/typescript-typings/types", "../../node_modules/@types", "comment: for building in an isolated environment:", - "node_modules/@0xproject/typescript-typings/types", + "node_modules/@0x/typescript-typings/types", "node_modules/@types" ] }, diff --git a/typedoc-tsconfig.json b/typedoc-tsconfig.json index 32efdb4cf..1d3a15a33 100644 --- a/typedoc-tsconfig.json +++ b/typedoc-tsconfig.json @@ -11,7 +11,7 @@ "resolveJsonModule": true, "pretty": true, "skipLibCheck": true, - "typeRoots": ["node_modules/@0xproject/typescript-typings/types", "node_modules/@types"], + "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"], "strict": true } } -- cgit From ac377490dc4e5c4e8bf4e9a25bfadaa270daed9b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:09:02 +0100 Subject: chore: add missing import --- packages/react-docs/src/docs_info.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts index e84050ec9..54b59ef1f 100644 --- a/packages/react-docs/src/docs_info.ts +++ b/packages/react-docs/src/docs_info.ts @@ -1,4 +1,4 @@ -import { ALink } from '@0x/react-shared'; +import { ALink, utils as sharedUtils } from '@0x/react-shared'; import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0x/types'; import * as _ from 'lodash'; -- cgit From 8cb6d99f17d734e0e841e55305449d5211db6f34 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 14:18:39 +0100 Subject: chore: update yarn.lock --- yarn.lock | 8 -------- 1 file changed, 8 deletions(-) diff --git a/yarn.lock b/yarn.lock index bd63bbb46..2c01768f4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -478,14 +478,6 @@ dependencies: npm-registry-client "7.0.9" -"@0xproject/types@^1.1.4": - version "1.1.4" - resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-1.1.4.tgz#3ffd65e670d6a21dab19ee0ffd5fad0056291b8e" - dependencies: - "@types/node" "*" - bignumber.js "~4.1.0" - ethereum-types "^1.0.11" - "@babel/code-frame@^7.0.0-beta.35": version "7.0.0" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8" -- cgit From ece76e58748f235c73a662b748ccb695ac20c1e0 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 15:27:07 +0200 Subject: Fix prettier issues --- packages/contract-addresses/README.md | 3 +-- packages/react-docs/src/components/signature_block.tsx | 8 +------- packages/subproviders/src/index.ts | 9 +-------- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/packages/contract-addresses/README.md b/packages/contract-addresses/README.md index 3631bb968..a4040cb54 100644 --- a/packages/contract-addresses/README.md +++ b/packages/contract-addresses/README.md @@ -18,8 +18,7 @@ import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; or ```javascript -var getContractAddressesForNetworkOrThrow = require('@0x/contract-addresses') - .getContractAddressesForNetworkOrThrow; +var getContractAddressesForNetworkOrThrow = require('@0x/contract-addresses').getContractAddressesForNetworkOrThrow; ``` ## Contributing diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx index 0ce32467b..7cdf19bb0 100644 --- a/packages/react-docs/src/components/signature_block.tsx +++ b/packages/react-docs/src/components/signature_block.tsx @@ -1,11 +1,5 @@ import { AnchorTitle, colors, HeaderSizes, Styles } from '@0x/react-shared'; -import { - Parameter, - SolidityMethod, - TypeDefinitionByName, - TypescriptFunction, - TypescriptMethod, -} from '@0x/types'; +import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptFunction, TypescriptMethod } from '@0x/types'; import * as _ from 'lodash'; import * as React from 'react'; diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts index 8f02210c9..050027f96 100644 --- a/packages/subproviders/src/index.ts +++ b/packages/subproviders/src/index.ts @@ -48,14 +48,7 @@ export { LedgerGetAddressResult, } from './types'; -export { - ECSignature, - EIP712Object, - EIP712ObjectValue, - EIP712TypedData, - EIP712Types, - EIP712Parameter, -} from '@0x/types'; +export { ECSignature, EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types, EIP712Parameter } from '@0x/types'; export { JSONRPCRequestPayload, -- cgit From 392d3394438fdadf4e3b4201c493e3a2921d8380 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 15:37:22 +0200 Subject: Add index signature to FakeTokenRegistry --- packages/website/ts/utils/fake_token_registry.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/utils/fake_token_registry.ts b/packages/website/ts/utils/fake_token_registry.ts index 1cb529102..607dd2553 100644 --- a/packages/website/ts/utils/fake_token_registry.ts +++ b/packages/website/ts/utils/fake_token_registry.ts @@ -1,4 +1,11 @@ -export const fakeTokenRegistry = { +export interface FakeTokenRegistryEntry { + address: string; + name: string; + symbol: string; + decimals: number; +} + +export const fakeTokenRegistry: { [networkId: string]: FakeTokenRegistryEntry[] } = { '1': [ { address: '0xe41d2489571d322189246dafa5ebde1f4699f498', -- cgit From 7e49db23010ed5a20b100e08802be08c2dadda2b Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 15:52:32 +0200 Subject: Fix ethereum-types versions --- packages/0x.js/package.json | 2 +- packages/abi-gen-wrappers/package.json | 2 +- packages/abi-gen/package.json | 2 +- packages/asset-buyer/package.json | 2 +- packages/base-contract/package.json | 2 +- packages/contract-wrappers/package.json | 2 +- packages/contracts/package.json | 2 +- packages/dev-utils/package.json | 2 +- packages/ethereum-types/package.json | 2 +- packages/fill-scenarios/package.json | 2 +- packages/instant/package.json | 2 +- packages/metacoin/package.json | 2 +- packages/migrations/package.json | 2 +- packages/order-utils/package.json | 2 +- packages/order-watcher/package.json | 2 +- packages/sol-compiler/package.json | 2 +- packages/sol-cov/package.json | 2 +- packages/sol-doc/package.json | 2 +- packages/subproviders/package.json | 2 +- packages/testnet-faucets/package.json | 2 +- packages/types/package.json | 2 +- packages/typescript-typings/package.json | 2 +- packages/utils/package.json | 2 +- packages/web3-wrapper/package.json | 2 +- packages/website/package.json | 2 +- 25 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 80dba73a6..b94a910ed 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -85,7 +85,7 @@ "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "@types/web3-provider-engine": "^14.0.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5", "web3-provider-engine": "14.0.6" diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 89a15661b..468620eb9 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -34,7 +34,7 @@ "@0x/tslint-config": "^1.0.8", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index dfe8a9afd..dfd4163bf 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -34,7 +34,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "chalk": "^2.3.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "glob": "^7.1.2", "handlebars": "^4.0.11", "lodash": "^4.17.5", diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index b454ca147..aed45ac7f 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -46,7 +46,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "lodash": "^4.17.10" }, "devDependencies": { diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index 37328fbbf..d99252da4 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -43,7 +43,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index b1611808f..741adec2a 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -76,7 +76,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 72a23fc9b..ef26c186b 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -79,7 +79,7 @@ "@0x/web3-wrapper": "^3.0.3", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index da20d008b..ddd66a9a8 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -48,7 +48,7 @@ "@0x/web3-wrapper": "^3.0.3", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json index 994631559..335c36c2b 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -1,6 +1,6 @@ { "name": "ethereum-types", - "version": "1.0.11", + "version": "1.1.0", "engines": { "node": ">=6.12" }, diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index d54293699..57cc8b017 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -36,7 +36,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/instant/package.json b/packages/instant/package.json index 342669b57..d0494b6e7 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -48,7 +48,7 @@ "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "lodash": "^4.17.10", "polished": "^2.2.0", "react": "^16.5.2", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 376e6f204..c6090ba4f 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -40,7 +40,7 @@ "@0x/web3-wrapper": "^3.0.3", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5", "run-s": "^0.0.0" diff --git a/packages/migrations/package.json b/packages/migrations/package.json index f3719f910..7b975ad4f 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -40,7 +40,7 @@ "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "@ledgerhq/hw-app-eth": "^4.3.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index c5d800b00..7899d8a73 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -64,7 +64,7 @@ "@0x/web3-wrapper": "^3.0.3", "@types/node": "*", "bn.js": "^4.11.8", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index 4f1c977b3..bcc0bb76c 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -71,7 +71,7 @@ "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "bintrees": "^1.0.2", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-blockstream": "6.0.0", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 6259b637f..42c4a83bc 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -74,7 +74,7 @@ "@0x/web3-wrapper": "^3.0.3", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.5", "mkdirp": "^0.5.1", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 5bdc10155..7dc0675bf 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -49,7 +49,7 @@ "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "@types/solidity-parser-antlr": "^0.2.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "glob": "^7.1.2", "istanbul": "^0.4.5", diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index 69089878f..0cee53231 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -28,7 +28,7 @@ "@0x/sol-compiler": "^1.1.7", "@0x/types": "^1.1.4", "@0x/utils": "^2.0.2", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.10", "yargs": "^12.0.2" diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index e88c0c239..272c740b9 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -43,7 +43,7 @@ "bip39": "^2.5.0", "bn.js": "^4.11.8", "eth-lightwallet": "^3.0.1", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-tx": "^1.3.5", "ethereumjs-util": "^5.1.1", "ganache-core": "^2.2.1", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 6208cdd8a..77d9667c0 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -24,7 +24,7 @@ "@0x/utils": "^2.0.2", "@0x/web3-wrapper": "^3.0.3", "body-parser": "^1.17.1", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-tx": "^1.3.5", "ethereumjs-util": "^5.1.1", "express": "^4.15.2", diff --git a/packages/types/package.json b/packages/types/package.json index c5522ac88..c215cd2b4 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -32,7 +32,7 @@ "dependencies": { "@types/node": "*", "bignumber.js": "~4.1.0", - "ethereum-types": "^1.0.11" + "ethereum-types": "^1.1.0" }, "publishConfig": { "access": "public" diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index 77115cc03..fab8a35e5 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -27,7 +27,7 @@ "@types/bn.js": "^4.11.0", "@types/react": "*", "bignumber.js": "~4.1.0", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "popper.js": "1.14.3" }, "devDependencies": { diff --git a/packages/utils/package.json b/packages/utils/package.json index 43844e535..f2faa63b1 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -47,7 +47,7 @@ "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", "detect-node": "2.0.3", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", "isomorphic-fetch": "^2.2.1", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index b1687f48a..10560b609 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -57,7 +57,7 @@ "@0x/json-schemas": "^1.0.7", "@0x/typescript-typings": "^3.0.2", "@0x/utils": "^2.0.2", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/website/package.json b/packages/website/package.json index 2f3b338a8..5912121ff 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -34,7 +34,7 @@ "blockies": "^0.0.2", "bowser": "^1.9.3", "deep-equal": "^1.0.1", - "ethereum-types": "^1.0.11", + "ethereum-types": "^1.1.0", "ethereumjs-util": "^5.1.1", "find-versions": "^2.0.0", "jsonschema": "^1.2.0", -- cgit From 71d1e6b0ecb4bfb5cfa44cf35b924682383beba2 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 16:02:49 +0200 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 3 ++- packages/0x.js/CHANGELOG.md | 11 ++++++++++- packages/abi-gen-wrappers/CHANGELOG.json | 9 +++++++++ packages/abi-gen-wrappers/CHANGELOG.md | 14 ++++++++++++++ packages/abi-gen/CHANGELOG.json | 9 +++++++++ packages/abi-gen/CHANGELOG.md | 6 +++++- packages/assert/CHANGELOG.json | 9 +++++++++ packages/assert/CHANGELOG.md | 6 +++++- packages/asset-buyer/CHANGELOG.json | 3 ++- packages/asset-buyer/CHANGELOG.md | 9 +++++++++ packages/base-contract/CHANGELOG.json | 9 +++++++++ packages/base-contract/CHANGELOG.md | 6 +++++- packages/connect/CHANGELOG.json | 9 +++++++++ packages/connect/CHANGELOG.md | 6 +++++- packages/contract-addresses/CHANGELOG.json | 3 ++- packages/contract-addresses/CHANGELOG.md | 14 ++++++++++++++ packages/contract-artifacts/CHANGELOG.json | 3 ++- packages/contract-artifacts/CHANGELOG.md | 14 ++++++++++++++ packages/contract-wrappers/CHANGELOG.json | 3 ++- packages/contract-wrappers/CHANGELOG.md | 13 ++++++++++++- packages/dev-utils/CHANGELOG.json | 3 ++- packages/dev-utils/CHANGELOG.md | 6 +++++- packages/ethereum-types/CHANGELOG.json | 3 ++- packages/ethereum-types/CHANGELOG.md | 12 ++++++++++-- packages/fill-scenarios/CHANGELOG.json | 3 ++- packages/fill-scenarios/CHANGELOG.md | 6 +++++- packages/json-schemas/CHANGELOG.json | 3 ++- packages/json-schemas/CHANGELOG.md | 6 +++++- packages/migrations/CHANGELOG.json | 3 ++- packages/migrations/CHANGELOG.md | 6 +++++- packages/order-utils/CHANGELOG.json | 3 ++- packages/order-utils/CHANGELOG.md | 9 ++++++++- packages/order-watcher/CHANGELOG.json | 3 ++- packages/order-watcher/CHANGELOG.md | 7 ++++++- packages/react-docs/CHANGELOG.json | 9 +++++++++ packages/react-docs/CHANGELOG.md | 6 +++++- packages/react-shared/CHANGELOG.json | 3 ++- packages/react-shared/CHANGELOG.md | 8 ++++++-- packages/sol-compiler/CHANGELOG.json | 9 +++++++++ packages/sol-compiler/CHANGELOG.md | 6 +++++- packages/sol-cov/CHANGELOG.json | 3 ++- packages/sol-cov/CHANGELOG.md | 6 +++++- packages/sol-doc/CHANGELOG.json | 9 +++++++++ packages/sol-doc/CHANGELOG.md | 4 ++++ packages/sol-resolver/CHANGELOG.json | 9 +++++++++ packages/sol-resolver/CHANGELOG.md | 6 +++++- packages/sra-spec/CHANGELOG.json | 3 ++- packages/sra-spec/CHANGELOG.md | 6 +++++- packages/subproviders/CHANGELOG.json | 3 ++- packages/subproviders/CHANGELOG.md | 8 +++++++- packages/tslint-config/CHANGELOG.json | 9 +++++++++ packages/tslint-config/CHANGELOG.md | 6 +++++- packages/types/CHANGELOG.json | 3 ++- packages/types/CHANGELOG.md | 8 +++++++- packages/typescript-typings/CHANGELOG.json | 9 +++++++++ packages/typescript-typings/CHANGELOG.md | 6 +++++- packages/utils/CHANGELOG.json | 9 +++++++++ packages/utils/CHANGELOG.md | 6 +++++- packages/web3-wrapper/CHANGELOG.json | 3 ++- packages/web3-wrapper/CHANGELOG.md | 9 +++++++-- 60 files changed, 352 insertions(+), 46 deletions(-) create mode 100644 packages/abi-gen-wrappers/CHANGELOG.md create mode 100644 packages/contract-addresses/CHANGELOG.md create mode 100644 packages/contract-artifacts/CHANGELOG.md diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 98791139f..a404ed481 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -29,7 +29,8 @@ "note": "Export new `AssetData` type from types", "pr": 1131 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.8", diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 27702413d..939ada519 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.0 - _October 18, 2018_ + + * Add support for `eth_signTypedData`. (#1102) + * Added `MetamaskSubprovider` to handle inconsistencies in Metamask's signing JSON RPC endpoints. (#1102) + * Removed `SignerType` (including `SignerType.Metamask`). Please use the `MetamaskSubprovider` to wrap `web3.currentProvider`. (#1102) + * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105) + * Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105) + * Export new `AssetData` type from types (#1131) + ## v1.0.8 - _October 4, 2018_ * Dependencies updated @@ -49,7 +58,7 @@ CHANGELOG * 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` (#963) -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.3 - _August 14, 2018_ * Dependencies updated * Update ecSignOrderHashAsync to return the signature as a string for immediate use in contracts (#914) diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index d91ad0b36..211d79d26 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.0", "changes": [ diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md new file mode 100644 index 000000000..df72b112c --- /dev/null +++ b/packages/abi-gen-wrappers/CHANGELOG.md @@ -0,0 +1,14 @@ + + +CHANGELOG + +## v1.0.1 - _October 18, 2018_ + + * Dependencies updated + +## v1.0.0 - _Invalid date_ + + * Initial release (#1105) diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json index d5e0f9469..4bec24183 100644 --- a/packages/abi-gen/CHANGELOG.json +++ b/packages/abi-gen/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.14", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.13", "changes": [ diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index ed955a051..61c4d8487 100644 --- a/packages/abi-gen/CHANGELOG.md +++ b/packages/abi-gen/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.14 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.13 - _October 4, 2018_ * Dependencies updated @@ -37,7 +41,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index ec84f099e..f5a77103b 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.14", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.13", "changes": [ diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index b9f097c4e..78b5da851 100644 --- a/packages/assert/CHANGELOG.md +++ b/packages/assert/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.14 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.13 - _October 4, 2018_ * Dependencies updated @@ -37,7 +41,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index e55661235..5ebe2aa24 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -26,7 +26,8 @@ "note": "Add missing types to public interface", "pr": 1139 } - ] + ], + "timestamp": 1539871071 }, { "version": "2.0.0", diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md index 65d190a2d..8845e7041 100644 --- a/packages/asset-buyer/CHANGELOG.md +++ b/packages/asset-buyer/CHANGELOG.md @@ -5,6 +5,15 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.0 - _October 18, 2018_ + + * Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts` + * Export `BuyQuoteInfo` type (#1131) + * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers (#1105) + * Add `gasLimit` and `gasPrice` as optional properties on `BuyQuoteExecutionOpts` (#1116) + * Add `docs:json` command to package.json (#1139) + * Add missing types to public interface (#1139) + ## v2.0.0 - _October 4, 2018_ * Expand AssetBuyer to work with multiple assets at once (#1086) diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index eca1717d5..166c04408 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "3.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "3.0.1", "changes": [ diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md index 114cac90f..2981b5ef8 100644 --- a/packages/base-contract/CHANGELOG.md +++ b/packages/base-contract/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.2 - _October 18, 2018_ + + * Dependencies updated + ## v3.0.1 - _October 4, 2018_ * Dependencies updated @@ -38,7 +42,7 @@ CHANGELOG * Dependencies updated -## v2.0.0-rc.1 - _August 13, 2018_ +## v2.0.0-rc.1 - _August 14, 2018_ * Added strict encoding/decoding checks for sendTransaction and call (#915) diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 04488504d..3412831d5 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "3.0.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "3.0.1", "changes": [ diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 16e35a0d5..d20b5a5f7 100644 --- a/packages/connect/CHANGELOG.md +++ b/packages/connect/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.2 - _October 18, 2018_ + + * Dependencies updated + ## v3.0.1 - _October 4, 2018_ * Dependencies updated @@ -42,7 +46,7 @@ CHANGELOG * Updated for SRA v2 (#974) * Stopped exporting `Order` type (#924) -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json index d9bd2c077..c2b44ede8 100644 --- a/packages/contract-addresses/CHANGELOG.json +++ b/packages/contract-addresses/CHANGELOG.json @@ -6,7 +6,8 @@ "pr": 1105, "note": "Initial release" } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.0", diff --git a/packages/contract-addresses/CHANGELOG.md b/packages/contract-addresses/CHANGELOG.md new file mode 100644 index 000000000..82c22f2e4 --- /dev/null +++ b/packages/contract-addresses/CHANGELOG.md @@ -0,0 +1,14 @@ + + +CHANGELOG + +## v1.0.1 - _October 18, 2018_ + + * Initial release (#1105) + +## v1.0.0 - _Invalid date_ + + * Unpublished Package diff --git a/packages/contract-artifacts/CHANGELOG.json b/packages/contract-artifacts/CHANGELOG.json index d9bd2c077..c2b44ede8 100644 --- a/packages/contract-artifacts/CHANGELOG.json +++ b/packages/contract-artifacts/CHANGELOG.json @@ -6,7 +6,8 @@ "pr": 1105, "note": "Initial release" } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.0", diff --git a/packages/contract-artifacts/CHANGELOG.md b/packages/contract-artifacts/CHANGELOG.md new file mode 100644 index 000000000..82c22f2e4 --- /dev/null +++ b/packages/contract-artifacts/CHANGELOG.md @@ -0,0 +1,14 @@ + + +CHANGELOG + +## v1.0.1 - _October 18, 2018_ + + * Initial release (#1105) + +## v1.0.0 - _Invalid date_ + + * Unpublished Package diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 9bb5e5fc5..f66be3f0a 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -38,7 +38,8 @@ "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 } - ] + ], + "timestamp": 1539871071 }, { "version": "2.0.2", diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md index 60675ddbe..6f3005831 100644 --- a/packages/contract-wrappers/CHANGELOG.md +++ b/packages/contract-wrappers/CHANGELOG.md @@ -5,6 +5,17 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.0 - _October 18, 2018_ + + * Add optional validation to the forwarder wrapper methods + * Updated to use new modularized artifacts. (#1105) + * Top-level `ContractWrappers` class has a new optional `contractAddresses` parameter. (#1105) + * Default contract addresses are no longer stored in artifacts and are instead loaded from the `@0xproject/contract-addresses` package. (#1105) + * 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()`). (#1105) + * Removed `setProvider` method in top-level `ContractWrapper` class and added new `unsubscribeAll` method. (#1105) + * 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. (#1105) + * 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. (#1105) + ## v2.0.2 - _October 4, 2018_ * Dependencies updated @@ -51,7 +62,7 @@ CHANGELOG * Remove superfluous exported types: `ContractEvent`, `Token`, `OrderFillRequest`, `ContractEventArgs`, `LogEvent`, `OnOrderStateChangeCallback`, `ECSignature`, `OrderStateValid`, `OrderStateInvalid`, `OrderState`, `FilterObject`, `TransactionReceipt` & `TransactionReceiptWithDecodedLogs` (#924) * Added Transaction Encoder for use with 0x Exchange executeTransaction (#975) -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.3 - _August 14, 2018_ * Added strict encoding/decoding checks for sendTransaction and call (#915) * Add ForwarderWrapper (#934) diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json index b9bd7d080..fd5a8d446 100644 --- a/packages/dev-utils/CHANGELOG.json +++ b/packages/dev-utils/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Make web3-provider-engine types a 'dependency' so it's available to users of the library", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.12", diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 00301d9c9..a6b60884e 100644 --- a/packages/dev-utils/CHANGELOG.md +++ b/packages/dev-utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.13 - _October 18, 2018_ + + * Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105) + ## v1.0.12 - _October 4, 2018_ * Dependencies updated @@ -37,7 +41,7 @@ CHANGELOG * Dependencies updated -## v1.0.4 - _August 13, 2018_ +## v1.0.4 - _August 14, 2018_ * Dependencies updated diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json index ffc4742b1..b042c4588 100644 --- a/packages/ethereum-types/CHANGELOG.json +++ b/packages/ethereum-types/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Add `JSONRPCResponseError` and error field on `JSONRPCResponsePayload`.", "pr": 1102 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.1.0", diff --git a/packages/ethereum-types/CHANGELOG.md b/packages/ethereum-types/CHANGELOG.md index 6e1965964..73ea54204 100644 --- a/packages/ethereum-types/CHANGELOG.md +++ b/packages/ethereum-types/CHANGELOG.md @@ -5,6 +5,14 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.1 - _October 18, 2018_ + + * Add `JSONRPCResponseError` and error field on `JSONRPCResponsePayload`. (#1102) + +## v1.1.0 - _Invalid date_ + + * Unpublished package. + ## v1.0.11 - _October 4, 2018_ * Dependencies updated @@ -33,7 +41,7 @@ CHANGELOG * Dependencies updated -## v1.0.4 - _August 13, 2018_ +## v1.0.4 - _August 14, 2018_ * Dependencies updated @@ -55,6 +63,6 @@ CHANGELOG * Add `TransactionReceiptStatus` type (#812) * Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField` (#924) -## v0.0.2 - _May 31, 2018_ +## v0.0.2 - _June 1, 2018_ * Initial publish (#642) diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index f8a2eab70..b9840957e 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Updated to use new @0xproject/contract-artifacts and @0xproject/abi-gen-wrappers packages", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.7", diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md index bf6fcf13e..20ef1322c 100644 --- a/packages/fill-scenarios/CHANGELOG.md +++ b/packages/fill-scenarios/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.8 - _October 18, 2018_ + + * Updated to use new @0xproject/contract-artifacts and @0xproject/abi-gen-wrappers packages (#1105) + ## v1.0.7 - _October 4, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Dependencies updated -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.3 - _August 14, 2018_ * Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface (#936) * Dependencies updated diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index 08e74b6db..8a88df6e2 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -7,7 +7,8 @@ "Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages.", "pr": 1145 } - ] + ], + "timestamp": 1539871071 }, { "timestamp": 1538693146, diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index d9813053f..21efe1be0 100644 --- a/packages/json-schemas/CHANGELOG.md +++ b/packages/json-schemas/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.0 - _October 18, 2018_ + + * Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages. (#1145) + ## v1.0.7 - _October 4, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Update incorrect relayer api fee recipients response schema (#974) -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 14, 2018_ * Allow for additional properties in txData schema (#938) * Change hexSchema to match `0x` (#937) diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index 6c1959a7e..6d93feb1e 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -7,7 +7,8 @@ "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 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.14", diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index 81f9fabe3..8d3346972 100644 --- a/packages/migrations/CHANGELOG.md +++ b/packages/migrations/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.0 - _October 18, 2018_ + + * 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. (#1105) + ## v1.0.14 - _October 4, 2018_ * Dependencies updated @@ -45,7 +49,7 @@ CHANGELOG * Dependencies updated -## v1.0.4 - _August 13, 2018_ +## v1.0.4 - _August 14, 2018_ * Dependencies updated diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index 9bf16ef2a..22af2412b 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -19,7 +19,8 @@ "note": "Use `AssetData` union type for function return values.", "pr": 1131 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.7", diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md index 24598883a..afd5c4adc 100644 --- a/packages/order-utils/CHANGELOG.md +++ b/packages/order-utils/CHANGELOG.md @@ -5,6 +5,13 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.0 - _October 18, 2018_ + + * Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`. (#1102) + * Added `ecSignTypedDataOrderAsync` to sign an order exclusively using `eth_signTypedData`. (#1102) + * Rename `ecSignOrderHashAsync` to `ecSignHashAsync` removing `SignerType` parameter. (#1102) + * Use `AssetData` union type for function return values. (#1131) + ## v1.0.7 - _October 4, 2018_ * Dependencies updated @@ -52,7 +59,7 @@ CHANGELOG * Make `sortFeeOrdersByFeeAdjustedRate` in `sortingUtils` generic (#997) * Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees (#997) -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.3 - _August 14, 2018_ * Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts. (#914) * Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters (#936) diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index 1fa0b3bc9..d574f4a18 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -11,7 +11,8 @@ "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter.", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "2.1.1", diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index 5fdf5c944..299af5437 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.0 - _October 18, 2018_ + + * Added getStats function and returns a Stats object (#1118) + * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter. (#1105) + ## v2.1.1 - _October 4, 2018_ * Dependencies updated @@ -48,7 +53,7 @@ CHANGELOG * Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload` (#924) * Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order` (#924) -## v1.0.1-rc.3 - _August 13, 2018_ +## v1.0.1-rc.3 - _August 14, 2018_ * Dependencies updated diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index ac3f22716..97485be96 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.14", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.13", "changes": [ diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index 485bf61a6..096bd8460 100644 --- a/packages/react-docs/CHANGELOG.md +++ b/packages/react-docs/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.14 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.13 - _October 4, 2018_ * Dependencies updated @@ -37,7 +41,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index ee0352561..8578b4603 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -5,7 +5,8 @@ { "note": "Dependencies updated" } - ] + ], + "timestamp": 1539871071 }, { "timestamp": 1538693146, diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md index 20d3e0bf7..fc3f7e32c 100644 --- a/packages/react-shared/CHANGELOG.md +++ b/packages/react-shared/CHANGELOG.md @@ -5,10 +5,14 @@ Edit the package's CHANGELOG.json file only. CHANGELOG -## v1.0.15 - _October 4, 2018_ +## v1.0.17 - _October 18, 2018_ * Dependencies updated +## v1.0.16 - _October 4, 2018_ + + * Unpublished package + ## v1.0.14 - _October 2, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Dependencies updated -## v1.0.6 - _August 13, 2018_ +## v1.0.6 - _August 14, 2018_ * Dependencies updated diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index 3b19a253a..d945c305b 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.1.8", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.1.7", "changes": [ diff --git a/packages/sol-compiler/CHANGELOG.md b/packages/sol-compiler/CHANGELOG.md index d436462c9..1a86d097d 100644 --- a/packages/sol-compiler/CHANGELOG.md +++ b/packages/sol-compiler/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.8 - _October 18, 2018_ + + * Dependencies updated + ## v1.1.7 - _October 4, 2018_ * Dependencies updated @@ -39,7 +43,7 @@ CHANGELOG * Stop exporting types: `ContractArtifact`, `ContractNetworks` (#924) * Export types: `CompilerSettings`, `OutputField` (#924) -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index 283946f07..cbee0233b 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Make @types/solidity-parser-antlr a 'dependency' so it's available to users of the library", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "2.1.7", diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md index c019c9e79..11ed486e2 100644 --- a/packages/sol-cov/CHANGELOG.md +++ b/packages/sol-cov/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.8 - _October 18, 2018_ + + * Make @types/solidity-parser-antlr a 'dependency' so it's available to users of the library (#1105) + ## v2.1.7 - _October 4, 2018_ * Dependencies updated @@ -37,7 +41,7 @@ CHANGELOG * Export types: `JSONRPCRequestPayload`, `Provider`, `JSONRPCErrorCallback`, `JSONRPCResponsePayload`, `JSONRPCRequestPayloadWithMethod`, `NextCallback`, `ErrorCallback`, `OnNextCompleted` and `Callback` (#924) -## v2.0.0 - _August 13, 2018_ +## v2.0.0 - _August 14, 2018_ * Fix a bug when eth_call coverage was not computed because of silent schema validation failures (#938) * Make `TruffleArtifactAdapter` read the `truffle.js` config for `solc` settings (#938) diff --git a/packages/sol-doc/CHANGELOG.json b/packages/sol-doc/CHANGELOG.json index c0b094ba0..e117ff291 100644 --- a/packages/sol-doc/CHANGELOG.json +++ b/packages/sol-doc/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.2", "changes": [ diff --git a/packages/sol-doc/CHANGELOG.md b/packages/sol-doc/CHANGELOG.md index 437c2e7be..9adc02b19 100644 --- a/packages/sol-doc/CHANGELOG.md +++ b/packages/sol-doc/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.3 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.2 - _October 4, 2018_ * Dependencies updated diff --git a/packages/sol-resolver/CHANGELOG.json b/packages/sol-resolver/CHANGELOG.json index f09870cac..a72ca6d63 100644 --- a/packages/sol-resolver/CHANGELOG.json +++ b/packages/sol-resolver/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.15", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1538693146, "version": "1.0.14", diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md index ef9033dde..671d3ea84 100644 --- a/packages/sol-resolver/CHANGELOG.md +++ b/packages/sol-resolver/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.15 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.14 - _October 4, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Fix a bug where RelativeFSResolver would crash when trying to read a directory (#909) * Fix a bug where NpmResolver would crash when trying to read a directory (#961) diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index 333a1dde0..a068df3fb 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "1.0.6", diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index 4d27f20df..ba4cddec2 100644 --- a/packages/sra-spec/CHANGELOG.md +++ b/packages/sra-spec/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.7 - _October 18, 2018_ + + * Make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library (#1105) + ## v1.0.6 - _October 4, 2018_ * Dependencies updated @@ -38,6 +42,6 @@ CHANGELOG * Add takerAddress to /orders parameters (#974) -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 14, 2018_ * Add inital spec for SRA v2 (#916) diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index 6aeeeb333..b145bbbe5 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -14,7 +14,8 @@ "note": "Make web3-provider-engine types a 'dependency' so it's available to users of the library", "pr": 1105 } - ] + ], + "timestamp": 1539871071 }, { "version": "2.0.7", diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index 872948ad7..f9e3e63a6 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.0 - _October 18, 2018_ + + * Add `MetamaskSubprovider` to handle inconsistent JSON RPC behaviour (#1102) + * Add support for `eth_signTypedData` in wallets Mnemonic, Private and EthLightWallet (#1102) + * Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105) + ## v2.0.7 - _October 4, 2018_ * Dependencies updated @@ -37,7 +43,7 @@ CHANGELOG * Export types: `PartialTxParams`, `JSONRPCRequestPayloadWithMethod`, `ECSignatureString`, `AccountFetchingConfigs`, `LedgerEthereumClientFactoryAsync`, `OnNextCompleted`, `MnemonicWalletSubproviderConfigs`, LedgerGetAddressResult, `JSONRPCRequestPayload`, `Provider`, `JSONRPCResponsePayload` and `JSONRPCErrorCallback` (#924) -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json index 2a9b22922..99fbc7989 100644 --- a/packages/tslint-config/CHANGELOG.json +++ b/packages/tslint-config/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "1.0.9", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1538693146, "version": "1.0.8", diff --git a/packages/tslint-config/CHANGELOG.md b/packages/tslint-config/CHANGELOG.md index 0486cb523..f0b429d29 100644 --- a/packages/tslint-config/CHANGELOG.md +++ b/packages/tslint-config/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.9 - _October 18, 2018_ + + * Dependencies updated + ## v1.0.8 - _October 4, 2018_ * Dependencies updated @@ -17,7 +21,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Dependencies updated diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index 106dc3281..84a06faa8 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -14,7 +14,8 @@ "note": "Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`)", "pr": 1131 } - ] + ], + "timestamp": 1539871071 }, { "timestamp": 1538693146, diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index aeb056903..d1b8ea79c 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -5,6 +5,12 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.2.0 - _October 18, 2018_ + + * Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing (#1102) + * Added `ZeroExTransaction` type for Exchange executeTransaction (#1102) + * Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`) (#1131) + ## v1.1.4 - _October 4, 2018_ * Dependencies updated @@ -44,7 +50,7 @@ CHANGELOG * Add revert reasons for ERC721Token (#933) -## v1.0.1-rc.4 - _August 13, 2018_ +## v1.0.1-rc.4 - _August 14, 2018_ * Added SignerType to handle different signing prefix scenarios (#914) diff --git a/packages/typescript-typings/CHANGELOG.json b/packages/typescript-typings/CHANGELOG.json index 4a85fd592..e21e788b5 100644 --- a/packages/typescript-typings/CHANGELOG.json +++ b/packages/typescript-typings/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "3.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1538693146, "version": "3.0.2", diff --git a/packages/typescript-typings/CHANGELOG.md b/packages/typescript-typings/CHANGELOG.md index 71ab1113b..df58bfc57 100644 --- a/packages/typescript-typings/CHANGELOG.md +++ b/packages/typescript-typings/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.3 - _October 18, 2018_ + + * Dependencies updated + ## v3.0.2 - _October 4, 2018_ * Dependencies updated @@ -33,7 +37,7 @@ CHANGELOG * Dependencies updated -## v1.0.4 - _August 13, 2018_ +## v1.0.4 - _August 14, 2018_ * Dependencies updated diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 237ebeecc..7594581d4 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1539871071, + "version": "2.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1538693146, "version": "2.0.2", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index fa731ecf0..45b2cd0c2 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.3 - _October 18, 2018_ + + * Dependencies updated + ## v2.0.2 - _October 4, 2018_ * Dependencies updated @@ -41,7 +45,7 @@ CHANGELOG * Dependencies updated -## v1.0.5 - _August 13, 2018_ +## v1.0.5 - _August 14, 2018_ * Increased BigNumber decimal precision from 20 to 78 (#807) * Store different ABIs for events with same function signature and different amount of indexed arguments (#933) diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index be5c1fef6..b8d06eac1 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -11,7 +11,8 @@ "Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned.", "pr": 1102 } - ] + ], + "timestamp": 1539871071 }, { "version": "3.0.3", diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index 8f1dc0f3f..90d62953a 100644 --- a/packages/web3-wrapper/CHANGELOG.md +++ b/packages/web3-wrapper/CHANGELOG.md @@ -5,6 +5,11 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.1.0 - _October 18, 2018_ + + * Add `signTypedData` to perform EIP712 `eth_signTypedData`. (#1102) + * Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned. (#1102) + ## v3.0.3 - _October 4, 2018_ * Dependencies updated @@ -40,7 +45,7 @@ CHANGELOG * Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC` (#924) * Export `AbiDecoder` class (#924) -## v1.2.0 - _August 13, 2018_ +## v1.2.0 - _August 14, 2018_ * Export marshaller to convert between RPC and user-space data formats (#938) * Export RPC types (#938) @@ -80,7 +85,7 @@ CHANGELOG * Dependencies updated -## v0.7.0 - _June 3, 2018_ +## v0.7.0 - _June 4, 2018_ * Add `web3Wrapper.getContractCodeAsync` (#675) * Add `web3Wrapper.getTransactionTraceAsync` (#675) -- cgit From 8b62b350b1fed6a0d8827ca9ed5fcec3e78ae82f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 16:03:00 +0200 Subject: Publish - 0x.js@2.0.0 - @0x/abi-gen@1.0.14 - @0x/abi-gen-wrappers@1.0.1 - @0x/assert@1.0.14 - @0x/asset-buyer@2.1.0 - @0x/base-contract@3.0.2 - @0x/connect@3.0.2 - @0x/contract-addresses@1.0.1 - @0x/contract-artifacts@1.0.1 - @0x/contract-wrappers@3.0.0 - contracts@2.1.50 - @0x/dev-tools-pages@0.0.2 - @0x/dev-utils@1.0.13 - ethereum-types@1.1.1 - @0x/fill-scenarios@1.0.8 - @0x/instant@0.0.3 - @0x/json-schemas@2.0.0 - @0x/metacoin@0.0.24 - @0x/migrations@2.0.0 - @0x/monorepo-scripts@1.0.12 - @0x/order-utils@2.0.0 - @0x/order-watcher@2.2.0 - @0x/react-docs@1.0.14 - @0x/react-shared@1.0.17 - @0x/sol-compiler@1.1.8 - @0x/sol-cov@2.1.8 - @0x/sol-doc@1.0.3 - @0x/sol-resolver@1.0.15 - @0x/sra-spec@1.0.7 - @0x/subproviders@2.1.0 - @0x/testnet-faucets@1.0.52 - @0x/tslint-config@1.0.9 - @0x/types@1.2.0 - @0x/typescript-typings@3.0.3 - @0x/utils@2.0.3 - @0x/web3-wrapper@3.1.0 - @0x/website@0.0.55 --- packages/0x.js/package.json | 38 ++++++++++++++++---------------- packages/abi-gen-wrappers/package.json | 14 ++++++------ packages/abi-gen/package.json | 10 ++++----- packages/assert/package.json | 10 ++++----- packages/asset-buyer/package.json | 26 +++++++++++----------- packages/base-contract/package.json | 12 +++++----- packages/connect/package.json | 16 +++++++------- packages/contract-addresses/package.json | 6 ++--- packages/contract-artifacts/package.json | 6 ++--- packages/contract-wrappers/package.json | 34 ++++++++++++++-------------- packages/contracts/package.json | 28 +++++++++++------------ packages/dev-tools-pages/package.json | 4 ++-- packages/dev-utils/package.json | 16 +++++++------- packages/ethereum-types/package.json | 4 ++-- packages/fill-scenarios/package.json | 22 +++++++++--------- packages/instant/package.json | 16 +++++++------- packages/json-schemas/package.json | 8 +++---- packages/metacoin/package.json | 26 +++++++++++----------- packages/migrations/package.json | 30 ++++++++++++------------- packages/monorepo-scripts/package.json | 2 +- packages/order-utils/package.json | 26 +++++++++++----------- packages/order-watcher/package.json | 36 +++++++++++++++--------------- packages/react-docs/package.json | 12 +++++----- packages/react-shared/package.json | 12 +++++----- packages/sol-compiler/package.json | 22 +++++++++--------- packages/sol-cov/package.json | 18 +++++++-------- packages/sol-doc/package.json | 12 +++++----- packages/sol-resolver/package.json | 8 +++---- packages/sra-spec/package.json | 6 ++--- packages/subproviders/package.json | 16 +++++++------- packages/testnet-faucets/package.json | 16 +++++++------- packages/tslint-config/package.json | 2 +- packages/types/package.json | 6 ++--- packages/typescript-typings/package.json | 4 ++-- packages/utils/package.json | 10 ++++----- packages/web3-wrapper/package.json | 14 ++++++------ packages/website/package.json | 24 ++++++++++---------- 37 files changed, 286 insertions(+), 286 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index b94a910ed..11339b7d8 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "1.0.8", + "version": "2.0.0", "engines": { "node": ">=6.12" }, @@ -42,13 +42,13 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/contract-addresses": "^1.0.0", - "@0x/abi-gen": "^1.0.13", - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/dev-utils": "^1.0.12", - "@0x/migrations": "^1.0.14", - "@0x/monorepo-scripts": "^1.0.11", - "@0x/tslint-config": "^1.0.8", + "@0x/abi-gen": "^1.0.14", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/contract-addresses": "^1.0.1", + "@0x/dev-utils": "^1.0.13", + "@0x/migrations": "^2.0.0", + "@0x/monorepo-scripts": "^1.0.12", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "*", @@ -74,18 +74,18 @@ "webpack": "^4.20.2" }, "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/base-contract": "^3.0.1", - "@0x/contract-wrappers": "^2.0.2", - "@0x/order-utils": "^1.0.7", - "@0x/order-watcher": "^2.1.1", - "@0x/subproviders": "^2.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.14", + "@0x/base-contract": "^3.0.2", + "@0x/contract-wrappers": "^3.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/order-watcher": "^2.2.0", + "@0x/subproviders": "^2.1.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/web3-provider-engine": "^14.0.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5", "web3-provider-engine": "14.0.6" diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 468620eb9..313cc339d 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen-wrappers", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -30,17 +30,17 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.12", - "@0x/tslint-config": "^1.0.8", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/abi-gen": "^1.0.14", + "@0x/tslint-config": "^1.0.9", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0x/base-contract": "^3.0.1" + "@0x/base-contract": "^3.0.2" }, "publishConfig": { "access": "public" diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index dfd4163bf..f32bb3a31 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen", - "version": "1.0.13", + "version": "1.0.14", "engines": { "node": ">=6.12" }, @@ -31,10 +31,10 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", "dependencies": { - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", "chalk": "^2.3.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "glob": "^7.1.2", "handlebars": "^4.0.11", "lodash": "^4.17.5", @@ -45,7 +45,7 @@ "yargs": "^10.0.3" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/glob": "5.0.35", "@types/handlebars": "^4.0.36", "@types/mkdirp": "^0.5.1", diff --git a/packages/assert/package.json b/packages/assert/package.json index ea5f89b0b..37af8979d 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0x/assert", - "version": "1.0.13", + "version": "1.0.14", "engines": { "node": ">=6.12" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/assert/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/valid-url": "^1.0.2", @@ -44,9 +44,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/json-schemas": "^1.0.7", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", + "@0x/json-schemas": "^2.0.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", "lodash": "^4.17.5", "valid-url": "^1.0.9" }, diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index aed45ac7f..e4b4d19c0 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -1,6 +1,6 @@ { "name": "@0x/asset-buyer", - "version": "2.0.0", + "version": "2.1.0", "engines": { "node": ">=6.12" }, @@ -36,21 +36,21 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/connect": "^3.0.1", - "@0x/contract-wrappers": "^2.0.2", - "@0x/json-schemas": "^1.0.7", - "@0x/order-utils": "^1.0.7", - "@0x/subproviders": "^2.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/assert": "^1.0.14", + "@0x/connect": "^3.0.2", + "@0x/contract-wrappers": "^3.0.0", + "@0x/json-schemas": "^2.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/subproviders": "^2.1.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "lodash": "^4.17.10" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "^4.14.116", "@types/mocha": "^2.2.42", "@types/node": "*", diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index d99252da4..676e8aab9 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -1,6 +1,6 @@ { "name": "@0x/base-contract", - "version": "3.0.1", + "version": "3.0.2", "engines": { "node": ">=6.12" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/base-contract/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "chai": "^4.0.1", "make-promises-safe": "^1.1.0", @@ -40,10 +40,10 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/connect/package.json b/packages/connect/package.json index 73c6d38f6..95b1bbd7d 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0x/connect", - "version": "3.0.1", + "version": "3.0.2", "engines": { "node": ">=6.12" }, @@ -44,12 +44,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/json-schemas": "^1.0.7", - "@0x/order-utils": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", + "@0x/assert": "^1.0.14", + "@0x/json-schemas": "^2.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", "lodash": "^4.17.5", "query-string": "^5.0.1", "sinon": "^4.0.0", @@ -57,7 +57,7 @@ "websocket": "^1.0.25" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/fetch-mock": "^6.0.3", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", diff --git a/packages/contract-addresses/package.json b/packages/contract-addresses/package.json index 809fc1fc9..3136d571b 100644 --- a/packages/contract-addresses/package.json +++ b/packages/contract-addresses/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-addresses", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -25,8 +25,8 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-addresses/README.md", "devDependencies": { "@types/lodash": "4.14.104", - "typescript": "3.0.1", - "shx": "^0.2.2" + "shx": "^0.2.2", + "typescript": "3.0.1" }, "dependencies": { "lodash": "^4.17.5" diff --git a/packages/contract-artifacts/package.json b/packages/contract-artifacts/package.json index 9ff836c65..53f5d3c47 100644 --- a/packages/contract-artifacts/package.json +++ b/packages/contract-artifacts/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-artifacts", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -24,8 +24,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-artifacts/README.md", "devDependencies": { - "typescript": "3.0.1", - "shx": "^0.2.2" + "shx": "^0.2.2", + "typescript": "3.0.1" }, "publishConfig": { "access": "public" diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 741adec2a..d427bb628 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-wrappers", - "version": "2.0.2", + "version": "3.0.0", "description": "Smart TS wrappers for 0x smart contracts", "keywords": [ "0xproject", @@ -37,10 +37,10 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/migrations": "^1.0.14", - "@0x/subproviders": "^2.0.7", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/migrations": "^2.0.0", + "@0x/subproviders": "^2.1.0", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "@types/node": "*", @@ -65,18 +65,18 @@ "web3-provider-engine": "14.0.6" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/assert": "^1.0.13", - "@0x/contract-addresses": "^1.0.0", - "@0x/contract-artifacts": "^1.0.0", - "@0x/fill-scenarios": "^1.0.7", - "@0x/json-schemas": "^1.0.7", - "@0x/order-utils": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/assert": "^1.0.14", + "@0x/contract-addresses": "^1.0.1", + "@0x/contract-artifacts": "^1.0.1", + "@0x/fill-scenarios": "^1.0.8", + "@0x/json-schemas": "^2.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index ef26c186b..3a5f12c74 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.49", + "version": "2.1.50", "engines": { "node": ">=6.12" }, @@ -45,12 +45,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.13", - "@0x/dev-utils": "^1.0.12", - "@0x/sol-compiler": "^1.1.7", - "@0x/sol-cov": "^2.1.7", - "@0x/subproviders": "^2.0.7", - "@0x/tslint-config": "^1.0.8", + "@0x/abi-gen": "^1.0.14", + "@0x/dev-utils": "^1.0.13", + "@0x/sol-compiler": "^1.1.8", + "@0x/sol-cov": "^2.1.8", + "@0x/subproviders": "^2.1.0", + "@0x/tslint-config": "^1.0.9", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", "@types/lodash": "4.14.104", @@ -71,15 +71,15 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/base-contract": "^3.0.1", - "@0x/order-utils": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/base-contract": "^3.0.2", + "@0x/order-utils": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json index e4d02bdaf..3563b4bef 100644 --- a/packages/dev-tools-pages/package.json +++ b/packages/dev-tools-pages/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-tools-pages", - "version": "0.0.1", + "version": "0.0.2", "engines": { "node": ">=6.12" }, @@ -16,7 +16,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@0x/react-shared": "^1.0.15", + "@0x/react-shared": "^1.0.17", "basscss": "^8.0.3", "bowser": "^1.9.3", "less": "^2.7.2", diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json index ddd66a9a8..d1b1efc87 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-utils", - "version": "1.0.12", + "version": "1.0.13", "engines": { "node": ">=6.12" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/dev-utils/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", "make-promises-safe": "^1.1.0", @@ -41,14 +41,14 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/subproviders": "^2.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/subproviders": "^2.1.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json index 335c36c2b..d24e39dfd 100644 --- a/packages/ethereum-types/package.json +++ b/packages/ethereum-types/package.json @@ -1,6 +1,6 @@ { "name": "ethereum-types", - "version": "1.1.0", + "version": "1.1.1", "engines": { "node": ">=6.12" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/ethereum-types/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 57cc8b017..0e1303259 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@0x/fill-scenarios", - "version": "1.0.7", + "version": "1.0.8", "description": "0x order fill scenario generator", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -20,7 +20,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", @@ -28,15 +28,15 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/base-contract": "^3.0.1", - "@0x/contract-artifacts": "^1.0.0", - "@0x/order-utils": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/base-contract": "^3.0.2", + "@0x/contract-artifacts": "^1.0.1", + "@0x/order-utils": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/instant/package.json b/packages/instant/package.json index d0494b6e7..cf30a5354 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,6 +1,6 @@ { "name": "@0x/instant", - "version": "0.0.2", + "version": "0.0.3", "engines": { "node": ">=6.12" }, @@ -43,12 +43,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0x/asset-buyer": "^2.0.0", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", - "ethereum-types": "^1.1.0", + "@0x/asset-buyer": "^2.1.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", + "ethereum-types": "^1.1.1", "lodash": "^4.17.10", "polished": "^2.2.0", "react": "^16.5.2", @@ -60,7 +60,7 @@ "ts-optchain": "^0.1.1" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/enzyme": "^3.1.14", "@types/enzyme-adapter-react-16": "^1.0.3", "@types/jest": "^23.3.5", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index 41226a7c4..97cf607c1 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0x/json-schemas", - "version": "1.0.7", + "version": "2.0.0", "engines": { "node": ">=6.12" }, @@ -39,14 +39,14 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md", "dependencies": { - "@0x/typescript-typings": "^3.0.2", + "@0x/typescript-typings": "^3.0.3", "@types/node": "*", "jsonschema": "^1.2.0", "lodash.values": "^4.3.0" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", - "@0x/utils": "^2.0.2", + "@0x/tslint-config": "^1.0.9", + "@0x/utils": "^2.0.3", "@types/lodash.foreach": "^4.5.3", "@types/lodash.values": "^4.3.3", "@types/mocha": "^2.2.42", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index c6090ba4f..04bdeba4c 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -1,6 +1,6 @@ { "name": "@0x/metacoin", - "version": "0.0.23", + "version": "0.0.24", "engines": { "node": ">=6.12" }, @@ -29,25 +29,25 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@0x/abi-gen": "^1.0.13", - "@0x/base-contract": "^3.0.1", - "@0x/sol-cov": "^2.1.7", - "@0x/subproviders": "^2.0.7", - "@0x/tslint-config": "^1.0.8", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/abi-gen": "^1.0.14", + "@0x/base-contract": "^3.0.2", + "@0x/sol-cov": "^2.1.8", + "@0x/subproviders": "^2.1.0", + "@0x/tslint-config": "^1.0.9", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5", "run-s": "^0.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/sol-compiler": "^1.1.7", + "@0x/dev-utils": "^1.0.13", + "@0x/sol-compiler": "^1.1.8", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.1", diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 7b975ad4f..353697bfc 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,6 +1,6 @@ { "name": "@0x/migrations", - "version": "1.0.14", + "version": "2.0.0", "engines": { "node": ">=6.12" }, @@ -17,9 +17,9 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/tslint-config": "^1.0.8", - "@0x/types": "^1.1.4", + "@0x/dev-utils": "^1.0.13", + "@0x/tslint-config": "^1.0.9", + "@0x/types": "^1.2.0", "@types/yargs": "^10.0.0", "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", @@ -29,18 +29,18 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/base-contract": "^3.0.1", - "@0x/contract-addresses": "^1.0.0", - "@0x/contract-artifacts": "^1.0.0", - "@0x/order-utils": "^1.0.7", - "@0x/sol-compiler": "^1.1.7", - "@0x/subproviders": "^2.0.7", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/base-contract": "^3.0.2", + "@0x/contract-addresses": "^1.0.1", + "@0x/contract-artifacts": "^1.0.1", + "@0x/order-utils": "^2.0.0", + "@0x/sol-compiler": "^1.1.8", + "@0x/subproviders": "^2.1.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@ledgerhq/hw-app-eth": "^4.3.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5" }, diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index 3a783af9b..ba5f9ca6a 100644 --- a/packages/monorepo-scripts/package.json +++ b/packages/monorepo-scripts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0x/monorepo-scripts", - "version": "1.0.11", + "version": "1.0.12", "engines": { "node": ">=6.12" }, diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 7899d8a73..69f14a79e 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-utils", - "version": "1.0.7", + "version": "2.0.0", "engines": { "node": ">=6.12" }, @@ -35,8 +35,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/tslint-config": "^1.0.9", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", "chai": "^4.0.1", @@ -53,18 +53,18 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/assert": "^1.0.13", - "@0x/base-contract": "^3.0.1", - "@0x/contract-artifacts": "^1.0.0", - "@0x/json-schemas": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/assert": "^1.0.14", + "@0x/base-contract": "^3.0.2", + "@0x/contract-artifacts": "^1.0.1", + "@0x/json-schemas": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/node": "*", "bn.js": "^4.11.8", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-abi": "0.6.5", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index bcc0bb76c..acc70544e 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-watcher", - "version": "2.1.1", + "version": "2.2.0", "description": "An order watcher daemon that watches for order validity", "keywords": [ "0x", @@ -33,9 +33,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/migrations": "^1.0.14", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/migrations": "^2.0.0", + "@0x/tslint-config": "^1.0.9", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -57,21 +57,21 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.0", - "@0x/assert": "^1.0.13", - "@0x/base-contract": "^3.0.1", - "@0x/contract-addresses": "^1.0.0", - "@0x/contract-artifacts": "^1.0.0", - "@0x/contract-wrappers": "^2.0.2", - "@0x/fill-scenarios": "^1.0.7", - "@0x/json-schemas": "^1.0.7", - "@0x/order-utils": "^1.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/abi-gen-wrappers": "^1.0.1", + "@0x/assert": "^1.0.14", + "@0x/base-contract": "^3.0.2", + "@0x/contract-addresses": "^1.0.1", + "@0x/contract-artifacts": "^1.0.1", + "@0x/contract-wrappers": "^3.0.0", + "@0x/fill-scenarios": "^1.0.8", + "@0x/json-schemas": "^2.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "bintrees": "^1.0.2", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-blockstream": "6.0.0", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index aeb3fb9ae..04e1387c6 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-docs", - "version": "1.0.13", + "version": "1.0.14", "engines": { "node": ">=6.12" }, @@ -24,8 +24,8 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/tslint-config": "^1.0.9", "@types/compare-versions": "^3.0.0", "@types/styled-components": "^4.0.0", "make-promises-safe": "^1.1.0", @@ -34,9 +34,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/react-shared": "^1.0.15", - "@0x/types": "^1.1.4", - "@0x/utils": "^2.0.2", + "@0x/react-shared": "^1.0.17", + "@0x/types": "^1.2.0", + "@0x/utils": "^2.0.3", "@types/lodash": "4.14.104", "@types/material-ui": "^0.20.0", "@types/node": "*", diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index ed0fcb309..488586f89 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-shared", - "version": "1.0.15", + "version": "1.0.17", "engines": { "node": ">=6.12" }, @@ -25,15 +25,15 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/tslint-config": "^1.0.9", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "^5.9.1", "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.1.4", + "@0x/types": "^1.2.0", "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", @@ -43,8 +43,8 @@ "@types/react-dom": "*", "@types/react-router-dom": "^4.0.4", "@types/react-scroll": "1.5.3", - "@types/valid-url": "^1.0.2", "@types/styled-components": "^4.0.0", + "@types/valid-url": "^1.0.2", "basscss": "^8.0.3", "change-case": "^3.0.2", "is-mobile": "^0.2.2", @@ -54,8 +54,8 @@ "react-dom": "^16.4.2", "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "react-router-dom": "^4.1.1", + "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", "styled-components": "^3.3.0", "valid-url": "^1.0.9" }, diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 42c4a83bc..4c4370b1f 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-compiler", - "version": "1.1.7", + "version": "1.1.8", "engines": { "node": ">=6.12" }, @@ -42,8 +42,8 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/tslint-config": "^1.0.8", + "@0x/dev-utils": "^1.0.13", + "@0x/tslint-config": "^1.0.9", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", "@types/semver": "^5.5.0", @@ -65,16 +65,16 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/json-schemas": "^1.0.7", - "@0x/sol-resolver": "^1.0.14", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.14", + "@0x/json-schemas": "^2.0.0", + "@0x/sol-resolver": "^1.0.15", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.5", "mkdirp": "^0.5.1", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 7dc0675bf..a56713d69 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-cov", - "version": "2.1.7", + "version": "2.1.8", "engines": { "node": ">=6.12" }, @@ -42,14 +42,14 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", "dependencies": { - "@0x/dev-utils": "^1.0.12", - "@0x/sol-compiler": "^1.1.7", - "@0x/subproviders": "^2.0.7", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/dev-utils": "^1.0.13", + "@0x/sol-compiler": "^1.1.8", + "@0x/subproviders": "^2.1.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@types/solidity-parser-antlr": "^0.2.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "glob": "^7.1.2", "istanbul": "^0.4.5", @@ -61,7 +61,7 @@ "solidity-parser-antlr": "^0.2.12" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/istanbul": "^0.4.30", "@types/loglevel": "^1.5.3", "@types/mkdirp": "^0.5.1", diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index 0cee53231..de10b9e17 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-doc", - "version": "1.0.2", + "version": "1.0.3", "description": "Solidity documentation generator", "main": "lib/src/index.js", "types": "lib/src/index.d.js", @@ -25,16 +25,16 @@ "author": "F. Eugene Aumson", "license": "Apache-2.0", "dependencies": { - "@0x/sol-compiler": "^1.1.7", - "@0x/types": "^1.1.4", - "@0x/utils": "^2.0.2", - "ethereum-types": "^1.1.0", + "@0x/sol-compiler": "^1.1.8", + "@0x/types": "^1.2.0", + "@0x/utils": "^2.0.3", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.10", "yargs": "^12.0.2" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "chai": "^4.1.2", "chai-as-promised": "^7.1.0", "chai-bignumber": "^2.0.2", diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json index a8df0f750..4bd63f406 100644 --- a/packages/sol-resolver/package.json +++ b/packages/sol-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-resolver", - "version": "1.0.14", + "version": "1.0.15", "engines": { "node": ">=6.12" }, @@ -23,15 +23,15 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/resolver/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", "lodash": "^4.17.5" }, "publishConfig": { diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index 8cbb3cc9f..0c55465d7 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sra-spec", - "version": "1.0.6", + "version": "1.0.7", "engines": { "node": ">=6.12" }, @@ -35,11 +35,11 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0x/json-schemas": "^1.0.7", + "@0x/json-schemas": "^2.0.0", "@loopback/openapi-v3-types": "^0.8.2" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/mocha": "^2.2.42", "@types/node": "^10.5.3", "chai": "^4.0.1", diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index 272c740b9..4eef09fe6 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,6 +1,6 @@ { "name": "@0x/subproviders", - "version": "2.0.7", + "version": "2.1.0", "engines": { "node": ">=6.12" }, @@ -29,11 +29,11 @@ } }, "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/assert": "^1.0.14", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "@ledgerhq/hw-app-eth": "^4.3.0", "@ledgerhq/hw-transport-u2f": "^4.3.0", "@types/eth-lightwallet": "^3.0.0", @@ -43,7 +43,7 @@ "bip39": "^2.5.0", "bn.js": "^4.11.8", "eth-lightwallet": "^3.0.1", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-tx": "^1.3.5", "ethereumjs-util": "^5.1.1", "ganache-core": "^2.2.1", @@ -54,7 +54,7 @@ "web3-provider-engine": "14.0.6" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/bip39": "^2.4.0", "@types/bn.js": "^4.11.0", "@types/ethereumjs-tx": "^1.0.0", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index 77d9667c0..e683ae25a 100644 --- a/packages/testnet-faucets/package.json +++ b/packages/testnet-faucets/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@0x/testnet-faucets", - "version": "1.0.51", + "version": "1.0.52", "engines": { "node": ">=6.12" }, @@ -18,13 +18,13 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^1.0.8", - "@0x/subproviders": "^2.0.7", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "0x.js": "^2.0.0", + "@0x/subproviders": "^2.1.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "body-parser": "^1.17.1", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-tx": "^1.3.5", "ethereumjs-util": "^5.1.1", "express": "^4.15.2", @@ -32,7 +32,7 @@ "rollbar": "^0.6.5" }, "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/body-parser": "^1.16.1", "@types/express": "^4.0.35", "@types/lodash": "4.14.104", diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json index 6b35b9f27..0a8c1b245 100644 --- a/packages/tslint-config/package.json +++ b/packages/tslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@0x/tslint-config", - "version": "1.0.8", + "version": "1.0.9", "engines": { "node": ">=6.12" }, diff --git a/packages/types/package.json b/packages/types/package.json index c215cd2b4..fdd68a486 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@0x/types", - "version": "1.1.4", + "version": "1.2.0", "engines": { "node": ">=6.12" }, @@ -23,7 +23,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/types/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", "tslint": "5.11.0", @@ -32,7 +32,7 @@ "dependencies": { "@types/node": "*", "bignumber.js": "~4.1.0", - "ethereum-types": "^1.1.0" + "ethereum-types": "^1.1.1" }, "publishConfig": { "access": "public" diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json index fab8a35e5..6b9e67602 100644 --- a/packages/typescript-typings/package.json +++ b/packages/typescript-typings/package.json @@ -1,6 +1,6 @@ { "name": "@0x/typescript-typings", - "version": "3.0.2", + "version": "3.0.3", "engines": { "node": ">=6.12" }, @@ -27,7 +27,7 @@ "@types/bn.js": "^4.11.0", "@types/react": "*", "bignumber.js": "~4.1.0", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "popper.js": "1.14.3" }, "devDependencies": { diff --git a/packages/utils/package.json b/packages/utils/package.json index f2faa63b1..f89cfda17 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/utils", - "version": "2.0.2", + "version": "2.0.3", "engines": { "node": ">=6.12" }, @@ -28,7 +28,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/utils/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/detect-node": "2.0.0", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -41,13 +41,13 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", "@types/node": "*", "abortcontroller-polyfill": "^1.1.9", "bignumber.js": "~4.1.0", "detect-node": "2.0.3", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", "isomorphic-fetch": "^2.2.1", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 10560b609..579957747 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0x/web3-wrapper", - "version": "3.0.3", + "version": "3.1.0", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/web3-wrapper/README.md", "devDependencies": { - "@0x/tslint-config": "^1.0.8", + "@0x/tslint-config": "^1.0.9", "@types/ganache-core": "^2.1.0", "@types/lodash": "4.14.104", "chai": "^4.0.1", @@ -53,11 +53,11 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/assert": "^1.0.13", - "@0x/json-schemas": "^1.0.7", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "ethereum-types": "^1.1.0", + "@0x/assert": "^1.0.14", + "@0x/json-schemas": "^2.0.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/website/package.json b/packages/website/package.json index 5912121ff..777790ca9 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0x/website", - "version": "0.0.54", + "version": "0.0.55", "engines": { "node": ">=6.12" }, @@ -19,22 +19,22 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0x/contract-wrappers": "^2.0.2", - "@0x/json-schemas": "^1.0.7", - "@0x/order-utils": "^1.0.7", - "@0x/react-docs": "^1.0.13", - "@0x/react-shared": "^1.0.15", - "@0x/subproviders": "^2.0.7", - "@0x/types": "^1.1.4", - "@0x/typescript-typings": "^3.0.2", - "@0x/utils": "^2.0.2", - "@0x/web3-wrapper": "^3.0.3", + "@0x/contract-wrappers": "^3.0.0", + "@0x/json-schemas": "^2.0.0", + "@0x/order-utils": "^2.0.0", + "@0x/react-docs": "^1.0.14", + "@0x/react-shared": "^1.0.17", + "@0x/subproviders": "^2.1.0", + "@0x/types": "^1.2.0", + "@0x/typescript-typings": "^3.0.3", + "@0x/utils": "^2.0.3", + "@0x/web3-wrapper": "^3.1.0", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", "bowser": "^1.9.3", "deep-equal": "^1.0.1", - "ethereum-types": "^1.1.0", + "ethereum-types": "^1.1.1", "ethereumjs-util": "^5.1.1", "find-versions": "^2.0.0", "jsonschema": "^1.2.0", -- cgit From a7336d3c6594cdb2c19540d526b62ee05eda6cf5 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 16:16:27 +0200 Subject: Don't attempt publishing if no packages need it --- packages/monorepo-scripts/src/publish.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index c1a6b9d7f..b7131e69e 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -35,6 +35,10 @@ async function confirmAsync(message: string): Promise { // Fetch public, updated Lerna packages const shouldIncludePrivate = true; const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); + if (_.isEmpty(allUpdatedPackages)) { + utils.log('No packages need publishing'); + process.exit(0); + } const packagesWithDocs = getPackagesWithDocs(allUpdatedPackages); if (!configs.IS_LOCAL_PUBLISH) { -- cgit From 4fd3f12aebc8df826dd129dc164f17cb7078046a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 18 Oct 2018 16:25:13 +0200 Subject: Remove 0x.js -> monorepo-scripts dependency --- packages/0x.js/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 11339b7d8..56999d3e5 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -47,7 +47,6 @@ "@0x/contract-addresses": "^1.0.1", "@0x/dev-utils": "^1.0.13", "@0x/migrations": "^2.0.0", - "@0x/monorepo-scripts": "^1.0.12", "@0x/tslint-config": "^1.0.9", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", -- cgit From c4ae91c7c5aaa2d6e278448667bf828162be93bc Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Thu, 18 Oct 2018 17:31:38 +0100 Subject: Update doc ref markdown sections --- .../website/md/docs/asset_buyer/installation.md | 6 +-- .../website/md/docs/asset_buyer/introduction.md | 2 +- .../website/md/docs/connect/1.0.0/installation.md | 15 ------ .../website/md/docs/connect/1.0.0/introduction.md | 1 - packages/website/md/docs/connect/1/installation.md | 15 ++++++ packages/website/md/docs/connect/1/introduction.md | 1 + .../website/md/docs/connect/2.0.0/introduction.md | 1 - packages/website/md/docs/connect/2/introduction.md | 1 + packages/website/md/docs/connect/3/installation.md | 15 ++++++ .../md/docs/contract_wrappers/1/installation.md | 11 ++++ .../md/docs/contract_wrappers/1/introduction.md | 1 + .../md/docs/contract_wrappers/2/installation.md | 11 ++++ .../md/docs/contract_wrappers/installation.md | 11 ---- .../md/docs/contract_wrappers/introduction.md | 1 - .../md/docs/json_schemas/1.0.0/installation.md | 17 ------ .../md/docs/json_schemas/1.0.0/introduction.md | 3 -- .../website/md/docs/json_schemas/1.0.0/schemas.md | 28 ---------- .../website/md/docs/json_schemas/1.0.0/usage.md | 14 ----- .../website/md/docs/json_schemas/1/installation.md | 17 ++++++ .../website/md/docs/json_schemas/1/introduction.md | 3 ++ packages/website/md/docs/json_schemas/1/schemas.md | 28 ++++++++++ packages/website/md/docs/json_schemas/1/usage.md | 14 +++++ .../website/md/docs/json_schemas/2.0.0/schemas.md | 40 -------------- packages/website/md/docs/json_schemas/2/schemas.md | 40 ++++++++++++++ .../website/md/docs/json_schemas/3/installation.md | 17 ++++++ .../website/md/docs/json_schemas/3/introduction.md | 3 ++ packages/website/md/docs/json_schemas/3/usage.md | 14 +++++ .../md/docs/order_utils/1.0.0/installation.md | 17 ------ .../md/docs/order_utils/1.0.0/introduction.md | 1 - .../website/md/docs/order_utils/1/installation.md | 17 ++++++ .../website/md/docs/order_utils/1/introduction.md | 1 + .../website/md/docs/order_utils/2/installation.md | 17 ++++++ .../website/md/docs/order_utils/2/introduction.md | 1 + .../md/docs/order_watcher/1/installation.md | 17 ++++++ .../md/docs/order_watcher/1/introduction.md | 1 + .../md/docs/order_watcher/2/installation.md | 17 ++++++ .../md/docs/order_watcher/2/introduction.md | 1 + .../website/md/docs/order_watcher/installation.md | 17 ------ .../website/md/docs/order_watcher/introduction.md | 1 - .../md/docs/smart_contracts/1.0.0/introduction.md | 1 - .../md/docs/smart_contracts/1/introduction.md | 1 + .../md/docs/smart_contracts/2.0.0/introduction.md | 6 --- .../md/docs/smart_contracts/2/introduction.md | 6 +++ .../website/md/docs/sol-compiler/1/installation.md | 23 ++++++++ .../website/md/docs/sol-compiler/1/introduction.md | 8 +++ packages/website/md/docs/sol-compiler/1/usage.md | 24 +++++++++ .../website/md/docs/sol-compiler/2/installation.md | 23 ++++++++ packages/website/md/docs/sol-compiler/2/usage.md | 24 +++++++++ .../website/md/docs/sol-compiler/installation.md | 23 -------- .../website/md/docs/sol-compiler/introduction.md | 8 --- packages/website/md/docs/sol-compiler/usage.md | 24 --------- packages/website/md/docs/sol_cov/1/installation.md | 17 ++++++ packages/website/md/docs/sol_cov/1/introduction.md | 1 + packages/website/md/docs/sol_cov/1/usage.md | 62 ++++++++++++++++++++++ packages/website/md/docs/sol_cov/2/installation.md | 17 ++++++ packages/website/md/docs/sol_cov/2/introduction.md | 1 + packages/website/md/docs/sol_cov/2/usage.md | 62 ++++++++++++++++++++++ packages/website/md/docs/sol_cov/installation.md | 17 ------ packages/website/md/docs/sol_cov/introduction.md | 1 - packages/website/md/docs/sol_cov/usage.md | 62 ---------------------- .../website/md/docs/subproviders/1/installation.md | 15 ++++++ .../website/md/docs/subproviders/1/introduction.md | 1 + .../md/docs/subproviders/1/ledger_node_hid.md | 17 ++++++ .../website/md/docs/subproviders/2/installation.md | 15 ++++++ .../website/md/docs/subproviders/installation.md | 15 ------ .../website/md/docs/subproviders/introduction.md | 1 - .../md/docs/subproviders/ledger_node_hid.md | 17 ------ .../website/md/docs/web3_wrapper/1/installation.md | 25 +++++++++ .../website/md/docs/web3_wrapper/1/introduction.md | 1 + .../website/md/docs/web3_wrapper/2/installation.md | 25 +++++++++ .../website/md/docs/web3_wrapper/installation.md | 25 --------- .../website/md/docs/web3_wrapper/introduction.md | 1 - .../website/ts/containers/connect_documentation.ts | 19 ++++--- .../containers/contract_wrappers_documentation.ts | 13 +++-- .../ts/containers/json_schemas_documentation.ts | 31 +++++++---- .../ts/containers/order_utils_documentation.ts | 14 +++-- .../ts/containers/order_watcher_documentation.ts | 14 +++-- .../ts/containers/smart_contracts_documentation.ts | 8 +-- .../ts/containers/sol_compiler_documentation.ts | 19 ++++--- .../website/ts/containers/sol_cov_documentation.ts | 20 ++++--- .../ts/containers/subproviders_documentation.ts | 18 ++++--- .../ts/containers/web3_wrapper_documentation.ts | 13 +++-- .../ts/containers/zero_ex_js_documentation.ts | 15 ++++-- 83 files changed, 759 insertions(+), 432 deletions(-) delete mode 100644 packages/website/md/docs/connect/1.0.0/installation.md delete mode 100644 packages/website/md/docs/connect/1.0.0/introduction.md create mode 100644 packages/website/md/docs/connect/1/installation.md create mode 100644 packages/website/md/docs/connect/1/introduction.md delete mode 100644 packages/website/md/docs/connect/2.0.0/introduction.md create mode 100644 packages/website/md/docs/connect/2/introduction.md create mode 100644 packages/website/md/docs/connect/3/installation.md create mode 100644 packages/website/md/docs/contract_wrappers/1/installation.md create mode 100644 packages/website/md/docs/contract_wrappers/1/introduction.md create mode 100644 packages/website/md/docs/contract_wrappers/2/installation.md delete mode 100644 packages/website/md/docs/contract_wrappers/installation.md delete mode 100644 packages/website/md/docs/contract_wrappers/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/1.0.0/installation.md delete mode 100644 packages/website/md/docs/json_schemas/1.0.0/introduction.md delete mode 100644 packages/website/md/docs/json_schemas/1.0.0/schemas.md delete mode 100644 packages/website/md/docs/json_schemas/1.0.0/usage.md create mode 100644 packages/website/md/docs/json_schemas/1/installation.md create mode 100644 packages/website/md/docs/json_schemas/1/introduction.md create mode 100644 packages/website/md/docs/json_schemas/1/schemas.md create mode 100644 packages/website/md/docs/json_schemas/1/usage.md delete mode 100644 packages/website/md/docs/json_schemas/2.0.0/schemas.md create mode 100644 packages/website/md/docs/json_schemas/2/schemas.md create mode 100644 packages/website/md/docs/json_schemas/3/installation.md create mode 100644 packages/website/md/docs/json_schemas/3/introduction.md create mode 100644 packages/website/md/docs/json_schemas/3/usage.md delete mode 100644 packages/website/md/docs/order_utils/1.0.0/installation.md delete mode 100644 packages/website/md/docs/order_utils/1.0.0/introduction.md create mode 100644 packages/website/md/docs/order_utils/1/installation.md create mode 100644 packages/website/md/docs/order_utils/1/introduction.md create mode 100644 packages/website/md/docs/order_utils/2/installation.md create mode 100644 packages/website/md/docs/order_utils/2/introduction.md create mode 100644 packages/website/md/docs/order_watcher/1/installation.md create mode 100644 packages/website/md/docs/order_watcher/1/introduction.md create mode 100644 packages/website/md/docs/order_watcher/2/installation.md create mode 100644 packages/website/md/docs/order_watcher/2/introduction.md delete mode 100644 packages/website/md/docs/order_watcher/installation.md delete mode 100644 packages/website/md/docs/order_watcher/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/1.0.0/introduction.md create mode 100644 packages/website/md/docs/smart_contracts/1/introduction.md delete mode 100644 packages/website/md/docs/smart_contracts/2.0.0/introduction.md create mode 100644 packages/website/md/docs/smart_contracts/2/introduction.md create mode 100644 packages/website/md/docs/sol-compiler/1/installation.md create mode 100644 packages/website/md/docs/sol-compiler/1/introduction.md create mode 100644 packages/website/md/docs/sol-compiler/1/usage.md create mode 100644 packages/website/md/docs/sol-compiler/2/installation.md create mode 100644 packages/website/md/docs/sol-compiler/2/usage.md delete mode 100644 packages/website/md/docs/sol-compiler/installation.md delete mode 100644 packages/website/md/docs/sol-compiler/introduction.md delete mode 100644 packages/website/md/docs/sol-compiler/usage.md create mode 100644 packages/website/md/docs/sol_cov/1/installation.md create mode 100644 packages/website/md/docs/sol_cov/1/introduction.md create mode 100644 packages/website/md/docs/sol_cov/1/usage.md create mode 100644 packages/website/md/docs/sol_cov/2/installation.md create mode 100644 packages/website/md/docs/sol_cov/2/introduction.md create mode 100644 packages/website/md/docs/sol_cov/2/usage.md delete mode 100644 packages/website/md/docs/sol_cov/installation.md delete mode 100644 packages/website/md/docs/sol_cov/introduction.md delete mode 100644 packages/website/md/docs/sol_cov/usage.md create mode 100644 packages/website/md/docs/subproviders/1/installation.md create mode 100644 packages/website/md/docs/subproviders/1/introduction.md create mode 100644 packages/website/md/docs/subproviders/1/ledger_node_hid.md create mode 100644 packages/website/md/docs/subproviders/2/installation.md delete mode 100644 packages/website/md/docs/subproviders/installation.md delete mode 100644 packages/website/md/docs/subproviders/introduction.md delete mode 100644 packages/website/md/docs/subproviders/ledger_node_hid.md create mode 100644 packages/website/md/docs/web3_wrapper/1/installation.md create mode 100644 packages/website/md/docs/web3_wrapper/1/introduction.md create mode 100644 packages/website/md/docs/web3_wrapper/2/installation.md delete mode 100644 packages/website/md/docs/web3_wrapper/installation.md delete mode 100644 packages/website/md/docs/web3_wrapper/introduction.md diff --git a/packages/website/md/docs/asset_buyer/installation.md b/packages/website/md/docs/asset_buyer/installation.md index 483ee2b65..76affaa09 100644 --- a/packages/website/md/docs/asset_buyer/installation.md +++ b/packages/website/md/docs/asset_buyer/installation.md @@ -1,17 +1,17 @@ **Install** ```bash -yarn add @0xproject/asset-buyer +yarn add @0x/asset-buyer ``` **Import** ```javascript -import { AssetBuyer } from '@0xproject/asset-buyer'; +import { AssetBuyer } from '@0x/asset-buyer'; ``` or ```javascript -var AssetBuyer = require('@0xproject/asset-buyer').AssetBuyer; +var AssetBuyer = require('@0x/asset-buyer').AssetBuyer; ``` diff --git a/packages/website/md/docs/asset_buyer/introduction.md b/packages/website/md/docs/asset_buyer/introduction.md index a40d20cc9..a59539ac6 100644 --- a/packages/website/md/docs/asset_buyer/introduction.md +++ b/packages/website/md/docs/asset_buyer/introduction.md @@ -1 +1 @@ -Welcome to the [@0xproject/asset-buyer](https://github.com/0xProject/0x-monorepo/tree/development/packages/asset-buyer) documentation! AssetBuyer is a library that provides an easy way to buy any asset with ETH in one click, leveraging 0x liquidity and the [Forwarder contract](https://0xproject.com/docs/contracts#Forwarder). +Welcome to the [asset-buyer](https://github.com/0xProject/0x-monorepo/tree/development/packages/asset-buyer) documentation! AssetBuyer is a library that provides an easy way to buy any asset with ETH in one click, leveraging 0x liquidity and the [Forwarder contract](https://0xproject.com/docs/contracts#Forwarder). diff --git a/packages/website/md/docs/connect/1.0.0/installation.md b/packages/website/md/docs/connect/1.0.0/installation.md deleted file mode 100644 index 950bf92ca..000000000 --- a/packages/website/md/docs/connect/1.0.0/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -**Install** - -```bash -npm install @0xproject/connect --save -``` - -**Import** - -```javascript -import { HttpClient } from '@0xproject/connect'; -``` - -### Wiki - -Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/1.0.0/introduction.md b/packages/website/md/docs/connect/1.0.0/introduction.md deleted file mode 100644 index 4e3039442..000000000 --- a/packages/website/md/docs/connect/1.0.0/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/1/installation.md b/packages/website/md/docs/connect/1/installation.md new file mode 100644 index 000000000..950bf92ca --- /dev/null +++ b/packages/website/md/docs/connect/1/installation.md @@ -0,0 +1,15 @@ +**Install** + +```bash +npm install @0xproject/connect --save +``` + +**Import** + +```javascript +import { HttpClient } from '@0xproject/connect'; +``` + +### Wiki + +Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/connect/1/introduction.md b/packages/website/md/docs/connect/1/introduction.md new file mode 100644 index 000000000..4e3039442 --- /dev/null +++ b/packages/website/md/docs/connect/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/2.0.0/introduction.md b/packages/website/md/docs/connect/2.0.0/introduction.md deleted file mode 100644 index 8e251b327..000000000 --- a/packages/website/md/docs/connect/2.0.0/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported asset pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific asset pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/2/introduction.md b/packages/website/md/docs/connect/2/introduction.md new file mode 100644 index 000000000..8e251b327 --- /dev/null +++ b/packages/website/md/docs/connect/2/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is a Javascript library that makes it easy to interact with relayers that conform to the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api). Functionality includes getting supported asset pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific asset pairs, getting fee information, and submitting orders. diff --git a/packages/website/md/docs/connect/3/installation.md b/packages/website/md/docs/connect/3/installation.md new file mode 100644 index 000000000..6797d9633 --- /dev/null +++ b/packages/website/md/docs/connect/3/installation.md @@ -0,0 +1,15 @@ +**Install** + +```bash +npm install @0x/connect --save +``` + +**Import** + +```javascript +import { HttpClient } from '@0x/connect'; +``` + +### Wiki + +Check out our [0x Connect introduction tutorial](https://0xproject.com/wiki#Intro-Tutorial) for information on how to integrate relayers into your application. diff --git a/packages/website/md/docs/contract_wrappers/1/installation.md b/packages/website/md/docs/contract_wrappers/1/installation.md new file mode 100644 index 000000000..d5c7fbdba --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/1/installation.md @@ -0,0 +1,11 @@ +**Install** + +```bash +npm install @0xproject/contract-wrappers --save +``` + +**Import** + +```javascript +import { ContractWrappers } from '@0xproject/contract-wrappers'; +``` diff --git a/packages/website/md/docs/contract_wrappers/1/introduction.md b/packages/website/md/docs/contract_wrappers/1/introduction.md new file mode 100644 index 000000000..ccc81b373 --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). diff --git a/packages/website/md/docs/contract_wrappers/2/installation.md b/packages/website/md/docs/contract_wrappers/2/installation.md new file mode 100644 index 000000000..50610550a --- /dev/null +++ b/packages/website/md/docs/contract_wrappers/2/installation.md @@ -0,0 +1,11 @@ +**Install** + +```bash +npm install @0x/contract-wrappers --save +``` + +**Import** + +```javascript +import { ContractWrappers } from '@0x/contract-wrappers'; +``` diff --git a/packages/website/md/docs/contract_wrappers/installation.md b/packages/website/md/docs/contract_wrappers/installation.md deleted file mode 100644 index d5c7fbdba..000000000 --- a/packages/website/md/docs/contract_wrappers/installation.md +++ /dev/null @@ -1,11 +0,0 @@ -**Install** - -```bash -npm install @0xproject/contract-wrappers --save -``` - -**Import** - -```javascript -import { ContractWrappers } from '@0xproject/contract-wrappers'; -``` diff --git a/packages/website/md/docs/contract_wrappers/introduction.md b/packages/website/md/docs/contract_wrappers/introduction.md deleted file mode 100644 index ccc81b373..000000000 --- a/packages/website/md/docs/contract_wrappers/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). diff --git a/packages/website/md/docs/json_schemas/1.0.0/installation.md b/packages/website/md/docs/json_schemas/1.0.0/installation.md deleted file mode 100644 index 50a37bae1..000000000 --- a/packages/website/md/docs/json_schemas/1.0.0/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/json-schemas -``` - -**Import** - -```javascript -import { schemas } from '@0xproject/json-schemas'; -``` - -or - -```javascript -var schemas = require('@0xproject/json-schemas').schemas; -``` diff --git a/packages/website/md/docs/json_schemas/1.0.0/introduction.md b/packages/website/md/docs/json_schemas/1.0.0/introduction.md deleted file mode 100644 index 5b2e90387..000000000 --- a/packages/website/md/docs/json_schemas/1.0.0/introduction.md +++ /dev/null @@ -1,3 +0,0 @@ -Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. - -If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). All the schema files are currently TypeScript that require evaluation in order to be recognized as valid JSON. diff --git a/packages/website/md/docs/json_schemas/1.0.0/schemas.md b/packages/website/md/docs/json_schemas/1.0.0/schemas.md deleted file mode 100644 index fcf5d8df6..000000000 --- a/packages/website/md/docs/json_schemas/1.0.0/schemas.md +++ /dev/null @@ -1,28 +0,0 @@ -0x Protocol Schemas - -* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) -* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) - -0x.js Schemas - -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) -* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) -* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) - -Standard Relayer API Schemas - -* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) -* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) -* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) -* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) -* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) -* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) -* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/1.0.0/usage.md b/packages/website/md/docs/json_schemas/1.0.0/usage.md deleted file mode 100644 index 68b801153..000000000 --- a/packages/website/md/docs/json_schemas/1.0.0/usage.md +++ /dev/null @@ -1,14 +0,0 @@ -The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. - -```javascript -import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; - -const {orderSchema} = schemas; -const validator = new SchemaValidator(); - -const order = { - ... -}; -const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors -const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean -``` diff --git a/packages/website/md/docs/json_schemas/1/installation.md b/packages/website/md/docs/json_schemas/1/installation.md new file mode 100644 index 000000000..50a37bae1 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/json-schemas +``` + +**Import** + +```javascript +import { schemas } from '@0xproject/json-schemas'; +``` + +or + +```javascript +var schemas = require('@0xproject/json-schemas').schemas; +``` diff --git a/packages/website/md/docs/json_schemas/1/introduction.md b/packages/website/md/docs/json_schemas/1/introduction.md new file mode 100644 index 000000000..5b2e90387 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1/introduction.md @@ -0,0 +1,3 @@ +Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. + +If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). All the schema files are currently TypeScript that require evaluation in order to be recognized as valid JSON. diff --git a/packages/website/md/docs/json_schemas/1/schemas.md b/packages/website/md/docs/json_schemas/1/schemas.md new file mode 100644 index 000000000..fcf5d8df6 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1/schemas.md @@ -0,0 +1,28 @@ +0x Protocol Schemas + +* [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number) +* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts) +* [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts) +* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts) + +0x.js Schemas + +* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts) +* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts) +* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts) +* [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts) +* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts) +* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts) +* [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts) +* [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts) + +Standard Relayer API Schemas + +* [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts) +* [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts) +* [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts) +* [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts) +* [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts) +* [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts) +* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts) +* [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts) diff --git a/packages/website/md/docs/json_schemas/1/usage.md b/packages/website/md/docs/json_schemas/1/usage.md new file mode 100644 index 000000000..68b801153 --- /dev/null +++ b/packages/website/md/docs/json_schemas/1/usage.md @@ -0,0 +1,14 @@ +The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package. + +```javascript +import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas'; + +const {orderSchema} = schemas; +const validator = new SchemaValidator(); + +const order = { + ... +}; +const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors +const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean +``` diff --git a/packages/website/md/docs/json_schemas/2.0.0/schemas.md b/packages/website/md/docs/json_schemas/2.0.0/schemas.md deleted file mode 100644 index ec7cf6f15..000000000 --- a/packages/website/md/docs/json_schemas/2.0.0/schemas.md +++ /dev/null @@ -1,40 +0,0 @@ -Basic Schemas - -* [Address type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/address.json) -* [Number type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/number.json) -* [Hex type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/hex.json) -* [JS number](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/js_number.json) - -0x Protocol Schemas - -* [Order](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_schema.json) -* [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/signed_order_schema.json) -* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_hash_schema.json) -* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/ec_signature_schema.json) - -0x.js Schemas - -* [BlockParam](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/block_param_schema.json) -* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/block_range_schema.json) -* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/index_filter_values_schema.json) -* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_fill_requests_schema.json) -* [OrderCancellationRequests](https://github.com/0xProjet/0x-monorepo/blob/development/packages/json-schemas/schemas/order_cancel_schema.json) -* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) -* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/signed_orders_schema.json) -* [Token](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/token_schema.json) -* [TxData](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/tx_data_schema.json) - -Standard Relayer API Schemas - -* [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/paginated_collection_schema.json) -* [Error response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_error_response_schema.json) -* [Order config payload](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) -* [Order config response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) -* [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) -* [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) -* [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) -* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) -* [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_pairs_schema.json) -* [Trade info](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_trade_info_schema.json) -* [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_pairs_response_schema.json) -* [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/json_schemas/2/schemas.md b/packages/website/md/docs/json_schemas/2/schemas.md new file mode 100644 index 000000000..ec7cf6f15 --- /dev/null +++ b/packages/website/md/docs/json_schemas/2/schemas.md @@ -0,0 +1,40 @@ +Basic Schemas + +* [Address type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/address.json) +* [Number type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/number.json) +* [Hex type](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/hex.json) +* [JS number](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/js_number.json) + +0x Protocol Schemas + +* [Order](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_schema.json) +* [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/signed_order_schema.json) +* [OrderHash](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_hash_schema.json) +* [ECSignature](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/ec_signature_schema.json) + +0x.js Schemas + +* [BlockParam](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/block_param_schema.json) +* [BlockRange](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/block_range_schema.json) +* [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/index_filter_values_schema.json) +* [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_fill_requests_schema.json) +* [OrderCancellationRequests](https://github.com/0xProjet/0x-monorepo/blob/development/packages/json-schemas/schemas/order_cancel_schema.json) +* [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json) +* [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/signed_orders_schema.json) +* [Token](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/token_schema.json) +* [TxData](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/tx_data_schema.json) + +Standard Relayer API Schemas + +* [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/paginated_collection_schema.json) +* [Error response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_error_response_schema.json) +* [Order config payload](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json) +* [Order config response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json) +* [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json) +* [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json) +* [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json) +* [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json) +* [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_pairs_schema.json) +* [Trade info](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_trade_info_schema.json) +* [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_asset_pairs_response_schema.json) +* [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json) diff --git a/packages/website/md/docs/json_schemas/3/installation.md b/packages/website/md/docs/json_schemas/3/installation.md new file mode 100644 index 000000000..a99886113 --- /dev/null +++ b/packages/website/md/docs/json_schemas/3/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/json-schemas +``` + +**Import** + +```javascript +import { schemas } from '@0x/json-schemas'; +``` + +or + +```javascript +var schemas = require('@0x/json-schemas').schemas; +``` diff --git a/packages/website/md/docs/json_schemas/3/introduction.md b/packages/website/md/docs/json_schemas/3/introduction.md new file mode 100644 index 000000000..0039d014a --- /dev/null +++ b/packages/website/md/docs/json_schemas/3/introduction.md @@ -0,0 +1,3 @@ +Welcome to the [json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project. + +If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). diff --git a/packages/website/md/docs/json_schemas/3/usage.md b/packages/website/md/docs/json_schemas/3/usage.md new file mode 100644 index 000000000..2b72eeaad --- /dev/null +++ b/packages/website/md/docs/json_schemas/3/usage.md @@ -0,0 +1,14 @@ +The following example shows you how to validate a 0x order using the `@0x/json-schemas` package. + +```javascript +import {SchemaValidator, ValidatorResult, schemas} from '@0x/json-schemas'; + +const {orderSchema} = schemas; +const validator = new SchemaValidator(); + +const order = { + ... +}; +const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors +const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean +``` diff --git a/packages/website/md/docs/order_utils/1.0.0/installation.md b/packages/website/md/docs/order_utils/1.0.0/installation.md deleted file mode 100644 index 68a7cf960..000000000 --- a/packages/website/md/docs/order_utils/1.0.0/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-utils -``` - -**Import** - -```javascript -import { createSignedOrderAsync } from '@0xproject/order-utils'; -``` - -or - -```javascript -var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; -``` diff --git a/packages/website/md/docs/order_utils/1.0.0/introduction.md b/packages/website/md/docs/order_utils/1.0.0/introduction.md deleted file mode 100644 index d5f3f2925..000000000 --- a/packages/website/md/docs/order_utils/1.0.0/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_utils/1/installation.md b/packages/website/md/docs/order_utils/1/installation.md new file mode 100644 index 000000000..68a7cf960 --- /dev/null +++ b/packages/website/md/docs/order_utils/1/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/order-utils +``` + +**Import** + +```javascript +import { createSignedOrderAsync } from '@0xproject/order-utils'; +``` + +or + +```javascript +var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync; +``` diff --git a/packages/website/md/docs/order_utils/1/introduction.md b/packages/website/md/docs/order_utils/1/introduction.md new file mode 100644 index 000000000..d5f3f2925 --- /dev/null +++ b/packages/website/md/docs/order_utils/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_utils/2/installation.md b/packages/website/md/docs/order_utils/2/installation.md new file mode 100644 index 000000000..d4bac6a53 --- /dev/null +++ b/packages/website/md/docs/order_utils/2/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/order-utils +``` + +**Import** + +```javascript +import { createSignedOrderAsync } from '@0x/order-utils'; +``` + +or + +```javascript +var createSignedOrderAsync = require('@0x/order-utils').createSignedOrderAsync; +``` diff --git a/packages/website/md/docs/order_utils/2/introduction.md b/packages/website/md/docs/order_utils/2/introduction.md new file mode 100644 index 000000000..567896603 --- /dev/null +++ b/packages/website/md/docs/order_utils/2/introduction.md @@ -0,0 +1 @@ +Welcome to the [order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders. diff --git a/packages/website/md/docs/order_watcher/1/installation.md b/packages/website/md/docs/order_watcher/1/installation.md new file mode 100644 index 000000000..4b28f583d --- /dev/null +++ b/packages/website/md/docs/order_watcher/1/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/order-watcher +``` + +**Import** + +```javascript +import { OrderWatcher } from '@0xproject/order-watcher'; +``` + +or + +```javascript +var OrderWatcher = require('@0xproject/order-utils').OrderWatcher; +``` diff --git a/packages/website/md/docs/order_watcher/1/introduction.md b/packages/website/md/docs/order_watcher/1/introduction.md new file mode 100644 index 000000000..f922d922f --- /dev/null +++ b/packages/website/md/docs/order_watcher/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/md/docs/order_watcher/2/installation.md b/packages/website/md/docs/order_watcher/2/installation.md new file mode 100644 index 000000000..883eb40e5 --- /dev/null +++ b/packages/website/md/docs/order_watcher/2/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/order-watcher +``` + +**Import** + +```javascript +import { OrderWatcher } from '@0x/order-watcher'; +``` + +or + +```javascript +var OrderWatcher = require('@0x/order-utils').OrderWatcher; +``` diff --git a/packages/website/md/docs/order_watcher/2/introduction.md b/packages/website/md/docs/order_watcher/2/introduction.md new file mode 100644 index 000000000..b2d574053 --- /dev/null +++ b/packages/website/md/docs/order_watcher/2/introduction.md @@ -0,0 +1 @@ +Welcome to the [order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/md/docs/order_watcher/installation.md b/packages/website/md/docs/order_watcher/installation.md deleted file mode 100644 index 4b28f583d..000000000 --- a/packages/website/md/docs/order_watcher/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/order-watcher -``` - -**Import** - -```javascript -import { OrderWatcher } from '@0xproject/order-watcher'; -``` - -or - -```javascript -var OrderWatcher = require('@0xproject/order-utils').OrderWatcher; -``` diff --git a/packages/website/md/docs/order_watcher/introduction.md b/packages/website/md/docs/order_watcher/introduction.md deleted file mode 100644 index f922d922f..000000000 --- a/packages/website/md/docs/order_watcher/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date. diff --git a/packages/website/md/docs/smart_contracts/1.0.0/introduction.md b/packages/website/md/docs/smart_contracts/1.0.0/introduction.md deleted file mode 100644 index 79a8f00fd..000000000 --- a/packages/website/md/docs/smart_contracts/1.0.0/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/packages/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. diff --git a/packages/website/md/docs/smart_contracts/1/introduction.md b/packages/website/md/docs/smart_contracts/1/introduction.md new file mode 100644 index 000000000..79a8f00fd --- /dev/null +++ b/packages/website/md/docs/smart_contracts/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/packages/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. diff --git a/packages/website/md/docs/smart_contracts/2.0.0/introduction.md b/packages/website/md/docs/smart_contracts/2.0.0/introduction.md deleted file mode 100644 index 4aa31db3d..000000000 --- a/packages/website/md/docs/smart_contracts/2.0.0/introduction.md +++ /dev/null @@ -1,6 +0,0 @@ -Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/packages/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. - -### Helpful wiki articles: - -* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) -* [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md) diff --git a/packages/website/md/docs/smart_contracts/2/introduction.md b/packages/website/md/docs/smart_contracts/2/introduction.md new file mode 100644 index 000000000..4aa31db3d --- /dev/null +++ b/packages/website/md/docs/smart_contracts/2/introduction.md @@ -0,0 +1,6 @@ +Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/packages/contracts) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts. + +### Helpful wiki articles: + +* [Deployed smart contract addresses](https://0xproject.com/wiki#Deployed-Addresses) +* [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md) diff --git a/packages/website/md/docs/sol-compiler/1/installation.md b/packages/website/md/docs/sol-compiler/1/installation.md new file mode 100644 index 000000000..9c8561d9b --- /dev/null +++ b/packages/website/md/docs/sol-compiler/1/installation.md @@ -0,0 +1,23 @@ +#### CLI Installation + +```bash +yarn global add @0xproject/sol-compiler +``` + +#### API Installation + +```bash +yarn add @0xproject/sol-compiler +``` + +**Import** + +```typescript +import { Compiler } from '@0xproject/sol-compiler'; +``` + +or + +```javascript +var Compiler = require('@0xproject/sol-compiler').Compiler; +``` diff --git a/packages/website/md/docs/sol-compiler/1/introduction.md b/packages/website/md/docs/sol-compiler/1/introduction.md new file mode 100644 index 000000000..fcd80f47b --- /dev/null +++ b/packages/website/md/docs/sol-compiler/1/introduction.md @@ -0,0 +1,8 @@ +Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: + +* Smart re-compilation: Only recompiles when smart contracts have changed +* Ability to compile an entire project instead of only individual `.sol` files +* Compilation using the Solidity version specified at the top of each individual `.sol` file +* Proper parsing of Solidity version ranges +* Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). +* Storage of constructor args, source maps and paths to all dependency source files. diff --git a/packages/website/md/docs/sol-compiler/1/usage.md b/packages/website/md/docs/sol-compiler/1/usage.md new file mode 100644 index 000000000..79c9b32ba --- /dev/null +++ b/packages/website/md/docs/sol-compiler/1/usage.md @@ -0,0 +1,24 @@ +#### CLI Usage + +```bash +$ sol-compiler +Options: + --version Show version number [boolean] + --contracts-dir path of contracts directory to compile [string] + --artifacts-dir path to write contracts artifacts to [string] + --contracts comma separated list of contracts to compile + [string] [default: "*"] + --help Show help [boolean] +``` + +#### API Usage + +```typescript +import { Compiler } from '@0xproject/sol-compiler'; + +const compiler = new Compiler(); + +(async () => { + await compiler.compileAllAsync(); +})().catch(console.log); +``` diff --git a/packages/website/md/docs/sol-compiler/2/installation.md b/packages/website/md/docs/sol-compiler/2/installation.md new file mode 100644 index 000000000..7e7b690fe --- /dev/null +++ b/packages/website/md/docs/sol-compiler/2/installation.md @@ -0,0 +1,23 @@ +#### CLI Installation + +```bash +yarn global add @0x/sol-compiler +``` + +#### API Installation + +```bash +yarn add @0x/sol-compiler +``` + +**Import** + +```typescript +import { Compiler } from '@0x/sol-compiler'; +``` + +or + +```javascript +var Compiler = require('@0x/sol-compiler').Compiler; +``` diff --git a/packages/website/md/docs/sol-compiler/2/usage.md b/packages/website/md/docs/sol-compiler/2/usage.md new file mode 100644 index 000000000..68e5a988f --- /dev/null +++ b/packages/website/md/docs/sol-compiler/2/usage.md @@ -0,0 +1,24 @@ +#### CLI Usage + +```bash +$ sol-compiler +Options: + --version Show version number [boolean] + --contracts-dir path of contracts directory to compile [string] + --artifacts-dir path to write contracts artifacts to [string] + --contracts comma separated list of contracts to compile + [string] [default: "*"] + --help Show help [boolean] +``` + +#### API Usage + +```typescript +import { Compiler } from '@0x/sol-compiler'; + +const compiler = new Compiler(); + +(async () => { + await compiler.compileAllAsync(); +})().catch(console.log); +``` diff --git a/packages/website/md/docs/sol-compiler/installation.md b/packages/website/md/docs/sol-compiler/installation.md deleted file mode 100644 index 9c8561d9b..000000000 --- a/packages/website/md/docs/sol-compiler/installation.md +++ /dev/null @@ -1,23 +0,0 @@ -#### CLI Installation - -```bash -yarn global add @0xproject/sol-compiler -``` - -#### API Installation - -```bash -yarn add @0xproject/sol-compiler -``` - -**Import** - -```typescript -import { Compiler } from '@0xproject/sol-compiler'; -``` - -or - -```javascript -var Compiler = require('@0xproject/sol-compiler').Compiler; -``` diff --git a/packages/website/md/docs/sol-compiler/introduction.md b/packages/website/md/docs/sol-compiler/introduction.md deleted file mode 100644 index fcd80f47b..000000000 --- a/packages/website/md/docs/sol-compiler/introduction.md +++ /dev/null @@ -1,8 +0,0 @@ -Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds: - -* Smart re-compilation: Only recompiles when smart contracts have changed -* Ability to compile an entire project instead of only individual `.sol` files -* Compilation using the Solidity version specified at the top of each individual `.sol` file -* Proper parsing of Solidity version ranges -* Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content). -* Storage of constructor args, source maps and paths to all dependency source files. diff --git a/packages/website/md/docs/sol-compiler/usage.md b/packages/website/md/docs/sol-compiler/usage.md deleted file mode 100644 index 79c9b32ba..000000000 --- a/packages/website/md/docs/sol-compiler/usage.md +++ /dev/null @@ -1,24 +0,0 @@ -#### CLI Usage - -```bash -$ sol-compiler -Options: - --version Show version number [boolean] - --contracts-dir path of contracts directory to compile [string] - --artifacts-dir path to write contracts artifacts to [string] - --contracts comma separated list of contracts to compile - [string] [default: "*"] - --help Show help [boolean] -``` - -#### API Usage - -```typescript -import { Compiler } from '@0xproject/sol-compiler'; - -const compiler = new Compiler(); - -(async () => { - await compiler.compileAllAsync(); -})().catch(console.log); -``` diff --git a/packages/website/md/docs/sol_cov/1/installation.md b/packages/website/md/docs/sol_cov/1/installation.md new file mode 100644 index 000000000..b9ce25a5f --- /dev/null +++ b/packages/website/md/docs/sol_cov/1/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0xproject/sol-cov +``` + +**Import** + +```javascript +import { CoverageSubprovider } from '@0xproject/sol-cov'; +``` + +or + +```javascript +var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; +``` diff --git a/packages/website/md/docs/sol_cov/1/introduction.md b/packages/website/md/docs/sol_cov/1/introduction.md new file mode 100644 index 000000000..7064a3554 --- /dev/null +++ b/packages/website/md/docs/sol_cov/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0xproject/sol-cov](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov) documentation! Sol-cov is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_cov/1/usage.md b/packages/website/md/docs/sol_cov/1/usage.md new file mode 100644 index 000000000..c747005fb --- /dev/null +++ b/packages/website/md/docs/sol_cov/1/usage.md @@ -0,0 +1,62 @@ +Sol-cov uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0xproject.com/wiki#Web3-Provider-Explained) wiki article. + +The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. + +Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. + +In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. + +### Sol-compiler + +If you are generating your artifacts with [@0xproject/sol-compiler](https://0xproject.com/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. + +```typescript +import { SolCompilerArtifactsAdapter } from '@0xproject/sol-cov'; +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); +``` + +### Truffle + +If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. + +```typescript +import { TruffleArtifactAdapter } from '@0xproject/sol-cov'; +const contractsPath = 'src/contracts'; +const artifactAdapter = new TruffleArtifactAdapter(contractsDir); +``` + +Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. + +### Other framework/toolset + +You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. +Look at the code of the two adapters above for examples. + +### Usage + +```typescript +import { CoverageSubprovider } from '@0xproject/sol-cov'; +import ProviderEngine = require('web3-provider-engine'); + +const provider = new ProviderEngine(); + +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const networkId = 50; +// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. +const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; +const isVerbose = true; +const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); + +provider.addProvider(coverageSubprovider); +``` + +After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: + +```typescript +await coverageSubprovider.writeCoverageAsync(); +``` + +This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters. diff --git a/packages/website/md/docs/sol_cov/2/installation.md b/packages/website/md/docs/sol_cov/2/installation.md new file mode 100644 index 000000000..1d4557cf5 --- /dev/null +++ b/packages/website/md/docs/sol_cov/2/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/sol-cov +``` + +**Import** + +```javascript +import { CoverageSubprovider } from '@0x/sol-cov'; +``` + +or + +```javascript +var CoverageSubprovider = require('@0x/sol-cov').CoverageSubprovider; +``` diff --git a/packages/website/md/docs/sol_cov/2/introduction.md b/packages/website/md/docs/sol_cov/2/introduction.md new file mode 100644 index 000000000..ac3256845 --- /dev/null +++ b/packages/website/md/docs/sol_cov/2/introduction.md @@ -0,0 +1 @@ +Welcome to the [sol-cov](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov) documentation! Sol-cov is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_cov/2/usage.md b/packages/website/md/docs/sol_cov/2/usage.md new file mode 100644 index 000000000..d1c76474b --- /dev/null +++ b/packages/website/md/docs/sol_cov/2/usage.md @@ -0,0 +1,62 @@ +Sol-cov uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0xproject.com/wiki#Web3-Provider-Explained) wiki article. + +The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. + +Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. + +In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. + +### Sol-compiler + +If you are generating your artifacts with [@0x/sol-compiler](https://0xproject.com/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. + +```typescript +import { SolCompilerArtifactsAdapter } from '@0x/sol-cov'; +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); +``` + +### Truffle + +If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. + +```typescript +import { TruffleArtifactAdapter } from '@0x/sol-cov'; +const contractsPath = 'src/contracts'; +const artifactAdapter = new TruffleArtifactAdapter(contractsDir); +``` + +Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. + +### Other framework/toolset + +You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. +Look at the code of the two adapters above for examples. + +### Usage + +```typescript +import { CoverageSubprovider } from '@0x/sol-cov'; +import ProviderEngine = require('web3-provider-engine'); + +const provider = new ProviderEngine(); + +const artifactsPath = 'src/artifacts'; +const contractsPath = 'src/contracts'; +const networkId = 50; +// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. +const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; +const isVerbose = true; +const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); + +provider.addProvider(coverageSubprovider); +``` + +After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: + +```typescript +await coverageSubprovider.writeCoverageAsync(); +``` + +This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters. diff --git a/packages/website/md/docs/sol_cov/installation.md b/packages/website/md/docs/sol_cov/installation.md deleted file mode 100644 index b9ce25a5f..000000000 --- a/packages/website/md/docs/sol_cov/installation.md +++ /dev/null @@ -1,17 +0,0 @@ -**Install** - -```bash -yarn add @0xproject/sol-cov -``` - -**Import** - -```javascript -import { CoverageSubprovider } from '@0xproject/sol-cov'; -``` - -or - -```javascript -var CoverageSubprovider = require('@0xproject/sol-cov').CoverageSubprovider; -``` diff --git a/packages/website/md/docs/sol_cov/introduction.md b/packages/website/md/docs/sol_cov/introduction.md deleted file mode 100644 index 7064a3554..000000000 --- a/packages/website/md/docs/sol_cov/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [@0xproject/sol-cov](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-cov) documentation! Sol-cov is a Solidity coverage tool for your smart contract tests. diff --git a/packages/website/md/docs/sol_cov/usage.md b/packages/website/md/docs/sol_cov/usage.md deleted file mode 100644 index c747005fb..000000000 --- a/packages/website/md/docs/sol_cov/usage.md +++ /dev/null @@ -1,62 +0,0 @@ -Sol-cov uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with ProviderEngine, please read the [Web3 Provider explained](https://0xproject.com/wiki#Web3-Provider-Explained) wiki article. - -The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot. - -Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data. - -In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it. - -### Sol-compiler - -If you are generating your artifacts with [@0xproject/sol-compiler](https://0xproject.com/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you. - -```typescript -import { SolCompilerArtifactsAdapter } from '@0xproject/sol-cov'; -const artifactsPath = 'src/artifacts'; -const contractsPath = 'src/contracts'; -const artifactsAdapter = new SolCompilerArtifactsAdapter(artifactsPath, contractsPath); -``` - -### Truffle - -If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you. - -```typescript -import { TruffleArtifactAdapter } from '@0xproject/sol-cov'; -const contractsPath = 'src/contracts'; -const artifactAdapter = new TruffleArtifactAdapter(contractsDir); -``` - -Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`. - -### Other framework/toolset - -You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`. -Look at the code of the two adapters above for examples. - -### Usage - -```typescript -import { CoverageSubprovider } from '@0xproject/sol-cov'; -import ProviderEngine = require('web3-provider-engine'); - -const provider = new ProviderEngine(); - -const artifactsPath = 'src/artifacts'; -const contractsPath = 'src/contracts'; -const networkId = 50; -// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from. -const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631'; -const isVerbose = true; -const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose); - -provider.addProvider(coverageSubprovider); -``` - -After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call: - -```typescript -await coverageSubprovider.writeCoverageAsync(); -``` - -This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters. diff --git a/packages/website/md/docs/subproviders/1/installation.md b/packages/website/md/docs/subproviders/1/installation.md new file mode 100644 index 000000000..a049ff0ec --- /dev/null +++ b/packages/website/md/docs/subproviders/1/installation.md @@ -0,0 +1,15 @@ +```bash +npm install @0xproject/subproviders --save +``` + +**Import** + +```typescript +import { LedgerSubprovider } from '@0xproject/subproviders'; +``` + +or + +```javascript +var LedgerSubprovider = require('@0xproject/subproviders').LedgerSubprovider; +``` diff --git a/packages/website/md/docs/subproviders/1/introduction.md b/packages/website/md/docs/subproviders/1/introduction.md new file mode 100644 index 000000000..835201064 --- /dev/null +++ b/packages/website/md/docs/subproviders/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [Subproviders](https://github.com/0xProject/0x-monorepo/tree/development/packages/subproviders) documentation! Subproviders is a package containing useful [subproviders](https://0xproject.com/wiki#Web3-Provider-Explained) that can be used with the [Web3 Provider Engine](https://github.com/MetaMask/provider-engine) library. diff --git a/packages/website/md/docs/subproviders/1/ledger_node_hid.md b/packages/website/md/docs/subproviders/1/ledger_node_hid.md new file mode 100644 index 000000000..3089817af --- /dev/null +++ b/packages/website/md/docs/subproviders/1/ledger_node_hid.md @@ -0,0 +1,17 @@ +By default, node-hid transport support is an optional dependency. This is due to the requirement of native usb developer packages on the host system. If these aren't installed the entire `npm install` fails. We also no longer export node-hid transport client factories. To re-create this see our integration tests or follow the example below: + +```typescript +import Eth from '@ledgerhq/hw-app-eth'; +import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; +async function ledgerEthereumNodeJsClientFactoryAsync(): Promise { + const ledgerConnection = await TransportNodeHid.create(); + const ledgerEthClient = new Eth(ledgerConnection); + return ledgerEthClient; +} + +// Create a LedgerSubprovider with the node-hid transport +ledgerSubprovider = new LedgerSubprovider({ + networkId, + ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, +}); +``` diff --git a/packages/website/md/docs/subproviders/2/installation.md b/packages/website/md/docs/subproviders/2/installation.md new file mode 100644 index 000000000..025dd0dee --- /dev/null +++ b/packages/website/md/docs/subproviders/2/installation.md @@ -0,0 +1,15 @@ +```bash +npm install @0x/subproviders --save +``` + +**Import** + +```typescript +import { LedgerSubprovider } from '@0x/subproviders'; +``` + +or + +```javascript +var LedgerSubprovider = require('@0x/subproviders').LedgerSubprovider; +``` diff --git a/packages/website/md/docs/subproviders/installation.md b/packages/website/md/docs/subproviders/installation.md deleted file mode 100644 index a049ff0ec..000000000 --- a/packages/website/md/docs/subproviders/installation.md +++ /dev/null @@ -1,15 +0,0 @@ -```bash -npm install @0xproject/subproviders --save -``` - -**Import** - -```typescript -import { LedgerSubprovider } from '@0xproject/subproviders'; -``` - -or - -```javascript -var LedgerSubprovider = require('@0xproject/subproviders').LedgerSubprovider; -``` diff --git a/packages/website/md/docs/subproviders/introduction.md b/packages/website/md/docs/subproviders/introduction.md deleted file mode 100644 index 835201064..000000000 --- a/packages/website/md/docs/subproviders/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Subproviders](https://github.com/0xProject/0x-monorepo/tree/development/packages/subproviders) documentation! Subproviders is a package containing useful [subproviders](https://0xproject.com/wiki#Web3-Provider-Explained) that can be used with the [Web3 Provider Engine](https://github.com/MetaMask/provider-engine) library. diff --git a/packages/website/md/docs/subproviders/ledger_node_hid.md b/packages/website/md/docs/subproviders/ledger_node_hid.md deleted file mode 100644 index 3089817af..000000000 --- a/packages/website/md/docs/subproviders/ledger_node_hid.md +++ /dev/null @@ -1,17 +0,0 @@ -By default, node-hid transport support is an optional dependency. This is due to the requirement of native usb developer packages on the host system. If these aren't installed the entire `npm install` fails. We also no longer export node-hid transport client factories. To re-create this see our integration tests or follow the example below: - -```typescript -import Eth from '@ledgerhq/hw-app-eth'; -import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'; -async function ledgerEthereumNodeJsClientFactoryAsync(): Promise { - const ledgerConnection = await TransportNodeHid.create(); - const ledgerEthClient = new Eth(ledgerConnection); - return ledgerEthClient; -} - -// Create a LedgerSubprovider with the node-hid transport -ledgerSubprovider = new LedgerSubprovider({ - networkId, - ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync, -}); -``` diff --git a/packages/website/md/docs/web3_wrapper/1/installation.md b/packages/website/md/docs/web3_wrapper/1/installation.md new file mode 100644 index 000000000..92794d9b0 --- /dev/null +++ b/packages/website/md/docs/web3_wrapper/1/installation.md @@ -0,0 +1,25 @@ +**Install** + +```bash +npm install @0xproject/web3-wrapper --save +``` + +**Import** + +```javascript +import { Web3Wrapper } from '@0xproject/web3-wrapper'; +``` + +or + +```javascript +var Web3Wrapper = require('@0xproject/web3-wrapper').Web3Wrapper; +``` + +If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: + +``` +"include": [ + "./node_modules/web3-typescript-typings/index.d.ts", +] +``` diff --git a/packages/website/md/docs/web3_wrapper/1/introduction.md b/packages/website/md/docs/web3_wrapper/1/introduction.md new file mode 100644 index 000000000..17bd316f1 --- /dev/null +++ b/packages/website/md/docs/web3_wrapper/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [Web3Wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) documentation! Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript. diff --git a/packages/website/md/docs/web3_wrapper/2/installation.md b/packages/website/md/docs/web3_wrapper/2/installation.md new file mode 100644 index 000000000..14c4f066c --- /dev/null +++ b/packages/website/md/docs/web3_wrapper/2/installation.md @@ -0,0 +1,25 @@ +**Install** + +```bash +npm install @0x/web3-wrapper --save +``` + +**Import** + +```javascript +import { Web3Wrapper } from '@0x/web3-wrapper'; +``` + +or + +```javascript +var Web3Wrapper = require('@0x/web3-wrapper').Web3Wrapper; +``` + +If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: + +``` +"include": [ + "./node_modules/web3-typescript-typings/index.d.ts", +] +``` diff --git a/packages/website/md/docs/web3_wrapper/installation.md b/packages/website/md/docs/web3_wrapper/installation.md deleted file mode 100644 index 92794d9b0..000000000 --- a/packages/website/md/docs/web3_wrapper/installation.md +++ /dev/null @@ -1,25 +0,0 @@ -**Install** - -```bash -npm install @0xproject/web3-wrapper --save -``` - -**Import** - -```javascript -import { Web3Wrapper } from '@0xproject/web3-wrapper'; -``` - -or - -```javascript -var Web3Wrapper = require('@0xproject/web3-wrapper').Web3Wrapper; -``` - -If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`: - -``` -"include": [ - "./node_modules/web3-typescript-typings/index.d.ts", -] -``` diff --git a/packages/website/md/docs/web3_wrapper/introduction.md b/packages/website/md/docs/web3_wrapper/introduction.md deleted file mode 100644 index 17bd316f1..000000000 --- a/packages/website/md/docs/web3_wrapper/introduction.md +++ /dev/null @@ -1 +0,0 @@ -Welcome to the [Web3Wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) documentation! Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript. diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 074839385..0f11e0809 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -9,9 +9,10 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/connect/1.0.0/introduction'); -const IntroMarkdownV2 = require('md/docs/connect/2.0.0/introduction'); -const InstallationMarkdownV1 = require('md/docs/connect/1.0.0/installation'); +const IntroMarkdown1 = require('md/docs/connect/1/introduction'); +const IntroMarkdown2 = require('md/docs/connect/2/introduction'); +const InstallationMarkdown1 = require('md/docs/connect/1/installation'); +const InstallationMarkdown3 = require('md/docs/connect/3/installation'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -30,12 +31,16 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, }, '2.0.0-rc.1': { - [markdownSections.introduction]: IntroMarkdownV2, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown2, + [markdownSections.installation]: InstallationMarkdown1, + }, + '3.0.2': { + [markdownSections.introduction]: IntroMarkdown2, + [markdownSections.installation]: InstallationMarkdown3, }, }, markdownSections, diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index 5bf2a4e1f..4c05605e3 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -9,8 +9,9 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/contract_wrappers/introduction'); -const InstallMarkdown = require('md/docs/contract_wrappers/installation'); +const IntroMarkdown1 = require('md/docs/contract_wrappers/1/introduction'); +const InstallMarkdownV1 = require('md/docs/contract_wrappers/1/installation'); +const InstallMarkdownV2 = require('md/docs/contract_wrappers/2/installation'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -29,8 +30,12 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdown, - [markdownSections.installation]: InstallMarkdown, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallMarkdownV1, + }, + '3.0.0': { + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallMarkdownV2, }, }, markdownSections, diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 38cdc909a..cb5918784 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -9,11 +9,14 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/json_schemas/1.0.0/introduction'); -const InstallationMarkdownV1 = require('md/docs/json_schemas/1.0.0/installation'); -const UsageMarkdownV1 = require('md/docs/json_schemas/1.0.0/usage'); -const SchemasMarkdownV1 = require('md/docs/json_schemas/1.0.0/schemas'); -const SchemasMarkdownV2 = require('md/docs/json_schemas/2.0.0/schemas'); +const IntroMarkdown1 = require('md/docs/json_schemas/1/introduction'); +const IntroMarkdown3 = require('md/docs/json_schemas/3/introduction'); +const InstallationMarkdown1 = require('md/docs/json_schemas/1/installation'); +const InstallationMarkdown3 = require('md/docs/json_schemas/3/installation'); +const usageMarkdown1 = require('md/docs/json_schemas/1/usage'); +const usageMarkdown3 = require('md/docs/json_schemas/3/usage'); +const SchemasMarkdownV1 = require('md/docs/json_schemas/1/schemas'); +const SchemasMarkdownV2 = require('md/docs/json_schemas/2/schemas'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -35,16 +38,22 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, [markdownSections.schemas]: SchemasMarkdownV1, - [markdownSections.usage]: UsageMarkdownV1, + [markdownSections.usage]: usageMarkdown1, }, '1.0.0': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, [markdownSections.schemas]: SchemasMarkdownV2, - [markdownSections.usage]: UsageMarkdownV1, + [markdownSections.usage]: usageMarkdown1, + }, + '2.0.0': { + [markdownSections.introduction]: IntroMarkdown3, + [markdownSections.installation]: InstallationMarkdown3, + [markdownSections.schemas]: SchemasMarkdownV2, + [markdownSections.usage]: usageMarkdown3, }, }, markdownSections, diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index ea083e6a6..f1d794988 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -9,8 +9,10 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/order_utils/1.0.0/introduction'); -const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation'); +const IntroMarkdown1 = require('md/docs/order_utils/1/introduction'); +const InstallationMarkdown1 = require('md/docs/order_utils/1/installation'); +const IntroMarkdown2 = require('md/docs/order_utils/2/introduction'); +const InstallationMarkdown2 = require('md/docs/order_utils/2/installation'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -29,8 +31,12 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + }, + '2.0.0': { + [markdownSections.introduction]: IntroMarkdown2, + [markdownSections.installation]: InstallationMarkdown2, }, }, markdownSections, diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index 83caf29ed..ac92e6a22 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -9,8 +9,10 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdown = require('md/docs/order_watcher/introduction'); -const InstallationMarkdown = require('md/docs/order_watcher/installation'); +const IntroMarkdown1 = require('md/docs/order_watcher/1/introduction'); +const InstallationMarkdown1 = require('md/docs/order_watcher/1/installation'); +const IntroMarkdown2 = require('md/docs/order_watcher/2/introduction'); +const InstallationMarkdown2 = require('md/docs/order_watcher/2/installation'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -29,8 +31,12 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdown, - [markdownSections.installation]: InstallationMarkdown, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + }, + '2.2.0': { + [markdownSections.introduction]: IntroMarkdown2, + [markdownSections.installation]: InstallationMarkdown2, }, }, markdownSections, diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index fc34b5f61..57c98fa3b 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -10,8 +10,8 @@ import { DocPackages, ScreenWidths, SmartContractDocSections as Sections } from import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/smart_contracts/1.0.0/introduction'); -const IntroMarkdownV2 = require('md/docs/smart_contracts/2.0.0/introduction'); +const IntroMarkdown1 = require('md/docs/smart_contracts/1/introduction'); +const IntroMarkdown2 = require('md/docs/smart_contracts/2/introduction'); /* tslint:enable:no-var-requires */ const docsInfoConfig: DocsInfoConfig = { @@ -25,10 +25,10 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [Sections.Introduction]: IntroMarkdownV1, + [Sections.Introduction]: IntroMarkdown1, }, '2.0.0': { - [Sections.Introduction]: IntroMarkdownV2, + [Sections.Introduction]: IntroMarkdown2, }, }, markdownSections: { diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index 03da8a25f..f3a793e80 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -9,9 +9,11 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/sol-compiler/introduction'); -const InstallationMarkdownV1 = require('md/docs/sol-compiler/installation'); -const UsageMarkdown = require('md/docs/sol-compiler/usage'); +const IntroMarkdown1 = require('md/docs/sol-compiler/1/introduction'); +const InstallationMarkdown1 = require('md/docs/sol-compiler/1/installation'); +const InstallationMarkdown2 = require('md/docs/sol-compiler/2/installation'); +const UsageMarkdown1 = require('md/docs/sol-compiler/1/usage'); +const UsageMarkdown2 = require('md/docs/sol-compiler/2/usage'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -31,9 +33,14 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, - [markdownSections.usage]: UsageMarkdown, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + [markdownSections.usage]: UsageMarkdown1, + }, + '1.1.8': { + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown2, + [markdownSections.usage]: UsageMarkdown2, }, }, markdownSections, diff --git a/packages/website/ts/containers/sol_cov_documentation.ts b/packages/website/ts/containers/sol_cov_documentation.ts index 5943be009..8944ec70a 100644 --- a/packages/website/ts/containers/sol_cov_documentation.ts +++ b/packages/website/ts/containers/sol_cov_documentation.ts @@ -9,9 +9,12 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/sol_cov/introduction'); -const InstallationMarkdownV1 = require('md/docs/sol_cov/installation'); -const UsageMarkdown = require('md/docs/sol_cov/usage'); +const IntroMarkdown1 = require('md/docs/sol_cov/1/introduction'); +const InstallationMarkdown1 = require('md/docs/sol_cov/1/installation'); +const UsageMarkdown1 = require('md/docs/sol_cov/1/usage'); +const IntroMarkdown2 = require('md/docs/sol_cov/2/introduction'); +const InstallationMarkdown2 = require('md/docs/sol_cov/2/installation'); +const UsageMarkdown2 = require('md/docs/sol_cov/2/usage'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -31,9 +34,14 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, - [markdownSections.usage]: UsageMarkdown, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + [markdownSections.usage]: UsageMarkdown1, + }, + '2.1.8': { + [markdownSections.introduction]: IntroMarkdown2, + [markdownSections.installation]: InstallationMarkdown2, + [markdownSections.usage]: UsageMarkdown2, }, }, markdownSections, diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index b00551a79..0e421777b 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -9,9 +9,10 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/subproviders/introduction'); -const InstallationMarkdownV1 = require('md/docs/subproviders/installation'); -const LedgerNodeHidMarkdown = require('md/docs/subproviders/ledger_node_hid'); +const IntroMarkdown1 = require('md/docs/subproviders/1/introduction'); +const InstallationMarkdown1 = require('md/docs/subproviders/1/installation'); +const InstallationMarkdown2 = require('md/docs/subproviders/2/installation'); +const LedgerNodeHidMarkdown1 = require('md/docs/subproviders/1/ledger_node_hid'); /* tslint:enable:no-var-requires */ const docSections = { @@ -31,9 +32,14 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [docSections.introduction]: IntroMarkdownV1, - [docSections.installation]: InstallationMarkdownV1, - [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown, + [docSections.introduction]: IntroMarkdown1, + [docSections.installation]: InstallationMarkdown1, + [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown1, + }, + '2.1.0': { + [docSections.introduction]: IntroMarkdown1, + [docSections.installation]: InstallationMarkdown2, + [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown1, }, }, markdownSections: docSections, diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index f064a1567..9c8c34621 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -9,8 +9,9 @@ import { DocPackages, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; /* tslint:disable:no-var-requires */ -const IntroMarkdownV1 = require('md/docs/web3_wrapper/introduction'); -const InstallationMarkdownV1 = require('md/docs/web3_wrapper/installation'); +const IntroMarkdown1 = require('md/docs/web3_wrapper/1/introduction'); +const InstallationMarkdown1 = require('md/docs/web3_wrapper/1/installation'); +const InstallationMarkdown2 = require('md/docs/web3_wrapper/2/installation'); /* tslint:enable:no-var-requires */ const markdownSections = { @@ -29,8 +30,12 @@ const docsInfoConfig: DocsInfoConfig = { }, sectionNameToMarkdownByVersion: { '0.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + }, + '3.1.0': { + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown2, }, }, markdownSections, diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 9c0de32a8..e0ea6e275 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -15,8 +15,8 @@ const AsyncMarkdownV0 = require('md/docs/0xjs/0.0.1/async'); const ErrorsMarkdownV0 = require('md/docs/0xjs/0.0.1/errors'); const versioningMarkdownV0 = require('md/docs/0xjs/0.0.1/versioning'); -const IntroMarkdownV1 = require('md/docs/0xjs/1.0.1/introduction'); -const InstallationMarkdownV1 = require('md/docs/0xjs/1.0.1/installation'); +const IntroMarkdown1 = require('md/docs/0xjs/1.0.1/introduction'); +const InstallationMarkdown1 = require('md/docs/0xjs/1.0.1/installation'); const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.1/async'); const ErrorsMarkdownV1 = ErrorsMarkdownV0; const versioningMarkdownV1 = require('md/docs/0xjs/1.0.1/versioning'); @@ -56,8 +56,15 @@ const docsInfoConfig: DocsInfoConfig = { [markdownSections.errors]: ErrorsMarkdownV0, }, '1.0.1': { - [markdownSections.introduction]: IntroMarkdownV1, - [markdownSections.installation]: InstallationMarkdownV1, + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + [markdownSections.versioning]: versioningMarkdownV1, + [markdownSections.async]: AsyncMarkdownV1, + [markdownSections.errors]: ErrorsMarkdownV1, + }, + '2.0.0': { + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, [markdownSections.versioning]: versioningMarkdownV1, [markdownSections.async]: AsyncMarkdownV1, [markdownSections.errors]: ErrorsMarkdownV1, -- cgit From 3f0059d4bb7de5bc31fde228142b4bc0370fc22f Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Thu, 18 Oct 2018 13:10:49 -0700 Subject: chore: Update list of published packages in top-level README --- README.md | 54 +++++++++++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 0be459d81..78e1689d0 100644 --- a/README.md +++ b/README.md @@ -20,29 +20,37 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t ### Published 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) | 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/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/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/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/monorepo-scripts`](/packages/monorepo-scripts) | [![npm](https://img.shields.io/npm/v/@0x/monorepo-scripts.svg)](https://www.npmjs.com/package/@0x/monorepo-scripts) | Monorepo scripts | -| [`@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/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/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 | +| 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 | ### Private Packages -- cgit From ee6bb229e0f912e2ccd9aff70ebf82d98b312251 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 09:44:27 +0100 Subject: Don't show topBar menu items in sidebar on wiki --- packages/website/ts/pages/wiki/wiki.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx index fdca61e39..e62300ddf 100644 --- a/packages/website/ts/pages/wiki/wiki.tsx +++ b/packages/website/ts/pages/wiki/wiki.tsx @@ -73,10 +73,14 @@ export class Wiki extends React.Component { {this._renderWikiArticles()}
    ); + const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm; const sidebar = _.isUndefined(this.state.articlesBySection) ? (
    ) : ( - + ); return ( Date: Fri, 19 Oct 2018 09:44:52 +0100 Subject: fix: Make sure page scrollable on mobile --- packages/website/ts/pages/documentation/developers_page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 934a4cc36..918a3a635 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -1,4 +1,4 @@ -import { colors, constants as sharedConstants } from '@0x/react-shared'; +import { colors, constants as sharedConstants, utils as sharedUtils } from '@0x/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import DocumentTitle = require('react-document-title'); @@ -71,6 +71,7 @@ export class DevelopersPage extends React.Component Date: Fri, 19 Oct 2018 09:56:34 +0100 Subject: copy: Networked liquidity -> shared liquidity --- packages/website/translations/chinese.json | 4 ++-- packages/website/translations/english.json | 4 ++-- packages/website/translations/korean.json | 4 ++-- packages/website/translations/russian.json | 4 ++-- packages/website/translations/spanish.json | 4 ++-- packages/website/ts/components/dropdowns/developers_drop_down.tsx | 2 +- packages/website/ts/pages/documentation/docs_home.tsx | 4 ++-- packages/website/ts/types.ts | 4 ++-- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 2d3ad6974..4f779282f 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -85,8 +85,8 @@ "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", - "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API", + "USE_NETWORKED_LIQUIDITY": "use networked liquidity", + "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index fab8ed56b..510b3a05b 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -89,8 +89,8 @@ "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", - "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", + "USE_NETWORKED_LIQUIDITY": "use networked liquidity", + "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index 8470bf9a0..be7d00228 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -85,8 +85,8 @@ "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", - "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", + "USE_NETWORKED_LIQUIDITY": "use networked liquidity", + "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index b2bc151ab..d75b2a459 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -85,8 +85,8 @@ "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", - "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", + "USE_NETWORKED_LIQUIDITY": "use networked liquidity", + "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index fefb92447..a64db197c 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -86,8 +86,8 @@ "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", - "USE_SHARED_LIQUIDITY": "use shared liquidity", - "USE_SHARED_LIQUIDITY_DESCRIPTION": "Learn how to tap into shared liquidity using the Standard Relayer API", + "USE_NETWORKED_LIQUIDITY": "use networked liquidity", + "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API", "VIEW_ALL_DOCUMENTATION": "view all documentation", "SANDBOX": "0x.js sandbox", "GITHUB": "github", diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx index f5d21535a..b279566e0 100644 --- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx +++ b/packages/website/ts/components/dropdowns/developers_drop_down.tsx @@ -24,7 +24,7 @@ const gettingStartedKeyToLinkInfo2: ALink[] = [ to: `${WebsitePaths.Wiki}#Ethereum-Development`, }, { - title: Key.UseSharedLiquidity, + title: Key.UseNetworkedLiquidity, to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, }, ]; diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index 74fd0135c..a8dcff43b 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -37,9 +37,9 @@ const TUTORIALS: TutorialInfo[] = [ }, { iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg', - description: Key.UseSharedLiquidityDescription, + description: Key.UseNetworkedLiquidityDescription, link: { - title: Key.UseSharedLiquidity, + title: Key.UseNetworkedLiquidity, to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`, }, }, diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index f85317c7b..d3bdd880e 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -468,8 +468,8 @@ export enum Key { DevelopOnEthereumDescription = 'DEVELOP_ON_ETHEREUM_DESCRIPTION', OrderBasics = 'ORDER_BASICS', OrderBasicsDescription = 'ORDER_BASICS_DESCRIPTION', - UseSharedLiquidity = 'USE_SHARED_LIQUIDITY', - UseSharedLiquidityDescription = 'USE_SHARED_LIQUIDITY_DESCRIPTION', + UseNetworkedLiquidity = 'USE_NETWORKED_LIQUIDITY', + UseNetworkedLiquidityDescription = 'USE_NETWORKED_LIQUIDITY_DESCRIPTION', ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION', Sandbox = 'SANDBOX', Github = 'GITHUB', -- cgit From 0eb9769cd41f86333670b2f77b01c0e9c203a499 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 10:00:30 +0100 Subject: Switch tutorial descriptions --- packages/website/translations/chinese.json | 4 ++-- packages/website/translations/english.json | 4 ++-- packages/website/translations/korean.json | 4 ++-- packages/website/translations/russian.json | 4 ++-- packages/website/translations/spanish.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json index 4f779282f..95b9bda62 100644 --- a/packages/website/translations/chinese.json +++ b/packages/website/translations/chinese.json @@ -80,9 +80,9 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "开发人员", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", + "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", - "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json index 510b3a05b..465bd49b4 100644 --- a/packages/website/translations/english.json +++ b/packages/website/translations/english.json @@ -84,9 +84,9 @@ "ROCKETCHAT": "rocket.chat", "TRADE_CALL_TO_ACTION": "trade on 0x", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", + "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", - "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json index be7d00228..5485e5583 100644 --- a/packages/website/translations/korean.json +++ b/packages/website/translations/korean.json @@ -80,9 +80,9 @@ "ROCKETCHAT": "Rocket.chat", "DEVELOPERS": "개발자", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", + "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", - "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json index d75b2a459..a2e2a8cef 100644 --- a/packages/website/translations/russian.json +++ b/packages/website/translations/russian.json @@ -80,9 +80,9 @@ "HOME": "Rocket.chat", "ROCKETCHAT": "Для разработчиков", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", + "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", - "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json index a64db197c..acbc59c3d 100644 --- a/packages/website/translations/spanish.json +++ b/packages/website/translations/spanish.json @@ -81,9 +81,9 @@ "HOME": "rocket.chat", "ROCKETCHAT": "desarrolladores", "BUILD_A_RELAYER": "build a relayer", - "BUILD_A_RELAYER_DESCRIPTION": "Learn more about building applications ontop of Ethereum", + "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", "DEVELOP_ON_ETHEREUM": "develop on Ethereum", - "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn how to build your own 0x relayer from scratch", + "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications ontop of Ethereum", "ORDER_BASICS": "0x order basics", "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x", "USE_NETWORKED_LIQUIDITY": "use networked liquidity", -- cgit From c26b3f5dfcea86b1885dcf2070580baec82430ea Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 10:05:19 +0100 Subject: copy: consistently name ERCdEX with correct capitalization --- packages/website/ts/pages/documentation/docs_home.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index a8dcff43b..cf229cb3b 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -194,7 +194,7 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { }, { description: - "ERCdex's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", + "ERCdEX's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers", link: { title: 'Aquaduct', to: 'https://www.npmjs.com/package/aqueduct', @@ -219,26 +219,26 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { }, }, { - description: "The ERC dEX Trade Widget let's any website provide token liquidity to it's users", + description: "The ERCdEX Trade Widget let's any website provide token liquidity to it's users", link: { to: 'https://github.com/ERCdEX/widget', - title: 'ERCdex Widget', + title: 'ERCdEX Widget', shouldOpenInNewTab: true, }, }, { - description: "ERCdex's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", + description: "ERCdEX's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers", link: { to: 'https://github.com/ERCdEX/java', - title: 'ERCdex Java SDK', + title: 'ERCdEX Java SDK', shouldOpenInNewTab: true, }, }, { - description: "ERCdex's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", + description: "ERCdEX's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers", link: { to: 'https://github.com/ERCdEX/python', - title: 'ERCdex Python SDK', + title: 'ERCdEX Python SDK', shouldOpenInNewTab: true, }, }, -- cgit From a60cf44d4581ee898482de235aeccec3eab412f7 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 10:16:01 +0100 Subject: style: fix doc reference package name capitalization --- packages/react-shared/src/components/markdown_section.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx index e6a7d80d5..42c910c11 100644 --- a/packages/react-shared/src/components/markdown_section.tsx +++ b/packages/react-shared/src/components/markdown_section.tsx @@ -48,7 +48,7 @@ export class MarkdownSection extends React.Component -- cgit From da0c5dd9d3e92b48a87585d4c08e2e9bd1279090 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 10:35:34 +0100 Subject: chore: Fix scroll issue by bumping version and installing from new branch --- packages/react-docs/package.json | 2 +- packages/react-shared/package.json | 2 +- packages/website/package.json | 2 +- yarn.lock | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 04e1387c6..d3ccfa8da 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -50,7 +50,7 @@ "react": "^16.4.2", "react-dom": "^16.4.2", "react-markdown": "^3.2.2", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", + "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state", "react-tooltip": "^3.2.7", "semver": "5.5.0", "styled-components": "^3.3.0" diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json index 488586f89..7a150bf35 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -55,7 +55,7 @@ "react-highlight": "0xproject/react-highlight#2f40a42e0a3f0ad126f9f42d505b97b603fc7162", "react-markdown": "^3.2.2", "react-router-dom": "^4.1.1", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", + "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state", "styled-components": "^3.3.0", "valid-url": "^1.0.9" }, diff --git a/packages/website/package.json b/packages/website/package.json index 777790ca9..771b1b908 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -52,7 +52,7 @@ "react-helmet": "^5.2.0", "react-popper": "^1.0.0-beta.6", "react-redux": "^5.0.3", - "react-scroll": "0xproject/react-scroll#similar-to-pr-330-but-with-replace-state", + "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state", "react-tooltip": "^3.2.7", "react-typist": "^2.0.4", "redux": "^3.6.0", diff --git a/yarn.lock b/yarn.lock index 2c01768f4..5975458e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12394,9 +12394,9 @@ react-router@^4.2.0: prop-types "^15.5.4" warning "^3.0.0" -react-scroll@0xproject/react-scroll#similar-to-pr-330-but-with-replace-state: - version "1.7.10" - resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/0f625b270d7e966313cac8b811c0ae807b37e170" +react-scroll@0xproject/react-scroll#pr-330-and-replace-state: + version "1.7.11" + resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/d2afc2729dc09980e4113d8c38a1b012ba180d81" dependencies: lodash.throttle "^4.1.1" prop-types "^15.5.8" @@ -16094,8 +16094,8 @@ websocket@^1.0.24, websocket@^1.0.25: yaeti "^0.0.6" "websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible": - version "1.0.24" - resolved "git://github.com/frozeman/WebSocket-Node.git#7004c39c42ac98875ab61126e5b4a925430f592c" + version "1.0.26" + resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2" dependencies: debug "^2.2.0" nan "^2.3.3" -- cgit From 26cd5ec1493adab55cbaf0801b0725ca99b8fc8e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 10:46:55 +0100 Subject: style: accomodate different scrollbar widths on Firefox vs. Chrome/Safari --- packages/website/ts/pages/documentation/developers_page.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 918a3a635..9e4f6d413 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -6,13 +6,14 @@ import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; import { Container } from 'ts/components/ui/container'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { ScreenWidths } from 'ts/types'; +import { BrowserType, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; const THROTTLE_TIMEOUT = 100; const TOP_BAR_HEIGHT = 80; -const SCROLLER_WIDTH = 4; +const browserType = utils.getBrowserType(); +const SCROLLER_WIDTH = browserType === BrowserType.Firefox ? 15 : 4; export interface DevelopersPageProps { location: Location; -- cgit From 7742df8614e6fd8c0508e29aec47bc86f9359a8b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 11:27:42 +0100 Subject: chore: Replace state with styled-components for hover detection --- .../ts/pages/documentation/developers_page.tsx | 140 ++++++++++----------- 1 file changed, 69 insertions(+), 71 deletions(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 9e4f6d413..4ea688529 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -6,6 +6,7 @@ import { DocsLogo } from 'ts/components/documentation/docs_logo'; import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; import { Container } from 'ts/components/ui/container'; import { Dispatcher } from 'ts/redux/dispatcher'; +import { styled } from 'ts/style/theme'; import { BrowserType, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; @@ -14,6 +15,7 @@ const THROTTLE_TIMEOUT = 100; const TOP_BAR_HEIGHT = 80; const browserType = utils.getBrowserType(); const SCROLLER_WIDTH = browserType === BrowserType.Firefox ? 15 : 4; +const SIDEBAR_PADDING = 22; export interface DevelopersPageProps { location: Location; @@ -25,11 +27,70 @@ export interface DevelopersPageProps { } export interface DevelopersPageState { - isHoveringSidebar: boolean; - isHoveringMainContent: boolean; isSidebarScrolling: boolean; } +const isUserOnMobile = sharedUtils.isUserOnMobile(); + +const scrollableContainerStyles = ` + position: absolute; + top: 80px; + left: 0px; + bottom: 0px; + right: 0px; + overflow-x: hidden; + overflow-y: scroll; + min-height: calc(100vh - ${TOP_BAR_HEIGHT}px); + -webkit-overflow-scrolling: touch; +`; + +interface SidebarContainerProps { + className?: string; +} + +const SidebarContainer = + styled.div < + SidebarContainerProps > + ` + ${scrollableContainerStyles} + padding-top: 27px; + padding-bottom: 100px; + padding-left: ${SIDEBAR_PADDING}px; + padding-right: ${SIDEBAR_PADDING}px; + overflow: hidden; + &:hover { + overflow: auto; + padding-right: ${SIDEBAR_PADDING - SCROLLER_WIDTH}px; + } +`; + +interface MainContentContainerProps { + className?: string; +} + +const MainContentContainer = + styled.div < + MainContentContainerProps > + ` + ${scrollableContainerStyles} + padding-top: 0px; + padding-left: 50px; + padding-right: 50px; + overflow: ${isUserOnMobile ? 'auto' : 'hidden'}; + &:hover { + padding-right: ${50 - SCROLLER_WIDTH}px; + overflow: auto; + } + @media (max-width: 40em) { + padding-left: 20px; + padding-right: 20px; + &:hover { + padding-right: ${20 - SCROLLER_WIDTH}px; + overflow: auto; + } + } +`; + export class DevelopersPage extends React.Component { private readonly _throttledScreenWidthUpdate: () => void; private readonly _throttledSidebarScrolling: () => void; @@ -39,8 +100,6 @@ export class DevelopersPage extends React.Component - + -
    -
    - {this.props.screenWidth !== ScreenWidths.Sm && this.props.sidebar} -
    -
    + + {this.props.screenWidth !== ScreenWidths.Sm && this.props.sidebar} + -
    + {this.props.mainContent} -
    + ); } - private _onSidebarHover(isHovering: boolean, _event: React.FormEvent): void { - if (isHovering !== this.state.isHoveringSidebar) { - this.setState({ - isHoveringSidebar: isHovering, - }); - } - } - private _onMainContentHover(isHovering: boolean, _event: React.FormEvent): void { - if (isHovering !== this.state.isHoveringMainContent) { - this.setState({ - isHoveringMainContent: isHovering, - }); - } - } private _onSidebarScroll(_event: React.FormEvent): void { this.setState({ isSidebarScrolling: true, -- cgit From a7a17c85dce26c8384165b821f0bf60ce531b987 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 11:48:15 +0100 Subject: chore: improve sidebar scroll --- packages/website/ts/pages/documentation/developers_page.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 4ea688529..0bbc6252d 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -40,8 +40,8 @@ const scrollableContainerStyles = ` right: 0px; overflow-x: hidden; overflow-y: scroll; - min-height: calc(100vh - ${TOP_BAR_HEIGHT}px); -webkit-overflow-scrolling: touch; + -ms-overflow-style: -ms-autohiding-scrollbar; `; interface SidebarContainerProps { -- cgit From 724f3b9cf7fb3a740d56e28c5375665b944919f3 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 19 Oct 2018 12:25:31 +0100 Subject: Improve sidebar logic to handle MS Edge, Firefox differences between Windows & Mac --- .../ts/pages/documentation/developers_page.tsx | 30 +++++++++++++++++----- packages/website/ts/types.ts | 2 ++ packages/website/ts/utils/utils.ts | 4 +++ 3 files changed, 30 insertions(+), 6 deletions(-) diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 0bbc6252d..30b79552f 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -7,14 +7,31 @@ import { DocsTopBar } from 'ts/components/documentation/docs_top_bar'; import { Container } from 'ts/components/ui/container'; import { Dispatcher } from 'ts/redux/dispatcher'; import { styled } from 'ts/style/theme'; -import { BrowserType, ScreenWidths } from 'ts/types'; +import { BrowserType, OperatingSystemType, ScreenWidths } from 'ts/types'; import { Translate } from 'ts/utils/translate'; import { utils } from 'ts/utils/utils'; const THROTTLE_TIMEOUT = 100; const TOP_BAR_HEIGHT = 80; const browserType = utils.getBrowserType(); -const SCROLLER_WIDTH = browserType === BrowserType.Firefox ? 15 : 4; +let SCROLLBAR_WIDTH; +switch (browserType) { + case BrowserType.Firefox: + // HACK: Firefox doesn't allow styling of their scrollbar's. + // Source: https://stackoverflow.com/questions/6165472/custom-css-scrollbar-for-firefox + const os = utils.getOperatingSystem(); + SCROLLBAR_WIDTH = os === OperatingSystemType.Windows ? 17 : 15; + break; + + case BrowserType.Edge: + // Edge's scrollbar is placed outside of the div content and doesn't + // need to be accounted for + SCROLLBAR_WIDTH = 0; + break; + + default: + SCROLLBAR_WIDTH = 4; +} const SIDEBAR_PADDING = 22; export interface DevelopersPageProps { @@ -34,13 +51,14 @@ const isUserOnMobile = sharedUtils.isUserOnMobile(); const scrollableContainerStyles = ` position: absolute; - top: 80px; + top: ${TOP_BAR_HEIGHT}px; left: 0px; bottom: 0px; right: 0px; overflow-x: hidden; overflow-y: scroll; -webkit-overflow-scrolling: touch; + /* Required for hide/show onHover of scrollbar on Microsoft Edge */ -ms-overflow-style: -ms-autohiding-scrollbar; `; @@ -60,7 +78,7 @@ const SidebarContainer = overflow: hidden; &:hover { overflow: auto; - padding-right: ${SIDEBAR_PADDING - SCROLLER_WIDTH}px; + padding-right: ${SIDEBAR_PADDING - SCROLLBAR_WIDTH}px; } `; @@ -78,14 +96,14 @@ const MainContentContainer = padding-right: 50px; overflow: ${isUserOnMobile ? 'auto' : 'hidden'}; &:hover { - padding-right: ${50 - SCROLLER_WIDTH}px; + padding-right: ${50 - SCROLLBAR_WIDTH}px; overflow: auto; } @media (max-width: 40em) { padding-left: 20px; padding-right: 20px; &:hover { - padding-right: ${20 - SCROLLER_WIDTH}px; + padding-right: ${20 - SCROLLBAR_WIDTH}px; overflow: auto; } } diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index d3bdd880e..22bfd2cb4 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -590,6 +590,8 @@ export enum BrowserType { Chrome = 'Chrome', Firefox = 'Firefox', Opera = 'Opera', + Safari = 'Safari', + Edge = 'Edge', Other = 'Other', } diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index d4ad5f611..87aa48018 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -413,6 +413,10 @@ export const utils = { return BrowserType.Firefox; } else if (bowser.opera) { return BrowserType.Opera; + } else if (bowser.msedge) { + return BrowserType.Edge; + } else if (bowser.safari) { + return BrowserType.Safari; } else { return BrowserType.Other; } -- cgit From 3f2b6482c3e0abcc2b6dc1a3caef767c01a446b3 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 19 Oct 2018 15:34:31 +0200 Subject: Fix the package versions in release notes --- packages/monorepo-scripts/src/prepublish_checks.ts | 2 +- packages/monorepo-scripts/src/publish.ts | 10 +++++----- packages/monorepo-scripts/src/publish_release_notes.ts | 2 +- .../monorepo-scripts/src/utils/github_release_utils.ts | 18 +++++++++--------- packages/monorepo-scripts/src/utils/utils.ts | 2 +- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts index 683c26094..5f603ebc7 100644 --- a/packages/monorepo-scripts/src/prepublish_checks.ts +++ b/packages/monorepo-scripts/src/prepublish_checks.ts @@ -11,7 +11,7 @@ import { utils } from './utils/utils'; async function prepublishChecksAsync(): Promise { const shouldIncludePrivate = false; - const updatedPublicPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); + const updatedPublicPackages = await utils.getPackagesToPublishAsync(shouldIncludePrivate); await checkCurrentVersionMatchesLatestPublishedNPMPackageAsync(updatedPublicPackages); await checkChangelogFormatAsync(updatedPublicPackages); diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index b7131e69e..854a72b86 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -34,12 +34,12 @@ async function confirmAsync(message: string): Promise { (async () => { // Fetch public, updated Lerna packages const shouldIncludePrivate = true; - const allUpdatedPackages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); - if (_.isEmpty(allUpdatedPackages)) { + const allPackagesToPublish = await utils.getPackagesToPublishAsync(shouldIncludePrivate); + if (_.isEmpty(allPackagesToPublish)) { utils.log('No packages need publishing'); process.exit(0); } - const packagesWithDocs = getPackagesWithDocs(allUpdatedPackages); + const packagesWithDocs = getPackagesWithDocs(allPackagesToPublish); if (!configs.IS_LOCAL_PUBLISH) { await confirmAsync( @@ -49,12 +49,12 @@ async function confirmAsync(message: string): Promise { } // Update CHANGELOGs - const updatedPublicPackages = _.filter(allUpdatedPackages, pkg => !pkg.packageJson.private); + const updatedPublicPackages = _.filter(allPackagesToPublish, pkg => !pkg.packageJson.private); const updatedPublicPackageNames = _.map(updatedPublicPackages, pkg => pkg.packageJson.name); utils.log(`Will update CHANGELOGs and publish: \n${updatedPublicPackageNames.join('\n')}\n`); const packageToNextVersion = await updateChangeLogsAsync(updatedPublicPackages); - const updatedPrivatePackages = _.filter(allUpdatedPackages, pkg => pkg.packageJson.private); + const updatedPrivatePackages = _.filter(allPackagesToPublish, pkg => pkg.packageJson.private); _.each(updatedPrivatePackages, pkg => { const currentVersion = pkg.packageJson.version; const packageName = pkg.packageJson.name; diff --git a/packages/monorepo-scripts/src/publish_release_notes.ts b/packages/monorepo-scripts/src/publish_release_notes.ts index 297eb3d50..d2082521c 100644 --- a/packages/monorepo-scripts/src/publish_release_notes.ts +++ b/packages/monorepo-scripts/src/publish_release_notes.ts @@ -22,7 +22,7 @@ const args = yargs let packages; if (_.isUndefined(args.packages)) { const shouldIncludePrivate = false; - packages = await utils.getUpdatedPackagesAsync(shouldIncludePrivate); + packages = await utils.getPackagesToPublishAsync(shouldIncludePrivate); } else { const packageNames = args.packages.split(' '); packages = await utils.getPackagesByNameAsync(packageNames); diff --git a/packages/monorepo-scripts/src/utils/github_release_utils.ts b/packages/monorepo-scripts/src/utils/github_release_utils.ts index 43c52ec2d..7434d397e 100644 --- a/packages/monorepo-scripts/src/utils/github_release_utils.ts +++ b/packages/monorepo-scripts/src/utils/github_release_utils.ts @@ -12,7 +12,7 @@ import { utils } from './utils'; const publishReleaseAsync = promisify(publishRelease); // tslint:disable-next-line:completed-docs -export async function publishReleaseNotesAsync(updatedPublishPackages: Package[], isDryRun: boolean): Promise { +export async function publishReleaseNotesAsync(packagesToPublish: Package[], isDryRun: boolean): Promise { // Git push a tag representing this publish (publish-{commit-hash}) (truncate hash) const result = await execAsync('git log -n 1 --pretty=format:"%H"', { cwd: constants.monorepoRootPath }); const latestGitCommit = result.stdout; @@ -40,12 +40,8 @@ export async function publishReleaseNotesAsync(updatedPublishPackages: Package[] let assets: string[] = []; let aggregateNotes = ''; - _.each(updatedPublishPackages, pkg => { - const notes = getReleaseNotesForPackage(pkg.packageJson.name, pkg.packageJson.version); - if (_.isEmpty(notes)) { - return; // don't include it - } - aggregateNotes += `### ${pkg.packageJson.name}@${pkg.packageJson.version}\n${notes}\n\n`; + _.each(packagesToPublish, pkg => { + aggregateNotes += getReleaseNotesForPackage(pkg.packageJson.name); const packageAssets = _.get(pkg.packageJson, 'config.postpublish.assets'); if (!_.isUndefined(packageAssets)) { @@ -92,7 +88,7 @@ function adjustAssetPaths(assets: string[]): string[] { return finalAssets; } -function getReleaseNotesForPackage(packageName: string, version: string): string { +function getReleaseNotesForPackage(packageName: string): string { const packageNameWithoutNamespace = packageName.replace('@0x/', ''); const changelogJSONPath = path.join( constants.monorepoRootPath, @@ -115,5 +111,9 @@ function getReleaseNotesForPackage(packageName: string, version: string): string } notes += `\n`; }); - return notes; + if (_.isEmpty(notes)) { + return ''; // don't include it + } + const releaseNotesSection = `### ${packageName}@${latestLog.version}\n${notes}\n\n`; + return releaseNotesSection; } diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts index 5e2e877c7..44ff971e8 100644 --- a/packages/monorepo-scripts/src/utils/utils.ts +++ b/packages/monorepo-scripts/src/utils/utils.ts @@ -61,7 +61,7 @@ export const utils = { }); return updatedPackages; }, - async getUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise { + async getPackagesToPublishAsync(shouldIncludePrivate: boolean): Promise { const updatedPublicPackages = await utils.getLernaUpdatedPackagesAsync(shouldIncludePrivate); const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name); -- cgit