From 20ed4fbbd46f359ca1436b2d3b9d17527c01df54 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 08:19:58 -0800 Subject: First pass on widget version of heap --- packages/instant/src/constants.ts | 1 + packages/instant/src/util/heap.ts | 87 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 packages/instant/src/util/heap.ts diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 5bd2349b3..994be9788 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -16,6 +16,7 @@ export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15; export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6); export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2; export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; +export const HEAP_ANALYTICS_DEVELOPMENT_APP_ID = '507265531'; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts new file mode 100644 index 000000000..399ac3f6f --- /dev/null +++ b/packages/instant/src/util/heap.ts @@ -0,0 +1,87 @@ +import { ObjectMap } from '@0x/types'; +import { logUtils } from '@0x/utils'; + +import { HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; + +export interface HeapAnalytics { + loaded: boolean; + identify(id: string, idType: string): void; + track(eventName: string, eventProperties?: ObjectMap): void; + resetIdentity(): void; + addUserProperties(properties: ObjectMap): void; + addEventProperties(properties: ObjectMap): void; + removeEventProperty(property: string): void; + clearEventProperties(): void; +} +interface ModifiedWindow { + heap?: HeapAnalytics; + zeroExInstantLoadedHeap?: boolean; +} +const getWindow = (): ModifiedWindow => { + return window as ModifiedWindow; +}; +// Typescript-compatible version of https://docs.heapanalytics.com/docs/installation +const setupZeroExInstantHeap = () => { + /* tslint:disable */ + ((window as any).heap = (window as any).heap || []), + ((window as any).heap.load = function(e: any, t: any) { + ((window as any).heap.appid = e), ((window as any).heap.config = t = t || {}); + var r = t.forceSSL || 'https:' === (document.location as Location).protocol, + a = document.createElement('script'); + (a.type = 'text/javascript'), + (a.async = !0), + (a.src = (r ? 'https:' : 'http:') + '//cdn.heapanalytics.com/js/heap-' + e + '.js'); + var n = document.getElementsByTagName('script')[0]; + (n.parentNode as Node).insertBefore(a, n); + for ( + var o = function(e: any) { + return function() { + (window as any).heap.push([e].concat(Array.prototype.slice.call(arguments, 0))); + }; + }, + p = [ + 'addEventProperties', + 'addUserProperties', + 'clearEventProperties', + 'identify', + 'resetIdentity', + 'removeEventProperty', + 'setEventProperties', + 'track', + 'unsetEventProperty', + ], + c = 0; + c < p.length; + c++ + ) + (window as any).heap[p[c]] = o(p[c]); + }); + // TODO: use production heap id once environment utils merged + (window as any).heap.load(HEAP_ANALYTICS_DEVELOPMENT_APP_ID); + /* tslint:enable */ + + const curWindow = getWindow(); + // Set property to specify that this is zeroEx's heap + curWindow.zeroExInstantLoadedHeap = true; + return curWindow.heap as HeapAnalytics; +}; + +export const heapUtil = { + getHeap: (): HeapAnalytics | null => { + const curWindow = getWindow(); + const hasOtherExistingHeapIntegration = curWindow.heap && !curWindow.zeroExInstantLoadedHeap; + if (hasOtherExistingHeapIntegration) { + logUtils.log('Heap integration already exists'); + return null; + } + + const zeroExInstantHeapIntegration = curWindow.zeroExInstantLoadedHeap && curWindow.heap; + if (zeroExInstantHeapIntegration) { + logUtils.log('Using existing 0x instant heap'); + return zeroExInstantHeapIntegration; + } + + logUtils.log('Setting up heap'); + return setupZeroExInstantHeap(); + }, +}; -- cgit From 61f227e123218ba76a7fdf7fc2ee89171c2bf16c Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 10:43:42 -0800 Subject: feat(instant): Heap middleware and first tracking events --- .../src/components/zero_ex_instant_container.tsx | 5 +++ packages/instant/src/redux/analytics_middleware.ts | 38 ++++++++++++++++++++++ packages/instant/src/redux/store.ts | 7 ++-- packages/instant/src/util/analytics.ts | 35 ++++++++++++++++++++ packages/instant/src/util/heap.ts | 13 ++++---- 5 files changed, 88 insertions(+), 10 deletions(-) create mode 100644 packages/instant/src/redux/analytics_middleware.ts create mode 100644 packages/instant/src/util/analytics.ts diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 698bfef17..d977b0690 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -10,6 +10,7 @@ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instan import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; import { OrderProcessState, SlideAnimationState } from '../types'; +import { analytics } from '../util/analytics'; import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; @@ -68,6 +69,10 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon ); } + // tslint:disable-next-line:prefer-function-over-method + public componentDidMount(): void { + analytics.track('Widget - Opened'); + } private readonly _handleSymbolClick = (): void => { this.setState({ tokenSelectionPanelAnimationState: 'slidIn', diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts new file mode 100644 index 000000000..8dd674e94 --- /dev/null +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -0,0 +1,38 @@ +import { ObjectMap } from '@0x/types'; +import * as _ from 'lodash'; +import { Middleware } from 'redux'; + +import { analytics } from '../util/analytics'; + +import { AccountState } from './../types'; +import { Action, ActionTypes } from './actions'; +import { State } from './reducer'; + +export const analyticsMiddleware: Middleware = store => next => middlewareAction => { + const prevState = store.getState() as State; + const nextAction = next(middlewareAction) as Action; + const nextState = store.getState() as State; + + const curAccount = nextState.providerState.account; + const prevAccount = prevState.providerState.account; + switch (nextAction.type) { + case ActionTypes.SET_ACCOUNT_STATE_READY: + if (curAccount.state === AccountState.Ready && !_.isEqual(curAccount, prevAccount)) { + const ethAddress = curAccount.address; + analytics.addUserProperties({ ethAddress }); + analytics.track('Wallet - Ready'); + } + break; + case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: + if ( + curAccount.state === AccountState.Ready && + curAccount.ethBalanceInWei && + !_.isEqual(curAccount, prevAccount) + ) { + const ethBalanceInWei = curAccount.ethBalanceInWei.toString(); + analytics.addUserProperties({ ethBalanceInWei }); + } + } + + return nextAction; +}; diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index 20710765d..54dfe58c4 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -1,7 +1,8 @@ import * as _ from 'lodash'; -import { createStore, Store as ReduxStore } from 'redux'; -import { devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; +import { applyMiddleware, createStore, Store as ReduxStore } from 'redux'; +import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; +import { analyticsMiddleware } from './analytics_middleware'; import { createReducer, State } from './reducer'; export type Store = ReduxStore; @@ -9,6 +10,6 @@ export type Store = ReduxStore; export const store = { create: (initialState: State): Store => { const reducer = createReducer(initialState); - return createStore(reducer, initialState, devToolsEnhancer({})); + return createStore(reducer, initialState, composeWithDevTools(applyMiddleware(analyticsMiddleware))); }, }; diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts new file mode 100644 index 000000000..4de3e5eff --- /dev/null +++ b/packages/instant/src/util/analytics.ts @@ -0,0 +1,35 @@ +import { ObjectMap } from '@0x/types'; +import { logUtils } from '@0x/utils'; + +import { HeapAnalytics, heapUtil } from './heap'; + +export class Analytics { + public static init(): Analytics { + return new Analytics(); + } + public track(eventName: string, eventProperties?: ObjectMap): void { + console.log('HEAP: tracking', eventName, eventProperties); + this._evaluteHeapCall(heap => heap.track(eventName, eventProperties)); + } + public addUserProperties(properties: ObjectMap): void { + console.log('HEAP: adding user properties', properties); + this._evaluteHeapCall(heap => heap.addUserProperties(properties)); + } + public addEventProperties(properties: ObjectMap): void { + this._evaluteHeapCall(heap => heap.addEventProperties(properties)); + } + private _evaluteHeapCall(heapFunctionCall: (heap: HeapAnalytics) => void): void { + const curHeap = heapUtil.getHeap(); + if (curHeap) { + try { + heapFunctionCall(curHeap); + } catch (e) { + // We never want analytics to crash our React component + // TODO: error reporter here + logUtils.log('Analytics error', e); + } + } + } +} + +export const analytics = Analytics.init(); diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 399ac3f6f..2f2c221b1 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -20,8 +20,13 @@ interface ModifiedWindow { const getWindow = (): ModifiedWindow => { return window as ModifiedWindow; }; -// Typescript-compatible version of https://docs.heapanalytics.com/docs/installation + const setupZeroExInstantHeap = () => { + const curWindow = getWindow(); + // Set property to specify that this is zeroEx's heap + curWindow.zeroExInstantLoadedHeap = true; + + // Typescript-compatible version of https://docs.heapanalytics.com/docs/installation /* tslint:disable */ ((window as any).heap = (window as any).heap || []), ((window as any).heap.load = function(e: any, t: any) { @@ -60,9 +65,6 @@ const setupZeroExInstantHeap = () => { (window as any).heap.load(HEAP_ANALYTICS_DEVELOPMENT_APP_ID); /* tslint:enable */ - const curWindow = getWindow(); - // Set property to specify that this is zeroEx's heap - curWindow.zeroExInstantLoadedHeap = true; return curWindow.heap as HeapAnalytics; }; @@ -71,17 +73,14 @@ export const heapUtil = { const curWindow = getWindow(); const hasOtherExistingHeapIntegration = curWindow.heap && !curWindow.zeroExInstantLoadedHeap; if (hasOtherExistingHeapIntegration) { - logUtils.log('Heap integration already exists'); return null; } const zeroExInstantHeapIntegration = curWindow.zeroExInstantLoadedHeap && curWindow.heap; if (zeroExInstantHeapIntegration) { - logUtils.log('Using existing 0x instant heap'); return zeroExInstantHeapIntegration; } - logUtils.log('Setting up heap'); return setupZeroExInstantHeap(); }, }; -- cgit From 2e61050a223a52b4b984034463887b0d579ce9b8 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 10:48:20 -0800 Subject: Use pure functions instead of class --- packages/instant/src/util/analytics.ts | 51 ++++++++++++++++------------------ 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 4de3e5eff..3e2a996cf 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -3,33 +3,30 @@ import { logUtils } from '@0x/utils'; import { HeapAnalytics, heapUtil } from './heap'; -export class Analytics { - public static init(): Analytics { - return new Analytics(); - } - public track(eventName: string, eventProperties?: ObjectMap): void { - console.log('HEAP: tracking', eventName, eventProperties); - this._evaluteHeapCall(heap => heap.track(eventName, eventProperties)); - } - public addUserProperties(properties: ObjectMap): void { - console.log('HEAP: adding user properties', properties); - this._evaluteHeapCall(heap => heap.addUserProperties(properties)); - } - public addEventProperties(properties: ObjectMap): void { - this._evaluteHeapCall(heap => heap.addEventProperties(properties)); - } - private _evaluteHeapCall(heapFunctionCall: (heap: HeapAnalytics) => void): void { - const curHeap = heapUtil.getHeap(); - if (curHeap) { - try { - heapFunctionCall(curHeap); - } catch (e) { - // We never want analytics to crash our React component - // TODO: error reporter here - logUtils.log('Analytics error', e); - } +const evaluteHeapCall = (heapFunctionCall: (heap: HeapAnalytics) => void): void => { + const curHeap = heapUtil.getHeap(); + if (curHeap) { + try { + heapFunctionCall(curHeap); + } catch (e) { + // We never want analytics to crash our React component + // TODO: error reporter here + logUtils.log('Analytics error', e); } } -} +}; -export const analytics = Analytics.init(); +export const analytics = { + addUserProperties: (properties: ObjectMap): void => { + console.log('HEAP: adding user properties', properties); + evaluteHeapCall(heap => heap.addUserProperties(properties)); + }, + addEventProperties: (properties: ObjectMap): void => { + console.log('HEAP: adding user properties', properties); + evaluteHeapCall(heap => heap.addEventProperties(properties)); + }, + track: (eventName: string, eventProperties?: ObjectMap): void => { + console.log('HEAP: tracking', eventName, eventProperties); + evaluteHeapCall(heap => heap.track(eventName, eventProperties)); + }, +}; -- cgit From 0a38bf8fd6d2b98a84671a152cc380458d2e5e7e Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 11:24:48 -0800 Subject: Report ETH in units --- packages/instant/src/redux/analytics_middleware.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 8dd674e94..01be9b988 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -1,11 +1,14 @@ import { ObjectMap } from '@0x/types'; +import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { Middleware } from 'redux'; +import { ETH_DECIMALS } from '../constants'; +import { AccountState } from '../types'; import { analytics } from '../util/analytics'; -import { AccountState } from './../types'; import { Action, ActionTypes } from './actions'; + import { State } from './reducer'; export const analyticsMiddleware: Middleware = store => next => middlewareAction => { @@ -29,8 +32,11 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction curAccount.ethBalanceInWei && !_.isEqual(curAccount, prevAccount) ) { - const ethBalanceInWei = curAccount.ethBalanceInWei.toString(); - analytics.addUserProperties({ ethBalanceInWei }); + const ethBalanceInUnitAmount = Web3Wrapper.toUnitAmount( + curAccount.ethBalanceInWei, + ETH_DECIMALS, + ).toString(); + analytics.addUserProperties({ ethBalanceInUnitAmount }); } } -- cgit From 450814ad80bb22332579e8ba54b58e1c06f34f71 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 11:28:44 -0800 Subject: Introduce ANALYTICS_ENABLED constant --- packages/instant/src/constants.ts | 1 + packages/instant/src/util/analytics.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 994be9788..f46b0ca21 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -16,6 +16,7 @@ export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15; export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6); export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2; export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; +export const ANALYTICS_ENABLED = true; // TODO: change when we can switch on dev export const HEAP_ANALYTICS_DEVELOPMENT_APP_ID = '507265531'; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 3e2a996cf..6b6115abe 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -1,9 +1,15 @@ import { ObjectMap } from '@0x/types'; import { logUtils } from '@0x/utils'; +import { ANALYTICS_ENABLED } from '../constants'; + import { HeapAnalytics, heapUtil } from './heap'; const evaluteHeapCall = (heapFunctionCall: (heap: HeapAnalytics) => void): void => { + if (!ANALYTICS_ENABLED) { + return; + } + const curHeap = heapUtil.getHeap(); if (curHeap) { try { -- cgit From ca9bb45327d2c5a8a83f2d261b134bf8489b3395 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 11:29:11 -0800 Subject: Move where we track widget opened, and report on networkId and providerName --- packages/instant/src/components/zero_ex_instant_container.tsx | 4 ---- packages/instant/src/components/zero_ex_instant_provider.tsx | 10 ++++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index d977b0690..8c3bdc6b6 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -69,10 +69,6 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon ); } - // tslint:disable-next-line:prefer-function-over-method - public componentDidMount(): void { - analytics.track('Widget - Opened'); - } private readonly _handleSymbolClick = (): void => { this.setState({ tokenSelectionPanelAnimationState: 'slidIn', diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 18e71edb6..c187f98ee 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -13,6 +13,7 @@ import { store, Store } from '../redux/store'; import { fonts } from '../style/fonts'; import { AccountState, AffiliateInfo, AssetMetaData, Network, OrderSource } from '../types'; import { assetUtils } from '../util/asset'; +import { analytics } from '../util/analytics'; import { errorFlasher } from '../util/error_flasher'; import { gasPriceEstimator } from '../util/gas_price_estimator'; import { Heartbeater } from '../util/heartbeater'; @@ -120,6 +121,15 @@ export class ZeroExInstantProvider extends React.Component Date: Thu, 15 Nov 2018 11:33:04 -0800 Subject: Take out console.logs --- packages/instant/src/util/analytics.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 6b6115abe..dd595529d 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -24,15 +24,12 @@ const evaluteHeapCall = (heapFunctionCall: (heap: HeapAnalytics) => void): void export const analytics = { addUserProperties: (properties: ObjectMap): void => { - console.log('HEAP: adding user properties', properties); evaluteHeapCall(heap => heap.addUserProperties(properties)); }, addEventProperties: (properties: ObjectMap): void => { - console.log('HEAP: adding user properties', properties); evaluteHeapCall(heap => heap.addEventProperties(properties)); }, track: (eventName: string, eventProperties?: ObjectMap): void => { - console.log('HEAP: tracking', eventName, eventProperties); evaluteHeapCall(heap => heap.track(eventName, eventProperties)); }, }; -- cgit From 71aeb7cddcd2a1faf7a4dc46d828ad8471019f37 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 11:35:47 -0800 Subject: Linting --- packages/instant/src/components/zero_ex_instant_container.tsx | 1 - packages/instant/src/components/zero_ex_instant_provider.tsx | 2 +- packages/instant/src/redux/analytics_middleware.ts | 1 - packages/instant/src/redux/store.ts | 2 +- packages/instant/src/util/heap.ts | 1 - 5 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 8c3bdc6b6..698bfef17 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -10,7 +10,6 @@ import { SelectedAssetInstantHeading } from '../containers/selected_asset_instan import { ColorOption } from '../style/theme'; import { zIndex } from '../style/z_index'; import { OrderProcessState, SlideAnimationState } from '../types'; -import { analytics } from '../util/analytics'; import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index c187f98ee..cfc542a59 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -12,8 +12,8 @@ import { DEFAULT_STATE, DefaultState, State } from '../redux/reducer'; import { store, Store } from '../redux/store'; import { fonts } from '../style/fonts'; import { AccountState, AffiliateInfo, AssetMetaData, Network, OrderSource } from '../types'; -import { assetUtils } from '../util/asset'; import { analytics } from '../util/analytics'; +import { assetUtils } from '../util/asset'; import { errorFlasher } from '../util/error_flasher'; import { gasPriceEstimator } from '../util/gas_price_estimator'; import { Heartbeater } from '../util/heartbeater'; diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 01be9b988..2b3ebf529 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -1,4 +1,3 @@ -import { ObjectMap } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as _ from 'lodash'; import { Middleware } from 'redux'; diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts index 54dfe58c4..11bba3876 100644 --- a/packages/instant/src/redux/store.ts +++ b/packages/instant/src/redux/store.ts @@ -1,6 +1,6 @@ import * as _ from 'lodash'; import { applyMiddleware, createStore, Store as ReduxStore } from 'redux'; -import { composeWithDevTools, devToolsEnhancer } from 'redux-devtools-extension/developmentOnly'; +import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly'; import { analyticsMiddleware } from './analytics_middleware'; import { createReducer, State } from './reducer'; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 2f2c221b1..6d3c75ea7 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -1,5 +1,4 @@ import { ObjectMap } from '@0x/types'; -import { logUtils } from '@0x/utils'; import { HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; -- cgit From ed26f5af985239e0dd91b68d4ec0aa264267acd6 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Thu, 15 Nov 2018 13:54:35 -0800 Subject: Move variable assignments around to be more clear --- packages/instant/src/redux/analytics_middleware.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 2b3ebf529..eddeeb193 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -12,11 +12,13 @@ import { State } from './reducer'; export const analyticsMiddleware: Middleware = store => next => middlewareAction => { const prevState = store.getState() as State; + const prevAccount = prevState.providerState.account; + const nextAction = next(middlewareAction) as Action; - const nextState = store.getState() as State; - const curAccount = nextState.providerState.account; - const prevAccount = prevState.providerState.account; + const curState = store.getState() as State; + const curAccount = curState.providerState.account; + switch (nextAction.type) { case ActionTypes.SET_ACCOUNT_STATE_READY: if (curAccount.state === AccountState.Ready && !_.isEqual(curAccount, prevAccount)) { -- cgit From 004e197863e4df942d21f9e4ed629c08eeadad56 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 14 Nov 2018 16:01:16 -0800 Subject: feat(instant): add icons to token selector --- packages/instant/package.json | 1 + packages/instant/src/assets/icons/ae.svg | 4 ++ packages/instant/src/assets/icons/agi.svg | 5 ++ packages/instant/src/assets/icons/ant.svg | 5 ++ packages/instant/src/assets/icons/ast.svg | 4 ++ packages/instant/src/assets/icons/bat.svg | 3 ++ packages/instant/src/assets/icons/cvc.svg | 4 ++ packages/instant/src/assets/icons/dai.svg | 5 ++ packages/instant/src/assets/icons/dgd.svg | 5 ++ packages/instant/src/assets/icons/dgx.svg | 4 ++ packages/instant/src/assets/icons/dnt.svg | 4 ++ packages/instant/src/assets/icons/fun.svg | 4 ++ packages/instant/src/assets/icons/gno.svg | 6 +++ packages/instant/src/assets/icons/gnt.svg | 3 ++ packages/instant/src/assets/icons/knc.svg | 6 +++ packages/instant/src/assets/icons/link.svg | 6 +++ packages/instant/src/assets/icons/lpt.svg | 8 +++ packages/instant/src/assets/icons/mana.svg | 8 +++ packages/instant/src/assets/icons/mkr.svg | 4 ++ packages/instant/src/assets/icons/mln.svg | 4 ++ packages/instant/src/assets/icons/omg.svg | 3 ++ packages/instant/src/assets/icons/powr.svg | 6 +++ packages/instant/src/assets/icons/ren.svg | 12 +++++ packages/instant/src/assets/icons/rep.svg | 7 +++ packages/instant/src/assets/icons/req.svg | 3 ++ packages/instant/src/assets/icons/salt.svg | 3 ++ packages/instant/src/assets/icons/snt.svg | 4 ++ packages/instant/src/assets/icons/spank.svg | 6 +++ packages/instant/src/assets/icons/wax.svg | 4 ++ packages/instant/src/assets/icons/zil.svg | 3 ++ packages/instant/src/assets/icons/zrx.svg | 3 ++ .../src/components/erc20_token_selector.tsx | 15 ++++-- packages/instant/src/data/asset_meta_data_map.ts | 4 +- packages/instant/webpack.config.js | 4 ++ yarn.lock | 63 +++++++++++++++++++++- 35 files changed, 223 insertions(+), 10 deletions(-) create mode 100644 packages/instant/src/assets/icons/ae.svg create mode 100644 packages/instant/src/assets/icons/agi.svg create mode 100644 packages/instant/src/assets/icons/ant.svg create mode 100644 packages/instant/src/assets/icons/ast.svg create mode 100644 packages/instant/src/assets/icons/bat.svg create mode 100644 packages/instant/src/assets/icons/cvc.svg create mode 100644 packages/instant/src/assets/icons/dai.svg create mode 100644 packages/instant/src/assets/icons/dgd.svg create mode 100644 packages/instant/src/assets/icons/dgx.svg create mode 100644 packages/instant/src/assets/icons/dnt.svg create mode 100644 packages/instant/src/assets/icons/fun.svg create mode 100644 packages/instant/src/assets/icons/gno.svg create mode 100644 packages/instant/src/assets/icons/gnt.svg create mode 100644 packages/instant/src/assets/icons/knc.svg create mode 100644 packages/instant/src/assets/icons/link.svg create mode 100644 packages/instant/src/assets/icons/lpt.svg create mode 100644 packages/instant/src/assets/icons/mana.svg create mode 100644 packages/instant/src/assets/icons/mkr.svg create mode 100644 packages/instant/src/assets/icons/mln.svg create mode 100644 packages/instant/src/assets/icons/omg.svg create mode 100644 packages/instant/src/assets/icons/powr.svg create mode 100644 packages/instant/src/assets/icons/ren.svg create mode 100644 packages/instant/src/assets/icons/rep.svg create mode 100644 packages/instant/src/assets/icons/req.svg create mode 100644 packages/instant/src/assets/icons/salt.svg create mode 100644 packages/instant/src/assets/icons/snt.svg create mode 100644 packages/instant/src/assets/icons/spank.svg create mode 100644 packages/instant/src/assets/icons/wax.svg create mode 100644 packages/instant/src/assets/icons/zil.svg create mode 100644 packages/instant/src/assets/icons/zrx.svg diff --git a/packages/instant/package.json b/packages/instant/package.json index 6caa3902b..669272cb1 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -89,6 +89,7 @@ "npm-run-all": "^4.1.2", "nyc": "^11.0.1", "shx": "^0.2.2", + "svg-react-loader": "^0.4.6", "ts-jest": "^23.10.3", "tslint": "5.11.0", "typedoc": "0.13.0", diff --git a/packages/instant/src/assets/icons/ae.svg b/packages/instant/src/assets/icons/ae.svg new file mode 100644 index 000000000..592400d1a --- /dev/null +++ b/packages/instant/src/assets/icons/ae.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/agi.svg b/packages/instant/src/assets/icons/agi.svg new file mode 100644 index 000000000..9ed9784a4 --- /dev/null +++ b/packages/instant/src/assets/icons/agi.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/instant/src/assets/icons/ant.svg b/packages/instant/src/assets/icons/ant.svg new file mode 100644 index 000000000..ed7e1491a --- /dev/null +++ b/packages/instant/src/assets/icons/ant.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/instant/src/assets/icons/ast.svg b/packages/instant/src/assets/icons/ast.svg new file mode 100644 index 000000000..8136fb688 --- /dev/null +++ b/packages/instant/src/assets/icons/ast.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/bat.svg b/packages/instant/src/assets/icons/bat.svg new file mode 100644 index 000000000..9b69ddf9d --- /dev/null +++ b/packages/instant/src/assets/icons/bat.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/cvc.svg b/packages/instant/src/assets/icons/cvc.svg new file mode 100644 index 000000000..bddc90e16 --- /dev/null +++ b/packages/instant/src/assets/icons/cvc.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/dai.svg b/packages/instant/src/assets/icons/dai.svg new file mode 100644 index 000000000..901d522ca --- /dev/null +++ b/packages/instant/src/assets/icons/dai.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/instant/src/assets/icons/dgd.svg b/packages/instant/src/assets/icons/dgd.svg new file mode 100644 index 000000000..371f89584 --- /dev/null +++ b/packages/instant/src/assets/icons/dgd.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/instant/src/assets/icons/dgx.svg b/packages/instant/src/assets/icons/dgx.svg new file mode 100644 index 000000000..2e4a90a5d --- /dev/null +++ b/packages/instant/src/assets/icons/dgx.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/dnt.svg b/packages/instant/src/assets/icons/dnt.svg new file mode 100644 index 000000000..7d5459343 --- /dev/null +++ b/packages/instant/src/assets/icons/dnt.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/fun.svg b/packages/instant/src/assets/icons/fun.svg new file mode 100644 index 000000000..bb4347df2 --- /dev/null +++ b/packages/instant/src/assets/icons/fun.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/gno.svg b/packages/instant/src/assets/icons/gno.svg new file mode 100644 index 000000000..ebf6290cf --- /dev/null +++ b/packages/instant/src/assets/icons/gno.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/instant/src/assets/icons/gnt.svg b/packages/instant/src/assets/icons/gnt.svg new file mode 100644 index 000000000..7315ce459 --- /dev/null +++ b/packages/instant/src/assets/icons/gnt.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/knc.svg b/packages/instant/src/assets/icons/knc.svg new file mode 100644 index 000000000..70d35bc2f --- /dev/null +++ b/packages/instant/src/assets/icons/knc.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/instant/src/assets/icons/link.svg b/packages/instant/src/assets/icons/link.svg new file mode 100644 index 000000000..2fddf7ef1 --- /dev/null +++ b/packages/instant/src/assets/icons/link.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/instant/src/assets/icons/lpt.svg b/packages/instant/src/assets/icons/lpt.svg new file mode 100644 index 000000000..cbe4f2202 --- /dev/null +++ b/packages/instant/src/assets/icons/lpt.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/instant/src/assets/icons/mana.svg b/packages/instant/src/assets/icons/mana.svg new file mode 100644 index 000000000..45be622e4 --- /dev/null +++ b/packages/instant/src/assets/icons/mana.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/instant/src/assets/icons/mkr.svg b/packages/instant/src/assets/icons/mkr.svg new file mode 100644 index 000000000..e09d47444 --- /dev/null +++ b/packages/instant/src/assets/icons/mkr.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/mln.svg b/packages/instant/src/assets/icons/mln.svg new file mode 100644 index 000000000..a0b821c57 --- /dev/null +++ b/packages/instant/src/assets/icons/mln.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/omg.svg b/packages/instant/src/assets/icons/omg.svg new file mode 100644 index 000000000..a906509af --- /dev/null +++ b/packages/instant/src/assets/icons/omg.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/powr.svg b/packages/instant/src/assets/icons/powr.svg new file mode 100644 index 000000000..eb48342e1 --- /dev/null +++ b/packages/instant/src/assets/icons/powr.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/instant/src/assets/icons/ren.svg b/packages/instant/src/assets/icons/ren.svg new file mode 100644 index 000000000..fe563dee2 --- /dev/null +++ b/packages/instant/src/assets/icons/ren.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/packages/instant/src/assets/icons/rep.svg b/packages/instant/src/assets/icons/rep.svg new file mode 100644 index 000000000..1be1a6a88 --- /dev/null +++ b/packages/instant/src/assets/icons/rep.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/instant/src/assets/icons/req.svg b/packages/instant/src/assets/icons/req.svg new file mode 100644 index 000000000..d9eb89634 --- /dev/null +++ b/packages/instant/src/assets/icons/req.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/salt.svg b/packages/instant/src/assets/icons/salt.svg new file mode 100644 index 000000000..f2892c981 --- /dev/null +++ b/packages/instant/src/assets/icons/salt.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/snt.svg b/packages/instant/src/assets/icons/snt.svg new file mode 100644 index 000000000..34b2c432b --- /dev/null +++ b/packages/instant/src/assets/icons/snt.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/spank.svg b/packages/instant/src/assets/icons/spank.svg new file mode 100644 index 000000000..1d7320770 --- /dev/null +++ b/packages/instant/src/assets/icons/spank.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/instant/src/assets/icons/wax.svg b/packages/instant/src/assets/icons/wax.svg new file mode 100644 index 000000000..8bcb73015 --- /dev/null +++ b/packages/instant/src/assets/icons/wax.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/instant/src/assets/icons/zil.svg b/packages/instant/src/assets/icons/zil.svg new file mode 100644 index 000000000..1a9218201 --- /dev/null +++ b/packages/instant/src/assets/icons/zil.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/assets/icons/zrx.svg b/packages/instant/src/assets/icons/zrx.svg new file mode 100644 index 000000000..07518f551 --- /dev/null +++ b/packages/instant/src/assets/icons/zrx.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index e4d8749a9..62dd52a4c 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -79,6 +79,7 @@ class TokenSelectorRow extends React.Component { public render(): React.ReactNode { const { token } = this.props; const displaySymbol = assetUtils.bestNameForAsset(token); + const TokenIcon = require(`../assets/icons/${token.metaData.symbol}.svg`); return ( { - - - - {displaySymbol} - + + + {!_.isUndefined(TokenIcon) ? ( + + ) : ( + + {displaySymbol} + + )} diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts index 6ecb9af85..b24c9c83d 100644 --- a/packages/instant/src/data/asset_meta_data_map.ts +++ b/packages/instant/src/data/asset_meta_data_map.ts @@ -2,8 +2,6 @@ import { AssetProxyId, ObjectMap } from '@0x/types'; import { AssetMetaData } from '../types'; -// Map from assetData string to AssetMetaData object -// TODO: import this from somewhere else. export const assetMetaDataMap: ObjectMap = { '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498': { assetProxyId: AssetProxyId.ERC20, @@ -85,7 +83,7 @@ export const assetMetaDataMap: ObjectMap = { '0xf47261b0000000000000000000000000e0b7927c4af23765cb51314a0e0521a9645f0e2a': { assetProxyId: AssetProxyId.ERC20, decimals: 9, - primaryColor: '#BC9952', + primaryColor: '#DEB564', symbol: 'dgd', name: 'DigixDao', }, diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index 3129e13a6..3c5cafc1d 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -20,6 +20,10 @@ const config = { test: /\.(ts|tsx)$/, loader: 'awesome-typescript-loader', }, + { + test: /\.svg$/, + loader: 'svg-react-loader', + }, ], }, devServer: { diff --git a/yarn.lock b/yarn.lock index e4304acd5..a7a55a7b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2292,6 +2292,10 @@ atob@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc" +atob@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" + autoprefixer@^6.3.1: version "6.7.7" resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" @@ -4647,6 +4651,15 @@ css-what@2.1: version "2.1.0" resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd" +css@2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929" + dependencies: + inherits "^2.0.3" + source-map "^0.6.1" + source-map-resolve "^0.5.2" + urix "^0.1.0" + cssesc@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4" @@ -9509,7 +9522,7 @@ loader-runner@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2" -loader-utils@^1.1.0: +loader-utils@1.1.0, loader-utils@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd" dependencies: @@ -9769,7 +9782,7 @@ 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" -lodash@^4.13.1, lodash@^4.15.0: +lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0: version "4.17.11" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -12335,6 +12348,10 @@ railroad-diagrams@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e" +ramda@0.21.0: + version "0.21.0" + resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35" + randexp@0.4.6: version "0.4.6" resolved "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3" @@ -13391,6 +13408,10 @@ rx-lite@*, rx-lite@^4.0.8: version "4.0.8" resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" +rx@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782" + rx@^2.4.3: version "2.5.3" resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566" @@ -14012,6 +14033,16 @@ source-map-resolve@^0.5.0: source-map-url "^0.4.0" urix "^0.1.0" +source-map-resolve@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259" + dependencies: + atob "^2.1.1" + decode-uri-component "^0.2.0" + resolve-url "^0.2.1" + source-map-url "^0.4.0" + urix "^0.1.0" + source-map-support@0.5.6, source-map-support@^0.5.6: version "0.5.6" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13" @@ -14503,6 +14534,17 @@ supports-color@^5.5.0: dependencies: has-flag "^3.0.0" +svg-react-loader@^0.4.6: + version "0.4.6" + resolved "https://registry.yarnpkg.com/svg-react-loader/-/svg-react-loader-0.4.6.tgz#b263efb3e3d2fff4c682a729351aba5f185051a1" + dependencies: + css "2.2.4" + loader-utils "1.1.0" + ramda "0.21.0" + rx "4.1.0" + traverse "0.6.6" + xml2js "0.4.17" + svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -14989,6 +15031,10 @@ traverse-chain@~0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1" +traverse@0.6.6: + version "0.6.6" + resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137" + treeify@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8" @@ -16512,6 +16558,13 @@ xml-name-validator@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" +xml2js@0.4.17: + version "0.4.17" + resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868" + dependencies: + sax ">=0.6.0" + xmlbuilder "^4.1.0" + xml2js@0.4.19: version "0.4.19" resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7" @@ -16519,6 +16572,12 @@ xml2js@0.4.19: sax ">=0.6.0" xmlbuilder "~9.0.1" +xmlbuilder@^4.1.0: + version "4.2.1" + resolved "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5" + dependencies: + lodash "^4.0.0" + xmlbuilder@~9.0.1: version "9.0.7" resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d" -- cgit From 7534c0f19ef465f27d98014d306ada5d74693b43 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 15 Nov 2018 19:07:43 -0800 Subject: fix(asset-buyer): change lodash version to the same as other 0x packages --- packages/asset-buyer/CHANGELOG.json | 9 +++++++++ packages/asset-buyer/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index 0e4623d05..394f29ff6 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "3.0.1", + "changes": [ + { + "note": "Dependencies updated", + "pr": 1276 + } + ] + }, { "version": "3.0.0", "changes": [ diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index fad33476b..f6a331844 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -47,7 +47,7 @@ "@0x/utils": "^2.0.5", "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", - "lodash": "^4.17.10" + "lodash": "^4.17.5" }, "devDependencies": { "@0x/tslint-config": "^1.0.10", -- cgit From f582cc327b3cc365ea0de0469adf2781b896c0e5 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 15 Nov 2018 19:08:24 -0800 Subject: fix(instant): change lodash version to the same as other 0x packages --- packages/instant/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/package.json b/packages/instant/package.json index 6caa3902b..bb37d762d 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -57,7 +57,7 @@ "bowser": "^1.9.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", - "lodash": "^4.17.10", + "lodash": "^4.17.5", "polished": "^2.2.0", "react": "^16.5.2", "react-dom": "^16.5.2", -- cgit From 37d60dc39ea6476c3185e124175cb02d5e830250 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 08:51:41 -0800 Subject: Typesafe analytic actions --- .../src/components/zero_ex_instant_provider.tsx | 3 +- packages/instant/src/redux/analytics_middleware.ts | 6 ++- packages/instant/src/util/analytics.ts | 50 +++++++++++----------- packages/instant/src/util/heap.ts | 19 +++++++- 4 files changed, 50 insertions(+), 28 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index cfc542a59..77adca472 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -19,6 +19,7 @@ import { gasPriceEstimator } from '../util/gas_price_estimator'; import { Heartbeater } from '../util/heartbeater'; import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory'; import { providerStateFactory } from '../util/provider_state_factory'; +import { analyticsMiddleware } from '../redux/analytics_middleware'; fonts.include(); @@ -129,7 +130,7 @@ export class ZeroExInstantProvider extends React.Component next => middlewareAction switch (nextAction.type) { case ActionTypes.SET_ACCOUNT_STATE_READY: - if (curAccount.state === AccountState.Ready && !_.isEqual(curAccount, prevAccount)) { + if (curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready) { const ethAddress = curAccount.address; analytics.addUserProperties({ ethAddress }); - analytics.track('Wallet - Ready'); + analytics.walletReady({ + numAssetsAvailable: curState.availableAssets ? curState.availableAssets.length : 0, + }); } break; case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index dd595529d..30193839e 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -1,35 +1,37 @@ import { ObjectMap } from '@0x/types'; -import { logUtils } from '@0x/utils'; -import { ANALYTICS_ENABLED } from '../constants'; +import { heapUtil } from './heap'; -import { HeapAnalytics, heapUtil } from './heap'; - -const evaluteHeapCall = (heapFunctionCall: (heap: HeapAnalytics) => void): void => { - if (!ANALYTICS_ENABLED) { - return; - } - - const curHeap = heapUtil.getHeap(); - if (curHeap) { - try { - heapFunctionCall(curHeap); - } catch (e) { - // We never want analytics to crash our React component - // TODO: error reporter here - logUtils.log('Analytics error', e); - } - } +enum EventNames { + WALLET_OPENED = 'Wallet - Opened', + WALLET_READY = 'Wallet - Ready', + WIDGET_OPENED = 'Widget - Opened', +} +const track = (eventName: EventNames, eventData: ObjectMap = {}): void => { + heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventData)); }; +function trackingEventFnWithoutPayload(eventName: EventNames): () => void { + return () => { + track(eventName); + }; +} +function trackingEventFnWithPayload>( + eventName: EventNames, +): (eventDataProperties: T) => void { + return (eventDataProperties: T) => { + track(eventName, eventDataProperties); + }; +} export const analytics = { + // TODO(sk): make these more specific addUserProperties: (properties: ObjectMap): void => { - evaluteHeapCall(heap => heap.addUserProperties(properties)); + heapUtil.evaluateHeapCall(heap => heap.addUserProperties(properties)); }, addEventProperties: (properties: ObjectMap): void => { - evaluteHeapCall(heap => heap.addEventProperties(properties)); - }, - track: (eventName: string, eventProperties?: ObjectMap): void => { - evaluteHeapCall(heap => heap.track(eventName, eventProperties)); + heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); }, + walletOpened: trackingEventFnWithoutPayload(EventNames.WALLET_OPENED), + walletReady: trackingEventFnWithPayload<{ numAssetsAvailable: number }>(EventNames.WALLET_READY), + widgetOpened: trackingEventFnWithoutPayload(EventNames.WIDGET_OPENED), }; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 6d3c75ea7..5fd61b4c9 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -1,6 +1,7 @@ import { ObjectMap } from '@0x/types'; +import { logUtils } from '@0x/utils'; -import { HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; +import { ANALYTICS_ENABLED, HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; export interface HeapAnalytics { loaded: boolean; @@ -82,4 +83,20 @@ export const heapUtil = { return setupZeroExInstantHeap(); }, + evaluateHeapCall: (heapFunctionCall: (heap: HeapAnalytics) => void): void => { + if (!ANALYTICS_ENABLED) { + return; + } + + const curHeap = heapUtil.getHeap(); + if (curHeap) { + try { + heapFunctionCall(curHeap); + } catch (e) { + // We never want analytics to crash our React component + // TODO: error reporter here + logUtils.log('Analytics error', e); + } + } + }, }; -- cgit From df71dba8edcba5ca5731bed969748bdcc73efe92 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 09:16:20 -0800 Subject: Make user and event properties more specific --- packages/instant/src/util/analytics.ts | 15 ++++++++++++--- packages/instant/src/util/heap.ts | 6 ++++-- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 30193839e..92f717f7b 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -23,12 +23,21 @@ function trackingEventFnWithPayload>( }; } +export interface AnalyticsUserOptions { + ethAddress?: string; + ethBalanceInUnitAmount?: string; +} +export interface AnalyticsEventOptions { + embeddedHost?: string; + embeddedUrl?: string; + networkId: number; + providerName: string; +} export const analytics = { - // TODO(sk): make these more specific - addUserProperties: (properties: ObjectMap): void => { + addUserProperties: (properties: AnalyticsUserOptions): void => { heapUtil.evaluateHeapCall(heap => heap.addUserProperties(properties)); }, - addEventProperties: (properties: ObjectMap): void => { + addEventProperties: (properties: AnalyticsEventOptions): void => { heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); }, walletOpened: trackingEventFnWithoutPayload(EventNames.WALLET_OPENED), diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 5fd61b4c9..e697562e4 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -3,13 +3,15 @@ import { logUtils } from '@0x/utils'; import { ANALYTICS_ENABLED, HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; +import { AnalyticsEventOptions, AnalyticsUserOptions } from './analytics'; + export interface HeapAnalytics { loaded: boolean; identify(id: string, idType: string): void; track(eventName: string, eventProperties?: ObjectMap): void; resetIdentity(): void; - addUserProperties(properties: ObjectMap): void; - addEventProperties(properties: ObjectMap): void; + addUserProperties(properties: AnalyticsUserOptions): void; + addEventProperties(properties: AnalyticsEventOptions): void; removeEventProperty(property: string): void; clearEventProperties(): void; } -- cgit From 3add465edb779587e2b4bb136d8668b00b58a8fb Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 09:20:44 -0800 Subject: We may not know num available assets available when wallet ready, so not trackin there --- packages/instant/src/redux/analytics_middleware.ts | 4 +--- packages/instant/src/util/analytics.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 81031eb29..fb6d7eff1 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -24,9 +24,7 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction if (curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready) { const ethAddress = curAccount.address; analytics.addUserProperties({ ethAddress }); - analytics.walletReady({ - numAssetsAvailable: curState.availableAssets ? curState.availableAssets.length : 0, - }); + analytics.walletReady(); } break; case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 92f717f7b..ab8a86f04 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -41,6 +41,6 @@ export const analytics = { heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); }, walletOpened: trackingEventFnWithoutPayload(EventNames.WALLET_OPENED), - walletReady: trackingEventFnWithPayload<{ numAssetsAvailable: number }>(EventNames.WALLET_READY), + walletReady: trackingEventFnWithoutPayload(EventNames.WALLET_READY), widgetOpened: trackingEventFnWithoutPayload(EventNames.WIDGET_OPENED), }; -- cgit From 45a1899eade34e90801e3fbcba9a6789e43684f4 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:10:43 -0800 Subject: Add access to environment variables --- packages/instant/webpack.config.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index 78a33ce90..129092d70 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -1,6 +1,15 @@ +const childProcess = require('child_process'); const path = require('path'); +const webpack = require('webpack'); + // The common js bundle (not this one) is built using tsc. // The umd bundle (this one) has a different entrypoint. + +const GIT_SHA = childProcess + .execSync('git rev-parse HEAD') + .toString() + .trim(); + module.exports = { entry: './src/index.umd.ts', output: { @@ -9,6 +18,15 @@ module.exports = { library: 'zeroExInstant', libraryTarget: 'umd', }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + NODE_ENV: JSON.stringify(process.env.NODE_ENV), + GIT_SHA: JSON.stringify(GIT_SHA), + ENABLE_HEAP: process.env.ENABLE_HEAP, + }, + }), + ], devtool: 'source-map', resolve: { extensions: ['.js', '.json', '.ts', '.tsx'], -- cgit From db7f74f99f7790297e737165a0fc9742fe3daf06 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:10:55 -0800 Subject: Switch heap id on environment, and make sure app id is what we expect --- packages/instant/src/constants.ts | 3 ++- packages/instant/src/util/heap.ts | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index f46b0ca21..80c93c431 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -16,8 +16,9 @@ export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15; export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6); export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2; export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; -export const ANALYTICS_ENABLED = true; // TODO: change when we can switch on dev +export const ANALYTICS_ENABLED = process.env.NODE_ENV === 'production' || process.env.ENABLE_HEAP; export const HEAP_ANALYTICS_DEVELOPMENT_APP_ID = '507265531'; +export const HEAP_ANALYTICS_PRODUCTION_APP_ID = '2323640988'; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index e697562e4..88f65c1ab 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -1,12 +1,13 @@ import { ObjectMap } from '@0x/types'; import { logUtils } from '@0x/utils'; -import { ANALYTICS_ENABLED, HEAP_ANALYTICS_DEVELOPMENT_APP_ID } from '../constants'; +import { ANALYTICS_ENABLED, HEAP_ANALYTICS_DEVELOPMENT_APP_ID, HEAP_ANALYTICS_PRODUCTION_APP_ID } from '../constants'; import { AnalyticsEventOptions, AnalyticsUserOptions } from './analytics'; export interface HeapAnalytics { loaded: boolean; + appid: string; identify(id: string, idType: string): void; track(eventName: string, eventProperties?: ObjectMap): void; resetIdentity(): void; @@ -23,6 +24,13 @@ const getWindow = (): ModifiedWindow => { return window as ModifiedWindow; }; +const getHeapAppId = (): string => { + if (process.env.NODE_ENV === 'production') { + return HEAP_ANALYTICS_PRODUCTION_APP_ID; + } + return HEAP_ANALYTICS_DEVELOPMENT_APP_ID; +}; + const setupZeroExInstantHeap = () => { const curWindow = getWindow(); // Set property to specify that this is zeroEx's heap @@ -64,7 +72,7 @@ const setupZeroExInstantHeap = () => { (window as any).heap[p[c]] = o(p[c]); }); // TODO: use production heap id once environment utils merged - (window as any).heap.load(HEAP_ANALYTICS_DEVELOPMENT_APP_ID); + (window as any).heap.load(getHeapAppId()); /* tslint:enable */ return curWindow.heap as HeapAnalytics; @@ -93,6 +101,10 @@ export const heapUtil = { const curHeap = heapUtil.getHeap(); if (curHeap) { try { + if (curHeap.appid !== getHeapAppId()) { + // Integrator has included heap after us and reset the app id + return; + } heapFunctionCall(curHeap); } catch (e) { // We never want analytics to crash our React component -- cgit From 74254636b4e9918eeb5dd8ccc238de8bba74585f Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:11:00 -0800 Subject: Remove unused import --- packages/instant/src/components/zero_ex_instant_provider.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 77adca472..8bcdc214e 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -19,7 +19,6 @@ import { gasPriceEstimator } from '../util/gas_price_estimator'; import { Heartbeater } from '../util/heartbeater'; import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory'; import { providerStateFactory } from '../util/provider_state_factory'; -import { analyticsMiddleware } from '../redux/analytics_middleware'; fonts.include(); -- cgit From ed62271cdab1157313f9dfe82fb4640291eeb757 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:13:32 -0800 Subject: Take out old TODO --- packages/instant/src/util/heap.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 88f65c1ab..44af5a9b5 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -71,7 +71,6 @@ const setupZeroExInstantHeap = () => { ) (window as any).heap[p[c]] = o(p[c]); }); - // TODO: use production heap id once environment utils merged (window as any).heap.load(getHeapAppId()); /* tslint:enable */ -- cgit From 988bb398bcab7153d662d301c5ddac929110e014 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:14:00 -0800 Subject: Add initials to TODO note --- packages/instant/src/util/heap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 44af5a9b5..8e9feb2fa 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -107,7 +107,7 @@ export const heapUtil = { heapFunctionCall(curHeap); } catch (e) { // We never want analytics to crash our React component - // TODO: error reporter here + // TODO(sk): error reporter here logUtils.log('Analytics error', e); } } -- cgit From 85a99203d0e85698aaaee25cdbf516175f1cb6e0 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:14:42 -0800 Subject: null -> undefined --- packages/instant/src/util/heap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 8e9feb2fa..1871c4abc 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -78,11 +78,11 @@ const setupZeroExInstantHeap = () => { }; export const heapUtil = { - getHeap: (): HeapAnalytics | null => { + getHeap: (): HeapAnalytics | undefined => { const curWindow = getWindow(); const hasOtherExistingHeapIntegration = curWindow.heap && !curWindow.zeroExInstantLoadedHeap; if (hasOtherExistingHeapIntegration) { - return null; + return undefined; } const zeroExInstantHeapIntegration = curWindow.zeroExInstantLoadedHeap && curWindow.heap; -- cgit From 42565869a452fcf2f498a3ff396f76c43aadfa29 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:19:16 -0800 Subject: Report on git sha and npm version of build --- packages/instant/src/components/zero_ex_instant_provider.tsx | 2 ++ packages/instant/src/util/analytics.ts | 6 ++++-- packages/instant/webpack.config.js | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 8bcdc214e..e85efb422 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -128,6 +128,8 @@ export class ZeroExInstantProvider extends React.Component { diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index 129092d70..43c149b3e 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -23,7 +23,8 @@ module.exports = { 'process.env': { NODE_ENV: JSON.stringify(process.env.NODE_ENV), GIT_SHA: JSON.stringify(GIT_SHA), - ENABLE_HEAP: process.env.ENABLE_HEAP, + ENABLE_HEAP: JSON.stringify(process.env.ENABLE_HEAP), + NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version), }, }), ], -- cgit From cbcb954c3015b7044e0c1f1b594103df8ea4dfa7 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 10:21:51 -0800 Subject: Disable tslint for unused function so we can include this for future tracking events --- packages/instant/src/util/analytics.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index e7a67bee5..e5f3635f2 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -15,6 +15,7 @@ function trackingEventFnWithoutPayload(eventName: EventNames): () => void { track(eventName); }; } +// tslint:disable-next-line:no-unused-variable function trackingEventFnWithPayload>( eventName: EventNames, ): (eventDataProperties: T) => void { -- cgit From 21ae0c46e1b0c0b4ba3f73cc2b58d0c430bf9043 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 14:51:57 -0800 Subject: Move ip import back --- packages/instant/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index ccbbe7359..6a4953bcc 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -1,4 +1,5 @@ const childProcess = require('child_process'); +const ip = require('ip'); const path = require('path'); const webpack = require('webpack'); @@ -9,7 +10,6 @@ const GIT_SHA = childProcess .execSync('git rev-parse HEAD') .toString() .trim(); -const ip = require('ip'); const config = { entry: './src/index.umd.ts', output: { -- cgit From 31ffa65f59fc6d2c6c7f79c1ac0e2abe0c5ed4ab Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 15:06:11 -0800 Subject: Getting rid of unused function, and using track prefix --- packages/instant/src/components/zero_ex_instant_provider.tsx | 2 +- packages/instant/src/redux/analytics_middleware.ts | 2 +- packages/instant/src/util/analytics.ts | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 5fa64aa45..74e42bb40 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -132,7 +132,7 @@ export class ZeroExInstantProvider extends React.Component next => middlewareAction if (curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready) { const ethAddress = curAccount.address; analytics.addUserProperties({ ethAddress }); - analytics.walletReady(); + analytics.trackWalletReady(); } break; case ActionTypes.UPDATE_ACCOUNT_ETH_BALANCE: diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index e5f3635f2..b75665ff5 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -3,7 +3,6 @@ import { ObjectMap } from '@0x/types'; import { heapUtil } from './heap'; enum EventNames { - WALLET_OPENED = 'Wallet - Opened', WALLET_READY = 'Wallet - Ready', WIDGET_OPENED = 'Widget - Opened', } @@ -43,7 +42,6 @@ export const analytics = { addEventProperties: (properties: AnalyticsEventOptions): void => { heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); }, - walletOpened: trackingEventFnWithoutPayload(EventNames.WALLET_OPENED), - walletReady: trackingEventFnWithoutPayload(EventNames.WALLET_READY), - widgetOpened: trackingEventFnWithoutPayload(EventNames.WIDGET_OPENED), + trackWalletReady: trackingEventFnWithoutPayload(EventNames.WALLET_READY), + trackWidgetOpened: trackingEventFnWithoutPayload(EventNames.WIDGET_OPENED), }; -- cgit From 4d7bd15334f909765749fea1c67ad26b161d6025 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 15:25:29 -0800 Subject: Trigger Wallet Ready when address changed --- packages/instant/src/redux/analytics_middleware.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 7fbb12cb9..a86cf1b83 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -3,13 +3,27 @@ import * as _ from 'lodash'; import { Middleware } from 'redux'; import { ETH_DECIMALS } from '../constants'; -import { AccountState } from '../types'; +import { Account, AccountState } from '../types'; import { analytics } from '../util/analytics'; import { Action, ActionTypes } from './actions'; import { State } from './reducer'; +const shouldTriggerWalletReady = (prevAccount: Account, curAccount: Account): boolean => { + const justTurnedReady = curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready; + if (justTurnedReady) { + return true; + } + + if (curAccount.state === AccountState.Ready && prevAccount.state === AccountState.Ready) { + // Account was ready, and is now ready again, but address has changed + return curAccount.address !== prevAccount.address; + } + + return false; +}; + export const analyticsMiddleware: Middleware = store => next => middlewareAction => { const prevState = store.getState() as State; const prevAccount = prevState.providerState.account; @@ -21,7 +35,7 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction switch (nextAction.type) { case ActionTypes.SET_ACCOUNT_STATE_READY: - if (curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready) { + if (curAccount.state === AccountState.Ready && shouldTriggerWalletReady(prevAccount, curAccount)) { const ethAddress = curAccount.address; analytics.addUserProperties({ ethAddress }); analytics.trackWalletReady(); -- cgit From e8be70da10c887956d6e200f7d551d3d7bbafb93 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 15:29:07 -0800 Subject: Widget -> Instant --- packages/instant/src/components/zero_ex_instant_provider.tsx | 2 +- packages/instant/src/util/analytics.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 74e42bb40..1d5e7fe6f 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -132,7 +132,7 @@ export class ZeroExInstantProvider extends React.Component Date: Fri, 16 Nov 2018 15:29:59 -0800 Subject: Remove old function --- packages/instant/src/util/analytics.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 4c229be03..1667c246c 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -5,7 +5,6 @@ import { heapUtil } from './heap'; enum EventNames { INSTANT_OPENED = 'Instant - Opened', WALLET_READY = 'Wallet - Ready', - WIDGET_OPENED = 'Widget - Opened', } const track = (eventName: EventNames, eventData: ObjectMap = {}): void => { heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventData)); @@ -44,6 +43,5 @@ export const analytics = { heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); }, trackWalletReady: trackingEventFnWithoutPayload(EventNames.WALLET_READY), - trackWidgetOpened: trackingEventFnWithoutPayload(EventNames.WIDGET_OPENED), trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED), }; -- cgit From 1564415e5dc29cd76ac17f679ed83e0973764153 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 15:41:54 -0800 Subject: Specify fallback web3 provider in analytics --- packages/instant/src/constants.ts | 1 + packages/instant/src/types.ts | 1 + packages/instant/src/util/env.ts | 2 ++ packages/instant/src/util/provider_factory.ts | 4 ++++ 4 files changed, 8 insertions(+) diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 80c93c431..26d5ff436 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -50,4 +50,5 @@ export const PROVIDER_TYPE_TO_NAME: { [key in ProviderType]: string } = { [ProviderType.Mist]: 'Mist', [ProviderType.CoinbaseWallet]: 'Coinbase Wallet', [ProviderType.Parity]: 'Parity', + [ProviderType.Fallback]: 'Fallback', }; diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index 67f21a396..31162e471 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -164,4 +164,5 @@ export enum ProviderType { Mist = 'MIST', CoinbaseWallet = 'COINBASE_WALLET', Cipher = 'CIPHER', + Fallback = 'FALLBACK', } diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index 4a32f9cb1..59b47d1e3 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -52,6 +52,8 @@ export const envUtil = { return ProviderType.CoinbaseWallet; } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { return ProviderType.Cipher; + } else if ((provider as any).zeroExInstantFallbackEngine) { + return ProviderType.Fallback; } return; }, diff --git a/packages/instant/src/util/provider_factory.ts b/packages/instant/src/util/provider_factory.ts index 603f7674d..d77407521 100644 --- a/packages/instant/src/util/provider_factory.ts +++ b/packages/instant/src/util/provider_factory.ts @@ -29,6 +29,10 @@ export const providerFactory = { providerEngine.addProvider(new RPCSubprovider(rpcUrl)); // // Start the Provider Engine providerEngine.start(); + // This feels a bit dirty, but was the only way I could think of + // checking to see if this engine is our fallback engine, and not + // another Web3Provider engine provided by some dapp browser + (providerEngine as any).zeroExInstantFallbackEngine = true; return providerEngine; }, }; -- cgit From 097bfe581dff6ff77e3cf19a03138743ae13868e Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 16:21:38 -0800 Subject: Better way of reporting Fallback provider --- packages/instant/src/util/env.ts | 2 -- packages/instant/src/util/provider_factory.ts | 4 ---- packages/instant/src/util/provider_state_factory.ts | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index 59b47d1e3..4a32f9cb1 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -52,8 +52,6 @@ export const envUtil = { return ProviderType.CoinbaseWallet; } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { return ProviderType.Cipher; - } else if ((provider as any).zeroExInstantFallbackEngine) { - return ProviderType.Fallback; } return; }, diff --git a/packages/instant/src/util/provider_factory.ts b/packages/instant/src/util/provider_factory.ts index d77407521..603f7674d 100644 --- a/packages/instant/src/util/provider_factory.ts +++ b/packages/instant/src/util/provider_factory.ts @@ -29,10 +29,6 @@ export const providerFactory = { providerEngine.addProvider(new RPCSubprovider(rpcUrl)); // // Start the Provider Engine providerEngine.start(); - // This feels a bit dirty, but was the only way I could think of - // checking to see if this engine is our fallback engine, and not - // another Web3Provider engine provided by some dapp browser - (providerEngine as any).zeroExInstantFallbackEngine = true; return providerEngine; }, }; diff --git a/packages/instant/src/util/provider_state_factory.ts b/packages/instant/src/util/provider_state_factory.ts index 452a71460..7c788dff2 100644 --- a/packages/instant/src/util/provider_state_factory.ts +++ b/packages/instant/src/util/provider_state_factory.ts @@ -56,7 +56,7 @@ export const providerStateFactory = { getInitialProviderStateFallback: (orderSource: OrderSource, network: Network): ProviderState => { const provider = providerFactory.getFallbackNoSigningProvider(network); const providerState: ProviderState = { - name: envUtil.getProviderName(provider), + name: 'Fallback', provider, web3Wrapper: new Web3Wrapper(provider), assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network), -- cgit From 3f0d94c83872ae80d6377fd4f712efa4c174a284 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Fri, 16 Nov 2018 16:44:23 -0800 Subject: Add way to disable via props --- .../src/components/zero_ex_instant_provider.tsx | 6 +++++- packages/instant/src/util/analytics.ts | 23 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 1d5e7fe6f..52454148f 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -12,7 +12,7 @@ import { DEFAULT_STATE, DefaultState, State } from '../redux/reducer'; import { store, Store } from '../redux/store'; import { fonts } from '../style/fonts'; import { AccountState, AffiliateInfo, AssetMetaData, Network, OrderSource } from '../types'; -import { analytics } from '../util/analytics'; +import { analytics, disableAnalytics } from '../util/analytics'; import { assetUtils } from '../util/asset'; import { errorFlasher } from '../util/error_flasher'; import { gasPriceEstimator } from '../util/gas_price_estimator'; @@ -37,6 +37,7 @@ export interface ZeroExInstantProviderOptionalProps { additionalAssetMetaDataMap: ObjectMap; networkId: Network; affiliateInfo: AffiliateInfo; + disableAnalyticsTracking: boolean; } export class ZeroExInstantProvider extends React.Component { @@ -124,6 +125,9 @@ export class ZeroExInstantProvider extends React.Component { + disabled = true; +}; +export const evaluateIfEnabled = (fnCall: () => void) => { + if (disabled) { + return; + } + fnCall(); +}; + enum EventNames { INSTANT_OPENED = 'Instant - Opened', WALLET_READY = 'Wallet - Ready', } const track = (eventName: EventNames, eventData: ObjectMap = {}): void => { - heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventData)); + evaluateIfEnabled(() => { + heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventData)); + }); }; function trackingEventFnWithoutPayload(eventName: EventNames): () => void { return () => { @@ -37,10 +50,14 @@ export interface AnalyticsEventOptions { } export const analytics = { addUserProperties: (properties: AnalyticsUserOptions): void => { - heapUtil.evaluateHeapCall(heap => heap.addUserProperties(properties)); + evaluateIfEnabled(() => { + heapUtil.evaluateHeapCall(heap => heap.addUserProperties(properties)); + }); }, addEventProperties: (properties: AnalyticsEventOptions): void => { - heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); + evaluateIfEnabled(() => { + heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties)); + }); }, trackWalletReady: trackingEventFnWithoutPayload(EventNames.WALLET_READY), trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED), -- cgit From 21046e4349a130efc186845948c06ebdcadd892c Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 17:19:09 -0800 Subject: chore: make instant public --- packages/instant/package.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/instant/package.json b/packages/instant/package.json index bddc88d18..a44c3c050 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -5,7 +5,6 @@ "node": ">=6.12" }, "description": "0x Instant React Component", - "private": true, "main": "lib/src/index.js", "types": "lib/src/index.d.ts", "scripts": { @@ -98,6 +97,6 @@ "webpack-dev-server": "^3.1.9" }, "publishConfig": { - "access": "private" + "access": "public" } } -- cgit From 302d172aad0a9b1c1aac6b2652cbd4088412675a Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 17:50:47 -0800 Subject: feat: fix instant build and add to project references --- packages/instant/tsconfig.json | 11 +++-------- tsconfig.json | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/instant/tsconfig.json b/packages/instant/tsconfig.json index 28a6190b8..14b0ad8f7 100644 --- a/packages/instant/tsconfig.json +++ b/packages/instant/tsconfig.json @@ -2,16 +2,11 @@ "extends": "../../tsconfig", "compilerOptions": { "outDir": "lib", - "rootDir": ".", + "rootDir": "src", "jsx": "react", - "allowSyntheticDefaultImports": true, "noImplicitAny": true, - "module": "ESNext", - "moduleResolution": "node", - "lib": ["es2015", "dom"], - "target": "es5", - "sourceMap": true + "allowSyntheticDefaultImports": true }, - "include": ["./src/**/*", "./test/**/*"], + "include": ["./src/**/*"], "exclude": ["./src/index.umd.ts"] } diff --git a/tsconfig.json b/tsconfig.json index bbcb0a6d2..eaaca8e4e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -34,6 +34,7 @@ { "path": "./packages/dev-utils" }, { "path": "./packages/ethereum-types" }, { "path": "./packages/fill-scenarios" }, + { "path": "./packages/instant" }, { "path": "./packages/json-schemas" }, { "path": "./packages/metacoin" }, { "path": "./packages/migrations" }, -- cgit From 4caacc78a1cbf287b88543355efdfb86a2d3d801 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 18:05:32 -0800 Subject: fix: specify new location of index.js in package.json --- packages/instant/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/instant/package.json b/packages/instant/package.json index a44c3c050..185fd7faa 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -5,8 +5,8 @@ "node": ">=6.12" }, "description": "0x Instant React Component", - "main": "lib/src/index.js", - "types": "lib/src/index.d.ts", + "main": "lib/index.js", + "types": "lib/index.d.ts", "scripts": { "build": "yarn build:all", "build:all": "run-p build:umd:prod build:commonjs", -- cgit From 8b8e277b7553c42b019f56822ffa5fd05dab2951 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 19 Nov 2018 14:28:10 +0000 Subject: Improve our CONTRIBUTING.md instructions --- CONTRIBUTING.md | 99 +++++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 65 insertions(+), 34 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff55ac4c6..6933a1162 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,61 +1,92 @@ ## 0x Contribution Guide -Thank you for your interest in contributing to 0x protocol! We welcome contributions from anyone on the internet, and are grateful for even the smallest of fixes! +We welcome contributions from anyone on the internet and are grateful for even the smallest contributions. This document will help get you setup to start contributing back to 0x. -### How to contribute +### Getting started -If you'd like to contribute to 0x protocol, please fork the repo, fix, commit and send a pull request against the `development` branch for the maintainers to review and merge into the main code base. If you wish to submit more complex changes though, please check with a core dev first on [our RocketChat #dev channel](http://chat.0xproject.com) to ensure those changes are in-line with the general philosophy of the project and/or to get some early feedback which can make both your efforts easier as well as our review and merge procedures quick and simple. +1. Fork `0xproject/0x-monorepo` +2. Clone your fork +3. Follow the [installation & build steps](https://github.com/0xProject/0x-monorepo#install-dependencies) in the repo's top-level README. +4. Setup the recommended [Development Tooling](#development-tooling). +5. Open a PR with the `[WIP]` flag against the `development` branch and describe the change you are intending to undertake in the PR description. (see [our branch naming conventions](#branch-structure)) -We encourage a “PR early” approach so create the PR as early as possible even without the fix/feature ready, so that devs and other contributors know you have picked up the issue. These early PRs should indicate an 'in progress' status by adding the '[WIP]' prefix to the PR title. Please make sure your contributions adhere to our coding guidelines: +Before removing the `[WIP]` tag and submitting the PR for review, make sure: -* Pull requests adding features or refactoring should be opened against the `development` branch -* Pull requests fixing bugs in the latest release version should be opened again the `master` branch -* Write [good commit messages](https://chris.beams.io/posts/git-commit/) +* It passes our linter checks (`yarn lint`) +* It is properly formatted with Prettier (`yarn prettier`) +* It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks) +* You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries. +* Your changes have sufficient test coverage (e.g regression tests for bug fixes) -### Code quality +### Branch structure -Because 0x.js is used by multiple relayers in production and their businesses depend on it, we strive for exceptional code quality. Please follow the existing code standards and conventions. `tslint` and `prettier` (described below) will help you. +We have two main branches: -If you're adding functionality, please also add tests and make sure they pass. We have an automatic coverage reporting tool, so we'll see it if they are missing ;) -If you're adding a new public function/member, make sure you document it with Java doc-style comments. We use typedoc to generate [awesome documentation](https://0xproject.com/docs/0xjs) from the comments within our source code. +* `master` represents the most recently released (published on npm) version of the codebase. +* `development` represents the current development state of the codebase. -If the sub-package you are modifying has a `CHANGELOG.md` file, make sure to add an entry in it for the change made to the package. For published packages, only changes that modify the public interface or behavior of the package need a CHANGELOG entry. +ALL PRs should be opened against `development`. -#### Enabling code coverage checks on your fork +Branch names should be prefixed with `fix`, `feature` or `refactor`. -If you simply fork the repo and then create a PR sourced from it, your PR will fail its test coverage check. This is because the 0x CircleCI configuration sets the `COVERALLS_REPO_TOKEN` environment variable to the token for 0xProject/0x-monorepo, but when running the check against your fork the token needs to match the repo that is your fork, rather than the 0x repo. +* e.g `fix/broken-wiki-link` +* If the PR only edits a single package, add it's name too + * e.g `fix/website/broken-wiki-link` -To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following: +### CHANGELOGs -1. Log in to [coveralls.io](https://coveralls.io/), go to Add Repos, and enable your fork. Then go to the settings for that repo, and copy the Repo Token identifier. -2. Log in to [CircleCI](https://circleci.com/login), go to Add Projects, click the Set Up Project button corresponding to your fork, and then click Start Building. (Aside from step 3 below, no actual set up is needed, since it will use the `.circleci/config.yml` file in 0x-monorepo, so you can ignore all of the instruction/explanation given on the page with the Start Building button.) -3. In CircleCI, configure your project to add an Environment Variable, with name `COVERALLS_REPO_TOKEN`, and for the value paste in the Repo Token you copied in step 1. +At 0x we use [Semantic Versioning](http://semver.org/) for all our published packages. If a change you make is a bug fix, adds a feature or introduces a breaking change to a package, you must modify it's `CHANGELOG.json` file accordingly. -Now, when you push to your branch, CircleCI will automatically run all of the checks in your own instance, and the coverage check will work since it has the proper Repo Token, and the PR will magically refer to your own checks rather than running them in the 0x CircleCI instance. +Each CHANGELOG entry that corresponds to a published package will have a `timestamp`. If no entry exists without a `timestamp`, you must first create a new one: -### Styleguide +``` +{ + "version": "1.0.0", <- The updated package version + "changes": [ + { + "note": "", <- Describe your change + "PR": 100 <- Your PR number + } + ] + }, +``` -We use [TSLint](https://palantir.github.io/tslint/) with [custom configs](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) to keep our code style consistent. +If an entry without a `timestamp` already exists, this means other changes have been introduced by other collaborators since the last publish. Add your changes to the list of notes and adjust the version if your PR introduces a greater semver change (i.e current changes required a patch bump, but your changes require a major version bump). -To lint your code just run: `yarn lint` +### Development Tooling -We also use [Prettier](https://prettier.io/) to auto-format our code. Be sure to either add a [text editor integration](https://prettier.io/docs/en/editors.html) or a [pre-commit hook](https://prettier.io/docs/en/precommit.html) to properly format your code changes. +We strongly recommend you use the [VSCode](https://code.visualstudio.com/) text editor since most of our code is written in Typescript and it offers amazing support for the language. -If using the Atom text editor, we recommend you install the following packages: +#### Linter + +We use [TSLint](https://palantir.github.io/tslint/) with [custom configs](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) to keep our code-style consistent. -* [atom-typescript](https://atom.io/packages/atom-typescript) -* [linter-tslint](https://atom.io/packages/linter-tslint) -* [prettier-atom](https://atom.io/packages/prettier-atom) -* [language-ethereum](https://atom.io/packages/language-ethereum) +Use `yarn:lint` to lint the entire monorepo, and `PKG={PACKAGE_NAME} yarn lint` to lint a specific package. -Our CI will also run TSLint and Prettier as a part of the test run when you submit your PR. Make sure that the CI tests pass for your contribution. +If you want to change a rule, or add a custom rule, please make these changes to our [tslint-config](https://github.com/0xProject/0x-monorepo/tree/development/packages/tslint-config) package. All other packages have it as a dependency. -### Branch structure & versioning +Integrate it into your text editor: -We use [semantic versioning](http://semver.org/), but before a package reaches v1.0.0 all breaking changes as well as new features will be minor version bumps. +* VSCode: [vscode-tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) +* Atom: [linter-tslint](https://atom.io/packages/linter-tslint) -We have two main branches: `master` and `development`. +#### Auto-formatter + +We use [Prettier](https://prettier.io/) to auto-format our code. Be sure to either add a [text editor integration](https://prettier.io/docs/en/editors.html) or a [pre-commit hook](https://prettier.io/docs/en/precommit.html) to properly format your code changes. + +If using the Atom text editor, we recommend you install the following packages: + +* VSCode: [prettier-vscode](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) +* Atom: [prettier-atom](https://atom.io/packages/prettier-atom) + +## Fix `submit-coverage` CI failure + +If you simply fork the repo and then create a PR from it, your PR will fail the `submit-coverage` check on CI. This is because the 0x CircleCI configuration sets the `COVERALLS_REPO_TOKEN` environment variable to the token for `0xProject/0x-monorepo`, but when running the check against your fork the token needs to match your repo's name `your-username/0x-monorepo`. + +To facilitate this check, after creating your fork, but before creating the branch for your PR, do the following: -`master` represents the most recent released (published on npm) version. +1. Log in to [coveralls.io](https://coveralls.io/), go to `Add Repos`, and enable your fork. Then go to the settings for that repo, and copy the `Repo Token` identifier. +2. Log in to [CircleCI](https://circleci.com/login), go to `Add Projects`, click the `Set Up Project` button corresponding to your fork, and then click `Start Building`. (Aside from step 3 below, no actual set up is needed, since it will use the `.circleci/config.yml` file in 0x-monorepo, so you can ignore all of the instruction/explanation given on the page with the `Start Building` button.) +3. In CircleCI, configure your project to add an environment variable, with name `COVERALLS_REPO_TOKEN`, and for the value paste in the `Repo Token` you copied in step 1. -`development` represents the development state and is a default branch to which you will submit a PR. We use this structure so that we can push hotfixes to the currently released version without needing to publish all the changes made towards the next release. If a hotfix is implemented on `master`, it is back-ported to `development`. +Now, when you push to your branch, CircleCI will automatically run all of the checks in your own instance, and the coverage check will work since it has the proper `Repo Token`, and the PR will magically refer to your own checks rather than running them in the 0x CircleCI instance. -- cgit From 4cb138ab37aee5c91ff70a178dda1abf5c1dfc39 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 19 Nov 2018 14:34:21 +0000 Subject: Fixes to CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6933a1162..1fea8f501 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Before removing the `[WIP]` tag and submitting the PR for review, make sure: * It is properly formatted with Prettier (`yarn prettier`) * It passes our continuous integration tests (See: [Enabling code coverage checks on your fork](#enabling-code-coverage-checks-on-your-fork) for instructions on getting the `submit-coverage` test to pass on forks) * You've created/updated the corresponding [CHANGELOG](#CHANGELOGs) entries. -* Your changes have sufficient test coverage (e.g regression tests for bug fixes) +* Your changes have sufficient test coverage (e.g regression tests have been added for bug fixes) ### Branch structure @@ -35,13 +35,13 @@ Branch names should be prefixed with `fix`, `feature` or `refactor`. ### CHANGELOGs -At 0x we use [Semantic Versioning](http://semver.org/) for all our published packages. If a change you make is a bug fix, adds a feature or introduces a breaking change to a package, you must modify it's `CHANGELOG.json` file accordingly. +At 0x we use [Semantic Versioning](http://semver.org/) for all our published packages. If a change you make corresponds to a semver bump, you must modify the package's `CHANGELOG.json` file accordingly. Each CHANGELOG entry that corresponds to a published package will have a `timestamp`. If no entry exists without a `timestamp`, you must first create a new one: ``` { - "version": "1.0.0", <- The updated package version + "version": "1.0.1", <- The updated package version "changes": [ { "note": "", <- Describe your change -- cgit From 99541f89f7676f6b0d8a923ad377fa901a74f504 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 19 Nov 2018 17:07:18 +0000 Subject: Add 0x-order-utils.py library to developers home --- packages/website/ts/pages/documentation/docs_home.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index 9faa930fc..e3328f3fa 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -82,6 +82,15 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { to: WebsitePaths.SmartContracts, }, }, + { + description: + "A Python library for interacting with 0x orders. Generate an orderHash, sign an order, validate it's signature and more.", + link: { + title: '0x-order-utils.py', + to: 'http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/', + 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)', -- cgit From e23f90b82cc1346bea66e91858bc7fdc874542dd Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 09:48:34 -0800 Subject: No need to explicit send in NODE_ENV --- packages/instant/webpack.config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index ce4f1672e..fe3e158a0 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -25,7 +25,6 @@ const config = { plugins: [ new webpack.DefinePlugin({ 'process.env': { - NODE_ENV: JSON.stringify(process.env.NODE_ENV), GIT_SHA: JSON.stringify(GIT_SHA), ENABLE_HEAP: JSON.stringify(process.env.ENABLE_HEAP), NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version), -- cgit From 2bfd03e64f20905b0526d65813f78eff3e924727 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 09:54:59 -0800 Subject: Change disabled analytics name, add assertion, and always set --- packages/instant/src/components/zero_ex_instant_provider.tsx | 6 ++---- packages/instant/src/index.umd.ts | 3 +++ packages/instant/src/util/analytics.ts | 8 ++++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 52454148f..9435d8c7c 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -37,7 +37,7 @@ export interface ZeroExInstantProviderOptionalProps { additionalAssetMetaDataMap: ObjectMap; networkId: Network; affiliateInfo: AffiliateInfo; - disableAnalyticsTracking: boolean; + shouldDisableAnalyticsTracking: boolean; } export class ZeroExInstantProvider extends React.Component { @@ -125,9 +125,7 @@ export class ZeroExInstantProvider extends React.Component { - disabled = true; +let isDisabled = false; +export const disableAnalytics = (shouldDisableAnalytics: boolean) => { + isDisabled = shouldDisableAnalytics; }; export const evaluateIfEnabled = (fnCall: () => void) => { - if (disabled) { + if (isDisabled) { return; } fnCall(); -- cgit From 9b725a645db423d20a4be1f1d5930f6ecb7ad682 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Mon, 19 Nov 2018 10:12:40 -0800 Subject: feat(instant): support custom iconUrls --- .../src/components/erc20_token_selector.tsx | 34 ++++++++++++++++------ packages/instant/src/types.ts | 1 + 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx index 62dd52a4c..1b1921acb 100644 --- a/packages/instant/src/components/erc20_token_selector.tsx +++ b/packages/instant/src/components/erc20_token_selector.tsx @@ -78,8 +78,8 @@ interface TokenSelectorRowProps { class TokenSelectorRow extends React.Component { public render(): React.ReactNode { const { token } = this.props; + const circleColor = token.metaData.primaryColor || 'black'; const displaySymbol = assetUtils.bestNameForAsset(token); - const TokenIcon = require(`../assets/icons/${token.metaData.symbol}.svg`); return ( { - + - {!_.isUndefined(TokenIcon) ? ( - - ) : ( - - {displaySymbol} - - )} + @@ -122,3 +116,25 @@ class TokenSelectorRow extends React.Component { this.props.onClick(this.props.token); }; } + +interface TokenSelectorRowIconProps { + token: ERC20Asset; +} + +const TokenSelectorRowIcon: React.StatelessComponent = props => { + const { token } = props; + const iconUrlIfExists = token.metaData.iconUrl; + const TokenIcon = require(`../assets/icons/${token.metaData.symbol}.svg`); + const displaySymbol = assetUtils.bestNameForAsset(token); + if (!_.isUndefined(iconUrlIfExists)) { + return ; + } else if (!_.isUndefined(TokenIcon)) { + return ; + } else { + return ( + + {displaySymbol} + + ); + } +}; diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts index 67f21a396..2d4a8a850 100644 --- a/packages/instant/src/types.ts +++ b/packages/instant/src/types.ts @@ -51,6 +51,7 @@ export interface ERC20AssetMetaData { primaryColor?: string; symbol: string; name: string; + iconUrl?: string; } export interface ERC721AssetMetaData { -- cgit From 8772d916993d754f784d7435dbbfb60c9a6f9205 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 12:02:31 -0800 Subject: Get heap analytics id from ENV variable --- packages/instant/src/constants.ts | 4 +- packages/instant/src/util/heap.ts | 18 +++---- packages/instant/webpack.config.js | 108 ++++++++++++++++++++++--------------- 3 files changed, 73 insertions(+), 57 deletions(-) diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 26d5ff436..44d09e31e 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -16,9 +16,7 @@ export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15; export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.mul(6); export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2; export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info'; -export const ANALYTICS_ENABLED = process.env.NODE_ENV === 'production' || process.env.ENABLE_HEAP; -export const HEAP_ANALYTICS_DEVELOPMENT_APP_ID = '507265531'; -export const HEAP_ANALYTICS_PRODUCTION_APP_ID = '2323640988'; +export const HEAP_ANALYTICS_ID = process.env.HEAP_ANALYTICS_ID; export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2'; export const PROGRESS_STALL_AT_WIDTH = '95%'; export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 1871c4abc..78ec3b3cc 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -1,7 +1,8 @@ import { ObjectMap } from '@0x/types'; import { logUtils } from '@0x/utils'; +import * as _ from 'lodash'; -import { ANALYTICS_ENABLED, HEAP_ANALYTICS_DEVELOPMENT_APP_ID, HEAP_ANALYTICS_PRODUCTION_APP_ID } from '../constants'; +import { HEAP_ANALYTICS_ID } from '../constants'; import { AnalyticsEventOptions, AnalyticsUserOptions } from './analytics'; @@ -24,14 +25,11 @@ const getWindow = (): ModifiedWindow => { return window as ModifiedWindow; }; -const getHeapAppId = (): string => { - if (process.env.NODE_ENV === 'production') { - return HEAP_ANALYTICS_PRODUCTION_APP_ID; +const setupZeroExInstantHeap = () => { + if (_.isUndefined(HEAP_ANALYTICS_ID)) { + return; } - return HEAP_ANALYTICS_DEVELOPMENT_APP_ID; -}; -const setupZeroExInstantHeap = () => { const curWindow = getWindow(); // Set property to specify that this is zeroEx's heap curWindow.zeroExInstantLoadedHeap = true; @@ -71,7 +69,7 @@ const setupZeroExInstantHeap = () => { ) (window as any).heap[p[c]] = o(p[c]); }); - (window as any).heap.load(getHeapAppId()); + (window as any).heap.load(HEAP_ANALYTICS_ID); /* tslint:enable */ return curWindow.heap as HeapAnalytics; @@ -93,14 +91,14 @@ export const heapUtil = { return setupZeroExInstantHeap(); }, evaluateHeapCall: (heapFunctionCall: (heap: HeapAnalytics) => void): void => { - if (!ANALYTICS_ENABLED) { + if (_.isUndefined(HEAP_ANALYTICS_ID)) { return; } const curHeap = heapUtil.getHeap(); if (curHeap) { try { - if (curHeap.appid !== getHeapAppId()) { + if (curHeap.appid !== HEAP_ANALYTICS_ID) { // Integrator has included heap after us and reset the app id return; } diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index fe3e158a0..7ffb09754 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -11,50 +11,70 @@ const GIT_SHA = childProcess .toString() .trim(); -const outputPath = process.env.WEBPACK_OUTPUT_PATH || 'umd'; -const config = { - entry: { - instant: './src/index.umd.ts', - }, - output: { - filename: '[name].js', - path: path.resolve(__dirname, outputPath), - library: 'zeroExInstant', - libraryTarget: 'umd', - }, - plugins: [ - new webpack.DefinePlugin({ - 'process.env': { - GIT_SHA: JSON.stringify(GIT_SHA), - ENABLE_HEAP: JSON.stringify(process.env.ENABLE_HEAP), - NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version), - }, - }), - ], - devtool: 'source-map', - resolve: { - extensions: ['.js', '.json', '.ts', '.tsx'], - }, - module: { - rules: [ - { - test: /\.(ts|tsx)$/, - loader: 'awesome-typescript-loader', - }, +const HEAP_PRODUCTION_ENV_VAR_NAME = 'INSTANT_HEAP_ANALYTICS_ID_PRODUCTION'; +const HEAP_DEVELOPMENT_ENV_VAR_NAME = 'INSTANT_HEAP_ANALYTICS_ID_DEVELOPMENT'; +const getHeapAnalyticsId = modeName => { + if (modeName === 'production') { + if (process.env[HEAP_PRODUCTION_ENV_VAR_NAME]) { + return process.env[HEAP_PRODUCTION_ENV_VAR_NAME]; + } + throw new Error(`Must have ${HEAP_PRODUCTION_ENV_VAR_NAME} set`); + } + + if (modeName === 'development') { + return process.env[HEAP_DEVELOPMENT_ENV_VAR_NAME]; + } + + return undefined; +}; + +module.exports = (env, argv) => { + const outputPath = process.env.WEBPACK_OUTPUT_PATH || 'umd'; + const config = { + entry: { + instant: './src/index.umd.ts', + }, + output: { + filename: '[name].js', + path: path.resolve(__dirname, outputPath), + library: 'zeroExInstant', + libraryTarget: 'umd', + }, + plugins: [ + new webpack.DefinePlugin({ + 'process.env': { + GIT_SHA: JSON.stringify(GIT_SHA), + HEAP_ANALYTICS_ID: getHeapAnalyticsId(argv.mode), + NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version), + }, + }), ], - }, - devServer: { - contentBase: path.join(__dirname, 'public'), - port: 5000, - host: '0.0.0.0', - after: () => { - if (config.devServer.host === '0.0.0.0') { - console.log( - `webpack-dev-server can be accessed externally at: http://${ip.address()}:${config.devServer.port}`, - ); - } + devtool: 'source-map', + resolve: { + extensions: ['.js', '.json', '.ts', '.tsx'], + }, + module: { + rules: [ + { + test: /\.(ts|tsx)$/, + loader: 'awesome-typescript-loader', + }, + ], }, - }, + devServer: { + contentBase: path.join(__dirname, 'public'), + port: 5000, + host: '0.0.0.0', + after: () => { + if (config.devServer.host === '0.0.0.0') { + console.log( + `webpack-dev-server can be accessed externally at: http://${ip.address()}:${ + config.devServer.port + }`, + ); + } + }, + }, + }; + return config; }; - -module.exports = config; -- cgit From 1880c7c27ddf3ba1b5e722f396126d5ff28e79a6 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 12:14:27 -0800 Subject: Linting: rename variable --- packages/instant/src/redux/analytics_middleware.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index a86cf1b83..f971dbd33 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -11,8 +11,8 @@ import { Action, ActionTypes } from './actions'; import { State } from './reducer'; const shouldTriggerWalletReady = (prevAccount: Account, curAccount: Account): boolean => { - const justTurnedReady = curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready; - if (justTurnedReady) { + const didJustTurnReady = curAccount.state === AccountState.Ready && prevAccount.state !== AccountState.Ready; + if (didJustTurnReady) { return true; } -- cgit From 497385818b42f298c777ce3fbeb3e2d55a2bdc64 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 15:38:09 -0800 Subject: Check for instant heap production credentials in pre-publish step --- packages/instant/webpack.config.js | 5 +---- packages/monorepo-scripts/src/prepublish_checks.ts | 11 +++++++++++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js index 7139ced16..41276809c 100644 --- a/packages/instant/webpack.config.js +++ b/packages/instant/webpack.config.js @@ -15,10 +15,7 @@ const HEAP_PRODUCTION_ENV_VAR_NAME = 'INSTANT_HEAP_ANALYTICS_ID_PRODUCTION'; const HEAP_DEVELOPMENT_ENV_VAR_NAME = 'INSTANT_HEAP_ANALYTICS_ID_DEVELOPMENT'; const getHeapAnalyticsId = modeName => { if (modeName === 'production') { - if (process.env[HEAP_PRODUCTION_ENV_VAR_NAME]) { - return process.env[HEAP_PRODUCTION_ENV_VAR_NAME]; - } - throw new Error(`Must have ${HEAP_PRODUCTION_ENV_VAR_NAME} set`); + return process.env[HEAP_PRODUCTION_ENV_VAR_NAME]; } if (modeName === 'development') { diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts index 5f603ebc7..fc550cf3a 100644 --- a/packages/monorepo-scripts/src/prepublish_checks.ts +++ b/packages/monorepo-scripts/src/prepublish_checks.ts @@ -17,6 +17,7 @@ async function prepublishChecksAsync(): Promise { await checkChangelogFormatAsync(updatedPublicPackages); await checkGitTagsForNextVersionAndDeleteIfExistAsync(updatedPublicPackages); await checkPublishRequiredSetupAsync(); + checkRequiredEnvVariables(); } async function checkGitTagsForNextVersionAndDeleteIfExistAsync(updatedPublicPackages: Package[]): Promise { @@ -183,6 +184,16 @@ async function checkPublishRequiredSetupAsync(): Promise { } } +const checkRequiredEnvVariables = () => { + utils.log('Checking required environment variables...'); + const requiredEnvVars = ['INSTANT_HEAP_ANALYTICS_ID_PRODUCTION']; + requiredEnvVars.forEach(requiredEnvVarName => { + if (_.isUndefined(process.env[requiredEnvVarName])) { + throw new Error(`Must have ${requiredEnvVarName} set`); + } + }); +}; + prepublishChecksAsync().catch(err => { utils.log(err.message); process.exit(1); -- cgit From 9ab55fd07d3a11616d12c95ef512f100d12a0aee Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 19 Nov 2018 16:22:05 -0800 Subject: fix: npmignore file ignoring index.d.ts --- packages/instant/.npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/.npmignore b/packages/instant/.npmignore index 579d65af0..a4f7810c0 100644 --- a/packages/instant/.npmignore +++ b/packages/instant/.npmignore @@ -1,5 +1,5 @@ .* * */ -!lib/src/**/* +!lib/**/* !umd/**/* \ No newline at end of file -- cgit From 578a46c57f04bbae223fe0b6b79f6aaa28576a95 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 16:28:40 -0800 Subject: feat(instant): Add powered by 0x image --- packages/instant/src/assets/powered_by_0x.svg | 27 ++++++++++++++++++++++ .../src/components/zero_ex_instant_container.tsx | 15 ++++++++++++ packages/instant/src/constants.ts | 1 + 3 files changed, 43 insertions(+) create mode 100644 packages/instant/src/assets/powered_by_0x.svg diff --git a/packages/instant/src/assets/powered_by_0x.svg b/packages/instant/src/assets/powered_by_0x.svg new file mode 100644 index 000000000..f49238a3c --- /dev/null +++ b/packages/instant/src/assets/powered_by_0x.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 698bfef17..9d5fe7171 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; +import { ZERO_EX_SITE_URL } from '../constants'; import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector'; import { ConnectedBuyOrderProgressOrPaymentMethod } from '../containers/connected_buy_order_progress_or_payment_method'; import { CurrentStandardSlidingPanel } from '../containers/current_standard_sliding_panel'; @@ -15,6 +16,7 @@ import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; +import { Text } from './ui/text'; export interface ZeroExInstantContainerProps { orderProcessState: OrderProcessState; @@ -28,6 +30,8 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon tokenSelectionPanelAnimationState: 'none' as SlideAnimationState, }; public render(): React.ReactNode { + const PoweredByLogo = require('../assets/powered_by_0x.svg'); + return ( @@ -64,6 +68,17 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon + + + + + ); diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts index 5bd2349b3..ad2d568fe 100644 --- a/packages/instant/src/constants.ts +++ b/packages/instant/src/constants.ts @@ -31,6 +31,7 @@ export const ETHEREUM_NODE_URL_BY_NETWORK = { [Network.Mainnet]: 'https://mainnet.infura.io/', [Network.Kovan]: 'https://kovan.infura.io/', }; +export const ZERO_EX_SITE_URL = 'https://www.0xproject.com/'; export const BLOCK_POLLING_INTERVAL_MS = 10000; // 10s export const NO_ACCOUNT: AccountNotReady = { state: AccountState.None, -- cgit From a1b7f0ad83477f575bb047048f77c3c9639b8b8e Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 16:36:51 -0800 Subject: Use anchor instead of Text --- packages/instant/src/components/zero_ex_instant_container.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 9d5fe7171..1de3bbbbb 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -25,13 +25,12 @@ export interface ZeroExInstantContainerState { tokenSelectionPanelAnimationState: SlideAnimationState; } +const PoweredByLogo = require('../assets/powered_by_0x.svg'); export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantContainerState> { public state = { tokenSelectionPanelAnimationState: 'none' as SlideAnimationState, }; public render(): React.ReactNode { - const PoweredByLogo = require('../assets/powered_by_0x.svg'); - return ( @@ -75,9 +74,9 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon marginRight="auto" width="140px" > - + - + -- cgit From db6b2cbb05c59003bd2eee05d7a560949f8e15d9 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 16:38:56 -0800 Subject: Fix linting --- packages/instant/src/components/zero_ex_instant_container.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 1de3bbbbb..2e3fb3c87 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -16,7 +16,6 @@ import { CSSReset } from './css_reset'; import { SlidingPanel } from './sliding_panel'; import { Container } from './ui/container'; import { Flex } from './ui/flex'; -import { Text } from './ui/text'; export interface ZeroExInstantContainerProps { orderProcessState: OrderProcessState; @@ -25,12 +24,12 @@ export interface ZeroExInstantContainerState { tokenSelectionPanelAnimationState: SlideAnimationState; } -const PoweredByLogo = require('../assets/powered_by_0x.svg'); export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantContainerState> { public state = { tokenSelectionPanelAnimationState: 'none' as SlideAnimationState, }; public render(): React.ReactNode { + const PoweredByLogo = require('../assets/powered_by_0x.svg'); return ( -- cgit From 3169b724064c1495b27c67ec92aeb7314a18e177 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 17:04:15 -0800 Subject: fix(instant): Don't allow changing of assets when order processing --- packages/instant/src/components/erc20_asset_amount_input.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index 520ac33d5..371e0b0d5 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -53,6 +53,7 @@ export class ERC20AssetAmountInput extends React.Component @@ -74,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component {assetUtils.formattedSymbolForAsset(asset)} - {this._renderChevronIcon()} + {isEnabled && this._renderChevronIcon()} -- cgit From 6de499459cb29f74cabd91c441f85e4c2325a6d7 Mon Sep 17 00:00:00 2001 From: fragosti Date: Mon, 19 Nov 2018 17:10:47 -0800 Subject: fix: do not use document on import --- packages/instant/src/components/zero_ex_instant_provider.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx index 8be53ee20..ac246128c 100644 --- a/packages/instant/src/components/zero_ex_instant_provider.tsx +++ b/packages/instant/src/components/zero_ex_instant_provider.tsx @@ -19,8 +19,6 @@ import { Heartbeater } from '../util/heartbeater'; import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory'; import { providerStateFactory } from '../util/provider_state_factory'; -fonts.include(); - export type ZeroExInstantProviderProps = ZeroExInstantProviderRequiredProps & Partial; @@ -86,6 +84,7 @@ export class ZeroExInstantProvider extends React.Component Date: Mon, 19 Nov 2018 17:12:21 -0800 Subject: Add ability to import SVGs in TS --- packages/instant/src/globals.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/instant/src/globals.d.ts b/packages/instant/src/globals.d.ts index 94e63a32d..1b5fa443d 100644 --- a/packages/instant/src/globals.d.ts +++ b/packages/instant/src/globals.d.ts @@ -1,3 +1,9 @@ +declare module '*.svg' { + const content: any; + /* tslint:disable */ + export default content; + /* tslint:enable */ +} declare module '*.json' { const json: any; /* tslint:disable */ -- cgit From 0ba34f587c58074a7448cec43894bfab764e4bc3 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Mon, 19 Nov 2018 17:12:32 -0800 Subject: Import via TS --- packages/instant/src/components/zero_ex_instant_container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx index 2e3fb3c87..47c938472 100644 --- a/packages/instant/src/components/zero_ex_instant_container.tsx +++ b/packages/instant/src/components/zero_ex_instant_container.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; +import PoweredByLogo from '../assets/powered_by_0x.svg'; import { ZERO_EX_SITE_URL } from '../constants'; import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector'; import { ConnectedBuyOrderProgressOrPaymentMethod } from '../containers/connected_buy_order_progress_or_payment_method'; @@ -29,7 +30,6 @@ export class ZeroExInstantContainer extends React.Component<{}, ZeroExInstantCon tokenSelectionPanelAnimationState: 'none' as SlideAnimationState, }; public render(): React.ReactNode { - const PoweredByLogo = require('../assets/powered_by_0x.svg'); return ( -- cgit From 22cfdd9f0b5cd2b8d53384e16defc956570ccd6a Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 20 Nov 2018 14:48:32 +0100 Subject: Properly unmarshall TransactionReceiptRPC to TransactionReceipt --- packages/web3-wrapper/CHANGELOG.json | 13 ++++++++++++ packages/web3-wrapper/package.json | 1 + packages/web3-wrapper/src/index.ts | 3 +++ packages/web3-wrapper/src/marshaller.ts | 18 +++++++++++++++++ packages/web3-wrapper/src/types.ts | 27 +++++++++++++++++++++++++ packages/web3-wrapper/src/web3_wrapper.ts | 26 ++++++++++++++---------- packages/web3-wrapper/test/web3_wrapper_test.ts | 14 ++++++++++++- 7 files changed, 90 insertions(+), 12 deletions(-) diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index b938f6986..cc65c2a7d 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,17 @@ [ + { + "version": "3.1.5", + "changes": [ + { + "note": "Add unmarshalling of transaction receipts", + "pr": 1291 + }, + { + "note": "Return `undefined` instead of `null` if transaction receipt not found", + "pr": 1291 + } + ] + }, { "timestamp": 1542208198, "version": "3.1.4", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 2469f7627..8d4d7ec35 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -10,6 +10,7 @@ "scripts": { "build": "tsc -b", "build:ci": "yarn build", + "watch_without_deps": "tsc -w", "clean": "shx rm -rf lib generated_docs", "lint": "tslint --format stylish --project .", "test": "yarn run_mocha", diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts index 679563a2b..4d20ba9be 100644 --- a/packages/web3-wrapper/src/index.ts +++ b/packages/web3-wrapper/src/index.ts @@ -52,6 +52,9 @@ export { CallDataRPC, BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, + TransactionReceiptStatusRPC, + TransactionReceiptRPC, + LogEntryRPC, TransactionRPC, TxDataRPC, } from './types'; diff --git a/packages/web3-wrapper/src/marshaller.ts b/packages/web3-wrapper/src/marshaller.ts index 299c6a64c..7bd274c85 100644 --- a/packages/web3-wrapper/src/marshaller.ts +++ b/packages/web3-wrapper/src/marshaller.ts @@ -9,6 +9,7 @@ import { LogEntry, RawLogEntry, Transaction, + TransactionReceipt, TxData, } from 'ethereum-types'; import ethUtil = require('ethereumjs-util'); @@ -21,6 +22,7 @@ import { BlockWithTransactionDataRPC, CallDataRPC, CallTxDataBaseRPC, + TransactionReceiptRPC, TransactionRPC, TxDataRPC, } from './types'; @@ -91,6 +93,22 @@ export const marshaller = { }; return tx; }, + /** + * Unmarshall transaction receipt + * @param txReceiptRpc transaction receipt to unmarshall + * @return unmarshalled transaction receipt + */ + unmarshalTransactionReceipt(txReceiptRpc: TransactionReceiptRPC): TransactionReceipt { + const txReceipt = { + ...txReceiptRpc, + blockNumber: utils.convertHexToNumber(txReceiptRpc.blockNumber), + transactionIndex: utils.convertHexToNumber(txReceiptRpc.transactionIndex), + cumulativeGasUsed: utils.convertHexToNumber(txReceiptRpc.cumulativeGasUsed), + gasUsed: utils.convertHexToNumber(txReceiptRpc.gasUsed), + logs: _.map(txReceiptRpc.logs, marshaller.unmarshalLog.bind(marshaller)), + }; + return txReceipt; + }, /** * Unmarshall transaction data * @param txDataRpc transaction data to unmarshall diff --git a/packages/web3-wrapper/src/types.ts b/packages/web3-wrapper/src/types.ts index e81039186..eb5a35f07 100644 --- a/packages/web3-wrapper/src/types.ts +++ b/packages/web3-wrapper/src/types.ts @@ -41,6 +41,33 @@ export interface TransactionRPC { input: string; } +export interface TransactionReceiptRPC { + blockHash: string; + blockNumber: string; + transactionHash: string; + transactionIndex: string; + from: string; + to: string; + status: TransactionReceiptStatusRPC; + cumulativeGasUsed: string; + gasUsed: string; + contractAddress: string | null; + logs: LogEntryRPC[]; +} + +export interface LogEntryRPC { + logIndex: string | null; + transactionIndex: string | null; + transactionHash: string; + blockHash: string | null; + blockNumber: string | null; + address: string; + data: string; + topics: string[]; +} + +export type TransactionReceiptStatusRPC = null | string | 0 | 1; + export interface CallTxDataBaseRPC { to?: string; value?: string; diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index be1713f20..f1247e48a 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -27,6 +27,7 @@ import { BlockWithoutTransactionDataRPC, BlockWithTransactionDataRPC, NodeType, + TransactionReceiptRPC, TransactionRPC, Web3WrapperErrors, } from './types'; @@ -212,20 +213,23 @@ export class Web3Wrapper { return networkId; } /** - * Retrieves the transaction receipt for a given transaction hash + * Retrieves the transaction receipt for a given transaction hash if found * @param txHash Transaction hash - * @returns The transaction receipt, including it's status (0: failed, 1: succeeded or undefined: not found) + * @returns The transaction receipt, including it's status (0: failed, 1: succeeded). Returns undefined if transaction not found. */ - public async getTransactionReceiptAsync(txHash: string): Promise { + public async getTransactionReceiptIfExistsAsync(txHash: string): Promise { assert.isHexString('txHash', txHash); - const transactionReceipt = await this.sendRawPayloadAsync({ + const transactionReceiptRpc = await this.sendRawPayloadAsync({ method: 'eth_getTransactionReceipt', params: [txHash], }); - if (!_.isNull(transactionReceipt)) { - transactionReceipt.status = Web3Wrapper._normalizeTxReceiptStatus(transactionReceipt.status); + if (!_.isNull(transactionReceiptRpc)) { + transactionReceiptRpc.status = Web3Wrapper._normalizeTxReceiptStatus(transactionReceiptRpc.status); + const transactionReceipt = marshaller.unmarshalTransactionReceipt(transactionReceiptRpc); + return transactionReceipt; + } else { + return undefined; } - return transactionReceipt; } /** * Retrieves the transaction data for a given transaction @@ -572,8 +576,8 @@ export class Web3Wrapper { assert.isNumber('timeoutMs', timeoutMs); } // Immediately check if the transaction has already been mined. - let transactionReceipt = await this.getTransactionReceiptAsync(txHash); - if (!_.isNull(transactionReceipt) && !_.isNull(transactionReceipt.blockNumber)) { + let transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash); + if (!_.isUndefined(transactionReceipt) && !_.isNull(transactionReceipt.blockNumber)) { const logsWithDecodedArgs = _.map( transactionReceipt.logs, this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder), @@ -600,8 +604,8 @@ export class Web3Wrapper { return reject(Web3WrapperErrors.TransactionMiningTimeout); } - transactionReceipt = await this.getTransactionReceiptAsync(txHash); - if (!_.isNull(transactionReceipt)) { + transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash); + if (!_.isUndefined(transactionReceipt)) { intervalUtils.clearAsyncExcludingInterval(intervalId); const logsWithDecodedArgs = _.map( transactionReceipt.logs, diff --git a/packages/web3-wrapper/test/web3_wrapper_test.ts b/packages/web3-wrapper/test/web3_wrapper_test.ts index 164253777..935c67636 100644 --- a/packages/web3-wrapper/test/web3_wrapper_test.ts +++ b/packages/web3-wrapper/test/web3_wrapper_test.ts @@ -1,5 +1,5 @@ import * as chai from 'chai'; -import { BlockParamLiteral, JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types'; +import { BlockParamLiteral, JSONRPCErrorCallback, JSONRPCRequestPayload, TransactionReceipt } from 'ethereum-types'; import * as Ganache from 'ganache-core'; import * as _ from 'lodash'; import 'mocha'; @@ -98,6 +98,18 @@ describe('Web3Wrapper tests', () => { expect(typeof blockNumber).to.be.equal('number'); }); }); + describe('#getTransactionReceiptAsync/awaitTransactionSuccessAsync', () => { + it('get block number', async () => { + const payload = { from: addresses[0], to: addresses[1], value: 1 }; + const txHash = await web3Wrapper.sendTransactionAsync(payload); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); + const receiptIfExists = await web3Wrapper.getTransactionReceiptIfExistsAsync(txHash); + expect(receiptIfExists).to.not.be.undefined(); + const receipt = receiptIfExists as TransactionReceipt; + expect(receipt.transactionIndex).to.be.a('number'); + expect(receipt.transactionHash).to.be.equal(txHash); + }); + }); describe('#getBlockIfExistsAsync', () => { it('gets block when supplied a valid BlockParamLiteral value', async () => { const blockParamLiteral = BlockParamLiteral.Earliest; -- cgit From e1bc3f3f2d538c56ee2830260afced798096422d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 20 Nov 2018 15:50:29 +0100 Subject: Add nonce to TxOpts --- packages/contract-wrappers/CHANGELOG.json | 10 +++++++ .../src/contract_wrappers/erc20_token_wrapper.ts | 3 ++ .../src/contract_wrappers/erc721_token_wrapper.ts | 3 ++ .../src/contract_wrappers/ether_token_wrapper.ts | 2 ++ .../src/contract_wrappers/exchange_wrapper.ts | 34 ++++++++++++++++++++++ .../src/contract_wrappers/forwarder_wrapper.ts | 4 +++ .../src/schemas/tx_opts_schema.ts | 1 + packages/contract-wrappers/src/types.ts | 2 ++ 8 files changed, 59 insertions(+) diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index fbf3972a9..b1568c9f3 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "4.1.0", + "changes": [ + { + "note": + "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with higher gas cost", + "pr": 1292 + } + ] + }, { "timestamp": 1542208198, "version": "4.0.2", 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 5e0ec1951..ad42cfd4f 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts @@ -111,6 +111,7 @@ export class ERC20TokenWrapper extends ContractWrapper { from: normalizedOwnerAddress, gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, + nonce: txOpts.nonce, }), ); return txHash; @@ -281,6 +282,7 @@ export class ERC20TokenWrapper extends ContractWrapper { from: normalizedFromAddress, gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, + nonce: txOpts.nonce, }), ); return txHash; @@ -342,6 +344,7 @@ export class ERC20TokenWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, + nonce: txOpts.nonce, }), ); return txHash; 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 1610af47b..3bc7dc8e7 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts @@ -238,6 +238,7 @@ export class ERC721TokenWrapper extends ContractWrapper { gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, from: normalizedOwnerAddress, + nonce: txOpts.nonce, }), ); return txHash; @@ -298,6 +299,7 @@ export class ERC721TokenWrapper extends ContractWrapper { gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, from: tokenOwnerAddress, + nonce: txOpts.nonce, }), ); return txHash; @@ -369,6 +371,7 @@ export class ERC721TokenWrapper extends ContractWrapper { gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, from: normalizedSenderAddress, + nonce: txOpts.nonce, }), ); return txHash; 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 913c47cf7..6093f0f95 100644 --- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts @@ -71,6 +71,7 @@ export class EtherTokenWrapper extends ContractWrapper { value: amountInWei, gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, + nonce: txOpts.nonce, }), ); return txHash; @@ -112,6 +113,7 @@ export class EtherTokenWrapper extends ContractWrapper { from: normalizedWithdrawerAddress, gas: txOpts.gasLimit, gasPrice: txOpts.gasPrice, + nonce: txOpts.nonce, }), ); return txHash; diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts index c76e51eee..c9556971a 100644 --- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts @@ -196,6 +196,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } @@ -207,6 +208,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -243,6 +245,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); } @@ -254,6 +257,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -287,6 +291,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.fillOrKillOrder.sendTransactionAsync( @@ -297,6 +302,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -336,6 +342,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.executeTransaction.sendTransactionAsync( @@ -347,6 +354,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -382,6 +390,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.batchFillOrders.sendTransactionAsync( @@ -392,6 +401,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -425,6 +435,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.marketBuyOrders.sendTransactionAsync( @@ -435,6 +446,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -468,6 +480,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.marketSellOrders.sendTransactionAsync( @@ -478,6 +491,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -511,6 +525,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.marketBuyOrdersNoThrow.sendTransactionAsync( @@ -521,6 +536,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -554,6 +570,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.marketSellOrdersNoThrow.sendTransactionAsync( @@ -564,6 +581,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -599,6 +617,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.batchFillOrdersNoThrow.sendTransactionAsync( @@ -609,6 +628,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -644,6 +664,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.batchFillOrKillOrders.sendTransactionAsync( @@ -654,6 +675,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -682,12 +704,14 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedMakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.batchCancelOrders.sendTransactionAsync(orders, { from: normalizedMakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); return txHash; } @@ -735,6 +759,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); } @@ -747,6 +772,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -781,12 +807,14 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.preSign.sendTransactionAsync(hash, signerAddress, signature, { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); return txHash; } @@ -956,12 +984,14 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedMakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.cancelOrder.sendTransactionAsync(order, { from: normalizedMakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); return txHash; } @@ -992,6 +1022,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.setSignatureValidatorApproval.sendTransactionAsync( @@ -1001,6 +1032,7 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -1030,12 +1062,14 @@ export class ExchangeWrapper extends ContractWrapper { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); } const txHash = await exchangeInstance.cancelOrdersUpTo.sendTransactionAsync(targetOrderEpoch, { from: normalizedSenderAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }); return txHash; } diff --git a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts index 80742e030..5497f92b5 100644 --- a/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts @@ -124,6 +124,7 @@ export class ForwarderWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); } @@ -140,6 +141,7 @@ export class ForwarderWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; @@ -213,6 +215,7 @@ export class ForwarderWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); } @@ -230,6 +233,7 @@ export class ForwarderWrapper extends ContractWrapper { from: normalizedTakerAddress, gas: orderTransactionOpts.gasLimit, gasPrice: orderTransactionOpts.gasPrice, + nonce: orderTransactionOpts.nonce, }, ); return txHash; diff --git a/packages/contract-wrappers/src/schemas/tx_opts_schema.ts b/packages/contract-wrappers/src/schemas/tx_opts_schema.ts index 83c819be2..1c1588db7 100644 --- a/packages/contract-wrappers/src/schemas/tx_opts_schema.ts +++ b/packages/contract-wrappers/src/schemas/tx_opts_schema.ts @@ -3,6 +3,7 @@ export const txOptsSchema = { properties: { gasPrice: { $ref: '/numberSchema' }, gasLimit: { type: 'number' }, + nonce: { type: 'number' }, }, type: 'object', }; diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index 5a5bdd530..21033cf3c 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -142,10 +142,12 @@ export interface MethodOpts { /** * gasPrice: Gas price in Wei to use for a transaction * gasLimit: The amount of gas to send with a transaction (in Gwei) + * nonce: The nonce to use for a transaction */ export interface TransactionOpts { gasPrice?: BigNumber; gasLimit?: number; + nonce?: number; } /** -- cgit From 0c91bf1415a384ed18a630c89fe974f768040234 Mon Sep 17 00:00:00 2001 From: Fabio B Date: Tue, 20 Nov 2018 16:32:34 +0100 Subject: Update packages/contract-wrappers/CHANGELOG.json Co-Authored-By: LogvinovLeon --- packages/contract-wrappers/CHANGELOG.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index b1568c9f3..1ea966fc6 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -4,7 +4,7 @@ "changes": [ { "note": - "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with higher gas cost", + "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount", "pr": 1292 } ] -- cgit From 7a38a196ad749699965f86e85e2a3caeada9a4bc Mon Sep 17 00:00:00 2001 From: Fabio B Date: Tue, 20 Nov 2018 16:42:49 +0100 Subject: Update packages/contract-wrappers/src/types.ts Co-Authored-By: LogvinovLeon --- packages/contract-wrappers/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contract-wrappers/src/types.ts b/packages/contract-wrappers/src/types.ts index 21033cf3c..14d4649ae 100644 --- a/packages/contract-wrappers/src/types.ts +++ b/packages/contract-wrappers/src/types.ts @@ -142,7 +142,7 @@ export interface MethodOpts { /** * gasPrice: Gas price in Wei to use for a transaction * gasLimit: The amount of gas to send with a transaction (in Gwei) - * nonce: The nonce to use for a transaction + * nonce: The nonce to use for a transaction. If not specified, it defaults to the next incremented nonce. */ export interface TransactionOpts { gasPrice?: BigNumber; -- cgit From 7ad5dbc59dc765d44f01cd1e92511196a54be82c Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 20 Nov 2018 09:51:14 -0800 Subject: Allow user to select other token on success --- packages/instant/src/components/erc20_asset_amount_input.tsx | 6 +++--- .../instant/src/containers/selected_erc20_asset_amount_input.ts | 8 ++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index 371e0b0d5..e675d3fc5 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -23,6 +23,7 @@ export interface ERC20AssetAmountInputProps { startingFontSizePx: number; fontColor?: ColorOption; isDisabled: boolean; + canSelectOtherAsset: boolean; numberOfAssetsAvailable?: number; } @@ -53,7 +54,6 @@ export class ERC20AssetAmountInput extends React.Component @@ -75,11 +75,11 @@ export class ERC20AssetAmountInput extends React.Component {assetUtils.formattedSymbolForAsset(asset)} - {isEnabled && this._renderChevronIcon()} + {this.props.canSelectOtherAsset && this._renderChevronIcon()} diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts index 2c2661e1a..bbc103566 100644 --- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts +++ b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts @@ -26,6 +26,7 @@ interface ConnectedState { isDisabled: boolean; numberOfAssetsAvailable?: number; affiliateInfo?: AffiliateInfo; + canSelectOtherAsset: boolean; } interface ConnectedDispatch { @@ -50,6 +51,11 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP ? (state.selectedAsset as ERC20Asset) : undefined; const numberOfAssetsAvailable = _.isUndefined(state.availableAssets) ? undefined : state.availableAssets.length; + const canSelectOtherAsset = + numberOfAssetsAvailable && numberOfAssetsAvailable > 1 + ? isEnabled || processState === OrderProcessState.Success + : false; + const assetBuyer = state.providerState.assetBuyer; return { assetBuyer, @@ -58,6 +64,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP isDisabled, numberOfAssetsAvailable, affiliateInfo: state.affiliateInfo, + canSelectOtherAsset, }; }; @@ -104,6 +111,7 @@ const mergeProps = ( }, isDisabled: connectedState.isDisabled, numberOfAssetsAvailable: connectedState.numberOfAssetsAvailable, + canSelectOtherAsset: connectedState.canSelectOtherAsset, }; }; -- cgit From b7eb2e887d636e2ed61eade4bae01596dba4b4c2 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 20 Nov 2018 13:59:09 -0800 Subject: isDisabled -> isInputDisabled --- packages/instant/src/components/erc20_asset_amount_input.tsx | 7 ++++--- .../src/containers/selected_erc20_asset_amount_input.ts | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx index e675d3fc5..b825255c4 100644 --- a/packages/instant/src/components/erc20_asset_amount_input.tsx +++ b/packages/instant/src/components/erc20_asset_amount_input.tsx @@ -22,7 +22,7 @@ export interface ERC20AssetAmountInputProps { onSelectAssetClick?: (asset?: ERC20Asset) => void; startingFontSizePx: number; fontColor?: ColorOption; - isDisabled: boolean; + isInputDisabled: boolean; canSelectOtherAsset: boolean; numberOfAssetsAvailable?: number; } @@ -51,14 +51,15 @@ export class ERC20AssetAmountInput extends React.Component { - const { onChange, ...rest } = this.props; - const amountBorderBottom = this.props.isDisabled ? '' : `1px solid ${transparentWhite}`; + const { onChange, isInputDisabled, ...rest } = this.props; + const amountBorderBottom = isInputDisabled ? '' : `1px solid ${transparentWhite}`; const onSymbolClick = this._generateSelectAssetClickHandler(); return ( { const processState = state.buyOrderState.processState; - const isEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure; - const isDisabled = !isEnabled; + const isInputEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure; + const isInputDisabled = !isInputEnabled; const selectedAsset = !_.isUndefined(state.selectedAsset) && state.selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20 ? (state.selectedAsset as ERC20Asset) @@ -53,7 +53,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP const numberOfAssetsAvailable = _.isUndefined(state.availableAssets) ? undefined : state.availableAssets.length; const canSelectOtherAsset = numberOfAssetsAvailable && numberOfAssetsAvailable > 1 - ? isEnabled || processState === OrderProcessState.Success + ? isInputEnabled || processState === OrderProcessState.Success : false; const assetBuyer = state.providerState.assetBuyer; @@ -61,7 +61,7 @@ const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputP assetBuyer, value: state.selectedAssetUnitAmount, asset: selectedAsset, - isDisabled, + isInputDisabled, numberOfAssetsAvailable, affiliateInfo: state.affiliateInfo, canSelectOtherAsset, @@ -109,7 +109,7 @@ const mergeProps = ( onChange: (value, asset) => { connectedDispatch.updateBuyQuote(connectedState.assetBuyer, value, asset, connectedState.affiliateInfo); }, - isDisabled: connectedState.isDisabled, + isInputDisabled: connectedState.isInputDisabled, numberOfAssetsAvailable: connectedState.numberOfAssetsAvailable, canSelectOtherAsset: connectedState.canSelectOtherAsset, }; -- cgit From 1a7b167f63144df73a974250b4aa089960149505 Mon Sep 17 00:00:00 2001 From: Steve Klebanoff Date: Tue, 20 Nov 2018 14:18:12 -0800 Subject: fix(instant): Use new valid svg image for instant --- packages/instant/src/assets/powered_by_0x.svg | 42 ++++++++++----------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/packages/instant/src/assets/powered_by_0x.svg b/packages/instant/src/assets/powered_by_0x.svg index f49238a3c..e3d007d0b 100644 --- a/packages/instant/src/assets/powered_by_0x.svg +++ b/packages/instant/src/assets/powered_by_0x.svg @@ -1,27 +1,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + -- cgit From 48aec9ef472cd161434cf58c58e63227beb565c4 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 22:38:36 +0000 Subject: Update issue template --- ISSUE_TEMPLATE.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index f814c4777..591bbdbfa 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -46,10 +46,14 @@ -| Package | Version | -| ------------------: | :------ | -| `0x.js` | 0.25.0 | -| `Exchange Contract` | v1 | +| Package | Version | +| ------: | :------ | + + + | Network | | ------- | -- cgit From 4b64d8c3aad3e1fa3d807941e70f2901941c2501 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:06:46 +0000 Subject: Allow a `SimpleContractArtifact` to be passed into `deployFrom0xArtifactAsync` --- packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts | 3 ++- packages/contract_templates/contract.handlebars | 3 ++- packages/types/src/index.ts | 9 ++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index ffd498055..a04b6025e 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -3024,7 +3025,7 @@ export class ExchangeContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars index 9c1952ed4..9b2a2b336 100644 --- a/packages/contract_templates/contract.handlebars +++ b/packages/contract_templates/contract.handlebars @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -40,7 +41,7 @@ export class {{contractName}}Contract extends BaseContract { {{/this.constant}} {{/each}} public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, {{> typed_params inputs=ctor.inputs}} diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 3c9b6bbc5..fd40f361a 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,7 +1,7 @@ // tslint:disable:max-file-line-count import { BigNumber } from 'bignumber.js'; -import { ContractAbi } from 'ethereum-types'; +import { ContractAbi, ContractNetworks, StandardContractOutput } from 'ethereum-types'; // HACK: Rather then extending from OrderWithoutExchangeAddress // we don't, because our docs don't expand inherited types, and it's unnecessarily @@ -626,3 +626,10 @@ export interface EIP712TypedData { export interface Stats { orderCount: number; } + +export interface SimpleContractArtifact { + schemaVersion: string; + contractName: string; + compilerOutput: StandardContractOutput; + networks: ContractNetworks; +} -- cgit From c2ebcfb023306f0bc16aa7de225d7b7408e1de3c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:15:53 +0000 Subject: Add @0x/types to dependencies of `@0x/abi-gen-wrappers` --- packages/abi-gen-wrappers/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 7236cf6ff..a86eb7ed1 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -32,6 +32,7 @@ "devDependencies": { "@0x/abi-gen": "^1.0.16", "@0x/tslint-config": "^1.0.10", + "@0x/types": "^1.2.1", "@0x/utils": "^2.0.5", "@0x/web3-wrapper": "^3.1.4", "ethereum-types": "^1.1.2", -- cgit From 21f39079c891d3e5b4c60edc51311eb36789d18e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:42:35 +0000 Subject: Update abi-gen-wrappers --- packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts | 3 ++- packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts | 3 ++- 13 files changed, 26 insertions(+), 13 deletions(-) diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts index 8ca70e026..27f108ebc 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -1800,7 +1801,7 @@ export class AssetProxyOwnerContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, _owners: string[], diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts index 1efeeed0a..3995c6d87 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -968,7 +969,7 @@ export class DummyERC20TokenContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, _name: string, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts index cc5f9679f..a7af2d158 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -1264,7 +1265,7 @@ export class DummyERC721TokenContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, _name: string, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts index ab207b38e..474472e43 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -601,7 +602,7 @@ export class ERC20ProxyContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts index 8ee563b7e..ab208cbf5 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -508,7 +509,7 @@ export class ERC20TokenContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts index 691c55578..f9730a072 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -601,7 +602,7 @@ export class ERC721ProxyContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts index d1a2d5670..251dfa5f9 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -845,7 +846,7 @@ export class ERC721TokenContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts index 80bbc52c7..8a88431b3 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -661,7 +662,7 @@ export class ForwarderContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, _exchange: string, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts index 203a66b6d..5f38ffdac 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -60,7 +61,7 @@ export class IValidatorContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts index 99809a049..5fa6f1577 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -55,7 +56,7 @@ export class IWalletContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts index 38233af3f..ce47b76fc 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -295,7 +296,7 @@ export class OrderValidatorContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, _exchange: string, diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts index 86d1031db..12ec55ae9 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -787,7 +788,7 @@ export class WETH9Contract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts index 98079e77b..877ffd12d 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts @@ -4,6 +4,7 @@ import { BaseContract } from '@0x/base-contract'; import { BlockParam, BlockParamLiteral, CallData, ContractAbi, ContractArtifact, DecodedLogArgs, MethodAbi, Provider, TxData, TxDataPayable } from 'ethereum-types'; import { BigNumber, classUtils, logUtils } from '@0x/utils'; +import { SimpleContractArtifact } from '@0x/types'; import { Web3Wrapper } from '@0x/web3-wrapper'; import * as ethers from 'ethers'; import * as _ from 'lodash'; @@ -598,7 +599,7 @@ export class ZRXTokenContract extends BaseContract { }, }; public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact, + artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, ): Promise { -- cgit From 895281989c4c896d4494e829ae3a2403305016b6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Tue, 20 Nov 2018 23:43:05 +0000 Subject: Fix `SimpleContractArtifact` type --- packages/types/src/index.ts | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index fd40f361a..9372bfafa 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,7 +1,7 @@ // tslint:disable:max-file-line-count import { BigNumber } from 'bignumber.js'; -import { ContractAbi, ContractNetworks, StandardContractOutput } from 'ethereum-types'; +import { ContractAbi, ContractNetworks, DevdocOutput } from 'ethereum-types'; // HACK: Rather then extending from OrderWithoutExchangeAddress // we don't, because our docs don't expand inherited types, and it's unnecessarily @@ -630,6 +630,20 @@ export interface Stats { export interface SimpleContractArtifact { schemaVersion: string; contractName: string; - compilerOutput: StandardContractOutput; + compilerOutput: SimpleStandardContractOutput; networks: ContractNetworks; } + +export interface SimpleStandardContractOutput { + abi: ContractAbi; + evm: SimpleEvmOutput; + devdoc?: DevdocOutput; +} + +export interface SimpleEvmOutput { + bytecode: SimpleEvmBytecodeOutput; +} + +export interface SimpleEvmBytecodeOutput { + object: string; +} -- cgit From 0244d04a55ede1a2ccde4b94ab340fd82c5ded3e Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 00:11:25 +0000 Subject: Fix prettier --- packages/types/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 9372bfafa..1a86f45e6 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -641,7 +641,7 @@ export interface SimpleStandardContractOutput { } export interface SimpleEvmOutput { - bytecode: SimpleEvmBytecodeOutput; + bytecode: SimpleEvmBytecodeOutput; } export interface SimpleEvmBytecodeOutput { -- cgit From 716168132a82f66724ac0844990a2af5289dcf9d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 10:39:10 +0000 Subject: Add CHANGELOG entry --- packages/abi-gen-wrappers/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index fff2bc41e..b55ee9867 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "1.1.0", + "changes": [ + { + "note": + "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", + "pr": 1298 + } + ] + }, { "timestamp": 1542208198, "version": "1.0.5", -- cgit From 2821bac3a3199fd9d4b99b97cdc69376ca8bff58 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 10:44:20 +0000 Subject: Add additional CHANGELOG to types package --- packages/types/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index 6d9f83c57..ecab7e9d6 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "1.3.0", + "changes": [ + { + "note": + "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package", + "pr": 1298 + } + ] + }, { "version": "1.2.1", "changes": [ -- cgit From db26ca977f56468e1ce7dbb30ed38e537912e545 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:47:24 +0000 Subject: Create migrations doc reference page --- package.json | 2 +- packages/migrations/package.json | 9 ++- packages/migrations/src/index.ts | 2 + packages/migrations/typedoc-tsconfig.json | 7 +++ .../website/md/docs/migrations/1/installation.md | 17 ++++++ .../website/md/docs/migrations/1/introduction.md | 1 + .../ts/containers/migrations_documentation.ts | 66 ++++++++++++++++++++++ packages/website/ts/index.tsx | 7 +++ .../website/ts/pages/documentation/doc_page.tsx | 1 + packages/website/ts/types.ts | 2 + 10 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 packages/migrations/typedoc-tsconfig.json create mode 100644 packages/website/md/docs/migrations/1/installation.md create mode 100644 packages/website/md/docs/migrations/1/introduction.md create mode 100644 packages/website/ts/containers/migrations_documentation.ts diff --git a/package.json b/package.json index 801657f5d..8b74aad67 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ }, "config": { "mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic", - "packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-cov ethereum-types asset-buyer" + "packagesWithDocPages": "0x.js connect json-schemas subproviders web3-wrapper contract-wrappers order-utils order-watcher sol-compiler sol-cov ethereum-types asset-buyer migrations" }, "bundlewatch": { "files": [ diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 8eaae96ba..688df5f04 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -13,7 +13,13 @@ "clean": "shx rm -rf lib", "lint": "tslint --format stylish --project .", "migrate:v2": "run-s build script:migrate:v2", - "script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0" + "script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0", + "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" + }, + "config": { + "postpublish": { + "assets": [] + } }, "license": "Apache-2.0", "devDependencies": { @@ -25,6 +31,7 @@ "npm-run-all": "^4.1.2", "shx": "^0.2.2", "tslint": "5.11.0", + "typedoc": "0.13.0", "typescript": "3.0.1", "yargs": "^10.0.3" }, diff --git a/packages/migrations/src/index.ts b/packages/migrations/src/index.ts index 8f629a24b..cfd41040a 100644 --- a/packages/migrations/src/index.ts +++ b/packages/migrations/src/index.ts @@ -1 +1,3 @@ +export { Provider, TxData, JSONRPCRequestPayload, JSONRPCErrorCallback, TxDataPayable, JSONRPCResponsePayload, JSONRPCResponseError } from 'ethereum-types'; +export { ContractAddresses } from '@0x/contract-addresses'; export { runMigrationsAsync, runMigrationsOnceAsync } from './migration'; diff --git a/packages/migrations/typedoc-tsconfig.json b/packages/migrations/typedoc-tsconfig.json new file mode 100644 index 000000000..c9b0af1ae --- /dev/null +++ b/packages/migrations/typedoc-tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../typedoc-tsconfig", + "compilerOptions": { + "outDir": "lib" + }, + "include": ["./src/**/*", "./test/**/*"] +} diff --git a/packages/website/md/docs/migrations/1/installation.md b/packages/website/md/docs/migrations/1/installation.md new file mode 100644 index 000000000..78403037b --- /dev/null +++ b/packages/website/md/docs/migrations/1/installation.md @@ -0,0 +1,17 @@ +**Install** + +```bash +yarn add @0x/migrations +``` + +**Import** + +```javascript +import { runMigrationsAsync } from '@0x/migrations'; +``` + +or + +```javascript +var runMigrationsAsync = require('@0x/migrations').runMigrationsAsync; +``` diff --git a/packages/website/md/docs/migrations/1/introduction.md b/packages/website/md/docs/migrations/1/introduction.md new file mode 100644 index 000000000..82ae3a0ab --- /dev/null +++ b/packages/website/md/docs/migrations/1/introduction.md @@ -0,0 +1 @@ +Welcome to the [@0x/migrations](https://github.com/0xProject/0x-monorepo/tree/development/packages/migrations) documentation! This package is intended for developers who would like to deploy the 0x protocol system of smart contracts to a custom testnet. If you want to test against existing testnets, check out our pre-deployed [Ganache snapshot](https://0xproject.com/wiki#Ganache-Setup-Guide) or where 0x is already deployed on [popular testnets](https://0xproject.com/wiki#Deployed-Addresses). diff --git a/packages/website/ts/containers/migrations_documentation.ts b/packages/website/ts/containers/migrations_documentation.ts new file mode 100644 index 000000000..02919e06e --- /dev/null +++ b/packages/website/ts/containers/migrations_documentation.ts @@ -0,0 +1,66 @@ +import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs'; +import * as React from 'react'; +import { connect } from 'react-redux'; +import { Dispatch } from 'redux'; +import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page'; +import { Dispatcher } from 'ts/redux/dispatcher'; +import { State } from 'ts/redux/reducer'; +import { DocPackages, ScreenWidths } from 'ts/types'; +import { Translate } from 'ts/utils/translate'; + +/* tslint:disable:no-var-requires */ +const IntroMarkdown1 = require('md/docs/migrations/1/introduction'); +const InstallationMarkdown1 = require('md/docs/migrations/1/installation'); +/* tslint:enable:no-var-requires */ + +const markdownSections = { + introduction: 'introduction', + installation: 'installation', +}; + +const docsInfoConfig: DocsInfoConfig = { + id: DocPackages.Migrations, + packageName: '@0x/migrations', + type: SupportedDocJson.TypeDoc, + displayName: 'Migrations', + packageUrl: 'https://github.com/0xProject/0x-monorepo', + markdownMenu: { + 'getting-started': [markdownSections.introduction, markdownSections.installation], + }, + sectionNameToMarkdownByVersion: { + '2.0.4': { + [markdownSections.introduction]: IntroMarkdown1, + [markdownSections.installation]: InstallationMarkdown1, + }, + }, + markdownSections, +}; +const docsInfo = new DocsInfo(docsInfoConfig); + +interface ConnectedState { + docsVersion: string; + availableDocVersions: string[]; + docsInfo: DocsInfo; + translate: Translate; + screenWidth: ScreenWidths; +} + +interface ConnectedDispatch { + dispatcher: Dispatcher; +} + +const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({ + docsVersion: state.docsVersion, + availableDocVersions: state.availableDocVersions, + translate: state.translate, + docsInfo, + screenWidth: state.screenWidth, +}); + +const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ + dispatcher: new Dispatcher(dispatch), +}); + +export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( + DocPageComponent, +); diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 96e7184f8..faf7d8c87 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -40,6 +40,9 @@ const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () => import(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'), ); +const LazyMigrationsDocumentation = createLazyComponent('Documentation', async () => + import(/* webpackChunkName: "migrationsDocs" */ 'ts/containers/migrations_documentation'), +); const LazyOrderWatcherDocumentation = createLazyComponent('Documentation', async () => import(/* webpackChunkName: "orderWatcherDocs" */ 'ts/containers/order_watcher_documentation'), ); @@ -102,6 +105,10 @@ render( path={`${WebsitePaths.ContractWrappers}/:version?`} component={LazyContractWrappersDocumentation} /> + Date: Wed, 21 Nov 2018 11:47:45 +0000 Subject: Add migrations, contract-addresses and contract-artifacts to Developers home --- .../website/ts/pages/documentation/docs_home.tsx | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx index e3328f3fa..f68d2892f 100644 --- a/packages/website/ts/pages/documentation/docs_home.tsx +++ b/packages/website/ts/pages/documentation/docs_home.tsx @@ -107,6 +107,14 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { to: WebsitePaths.ContractWrappers, }, }, + { + description: + "A package to deploy the 0x protocol's system of smart contracts to the testnet of your choice", + link: { + title: '@0x/migrations', + to: WebsitePaths.Migrations, + }, + }, { description: 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)', @@ -131,6 +139,23 @@ const CATEGORY_TO_PACKAGES: ObjectMap = { to: WebsitePaths.OrderWatcher, }, }, + { + description: + 'A tiny utility library for getting known deployed contract addresses for a particular network.', + link: { + title: '@0x/contract-addresses', + to: 'https://www.npmjs.com/package/@0x/contract-addresses', + shouldOpenInNewTab: true, + }, + }, + { + description: 'Smart contract compilation artifacts for the latest version of the 0x protocol.', + link: { + title: '@0x/contract-artifacts', + to: 'https://www.npmjs.com/package/@0x/contract-artifacts', + shouldOpenInNewTab: true, + }, + }, { description: 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.', -- cgit From a90be44c9fe8dd64d4d5d182658deb7b740504f8 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:48:07 +0000 Subject: Improve comments --- packages/migrations/src/migration.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 86c76a54b..570f18408 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -11,10 +11,9 @@ import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info'; /** * Creates and deploys all the contracts that are required for the latest - * version of the 0x protocol. Custom migrations can be defined here. This will - * be called with the CLI 'migrate:v2' command. - * @param provider Web3 provider instance. - * @param txDefaults Default transaction values to use when deploying contracts. + * version of the 0x protocol. + * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to. + * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter). * @returns The addresses of the contracts that were deployed. */ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial): Promise { -- cgit From baf69a60ebe14b525479d2824c62080589e0ad16 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:53:50 +0000 Subject: Fix additional comments --- packages/migrations/src/migration.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 570f18408..61ac56938 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -158,8 +158,8 @@ let _cachedContractAddresses: ContractAddresses; * Exactly like runMigrationsAsync but will only run the migrations the first * time it is called. Any subsequent calls will return the cached contract * addresses. - * @param provider Web3 provider instance. - * @param txDefaults Default transaction values to use when deploying contracts. + * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to. + * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter). * @returns The addresses of the contracts that were deployed. */ export async function runMigrationsOnceAsync( -- cgit From 39429dde6842d7507cf88abcc120b34eeb4aec32 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:54:24 +0000 Subject: Add CHANGELOG entry --- packages/migrations/CHANGELOG.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index 5b0d58909..0056a3166 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,14 @@ [ + { + "version": "2.1.0", + "changes": [ + { + "note": + "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping", + "pr": 1301 + } + ] + }, { "timestamp": 1542208198, "version": "2.0.4", -- cgit From e2b3c98d25cdb9ba37c5a6c84a566a5577648932 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 11:56:45 +0000 Subject: remove unused flag --- packages/migrations/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/migrations/package.json b/packages/migrations/package.json index 688df5f04..04503c0b2 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -13,7 +13,7 @@ "clean": "shx rm -rf lib", "lint": "tslint --format stylish --project .", "migrate:v2": "run-s build script:migrate:v2", - "script:migrate:v2": "node ./lib/migrate.js --contracts-version 2.0.0", + "script:migrate:v2": "node ./lib/migrate.js", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES" }, "config": { -- cgit From 61b3305af3a7a599f83370aa8ebe8157738506fb Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 13:26:58 +0000 Subject: Fix prettier --- packages/migrations/src/index.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/migrations/src/index.ts b/packages/migrations/src/index.ts index cfd41040a..4f22c30b9 100644 --- a/packages/migrations/src/index.ts +++ b/packages/migrations/src/index.ts @@ -1,3 +1,11 @@ -export { Provider, TxData, JSONRPCRequestPayload, JSONRPCErrorCallback, TxDataPayable, JSONRPCResponsePayload, JSONRPCResponseError } from 'ethereum-types'; +export { + Provider, + TxData, + JSONRPCRequestPayload, + JSONRPCErrorCallback, + TxDataPayable, + JSONRPCResponsePayload, + JSONRPCResponseError, +} from 'ethereum-types'; export { ContractAddresses } from '@0x/contract-addresses'; export { runMigrationsAsync, runMigrationsOnceAsync } from './migration'; -- cgit From edf07d9b5b2be0384cf1adb53023845662f9c5e4 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 15:13:58 +0000 Subject: Improve top-level README --- README.md | 119 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/README.md b/README.md index 90810f089..e3ac633b9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ --- -[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. A full description of the protocol may be found in our [whitepaper][whitepaper-url]. +[0x][website-url] is an open protocol that facilitates trustless, low friction exchange of Ethereum-based assets. For more information on how it works, check out the [0x protocol specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md). This repository is a monorepo including the 0x protocol smart contracts and numerous developer tools. Each public sub-package is independently published to NPM. @@ -18,71 +18,72 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t [![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -### Published Packages - -#### TypeScript/JavaScript - -| Package | Version | Description | -| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | -| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | A Javascript library for interacting with the 0x protocol | -| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs | -| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using @0x/abi-gen | -| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages | -| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether | -| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts | -| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | A Javascript library for interacting with the Standard Relayer API | -| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | Used to get known addresses of deployed 0x contracts | -| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts | -| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | Smart TS wrappers for 0x smart contracts | -| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x projects and packages | -| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generation | -| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related json schemas | -| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | 0x smart contract migrations | -| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders | -| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity | -| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & Doxity generated JSON | -| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components | -| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A thin wrapper around Solc.js that outputs artifacts, resolves imports, only re-compiles when needed, and other niceties | -| [`@0x/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | Solidity test coverage tool | -| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator | -| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies | -| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the standard relayer API | -| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Useful web3 subproviders (e.g. LedgerSubprovider) | -| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom 0x development TSLint rules | -| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations | -| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages | -| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities | -| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | Web3 wrapper | - -#### Python +# Packages + +### Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below. + +## Typescript/Javascript Packages + +### 0x-specific packages + +| Package | Version | Description | +| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | +| [`0x.js`](/packages/0x.js) | [![npm](https://img.shields.io/npm/v/0x.js.svg)](https://www.npmjs.com/package/0x.js) | An aggregate package combining many smaller utility packages for interacting with the 0x protocol | +| [`@0x/contract-addresses`](/packages/contract-addresses) | [![npm](https://img.shields.io/npm/v/@0x/contract-addresses.svg)](https://www.npmjs.com/package/@0x/contract-addresses) | A tiny utility library for getting known deployed contract addresses for a particular network. | +| [`@0x/contract-wrappers`](/packages/contract-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/contract-wrappers.svg)](https://www.npmjs.com/package/@0x/contract-wrappers) | JS/TS wrappers for interacting with the 0x smart contracts | +| [`@0x/order-utils`](/packages/order-utils) | [![npm](https://img.shields.io/npm/v/@0x/order-utils.svg)](https://www.npmjs.com/package/@0x/order-utils) | A set of utilities for generating, parsing, signing and validating 0x orders | +| [`@0x/json-schemas`](/packages/json-schemas) | [![npm](https://img.shields.io/npm/v/@0x/json-schemas.svg)](https://www.npmjs.com/package/@0x/json-schemas) | 0x-related JSON schemas | +| [`@0x/order-watcher`](/packages/order-watcher) | [![npm](https://img.shields.io/npm/v/@0x/order-watcher.svg)](https://www.npmjs.com/package/@0x/order-watcher) | An order watcher daemon that watches for order validity | +| [`@0x/migrations`](/packages/migrations) | [![npm](https://img.shields.io/npm/v/@0x/migrations.svg)](https://www.npmjs.com/package/@0x/migrations) | Migration tool for deploying 0x smart contracts on private testnets | +| [`@0x/contract-artifacts`](/packages/contract-artifacts) | [![npm](https://img.shields.io/npm/v/@0x/contract-artifacts.svg)](https://www.npmjs.com/package/@0x/contract-artifacts) | 0x smart contract compilation artifacts | +| [`@0x/abi-gen-wrappers`](/packages/abi-gen-wrappers) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen-wrappers.svg)](https://www.npmjs.com/package/@0x/abi-gen-wrappers) | Low-level 0x smart contract wrappers generated using `@0x/abi-gen` | +| [`@0x/sra-spec`](/packages/sra-spec) | [![npm](https://img.shields.io/npm/v/@0x/sra-spec.svg)](https://www.npmjs.com/package/@0x/sra-spec) | OpenAPI specification for the Standard Relayer API | +| [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | An HTTP/WS client for interacting with the Standard Relayer API | +| [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether | + +### Ethereum tooling + +| Package | Version | Description | +| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | An Ethereum JSON RPC client | +| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. | +| [`@0x/sol-cov`](/packages/sol-cov) | [![npm](https://img.shields.io/npm/v/@0x/sol-cov.svg)](https://www.npmjs.com/package/@0x/sol-cov) | A solidity test coverage tool | +| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies | +| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) | +| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator | + +### Utilities + +| Package | Version | Description | +| -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| [`@0x/abi-gen`](/packages/abi-gen) | [![npm](https://img.shields.io/npm/v/@0x/abi-gen.svg)](https://www.npmjs.com/package/@0x/abi-gen) | Tool to generate TS wrappers from smart contract ABIs | +| [`@0x/tslint-config`](/packages/tslint-config) | [![npm](https://img.shields.io/npm/v/@0x/tslint-config.svg)](https://www.npmjs.com/package/@0x/tslint-config) | Custom TSLint rules used by the 0x core team | +| [`@0x/types`](/packages/types) | [![npm](https://img.shields.io/npm/v/@0x/types.svg)](https://www.npmjs.com/package/@0x/types) | Shared type declarations | +| [`@0x/typescript-typings`](/packages/typescript-typings) | [![npm](https://img.shields.io/npm/v/@0x/typescript-typings.svg)](https://www.npmjs.com/package/@0x/typescript-typings) | Repository of types for external packages | +| [`@0x/utils`](/packages/utils) | [![npm](https://img.shields.io/npm/v/@0x/utils.svg)](https://www.npmjs.com/package/@0x/utils) | Shared utilities | +| [`@0x/react-docs`](/packages/react-docs) | [![npm](https://img.shields.io/npm/v/@0x/react-docs.svg)](https://www.npmjs.com/package/@0x/react-docs) | React documentation component for rendering TypeDoc & sol-doc generated JSON | +| [`@0x/react-shared`](/packages/react-shared) | [![npm](https://img.shields.io/npm/v/@0x/react-shared.svg)](https://www.npmjs.com/package/@0x/react-shared) | 0x shared react components | +| [`@0x/assert`](/packages/assert) | [![npm](https://img.shields.io/npm/v/@0x/assert.svg)](https://www.npmjs.com/package/@0x/assert) | Type and schema assertions used by our packages | +| [`@0x/base-contract`](/packages/base-contract) | [![npm](https://img.shields.io/npm/v/@0x/base-contract.svg)](https://www.npmjs.com/package/@0x/base-contract) | BaseContract used by auto-generated `abi-gen` wrapper contracts | +| [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages | +| [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generator | + +### Private Packages + +| Package | Description | +| -------------------------------------------------- | ---------------------------------------------------------------- | +| [`@0x/contracts`](/packages/contracts) | 0x protocol solidity smart contracts & tests | +| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | +| [`@0x/website`](/packages/website) | 0x website | + +## Python Packages | Package | Version | Description | | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | | [`0x-order-utils.py`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders | -### Private Packages - -| Package | Description | -| -------------------------------------------------------- | ---------------------------------------------------------------- | -| [`@0x/contracts`](/packages/contracts) | 0x solidity smart contracts & tests | -| [`@0x/react-docs-example`](/packages/react-docs-example) | Example documentation site created with `@0x/react-docs` | -| [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | -| [`@0x/website`](/packages/website) | 0x website & Portal DApp | - ## Usage -Dedicated documentation pages: - -* [0x.js Library](https://0xproject.com/docs/0xjs) -* [0x Connect](https://0xproject.com/docs/connect) -* [Smart contracts](https://0xproject.com/docs/contracts) -* [Subproviders](https://0xproject.com/docs/subproviders) -* [Sol Compiler](https://0xproject.com/docs/sol-compiler) -* [Web3-wrapper](https://0xproject.com/docs/web3-wrapper) -* [JSON-schemas](https://0xproject.com/docs/json-schemas) -* [Sol-cov](https://0xproject.com/docs/sol-cov) -* [Standard Relayer API](https://github.com/0xProject/standard-relayer-api/blob/master/README.md) - Node version >= 6.12 is required. Most of the packages require additional typings for external dependencies. -- cgit From 36974a95573279e9d39cbef8ba1826543990f1a6 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 15:16:26 +0000 Subject: reduce text side in README --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index e3ac633b9..458e24bca 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,11 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t # Packages -### Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below. +Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below. -## Typescript/Javascript Packages +### Typescript/Javascript Packages -### 0x-specific packages +#### 0x-specific packages | Package | Version | Description | | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | @@ -41,7 +41,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t | [`@0x/connect`](/packages/connect) | [![npm](https://img.shields.io/npm/v/@0x/connect.svg)](https://www.npmjs.com/package/@0x/connect) | An HTTP/WS client for interacting with the Standard Relayer API | | [`@0x/asset-buyer`](/packages/asset-buyer) | [![npm](https://img.shields.io/npm/v/@0x/asset-buyer.svg)](https://www.npmjs.com/package/@0x/asset-buyer) | Convenience package for discovering and buying assets with Ether | -### Ethereum tooling +#### Ethereum tooling | Package | Version | Description | | -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -52,7 +52,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t | [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) | | [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator | -### Utilities +#### Utilities | Package | Version | Description | | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | @@ -68,7 +68,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t | [`@0x/dev-utils`](/packages/dev-utils) | [![npm](https://img.shields.io/npm/v/@0x/dev-utils.svg)](https://www.npmjs.com/package/@0x/dev-utils) | Dev utils to be shared across 0x packages | | [`@0x/fill-scenarios`](/packages/fill-scenarios) | [![npm](https://img.shields.io/npm/v/@0x/fill-scenarios.svg)](https://www.npmjs.com/package/@0x/fill-scenarios) | 0x order fill scenario generator | -### Private Packages +#### Private Packages | Package | Description | | -------------------------------------------------- | ---------------------------------------------------------------- | @@ -76,7 +76,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t | [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | | [`@0x/website`](/packages/website) | 0x website | -## Python Packages +### Python Packages | Package | Version | Description | | --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -- cgit From f27fef0295243eeb85498ee09810a2f56afd88bd Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 15:17:04 +0000 Subject: Reduce title size --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 458e24bca..d30a7332e 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t [![Join the chat at https://gitter.im/0xProject/Lobby](https://badges.gitter.im/0xProject/Lobby.svg)](https://gitter.im/0xProject/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) -# Packages +## Packages Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below. -- cgit From 8ea2eb9102058a03d96e488507c71db0cc082356 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 17:05:11 +0000 Subject: Put python package above TS/JS packages --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index d30a7332e..421299371 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,12 @@ If you're developing on 0x now or are interested in using 0x infrastructure in t Visit our [developer portal](https://0xproject.com/docs/order-utils) for a comprehensive list of core & community maintained packages. All packages maintained with this monorepo are listed below. +### Python Packages + +| Package | Version | Description | +| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| [`0x-order-utils.py`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders | + ### Typescript/Javascript Packages #### 0x-specific packages @@ -76,12 +82,6 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr | [`@0x/testnet-faucets`](/packages/testnet-faucets) | A faucet micro-service that dispenses test ERC20 tokens or Ether | | [`@0x/website`](/packages/website) | 0x website | -### Python Packages - -| Package | Version | Description | -| --------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | -| [`0x-order-utils.py`](/python-packages/order_utils) | [![PyPI](https://img.shields.io/pypi/v/0x-order-utils.svg)](https://pypi.org/project/0x-order-utils/) | A set of utilities for generating, parsing, signing and validating 0x orders | - ## Usage Node version >= 6.12 is required. -- cgit From 71d15a68c1ca5de2055ad8c1ad9fc47608022a53 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 17:27:27 +0000 Subject: immediately return the patch incremented version if no changelog entries exist --- packages/monorepo-scripts/src/utils/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts index 44ff971e8..95b187cc2 100644 --- a/packages/monorepo-scripts/src/utils/utils.ts +++ b/packages/monorepo-scripts/src/utils/utils.ts @@ -91,6 +91,7 @@ export const utils = { const changelog = changelogUtils.getChangelogOrCreateIfMissing(packageName, packageLocation); if (_.isEmpty(changelog)) { nextVersionIfValid = semver.inc(currentVersion, 'patch'); + return nextVersionIfValid as string; } const lastEntry = changelog[0]; if (semver.gt(currentVersion, lastEntry.version)) { -- cgit From 68c15de8908b1e8eb8f04d26301fec62ed2af1c1 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 17:27:40 +0000 Subject: print out error message and stack --- packages/monorepo-scripts/src/prepublish_checks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts index fc550cf3a..60cdccf1d 100644 --- a/packages/monorepo-scripts/src/prepublish_checks.ts +++ b/packages/monorepo-scripts/src/prepublish_checks.ts @@ -195,6 +195,6 @@ const checkRequiredEnvVariables = () => { }; prepublishChecksAsync().catch(err => { - utils.log(err.message); + utils.log(err); process.exit(1); }); -- cgit From 707af1ec583dfbe76a8e240bd294689020fcd866 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 21:09:37 +0000 Subject: Updated CHANGELOGS --- packages/0x.js/CHANGELOG.json | 9 +++++++++ packages/0x.js/CHANGELOG.md | 4 ++++ packages/abi-gen-wrappers/CHANGELOG.json | 3 ++- packages/abi-gen-wrappers/CHANGELOG.md | 4 ++++ packages/abi-gen/CHANGELOG.json | 9 +++++++++ packages/abi-gen/CHANGELOG.md | 4 ++++ packages/assert/CHANGELOG.json | 9 +++++++++ packages/assert/CHANGELOG.md | 4 ++++ packages/asset-buyer/CHANGELOG.json | 3 ++- packages/asset-buyer/CHANGELOG.md | 4 ++++ packages/base-contract/CHANGELOG.json | 9 +++++++++ packages/base-contract/CHANGELOG.md | 4 ++++ packages/connect/CHANGELOG.json | 9 +++++++++ packages/connect/CHANGELOG.md | 4 ++++ packages/contract-addresses/CHANGELOG.json | 3 ++- packages/contract-addresses/CHANGELOG.md | 4 ++++ packages/contract-wrappers/CHANGELOG.json | 3 ++- packages/contract-wrappers/CHANGELOG.md | 4 ++++ packages/dev-utils/CHANGELOG.json | 9 +++++++++ packages/dev-utils/CHANGELOG.md | 4 ++++ packages/fill-scenarios/CHANGELOG.json | 9 +++++++++ packages/fill-scenarios/CHANGELOG.md | 4 ++++ packages/instant/CHANGELOG.json | 12 +++++++++++- packages/instant/CHANGELOG.md | 9 +++++++++ packages/json-schemas/CHANGELOG.json | 9 +++++++++ packages/json-schemas/CHANGELOG.md | 4 ++++ packages/migrations/CHANGELOG.json | 3 ++- packages/migrations/CHANGELOG.md | 4 ++++ packages/order-utils/CHANGELOG.json | 9 +++++++++ packages/order-utils/CHANGELOG.md | 4 ++++ packages/order-watcher/CHANGELOG.json | 9 +++++++++ packages/order-watcher/CHANGELOG.md | 4 ++++ packages/react-docs/CHANGELOG.json | 9 +++++++++ packages/react-docs/CHANGELOG.md | 4 ++++ packages/react-shared/CHANGELOG.json | 9 +++++++++ packages/react-shared/CHANGELOG.md | 4 ++++ packages/sol-compiler/CHANGELOG.json | 9 +++++++++ packages/sol-compiler/CHANGELOG.md | 4 ++++ packages/sol-cov/CHANGELOG.json | 9 +++++++++ packages/sol-cov/CHANGELOG.md | 4 ++++ packages/sol-doc/CHANGELOG.json | 9 +++++++++ packages/sol-doc/CHANGELOG.md | 4 ++++ packages/sol-resolver/CHANGELOG.json | 9 +++++++++ packages/sol-resolver/CHANGELOG.md | 4 ++++ packages/sra-spec/CHANGELOG.json | 9 +++++++++ packages/sra-spec/CHANGELOG.md | 4 ++++ packages/subproviders/CHANGELOG.json | 9 +++++++++ packages/subproviders/CHANGELOG.md | 4 ++++ packages/types/CHANGELOG.json | 3 ++- packages/types/CHANGELOG.md | 4 ++++ packages/utils/CHANGELOG.json | 9 +++++++++ packages/utils/CHANGELOG.md | 4 ++++ packages/web3-wrapper/CHANGELOG.json | 3 ++- packages/web3-wrapper/CHANGELOG.md | 5 +++++ 54 files changed, 310 insertions(+), 8 deletions(-) diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json index 0321ee200..9ff4183e7 100644 --- a/packages/0x.js/CHANGELOG.json +++ b/packages/0x.js/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.0.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "2.0.4", diff --git a/packages/0x.js/CHANGELOG.md b/packages/0x.js/CHANGELOG.md index 2467311bf..1f40bca7a 100644 --- a/packages/0x.js/CHANGELOG.md +++ b/packages/0x.js/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.0.5 - _November 21, 2018_ + + * Dependencies updated + ## v2.0.4 - _November 14, 2018_ * Dependencies updated diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index b55ee9867..955b8220f 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -7,7 +7,8 @@ "`deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface", "pr": 1298 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/abi-gen-wrappers/CHANGELOG.md b/packages/abi-gen-wrappers/CHANGELOG.md index 4dea965f1..7d359f07b 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.md +++ b/packages/abi-gen-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.1.0 - _November 21, 2018_ + + * `deployFrom0xArtifactAsync` additionally accepts artifacts that conform to the `SimpleContractArtifact` interface (#1298) + ## v1.0.5 - _November 14, 2018_ * Dependencies updated diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json index 1735c6b53..2b4455bed 100644 --- a/packages/abi-gen/CHANGELOG.json +++ b/packages/abi-gen/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.17", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.16", diff --git a/packages/abi-gen/CHANGELOG.md b/packages/abi-gen/CHANGELOG.md index 23e2f8914..f939199fd 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.17 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.16 - _November 14, 2018_ * Dependencies updated diff --git a/packages/assert/CHANGELOG.json b/packages/assert/CHANGELOG.json index 2b4a3e7a1..2b3fc68a4 100644 --- a/packages/assert/CHANGELOG.json +++ b/packages/assert/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.18", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.17", diff --git a/packages/assert/CHANGELOG.md b/packages/assert/CHANGELOG.md index 66f0971c1..017b1c6ef 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.18 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.17 - _November 14, 2018_ * Dependencies updated diff --git a/packages/asset-buyer/CHANGELOG.json b/packages/asset-buyer/CHANGELOG.json index 394f29ff6..b7a83ccfc 100644 --- a/packages/asset-buyer/CHANGELOG.json +++ b/packages/asset-buyer/CHANGELOG.json @@ -6,7 +6,8 @@ "note": "Dependencies updated", "pr": 1276 } - ] + ], + "timestamp": 1542821676 }, { "version": "3.0.0", diff --git a/packages/asset-buyer/CHANGELOG.md b/packages/asset-buyer/CHANGELOG.md index d6013e53e..20702a531 100644 --- a/packages/asset-buyer/CHANGELOG.md +++ b/packages/asset-buyer/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.1 - _November 21, 2018_ + + * Dependencies updated (#1276) + ## v3.0.0 - _November 14, 2018_ * update `getBuyQuoteAsync` to return eth spent on assets instead of per unit amount (#1252) diff --git a/packages/base-contract/CHANGELOG.json b/packages/base-contract/CHANGELOG.json index dc30ac076..66633136c 100644 --- a/packages/base-contract/CHANGELOG.json +++ b/packages/base-contract/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "3.0.7", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "3.0.6", diff --git a/packages/base-contract/CHANGELOG.md b/packages/base-contract/CHANGELOG.md index cf1b80b6d..35032fc9f 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.7 - _November 21, 2018_ + + * Dependencies updated + ## v3.0.6 - _November 14, 2018_ * Dependencies updated diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json index 6960e1d97..db9d8c92a 100644 --- a/packages/connect/CHANGELOG.json +++ b/packages/connect/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "3.0.7", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "3.0.6", diff --git a/packages/connect/CHANGELOG.md b/packages/connect/CHANGELOG.md index 13afad09b..5e4013322 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.7 - _November 21, 2018_ + + * Dependencies updated + ## v3.0.6 - _November 14, 2018_ * Dependencies updated diff --git a/packages/contract-addresses/CHANGELOG.json b/packages/contract-addresses/CHANGELOG.json index 86c6a5c31..e65351c7e 100644 --- a/packages/contract-addresses/CHANGELOG.json +++ b/packages/contract-addresses/CHANGELOG.json @@ -5,7 +5,8 @@ { "note": "Rinkeby Deployment" } - ] + ], + "timestamp": 1542821676 }, { "version": "1.1.0", diff --git a/packages/contract-addresses/CHANGELOG.md b/packages/contract-addresses/CHANGELOG.md index 20e52cd8b..9801831f7 100644 --- a/packages/contract-addresses/CHANGELOG.md +++ b/packages/contract-addresses/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.2.0 - _November 21, 2018_ + + * Rinkeby Deployment + ## v1.1.0 - _November 9, 2018_ * Update Forwarder addresses (#1192) diff --git a/packages/contract-wrappers/CHANGELOG.json b/packages/contract-wrappers/CHANGELOG.json index 1ea966fc6..711ab49a1 100644 --- a/packages/contract-wrappers/CHANGELOG.json +++ b/packages/contract-wrappers/CHANGELOG.json @@ -7,7 +7,8 @@ "Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount", "pr": 1292 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/contract-wrappers/CHANGELOG.md b/packages/contract-wrappers/CHANGELOG.md index eca1b4633..201c65a4c 100644 --- a/packages/contract-wrappers/CHANGELOG.md +++ b/packages/contract-wrappers/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v4.1.0 - _November 21, 2018_ + + * Add a `nonce` field for `TxOpts` so that it's now possible to re-broadcast stuck transactions with a higher gas amount (#1292) + ## v4.0.2 - _November 14, 2018_ * Dependencies updated diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json index d6cdd1c5a..4f47f0f45 100644 --- a/packages/dev-utils/CHANGELOG.json +++ b/packages/dev-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.18", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.17", diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md index 4becadf81..3ab8192c7 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.18 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.17 - _November 14, 2018_ * Dependencies updated diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json index deeae5f5d..f83a6612d 100644 --- a/packages/fill-scenarios/CHANGELOG.json +++ b/packages/fill-scenarios/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.13", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.12", diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md index c8bd402de..3c39e1650 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.13 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.12 - _November 14, 2018_ * Dependencies updated diff --git a/packages/instant/CHANGELOG.json b/packages/instant/CHANGELOG.json index fe51488c7..db187140f 100644 --- a/packages/instant/CHANGELOG.json +++ b/packages/instant/CHANGELOG.json @@ -1 +1,11 @@ -[] +[ + { + "timestamp": 1542821676, + "version": "1.0.1", + "changes": [ + { + "note": "Dependencies updated" + } + ] + } +] diff --git a/packages/instant/CHANGELOG.md b/packages/instant/CHANGELOG.md index 8b1378917..c8be0c644 100644 --- a/packages/instant/CHANGELOG.md +++ b/packages/instant/CHANGELOG.md @@ -1 +1,10 @@ + +CHANGELOG + +## v1.0.1 - _November 21, 2018_ + + * Dependencies updated diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json index bf815e523..17cabc473 100644 --- a/packages/json-schemas/CHANGELOG.json +++ b/packages/json-schemas/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.1.2", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "2.1.1", diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md index dc412bded..2f39c9596 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.1.2 - _November 21, 2018_ + + * Dependencies updated + ## v2.1.1 - _November 14, 2018_ * Dependencies updated diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index 0056a3166..dea87b477 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -7,7 +7,8 @@ "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping", "pr": 1301 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md index 87d0b25ca..986e224b0 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.1.0 - _November 21, 2018_ + + * Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping (#1301) + ## v2.0.4 - _November 14, 2018_ * Dependencies updated diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index 55e7defda..a4f5dc622 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "3.0.3", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "3.0.2", diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md index edf1569a7..b863cbc03 100644 --- a/packages/order-utils/CHANGELOG.md +++ b/packages/order-utils/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v3.0.3 - _November 21, 2018_ + + * Dependencies updated + ## v3.0.2 - _November 14, 2018_ * Dependencies updated diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json index b4d7a1501..ca2de9831 100644 --- a/packages/order-watcher/CHANGELOG.json +++ b/packages/order-watcher/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.2.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "2.2.4", "changes": [ diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md index c7003f759..7ae47fdda 100644 --- a/packages/order-watcher/CHANGELOG.md +++ b/packages/order-watcher/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.2.5 - _November 21, 2018_ + + * Dependencies updated + ## v2.2.4 - _November 14, 2018_ * Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX (#1259) diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json index 0e9afc32a..cecc270eb 100644 --- a/packages/react-docs/CHANGELOG.json +++ b/packages/react-docs/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.19", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.18", diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index db574e41b..f0a56191d 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.19 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.18 - _November 14, 2018_ * Dependencies updated diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json index cb8ae1bf0..bcbf2d9f9 100644 --- a/packages/react-shared/CHANGELOG.json +++ b/packages/react-shared/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.22", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.21", diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md index 0ecb66a27..c6fb9e479 100644 --- a/packages/react-shared/CHANGELOG.md +++ b/packages/react-shared/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.0.22 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.21 - _November 14, 2018_ * Dependencies updated diff --git a/packages/sol-compiler/CHANGELOG.json b/packages/sol-compiler/CHANGELOG.json index fc39106dc..2ca983c59 100644 --- a/packages/sol-compiler/CHANGELOG.json +++ b/packages/sol-compiler/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.1.13", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.1.12", diff --git a/packages/sol-compiler/CHANGELOG.md b/packages/sol-compiler/CHANGELOG.md index b69976cdc..e535df64e 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.13 - _November 21, 2018_ + + * Dependencies updated + ## v1.1.12 - _November 14, 2018_ * Dependencies updated diff --git a/packages/sol-cov/CHANGELOG.json b/packages/sol-cov/CHANGELOG.json index bdeda8a96..3dd04be8c 100644 --- a/packages/sol-cov/CHANGELOG.json +++ b/packages/sol-cov/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.1.13", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "2.1.12", diff --git a/packages/sol-cov/CHANGELOG.md b/packages/sol-cov/CHANGELOG.md index 906c0dd52..e56a1393e 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.13 - _November 21, 2018_ + + * Dependencies updated + ## v2.1.12 - _November 14, 2018_ * Dependencies updated diff --git a/packages/sol-doc/CHANGELOG.json b/packages/sol-doc/CHANGELOG.json index a9547c883..c3dcc81f1 100644 --- a/packages/sol-doc/CHANGELOG.json +++ b/packages/sol-doc/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.8", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.7", diff --git a/packages/sol-doc/CHANGELOG.md b/packages/sol-doc/CHANGELOG.md index 74a736c75..a7a7fa0fa 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.8 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.7 - _November 14, 2018_ * Dependencies updated diff --git a/packages/sol-resolver/CHANGELOG.json b/packages/sol-resolver/CHANGELOG.json index a6ff84237..fdfb4009b 100644 --- a/packages/sol-resolver/CHANGELOG.json +++ b/packages/sol-resolver/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.17", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "version": "1.0.16", "changes": [ diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md index f8c5a7692..b83275e5a 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.17 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.16 - _November 9, 2018_ * Dependencies updated diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json index 3cc917e5a..49d1f1c83 100644 --- a/packages/sra-spec/CHANGELOG.json +++ b/packages/sra-spec/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "1.0.11", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "1.0.10", diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md index 8b2b7747b..77b22515f 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.11 - _November 21, 2018_ + + * Dependencies updated + ## v1.0.10 - _November 14, 2018_ * Dependencies updated diff --git a/packages/subproviders/CHANGELOG.json b/packages/subproviders/CHANGELOG.json index cdc150c3a..62c495b49 100644 --- a/packages/subproviders/CHANGELOG.json +++ b/packages/subproviders/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.1.5", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "2.1.4", diff --git a/packages/subproviders/CHANGELOG.md b/packages/subproviders/CHANGELOG.md index eda76bd2f..0251b6d9a 100644 --- a/packages/subproviders/CHANGELOG.md +++ b/packages/subproviders/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v2.1.5 - _November 21, 2018_ + + * Dependencies updated + ## v2.1.4 - _November 14, 2018_ * Dependencies updated diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index ecab7e9d6..0b32b60f0 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -7,7 +7,8 @@ "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package", "pr": 1298 } - ] + ], + "timestamp": 1542821676 }, { "version": "1.2.1", diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 556bf1799..f133c05f1 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only. CHANGELOG +## v1.3.0 - _November 21, 2018_ + + * Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package (#1298) + ## v1.2.1 - _November 9, 2018_ * Dependencies updated diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json index 1ef16e112..8c6fb124f 100644 --- a/packages/utils/CHANGELOG.json +++ b/packages/utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "timestamp": 1542821676, + "version": "2.0.6", + "changes": [ + { + "note": "Dependencies updated" + } + ] + }, { "timestamp": 1542208198, "version": "2.0.5", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 9846dd344..c5c42161a 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.6 - _November 21, 2018_ + + * Dependencies updated + ## v2.0.5 - _November 14, 2018_ * Dependencies updated diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index cc65c2a7d..9725640ac 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -10,7 +10,8 @@ "note": "Return `undefined` instead of `null` if transaction receipt not found", "pr": 1291 } - ] + ], + "timestamp": 1542821676 }, { "timestamp": 1542208198, diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md index 70a00ee1e..fa88eee2c 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.5 - _November 21, 2018_ + + * Add unmarshalling of transaction receipts (#1291) + * Return `undefined` instead of `null` if transaction receipt not found (#1291) + ## v3.1.4 - _November 14, 2018_ * Dependencies updated -- cgit From f46a49fd13c88dd86c9661d76bace18844642c04 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 21 Nov 2018 21:09:47 +0000 Subject: Publish - 0x.js@2.0.5 - @0x/abi-gen@1.0.17 - @0x/abi-gen-wrappers@1.1.0 - @0x/assert@1.0.18 - @0x/asset-buyer@3.0.1 - @0x/base-contract@3.0.7 - @0x/connect@3.0.7 - @0x/contract-addresses@1.2.0 - @0x/contract-wrappers@4.1.0 - contracts@2.1.55 - @0x/dev-tools-pages@0.0.7 - @0x/dev-utils@1.0.18 - @0x/fill-scenarios@1.0.13 - @0x/instant@1.0.1 - @0x/json-schemas@2.1.2 - @0x/metacoin@0.0.29 - @0x/migrations@2.1.0 - @0x/monorepo-scripts@1.0.14 - @0x/order-utils@3.0.3 - @0x/order-watcher@2.2.5 - @0x/react-docs@1.0.19 - @0x/react-shared@1.0.22 - @0x/sol-compiler@1.1.13 - @0x/sol-cov@2.1.13 - @0x/sol-doc@1.0.8 - @0x/sol-resolver@1.0.17 - @0x/sra-spec@1.0.11 - @0x/subproviders@2.1.5 - @0x/testnet-faucets@1.0.57 - @0x/types@1.3.0 - @0x/utils@2.0.6 - @0x/web3-wrapper@3.1.5 - @0x/website@0.0.60 --- packages/0x.js/package.json | 30 +++++++++++++++--------------- packages/abi-gen-wrappers/package.json | 12 ++++++------ packages/abi-gen/package.json | 4 ++-- packages/assert/package.json | 6 +++--- packages/asset-buyer/package.json | 20 ++++++++++---------- packages/base-contract/package.json | 6 +++--- packages/connect/package.json | 12 ++++++------ packages/contract-addresses/package.json | 2 +- packages/contract-wrappers/package.json | 26 +++++++++++++------------- packages/contracts/package.json | 22 +++++++++++----------- packages/dev-tools-pages/package.json | 4 ++-- packages/dev-utils/package.json | 10 +++++----- packages/fill-scenarios/package.json | 14 +++++++------- packages/instant/package.json | 18 +++++++++--------- packages/json-schemas/package.json | 4 ++-- packages/metacoin/package.json | 20 ++++++++++---------- packages/migrations/package.json | 22 +++++++++++----------- packages/monorepo-scripts/package.json | 2 +- packages/order-utils/package.json | 18 +++++++++--------- packages/order-watcher/package.json | 28 ++++++++++++++-------------- packages/react-docs/package.json | 10 +++++----- packages/react-shared/package.json | 6 +++--- packages/sol-compiler/package.json | 16 ++++++++-------- packages/sol-cov/package.json | 12 ++++++------ packages/sol-doc/package.json | 8 ++++---- packages/sol-resolver/package.json | 4 ++-- packages/sra-spec/package.json | 4 ++-- packages/subproviders/package.json | 10 +++++----- packages/testnet-faucets/package.json | 10 +++++----- packages/types/package.json | 2 +- packages/utils/package.json | 4 ++-- packages/web3-wrapper/package.json | 8 ++++---- packages/website/package.json | 20 ++++++++++---------- 33 files changed, 197 insertions(+), 197 deletions(-) diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index 755ff7512..bc7ee2c87 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -1,6 +1,6 @@ { "name": "0x.js", - "version": "2.0.4", + "version": "2.0.5", "engines": { "node": ">=6.12" }, @@ -42,11 +42,11 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/abi-gen": "^1.0.16", - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/contract-addresses": "^1.1.0", - "@0x/dev-utils": "^1.0.17", - "@0x/migrations": "^2.0.4", + "@0x/abi-gen": "^1.0.17", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/contract-addresses": "^1.2.0", + "@0x/dev-utils": "^1.0.18", + "@0x/migrations": "^2.1.0", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -73,16 +73,16 @@ "webpack": "^4.20.2" }, "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/base-contract": "^3.0.6", - "@0x/contract-wrappers": "^4.0.2", - "@0x/order-utils": "^3.0.2", - "@0x/order-watcher": "^2.2.4", - "@0x/subproviders": "^2.1.4", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/base-contract": "^3.0.7", + "@0x/contract-wrappers": "^4.1.0", + "@0x/order-utils": "^3.0.3", + "@0x/order-watcher": "^2.2.5", + "@0x/subproviders": "^2.1.5", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/web3-provider-engine": "^14.0.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index a86eb7ed1..0977ca03a 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.5", + "version": "1.1.0", "engines": { "node": ">=6.12" }, @@ -30,18 +30,18 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.16", + "@0x/abi-gen": "^1.0.17", "@0x/tslint-config": "^1.0.10", - "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/types": "^1.3.0", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5", "shx": "^0.2.2" }, "dependencies": { - "@0x/base-contract": "^3.0.6" + "@0x/base-contract": "^3.0.7" }, "publishConfig": { "access": "public" diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json index f69d24116..485e72730 100644 --- a/packages/abi-gen/package.json +++ b/packages/abi-gen/package.json @@ -1,6 +1,6 @@ { "name": "@0x/abi-gen", - "version": "1.0.16", + "version": "1.0.17", "engines": { "node": ">=6.12" }, @@ -32,7 +32,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen/README.md", "dependencies": { "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "chalk": "^2.3.0", "ethereum-types": "^1.1.2", "glob": "^7.1.2", diff --git a/packages/assert/package.json b/packages/assert/package.json index ec093a5be..90b07ae76 100644 --- a/packages/assert/package.json +++ b/packages/assert/package.json @@ -1,6 +1,6 @@ { "name": "@0x/assert", - "version": "1.0.17", + "version": "1.0.18", "engines": { "node": ">=6.12" }, @@ -44,9 +44,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/json-schemas": "^2.1.1", + "@0x/json-schemas": "^2.1.2", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "lodash": "^4.17.5", "valid-url": "^1.0.9" }, diff --git a/packages/asset-buyer/package.json b/packages/asset-buyer/package.json index f6a331844..50b276704 100644 --- a/packages/asset-buyer/package.json +++ b/packages/asset-buyer/package.json @@ -1,6 +1,6 @@ { "name": "@0x/asset-buyer", - "version": "3.0.0", + "version": "3.0.1", "engines": { "node": ">=6.12" }, @@ -36,16 +36,16 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/asset-buyer/README.md", "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/connect": "^3.0.6", - "@0x/contract-wrappers": "^4.0.2", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/subproviders": "^2.1.4", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/connect": "^3.0.7", + "@0x/contract-wrappers": "^4.1.0", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/subproviders": "^2.1.5", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "lodash": "^4.17.5" }, diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json index b1cdc3cc6..2ae42d66b 100644 --- a/packages/base-contract/package.json +++ b/packages/base-contract/package.json @@ -1,6 +1,6 @@ { "name": "@0x/base-contract", - "version": "3.0.6", + "version": "3.0.7", "engines": { "node": ">=6.12" }, @@ -41,8 +41,8 @@ }, "dependencies": { "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/connect/package.json b/packages/connect/package.json index 8e3f3ac8f..d05f24463 100644 --- a/packages/connect/package.json +++ b/packages/connect/package.json @@ -1,6 +1,6 @@ { "name": "@0x/connect", - "version": "3.0.6", + "version": "3.0.7", "engines": { "node": ">=6.12" }, @@ -44,12 +44,12 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/connect/README.md", "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "lodash": "^4.17.5", "query-string": "^5.0.1", "sinon": "^4.0.0", diff --git a/packages/contract-addresses/package.json b/packages/contract-addresses/package.json index 47258edef..9f0db4d30 100644 --- a/packages/contract-addresses/package.json +++ b/packages/contract-addresses/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-addresses", - "version": "1.1.0", + "version": "1.2.0", "engines": { "node": ">=6.12" }, diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json index 2d6b4e3f8..999375ea5 100644 --- a/packages/contract-wrappers/package.json +++ b/packages/contract-wrappers/package.json @@ -1,6 +1,6 @@ { "name": "@0x/contract-wrappers", - "version": "4.0.2", + "version": "4.1.0", "description": "Smart TS wrappers for 0x smart contracts", "keywords": [ "0xproject", @@ -37,9 +37,9 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.17", - "@0x/migrations": "^2.0.4", - "@0x/subproviders": "^2.1.4", + "@0x/dev-utils": "^1.0.18", + "@0x/migrations": "^2.1.0", + "@0x/subproviders": "^2.1.5", "@0x/tslint-config": "^1.0.10", "@types/lodash": "4.14.104", "@types/mocha": "^2.2.42", @@ -65,17 +65,17 @@ "web3-provider-engine": "14.0.6" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/assert": "^1.0.17", - "@0x/contract-addresses": "^1.1.0", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/assert": "^1.0.18", + "@0x/contract-addresses": "^1.2.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/fill-scenarios": "^1.0.12", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/types": "^1.2.1", + "@0x/fill-scenarios": "^1.0.13", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", "ethereumjs-util": "^5.1.1", diff --git a/packages/contracts/package.json b/packages/contracts/package.json index c87e2e95b..e10678d83 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "contracts", - "version": "2.1.54", + "version": "2.1.55", "engines": { "node": ">=6.12" }, @@ -45,11 +45,11 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/contracts/README.md", "devDependencies": { - "@0x/abi-gen": "^1.0.16", - "@0x/dev-utils": "^1.0.17", - "@0x/sol-compiler": "^1.1.12", - "@0x/sol-cov": "^2.1.12", - "@0x/subproviders": "^2.1.4", + "@0x/abi-gen": "^1.0.17", + "@0x/dev-utils": "^1.0.18", + "@0x/sol-compiler": "^1.1.13", + "@0x/sol-cov": "^2.1.13", + "@0x/subproviders": "^2.1.5", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/ethereumjs-abi": "^0.6.0", @@ -71,12 +71,12 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/base-contract": "^3.0.6", - "@0x/order-utils": "^3.0.2", - "@0x/types": "^1.2.1", + "@0x/base-contract": "^3.0.7", + "@0x/order-utils": "^3.0.3", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/js-combinatorics": "^0.5.29", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/dev-tools-pages/package.json b/packages/dev-tools-pages/package.json index e6d954f15..eb320c103 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.6", + "version": "0.0.7", "engines": { "node": ">=6.12" }, @@ -16,7 +16,7 @@ }, "license": "Apache-2.0", "dependencies": { - "@0x/react-shared": "^1.0.21", + "@0x/react-shared": "^1.0.22", "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 3db391131..e7cd62a81 100644 --- a/packages/dev-utils/package.json +++ b/packages/dev-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/dev-utils", - "version": "1.0.17", + "version": "1.0.18", "engines": { "node": ">=6.12" }, @@ -41,11 +41,11 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/subproviders": "^2.1.4", - "@0x/types": "^1.2.1", + "@0x/subproviders": "^2.1.5", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/web3-provider-engine": "^14.0.0", "chai": "^4.0.1", "ethereum-types": "^1.1.2", diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json index 2d9bff0e7..e91ed8a4e 100644 --- a/packages/fill-scenarios/package.json +++ b/packages/fill-scenarios/package.json @@ -1,6 +1,6 @@ { "name": "@0x/fill-scenarios", - "version": "1.0.12", + "version": "1.0.13", "description": "0x order fill scenario generator", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -28,14 +28,14 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/base-contract": "^3.0.6", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/base-contract": "^3.0.7", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^3.0.2", - "@0x/types": "^1.2.1", + "@0x/order-utils": "^3.0.3", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", "lodash": "^4.17.5" diff --git a/packages/instant/package.json b/packages/instant/package.json index 69319e854..d3a85a646 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -1,6 +1,6 @@ { "name": "@0x/instant", - "version": "1.0.0", + "version": "1.0.1", "engines": { "node": ">=6.12" }, @@ -44,15 +44,15 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md", "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/asset-buyer": "^3.0.0", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/subproviders": "^2.1.4", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/asset-buyer": "^3.0.1", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/subproviders": "^2.1.5", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "bowser": "^1.9.4", "copy-to-clipboard": "^3.0.8", "ethereum-types": "^1.1.2", diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json index fb89a2d5b..da3231b57 100644 --- a/packages/json-schemas/package.json +++ b/packages/json-schemas/package.json @@ -1,6 +1,6 @@ { "name": "@0x/json-schemas", - "version": "2.1.1", + "version": "2.1.2", "engines": { "node": ">=6.12" }, @@ -46,7 +46,7 @@ }, "devDependencies": { "@0x/tslint-config": "^1.0.10", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "@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 f990db6b0..c5679a1d6 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -1,6 +1,6 @@ { "name": "@0x/metacoin", - "version": "0.0.28", + "version": "0.0.29", "engines": { "node": ">=6.12" }, @@ -29,15 +29,15 @@ "author": "", "license": "Apache-2.0", "dependencies": { - "@0x/abi-gen": "^1.0.16", - "@0x/base-contract": "^3.0.6", - "@0x/sol-cov": "^2.1.12", - "@0x/subproviders": "^2.1.4", + "@0x/abi-gen": "^1.0.17", + "@0x/base-contract": "^3.0.7", + "@0x/sol-cov": "^2.1.13", + "@0x/subproviders": "^2.1.5", "@0x/tslint-config": "^1.0.10", - "@0x/types": "^1.2.1", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/mocha": "^5.2.2", "copyfiles": "^2.0.0", "ethereum-types": "^1.1.2", @@ -46,8 +46,8 @@ "run-s": "^0.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.17", - "@0x/sol-compiler": "^1.1.12", + "@0x/dev-utils": "^1.0.18", + "@0x/sol-compiler": "^1.1.13", "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 04503c0b2..c1ce7050d 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -1,6 +1,6 @@ { "name": "@0x/migrations", - "version": "2.0.4", + "version": "2.1.0", "engines": { "node": ">=6.12" }, @@ -23,9 +23,9 @@ }, "license": "Apache-2.0", "devDependencies": { - "@0x/dev-utils": "^1.0.17", + "@0x/dev-utils": "^1.0.18", "@0x/tslint-config": "^1.0.10", - "@0x/types": "^1.2.1", + "@0x/types": "^1.3.0", "@types/yargs": "^10.0.0", "make-promises-safe": "^1.1.0", "npm-run-all": "^4.1.2", @@ -36,16 +36,16 @@ "yargs": "^10.0.3" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/base-contract": "^3.0.6", - "@0x/contract-addresses": "^1.1.0", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/base-contract": "^3.0.7", + "@0x/contract-addresses": "^1.2.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/order-utils": "^3.0.2", - "@0x/sol-compiler": "^1.1.12", - "@0x/subproviders": "^2.1.4", + "@0x/order-utils": "^3.0.3", + "@0x/sol-compiler": "^1.1.13", + "@0x/subproviders": "^2.1.5", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@ledgerhq/hw-app-eth": "^4.3.0", "ethereum-types": "^1.1.2", "ethers": "~4.0.4", diff --git a/packages/monorepo-scripts/package.json b/packages/monorepo-scripts/package.json index a31085014..9af18a6b7 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.13", + "version": "1.0.14", "engines": { "node": ">=6.12" }, diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index fe5ea70b1..e032d6e7d 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-utils", - "version": "3.0.2", + "version": "3.0.3", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/order-utils/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.17", + "@0x/dev-utils": "^1.0.18", "@0x/tslint-config": "^1.0.10", "@types/bn.js": "^4.11.0", "@types/lodash": "4.14.104", @@ -53,15 +53,15 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/assert": "^1.0.17", - "@0x/base-contract": "^3.0.6", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/assert": "^1.0.18", + "@0x/base-contract": "^3.0.7", "@0x/contract-artifacts": "^1.1.0", - "@0x/json-schemas": "^2.1.1", - "@0x/types": "^1.2.1", + "@0x/json-schemas": "^2.1.2", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/node": "*", "bn.js": "^4.11.8", "ethereum-types": "^1.1.2", diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json index af88a120e..4257bd2a8 100644 --- a/packages/order-watcher/package.json +++ b/packages/order-watcher/package.json @@ -1,6 +1,6 @@ { "name": "@0x/order-watcher", - "version": "2.2.4", + "version": "2.2.5", "description": "An order watcher daemon that watches for order validity", "keywords": [ "0x", @@ -33,8 +33,8 @@ "node": ">=6.0.0" }, "devDependencies": { - "@0x/dev-utils": "^1.0.17", - "@0x/migrations": "^2.0.4", + "@0x/dev-utils": "^1.0.18", + "@0x/migrations": "^2.1.0", "@0x/tslint-config": "^1.0.10", "@types/bintrees": "^1.0.2", "@types/lodash": "4.14.104", @@ -57,19 +57,19 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/abi-gen-wrappers": "^1.0.5", - "@0x/assert": "^1.0.17", - "@0x/base-contract": "^3.0.6", - "@0x/contract-addresses": "^1.1.0", + "@0x/abi-gen-wrappers": "^1.1.0", + "@0x/assert": "^1.0.18", + "@0x/base-contract": "^3.0.7", + "@0x/contract-addresses": "^1.2.0", "@0x/contract-artifacts": "^1.1.0", - "@0x/contract-wrappers": "^4.0.2", - "@0x/fill-scenarios": "^1.0.12", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/types": "^1.2.1", + "@0x/contract-wrappers": "^4.1.0", + "@0x/fill-scenarios": "^1.0.13", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "bintrees": "^1.0.2", "ethereum-types": "^1.1.2", "ethereumjs-blockstream": "6.0.0", diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json index 3e77a9a07..6e819ee72 100644 --- a/packages/react-docs/package.json +++ b/packages/react-docs/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-docs", - "version": "1.0.18", + "version": "1.0.19", "engines": { "node": ">=6.12" }, @@ -24,7 +24,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.17", + "@0x/dev-utils": "^1.0.18", "@0x/tslint-config": "^1.0.10", "@types/compare-versions": "^3.0.0", "@types/styled-components": "^4.0.0", @@ -34,9 +34,9 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/react-shared": "^1.0.21", - "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.5", + "@0x/react-shared": "^1.0.22", + "@0x/types": "^1.3.0", + "@0x/utils": "^2.0.6", "@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 d2a00ca9c..34412e14e 100644 --- a/packages/react-shared/package.json +++ b/packages/react-shared/package.json @@ -1,6 +1,6 @@ { "name": "@0x/react-shared", - "version": "1.0.21", + "version": "1.0.22", "engines": { "node": ">=6.12" }, @@ -25,7 +25,7 @@ "url": "https://github.com/0xProject/0x-monorepo.git" }, "devDependencies": { - "@0x/dev-utils": "^1.0.17", + "@0x/dev-utils": "^1.0.18", "@0x/tslint-config": "^1.0.10", "make-promises-safe": "^1.1.0", "shx": "^0.2.2", @@ -33,7 +33,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.2.1", + "@0x/types": "^1.3.0", "@material-ui/core": "^3.0.1", "@types/is-mobile": "0.3.0", "@types/lodash": "4.14.104", diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json index 2904cfd23..bcc235866 100644 --- a/packages/sol-compiler/package.json +++ b/packages/sol-compiler/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-compiler", - "version": "1.1.12", + "version": "1.1.13", "engines": { "node": ">=6.12" }, @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-compiler/README.md", "devDependencies": { - "@0x/dev-utils": "^1.0.17", + "@0x/dev-utils": "^1.0.18", "@0x/tslint-config": "^1.0.10", "@types/mkdirp": "^0.5.2", "@types/require-from-string": "^1.2.0", @@ -65,13 +65,13 @@ "zeppelin-solidity": "1.8.0" }, "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/json-schemas": "^2.1.1", - "@0x/sol-resolver": "^1.0.16", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/json-schemas": "^2.1.2", + "@0x/sol-resolver": "^1.0.17", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/yargs": "^11.0.0", "chalk": "^2.3.0", "ethereum-types": "^1.1.2", diff --git a/packages/sol-cov/package.json b/packages/sol-cov/package.json index 159a2207d..9dcb3b854 100644 --- a/packages/sol-cov/package.json +++ b/packages/sol-cov/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-cov", - "version": "2.1.12", + "version": "2.1.13", "engines": { "node": ">=6.12" }, @@ -42,12 +42,12 @@ }, "homepage": "https://github.com/0xProject/0x.js/packages/sol-cov/README.md", "dependencies": { - "@0x/dev-utils": "^1.0.17", - "@0x/sol-compiler": "^1.1.12", - "@0x/subproviders": "^2.1.4", + "@0x/dev-utils": "^1.0.18", + "@0x/sol-compiler": "^1.1.13", + "@0x/subproviders": "^2.1.5", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@types/solidity-parser-antlr": "^0.2.0", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json index e56408f98..6bf76d47a 100644 --- a/packages/sol-doc/package.json +++ b/packages/sol-doc/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-doc", - "version": "1.0.7", + "version": "1.0.8", "description": "Solidity documentation generator", "main": "lib/src/index.js", "types": "lib/src/index.d.js", @@ -25,9 +25,9 @@ "author": "F. Eugene Aumson", "license": "Apache-2.0", "dependencies": { - "@0x/sol-compiler": "^1.1.12", - "@0x/types": "^1.2.1", - "@0x/utils": "^2.0.5", + "@0x/sol-compiler": "^1.1.13", + "@0x/types": "^1.3.0", + "@0x/utils": "^2.0.6", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", "lodash": "^4.17.10", diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json index 7572072c4..5c5eec2cf 100644 --- a/packages/sol-resolver/package.json +++ b/packages/sol-resolver/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sol-resolver", - "version": "1.0.16", + "version": "1.0.17", "engines": { "node": ">=6.12" }, @@ -30,7 +30,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.2.1", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", "lodash": "^4.17.5" }, diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json index fac5a5a4b..1623e2574 100644 --- a/packages/sra-spec/package.json +++ b/packages/sra-spec/package.json @@ -1,6 +1,6 @@ { "name": "@0x/sra-spec", - "version": "1.0.10", + "version": "1.0.11", "engines": { "node": ">=6.12" }, @@ -35,7 +35,7 @@ }, "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md", "dependencies": { - "@0x/json-schemas": "^2.1.1", + "@0x/json-schemas": "^2.1.2", "@loopback/openapi-v3-types": "^0.8.2" }, "devDependencies": { diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json index d249e4d6d..3b367054b 100644 --- a/packages/subproviders/package.json +++ b/packages/subproviders/package.json @@ -1,6 +1,6 @@ { "name": "@0x/subproviders", - "version": "2.1.4", + "version": "2.1.5", "engines": { "node": ">=6.12" }, @@ -29,11 +29,11 @@ } }, "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/types": "^1.2.1", + "@0x/assert": "^1.0.18", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "@ledgerhq/hw-app-eth": "^4.3.0", "@ledgerhq/hw-transport-u2f": "4.24.0", "@types/eth-lightwallet": "^3.0.0", diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json index ac720a748..cdfd1b7ff 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.56", + "version": "1.0.57", "engines": { "node": ">=6.12" }, @@ -18,11 +18,11 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "0x.js": "^2.0.4", - "@0x/subproviders": "^2.1.4", + "0x.js": "^2.0.5", + "@0x/subproviders": "^2.1.5", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "body-parser": "^1.17.1", "ethereum-types": "^1.1.2", "ethereumjs-tx": "^1.3.5", diff --git a/packages/types/package.json b/packages/types/package.json index c32e9a6f7..46e268a66 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@0x/types", - "version": "1.2.1", + "version": "1.3.0", "engines": { "node": ">=6.12" }, diff --git a/packages/utils/package.json b/packages/utils/package.json index 4b924226f..8dc1f0739 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@0x/utils", - "version": "2.0.5", + "version": "2.0.6", "engines": { "node": ">=6.12" }, @@ -41,7 +41,7 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/types": "^1.2.1", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", "@types/node": "*", "abortcontroller-polyfill": "^1.1.9", diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json index 8d4d7ec35..2eba35da7 100644 --- a/packages/web3-wrapper/package.json +++ b/packages/web3-wrapper/package.json @@ -1,6 +1,6 @@ { "name": "@0x/web3-wrapper", - "version": "3.1.4", + "version": "3.1.5", "engines": { "node": ">=6.12" }, @@ -54,10 +54,10 @@ "typescript": "3.0.1" }, "dependencies": { - "@0x/assert": "^1.0.17", - "@0x/json-schemas": "^2.1.1", + "@0x/assert": "^1.0.18", + "@0x/json-schemas": "^2.1.2", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", + "@0x/utils": "^2.0.6", "ethereum-types": "^1.1.2", "ethereumjs-util": "^5.1.1", "ethers": "~4.0.4", diff --git a/packages/website/package.json b/packages/website/package.json index bb64b24db..52ba206c6 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "@0x/website", - "version": "0.0.59", + "version": "0.0.60", "engines": { "node": ">=6.12" }, @@ -20,16 +20,16 @@ "author": "Fabio Berger", "license": "Apache-2.0", "dependencies": { - "@0x/contract-wrappers": "^4.0.2", - "@0x/json-schemas": "^2.1.1", - "@0x/order-utils": "^3.0.2", - "@0x/react-docs": "^1.0.18", - "@0x/react-shared": "^1.0.21", - "@0x/subproviders": "^2.1.4", - "@0x/types": "^1.2.1", + "@0x/contract-wrappers": "^4.1.0", + "@0x/json-schemas": "^2.1.2", + "@0x/order-utils": "^3.0.3", + "@0x/react-docs": "^1.0.19", + "@0x/react-shared": "^1.0.22", + "@0x/subproviders": "^2.1.5", + "@0x/types": "^1.3.0", "@0x/typescript-typings": "^3.0.4", - "@0x/utils": "^2.0.5", - "@0x/web3-wrapper": "^3.1.4", + "@0x/utils": "^2.0.6", + "@0x/web3-wrapper": "^3.1.5", "accounting": "^0.4.1", "basscss": "^8.0.3", "blockies": "^0.0.2", -- cgit