From 848193074a10d9799ffbc27918a8b264a2e101bb Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:21:04 -0800 Subject: feat: close and open instant based on history changes --- packages/instant/src/index.umd.ts | 51 +++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 13 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 0274db30c..81b7aebe3 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -5,6 +5,7 @@ import * as ReactDOM from 'react-dom'; import { DEFAULT_ZERO_EX_CONTAINER_SELECTOR, INJECTED_DIV_CLASS, INJECTED_DIV_ID } from './constants'; import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index'; import { assert } from './util/assert'; +import { util } from './util/util'; export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { assert.isValidOrderSource('orderSource', props.orderSource); @@ -36,21 +37,45 @@ export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFA assert.isWeb3Provider('props.provider', props.provider); } assert.isString('selector', selector); - const appendToIfExists = document.querySelector(selector); - assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`); - const appendTo = appendToIfExists as Element; - const injectedDiv = document.createElement('div'); - injectedDiv.setAttribute('id', INJECTED_DIV_ID); - injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); - appendTo.appendChild(injectedDiv); - const instantOverlayProps = { - ...props, - onClose: () => { - appendTo.removeChild(injectedDiv); + // Render instant and return a callback that allows you to close it. + const renderInstant = () => { + const appendToIfExists = document.querySelector(selector); + assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`); + const appendTo = appendToIfExists as Element; + const injectedDiv = document.createElement('div'); + injectedDiv.setAttribute('id', INJECTED_DIV_ID); + injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); + appendTo.appendChild(injectedDiv); + const instantOverlayProps = { + ...props, + onClose: () => window.history.back(), + }; + ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); + const close = () => appendTo.removeChild(injectedDiv); + return close; + }; + // Before we render, push to history saying that instant is showing for this part of the history. + window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); + let closeInstant = renderInstant(); + + let prevOnPopState = util.boundNoop; + if (window.onpopstate) { + prevOnPopState = window.onpopstate.bind(window); + } + window.onpopstate = (e: PopStateEvent) => { + // Don't override integrators handler. + prevOnPopState(e); + // e.state represents the new state + if (e.state && e.state.zeroExInstantShowing) { + // The user pressed fowards, so re-render instant. + closeInstant = renderInstant(); + } else { + // User pressed back, so close instant. + closeInstant(); + delete window.onpopstate; if (!_.isUndefined(props.onClose)) { props.onClose(); } - }, + } }; - ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); }; -- cgit v1.2.3 From f7914af9c564d4521e375fb3dd5825da763df7d6 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:23:44 -0800 Subject: feat: rename props to config --- packages/instant/src/index.umd.ts | 50 +++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 23 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 81b7aebe3..fda21478f 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -7,34 +7,38 @@ import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index'; import { assert } from './util/assert'; import { util } from './util/util'; -export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { - assert.isValidOrderSource('orderSource', props.orderSource); - if (!_.isUndefined(props.defaultSelectedAssetData)) { - assert.isHexString('defaultSelectedAssetData', props.defaultSelectedAssetData); +export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { + shouldUseHistoryApi?: boolean; +} + +export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { + assert.isValidOrderSource('orderSource', config.orderSource); + if (!_.isUndefined(config.defaultSelectedAssetData)) { + assert.isHexString('defaultSelectedAssetData', config.defaultSelectedAssetData); } - if (!_.isUndefined(props.additionalAssetMetaDataMap)) { - assert.isValidAssetMetaDataMap('props.additionalAssetMetaDataMap', props.additionalAssetMetaDataMap); + if (!_.isUndefined(config.additionalAssetMetaDataMap)) { + assert.isValidAssetMetaDataMap('props.additionalAssetMetaDataMap', config.additionalAssetMetaDataMap); } - if (!_.isUndefined(props.defaultAssetBuyAmount)) { - assert.isNumber('props.defaultAssetBuyAmount', props.defaultAssetBuyAmount); + if (!_.isUndefined(config.defaultAssetBuyAmount)) { + assert.isNumber('props.defaultAssetBuyAmount', config.defaultAssetBuyAmount); } - if (!_.isUndefined(props.networkId)) { - assert.isNumber('props.networkId', props.networkId); + if (!_.isUndefined(config.networkId)) { + assert.isNumber('props.networkId', config.networkId); } - if (!_.isUndefined(props.availableAssetDatas)) { - assert.areValidAssetDatas('availableAssetDatas', props.availableAssetDatas); + if (!_.isUndefined(config.availableAssetDatas)) { + assert.areValidAssetDatas('availableAssetDatas', config.availableAssetDatas); } - if (!_.isUndefined(props.onClose)) { - assert.isFunction('props.onClose', props.onClose); + if (!_.isUndefined(config.onClose)) { + assert.isFunction('props.onClose', config.onClose); } - if (!_.isUndefined(props.zIndex)) { - assert.isNumber('props.zIndex', props.zIndex); + if (!_.isUndefined(config.zIndex)) { + assert.isNumber('props.zIndex', config.zIndex); } - if (!_.isUndefined(props.affiliateInfo)) { - assert.isValidAffiliateInfo('props.affiliateInfo', props.affiliateInfo); + if (!_.isUndefined(config.affiliateInfo)) { + assert.isValidAffiliateInfo('props.affiliateInfo', config.affiliateInfo); } - if (!_.isUndefined(props.provider)) { - assert.isWeb3Provider('props.provider', props.provider); + if (!_.isUndefined(config.provider)) { + assert.isWeb3Provider('props.provider', config.provider); } assert.isString('selector', selector); // Render instant and return a callback that allows you to close it. @@ -47,7 +51,7 @@ export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFA injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); appendTo.appendChild(injectedDiv); const instantOverlayProps = { - ...props, + ...config, onClose: () => window.history.back(), }; ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); @@ -73,8 +77,8 @@ export const render = (props: ZeroExInstantOverlayProps, selector: string = DEFA // User pressed back, so close instant. closeInstant(); delete window.onpopstate; - if (!_.isUndefined(props.onClose)) { - props.onClose(); + if (!_.isUndefined(config.onClose)) { + config.onClose(); } } }; -- cgit v1.2.3 From 9a53a29b1f421cdea190b6175dec437ec6d76a39 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:41:21 -0800 Subject: feat: allow integrator to disable pushstate logic --- packages/instant/public/index.html | 2 ++ packages/instant/src/index.umd.ts | 54 ++++++++++++++++++++------------------ 2 files changed, 31 insertions(+), 25 deletions(-) (limited to 'packages') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 253cbb194..79edb6c17 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -128,8 +128,10 @@ availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined, defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'), affiliateInfo: affiliateInfoOverride, + } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); + window.onpopstate = () => console.log('Integrators onpopstate called'); zeroExInstant.render(renderOptions); diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index fda21478f..381c9094b 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -8,7 +8,7 @@ import { assert } from './util/assert'; import { util } from './util/util'; export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { - shouldUseHistoryApi?: boolean; + shouldDisablePushToHistory?: boolean; } export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { @@ -50,36 +50,40 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z injectedDiv.setAttribute('id', INJECTED_DIV_ID); injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); appendTo.appendChild(injectedDiv); + const close = () => appendTo.removeChild(injectedDiv); const instantOverlayProps = { ...config, - onClose: () => window.history.back(), + // If we are using the history API, just go back to close + onClose: () => (config.shouldDisablePushToHistory ? close() : window.history.back()), }; ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); - const close = () => appendTo.removeChild(injectedDiv); return close; }; - // Before we render, push to history saying that instant is showing for this part of the history. - window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); - let closeInstant = renderInstant(); + if (config.shouldDisablePushToHistory) { + renderInstant(); + } else { + // Before we render, push to history saying that instant is showing for this part of the history. + window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); + let closeInstant = renderInstant(); - let prevOnPopState = util.boundNoop; - if (window.onpopstate) { - prevOnPopState = window.onpopstate.bind(window); - } - window.onpopstate = (e: PopStateEvent) => { - // Don't override integrators handler. - prevOnPopState(e); - // e.state represents the new state - if (e.state && e.state.zeroExInstantShowing) { - // The user pressed fowards, so re-render instant. - closeInstant = renderInstant(); - } else { - // User pressed back, so close instant. - closeInstant(); - delete window.onpopstate; - if (!_.isUndefined(config.onClose)) { - config.onClose(); - } + let prevOnPopState = util.boundNoop; + if (window.onpopstate) { + prevOnPopState = window.onpopstate.bind(window); } - }; + window.onpopstate = (e: PopStateEvent) => { + // Don't override integrators handler. + prevOnPopState(e); + // e.state represents the new state + if (e.state && e.state.zeroExInstantShowing) { + // The user pressed fowards, so re-render instant. + closeInstant = renderInstant(); + } else { + // User pressed back, so close instant. + closeInstant(); + if (!_.isUndefined(config.onClose)) { + config.onClose(); + } + } + }; + } }; -- cgit v1.2.3 From a4f6cd21bd289eb2baaee8b6b7d09cbb9e0955dc Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:45:02 -0800 Subject: feat: be more specific with callback name --- packages/instant/src/index.umd.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 381c9094b..298b7733f 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -41,7 +41,7 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z assert.isWeb3Provider('props.provider', config.provider); } assert.isString('selector', selector); - // Render instant and return a callback that allows you to close it. + // Render instant and return a callback that allows you to remove it from the DOM. const renderInstant = () => { const appendToIfExists = document.querySelector(selector); assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`); @@ -50,21 +50,21 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z injectedDiv.setAttribute('id', INJECTED_DIV_ID); injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); appendTo.appendChild(injectedDiv); - const close = () => appendTo.removeChild(injectedDiv); + const removeFromDom = () => appendTo.removeChild(injectedDiv); const instantOverlayProps = { ...config, // If we are using the history API, just go back to close - onClose: () => (config.shouldDisablePushToHistory ? close() : window.history.back()), + onClose: () => (config.shouldDisablePushToHistory ? removeFromDom() : window.history.back()), }; ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); - return close; + return removeFromDom; }; if (config.shouldDisablePushToHistory) { renderInstant(); } else { // Before we render, push to history saying that instant is showing for this part of the history. window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); - let closeInstant = renderInstant(); + let removeInstant = renderInstant(); let prevOnPopState = util.boundNoop; if (window.onpopstate) { @@ -76,10 +76,10 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z // e.state represents the new state if (e.state && e.state.zeroExInstantShowing) { // The user pressed fowards, so re-render instant. - closeInstant = renderInstant(); + removeInstant = renderInstant(); } else { // User pressed back, so close instant. - closeInstant(); + removeInstant(); if (!_.isUndefined(config.onClose)) { config.onClose(); } -- cgit v1.2.3 From 51dce3008841b7bdc9080212f8b5e12a90f6cce9 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:48:55 -0800 Subject: feat: add assert for shouldDisablePushToHistory --- packages/instant/src/index.umd.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 298b7733f..9703c6fc0 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -17,28 +17,31 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z assert.isHexString('defaultSelectedAssetData', config.defaultSelectedAssetData); } if (!_.isUndefined(config.additionalAssetMetaDataMap)) { - assert.isValidAssetMetaDataMap('props.additionalAssetMetaDataMap', config.additionalAssetMetaDataMap); + assert.isValidAssetMetaDataMap('additionalAssetMetaDataMap', config.additionalAssetMetaDataMap); } if (!_.isUndefined(config.defaultAssetBuyAmount)) { - assert.isNumber('props.defaultAssetBuyAmount', config.defaultAssetBuyAmount); + assert.isNumber('defaultAssetBuyAmount', config.defaultAssetBuyAmount); } if (!_.isUndefined(config.networkId)) { - assert.isNumber('props.networkId', config.networkId); + assert.isNumber('networkId', config.networkId); } if (!_.isUndefined(config.availableAssetDatas)) { assert.areValidAssetDatas('availableAssetDatas', config.availableAssetDatas); } if (!_.isUndefined(config.onClose)) { - assert.isFunction('props.onClose', config.onClose); + assert.isFunction('onClose', config.onClose); } if (!_.isUndefined(config.zIndex)) { - assert.isNumber('props.zIndex', config.zIndex); + assert.isNumber('zIndex', config.zIndex); } if (!_.isUndefined(config.affiliateInfo)) { - assert.isValidAffiliateInfo('props.affiliateInfo', config.affiliateInfo); + assert.isValidAffiliateInfo('affiliateInfo', config.affiliateInfo); } if (!_.isUndefined(config.provider)) { - assert.isWeb3Provider('props.provider', config.provider); + assert.isWeb3Provider('provider', config.provider); + } + if (!_.isUndefined(config.shouldDisablePushToHistory)) { + assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory); } assert.isString('selector', selector); // Render instant and return a callback that allows you to remove it from the DOM. -- cgit v1.2.3 From 6e2fbcdb3e17e328fc76411b352b2385838eaa3a Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 15:58:41 -0800 Subject: feat: add URL override param --- packages/instant/public/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 79edb6c17..039f8b781 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -128,7 +128,7 @@ availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined, defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'), affiliateInfo: affiliateInfoOverride, - + shouldDisablePushToHistory: !!queryParams.getQueryParamValue('shouldDisablePushToHistory'), } const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides)); window.onpopstate = () => console.log('Integrators onpopstate called'); -- cgit v1.2.3 From 654c13df8aee2e43992c6629d2249d56667fec67 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 16:07:37 -0800 Subject: fix: bug where we did not call onClose config --- packages/instant/src/index.umd.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 9703c6fc0..518326e21 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -53,14 +53,19 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z injectedDiv.setAttribute('id', INJECTED_DIV_ID); injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); appendTo.appendChild(injectedDiv); - const removeFromDom = () => appendTo.removeChild(injectedDiv); + const closeInstant = () => { + if (config.onClose) { + config.onClose(); + } + appendTo.removeChild(injectedDiv); + }; const instantOverlayProps = { ...config, // If we are using the history API, just go back to close - onClose: () => (config.shouldDisablePushToHistory ? removeFromDom() : window.history.back()), + onClose: () => (config.shouldDisablePushToHistory ? closeInstant() : window.history.back()), }; ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); - return removeFromDom; + return closeInstant; }; if (config.shouldDisablePushToHistory) { renderInstant(); @@ -83,9 +88,6 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z } else { // User pressed back, so close instant. removeInstant(); - if (!_.isUndefined(config.onClose)) { - config.onClose(); - } } }; } -- cgit v1.2.3 From ac942faa258f604f4f6171759f6bcdf786317d29 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 16:14:10 -0800 Subject: chore: use lodash where relevant --- packages/instant/src/index.umd.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 518326e21..34d893ad7 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -54,7 +54,7 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); appendTo.appendChild(injectedDiv); const closeInstant = () => { - if (config.onClose) { + if (!_.isUndefined(config.onClose)) { config.onClose(); } appendTo.removeChild(injectedDiv); -- cgit v1.2.3 From 9384c507ac29043d0d2f68bef3dde94a43282d09 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 16 Nov 2018 16:33:02 -0800 Subject: feat: add isInstantRendered check to safeguard against double renders and double removes --- packages/instant/public/index.html | 4 ++++ packages/instant/src/index.umd.ts | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 039f8b781..557cfa3dc 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -27,6 +27,10 @@
+ + + - + .button { + margin: 10px; + } - -
- - + + + + +
+
+
+ + + +
+
+
+ + + diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 59f658b33..1d62084b5 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -7,6 +7,7 @@ import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index'; import { assert } from './util/assert'; import { util } from './util/util'; +const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID); export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { shouldDisablePushToHistory?: boolean; } @@ -43,8 +44,8 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z if (!_.isUndefined(config.shouldDisablePushToHistory)) { assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory); } - if (!_.isUndefined(props.shouldDisableAnalyticsTracking)) { - assert.isBoolean('props.shouldDisableAnalyticsTracking', props.shouldDisableAnalyticsTracking); + if (!_.isUndefined(config.shouldDisableAnalyticsTracking)) { + assert.isBoolean('shouldDisableAnalyticsTracking', config.shouldDisableAnalyticsTracking); } assert.isString('selector', selector); // Render instant and return a callback that allows you to remove it from the DOM. @@ -101,5 +102,3 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z }; } }; - -const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID); -- cgit v1.2.3 From b494a4a4dba6c781667b690f38387f03a22fe141 Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 21 Nov 2018 11:55:32 -0500 Subject: chore: clean up index.umd.ts a bit --- packages/instant/public/index.html | 2 +- packages/instant/src/index.umd.ts | 70 +++++++++++++++++++++----------------- 2 files changed, 39 insertions(+), 33 deletions(-) (limited to 'packages') diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html index 8f11502e4..df39994ef 100644 --- a/packages/instant/public/index.html +++ b/packages/instant/public/index.html @@ -64,7 +64,7 @@ window.history.pushState({ page: 1 }, '0x Instant'); window.history.pushState({ page: 2 }, '0x Instant'); window.history.pushState({ page: 3 }, '0x Instant'); - window.onpopstate = () => console.log('Integrators onpopstate called'); + window.onpopstate = () => console.log("Integrator's onpopstate called"); const removeUndefined = obj => { for (let k in obj) if (obj[k] === undefined) delete obj[k]; diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 1d62084b5..15ca59323 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -8,11 +8,8 @@ import { assert } from './util/assert'; import { util } from './util/util'; const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID); -export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { - shouldDisablePushToHistory?: boolean; -} -export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { +const validateInstantRenderConfig = (config: ZeroExInstantConfig, selector: string) => { assert.isValidOrderSource('orderSource', config.orderSource); if (!_.isUndefined(config.defaultSelectedAssetData)) { assert.isHexString('defaultSelectedAssetData', config.defaultSelectedAssetData); @@ -48,37 +45,46 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z assert.isBoolean('shouldDisableAnalyticsTracking', config.shouldDisableAnalyticsTracking); } assert.isString('selector', selector); - // Render instant and return a callback that allows you to remove it from the DOM. - const renderInstant = () => { - const appendToIfExists = document.querySelector(selector); - assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`); - const appendTo = appendToIfExists as Element; - const injectedDiv = document.createElement('div'); - injectedDiv.setAttribute('id', INJECTED_DIV_ID); - injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); - appendTo.appendChild(injectedDiv); - const closeInstant = () => { - if (!_.isUndefined(config.onClose)) { - config.onClose(); - } - appendTo.removeChild(injectedDiv); - }; - const instantOverlayProps = { - ...config, - // If we are using the history API, just go back to close - onClose: () => (config.shouldDisablePushToHistory ? closeInstant() : window.history.back()), - }; - ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); - return closeInstant; +}; + +// Render instant and return a callback that allows you to remove it from the DOM. +const renderInstant = (config: ZeroExInstantConfig, selector: string) => { + const appendToIfExists = document.querySelector(selector); + assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`); + const appendTo = appendToIfExists as Element; + const injectedDiv = document.createElement('div'); + injectedDiv.setAttribute('id', INJECTED_DIV_ID); + injectedDiv.setAttribute('class', INJECTED_DIV_CLASS); + appendTo.appendChild(injectedDiv); + const closeInstant = () => { + if (!_.isUndefined(config.onClose)) { + config.onClose(); + } + appendTo.removeChild(injectedDiv); + }; + const instantOverlayProps = { + ...config, + // If we are using the history API, just go back to close + onClose: () => (config.shouldDisablePushToHistory ? closeInstant() : window.history.back()), }; + ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv); + return closeInstant; +}; + +export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps { + shouldDisablePushToHistory?: boolean; +} + +export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => { + validateInstantRenderConfig(config, selector); if (config.shouldDisablePushToHistory) { if (!isInstantRendered()) { - renderInstant(); + renderInstant(config, selector); } } else { // Before we render, push to history saying that instant is showing for this part of the history. window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); - let removeInstant = renderInstant(); + let removeInstant = renderInstant(config, selector); let prevOnPopState = util.boundNoop; if (window.onpopstate) { @@ -86,12 +92,12 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z } window.onpopstate = (e: PopStateEvent) => { // Don't override integrators handler. - prevOnPopState(e); - // e.state represents the new state - if (e.state && e.state.zeroExInstantShowing) { + // prevOnPopState(e); + const newState = e.state; + if (newState && newState.zeroExInstantShowing) { // We have returned to a history state that expects instant to be rendered. if (!isInstantRendered()) { - removeInstant = renderInstant(); + removeInstant = renderInstant(config, selector); } } else { // History has changed to a different state. -- cgit v1.2.3 From ed91c6c874282ab069a72784b8e563b634a236bf Mon Sep 17 00:00:00 2001 From: fragosti Date: Wed, 21 Nov 2018 12:44:28 -0500 Subject: fix: multiple render and closes edge case for onpopstate render --- packages/instant/src/index.umd.ts | 52 ++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 25 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts index 15ca59323..3a8694d6a 100644 --- a/packages/instant/src/index.umd.ts +++ b/packages/instant/src/index.umd.ts @@ -81,30 +81,32 @@ export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_Z if (!isInstantRendered()) { renderInstant(config, selector); } - } else { - // Before we render, push to history saying that instant is showing for this part of the history. - window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); - let removeInstant = renderInstant(config, selector); - - let prevOnPopState = util.boundNoop; - if (window.onpopstate) { - prevOnPopState = window.onpopstate.bind(window); - } - window.onpopstate = (e: PopStateEvent) => { - // Don't override integrators handler. - // prevOnPopState(e); - const newState = e.state; - if (newState && newState.zeroExInstantShowing) { - // We have returned to a history state that expects instant to be rendered. - if (!isInstantRendered()) { - removeInstant = renderInstant(config, selector); - } - } else { - // History has changed to a different state. - if (isInstantRendered()) { - removeInstant(); - } - } - }; + return; + } + // Before we render, push to history saying that instant is showing for this part of the history. + window.history.pushState({ zeroExInstantShowing: true }, '0x Instant'); + let removeInstant = renderInstant(config, selector); + // If the integrator defined a popstate handler, save it to __zeroExInstantIntegratorsPopStateHandler + // unless we have already done so on a previous render. + const anyWindow = window as any; + if (window.onpopstate && !anyWindow.__zeroExInstantIntegratorsPopStateHandler) { + anyWindow.__zeroExInstantIntegratorsPopStateHandler = window.onpopstate.bind(window); } + const integratorsOnPopStateHandler = anyWindow.__zeroExInstantIntegratorsPopStateHandler || util.boundNoop; + const onPopStateHandler = (e: PopStateEvent) => { + integratorsOnPopStateHandler(e); + const newState = e.state; + if (newState && newState.zeroExInstantShowing) { + // We have returned to a history state that expects instant to be rendered. + if (!isInstantRendered()) { + removeInstant = renderInstant(config, selector); + } + } else { + // History has changed to a different state. + if (isInstantRendered()) { + removeInstant(); + } + } + }; + window.onpopstate = onPopStateHandler; }; -- cgit v1.2.3 From 31d1b4ba670d25c4cd4ed93d32d12718b4804e5d Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 21 Nov 2018 12:30:52 -0800 Subject: chore(instant): refactor account tracking logic in middleware to be more readable --- packages/instant/src/redux/analytics_middleware.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 893844f5d..889cc875e 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -21,17 +21,17 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction switch (nextAction.type) { case ActionTypes.SET_ACCOUNT_STATE_READY: - if (prevAccount.state !== AccountState.Ready && curAccount.state === AccountState.Ready) { - // if we are moving from account not ready to account ready, update the current address and track `Account - Ready` + if (curAccount.state === AccountState.Ready) { + const didJustTurnReady = prevAccount.state !== AccountState.Ready; + const didJustUpdateAddress = + prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address; const ethAddress = curAccount.address; - analytics.addUserProperties({ ethAddress }); - analytics.trackAccountReady(ethAddress); - } else if (prevAccount.state === AccountState.Ready && curAccount.state === AccountState.Ready) { - if (prevAccount.address !== curAccount.address) { - // if our account state was already ready and our address has changed, update the current address and track `Account - Address Changed` - const ethAddress = curAccount.address; + if (didJustTurnReady) { + analytics.trackAccountReady(ethAddress); analytics.addUserProperties({ ethAddress }); + } else if (didJustUpdateAddress) { analytics.trackAccountAddressChanged(ethAddress); + analytics.addUserProperties({ ethAddress }); } } break; -- cgit v1.2.3 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(-) (limited to 'packages') 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 v1.2.3 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(-) (limited to 'packages') 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 v1.2.3 From 6604e2db20d6263e05b00cf5d36b56788e42d9c2 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 21 Nov 2018 12:44:28 -0800 Subject: chore(instant): refactor usage of event properties in heap --- packages/instant/src/redux/analytics_middleware.ts | 12 ++++---- packages/instant/src/util/analytics.ts | 32 ++++++++++++---------- packages/instant/src/util/heap.ts | 4 ++- 3 files changed, 26 insertions(+), 22 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 889cc875e..931902187 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -27,19 +27,17 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address; const ethAddress = curAccount.address; if (didJustTurnReady) { - analytics.trackAccountReady(ethAddress); - analytics.addUserProperties({ ethAddress }); + analytics.trackAccountReady({ address: ethAddress }); + analytics.addUserProperties({ lastKnownEthAddress: ethAddress }); } else if (didJustUpdateAddress) { - analytics.trackAccountAddressChanged(ethAddress); - analytics.addUserProperties({ ethAddress }); + analytics.trackAccountAddressChanged({ address: ethAddress }); + analytics.addUserProperties({ lastKnownEthAddress: ethAddress }); } } break; case ActionTypes.SET_ACCOUNT_STATE_LOCKED: if (prevAccount.state !== AccountState.Locked && curAccount.state === AccountState.Locked) { - // if we are moving from account not locked to account locked, update the current address to undefined and track `Account - Locked` - const ethAddress = undefined; - analytics.addUserProperties({ ethAddress }); + // if we are moving from account not locked to account locked, track `Account - Locked` analytics.trackAccountLocked(); } break; diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index d36bf8fc3..31233fe7a 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -1,6 +1,4 @@ -import { ObjectMap } from '@0x/types'; - -import { heapUtil } from './heap'; +import { EventProperties, heapUtil } from './heap'; let isDisabled = false; export const disableAnalytics = (shouldDisableAnalytics: boolean) => { @@ -21,9 +19,9 @@ enum EventNames { ACCOUNT_UNLOCK_DENIED = 'Account - Unlock Denied', ACCOUNT_ADDRESS_CHANGED = 'Account - Address Changed', } -const track = (eventName: EventNames, eventData: ObjectMap = {}): void => { +const track = (eventName: EventNames, eventProperties: EventProperties = {}): void => { evaluateIfEnabled(() => { - heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventData)); + heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventProperties)); }); }; function trackingEventFnWithoutPayload(eventName: EventNames): () => void { @@ -32,16 +30,14 @@ function trackingEventFnWithoutPayload(eventName: EventNames): () => void { }; } // tslint:disable-next-line:no-unused-variable -function trackingEventFnWithPayload>( - eventName: EventNames, -): (eventDataProperties: T) => void { - return (eventDataProperties: T) => { - track(eventName, eventDataProperties); +function trackingEventFnWithPayload(eventName: EventNames): (eventProperties: EventProperties) => void { + return (eventProperties: EventProperties) => { + track(eventName, eventProperties); }; } export interface AnalyticsUserOptions { - ethAddress?: string; + lastKnownEthAddress?: string; ethBalanceInUnitAmount?: string; } export interface AnalyticsEventOptions { @@ -52,6 +48,13 @@ export interface AnalyticsEventOptions { gitSha?: string; npmVersion?: string; } +export interface AccountReadyEventProperties { + address: string; +} +export interface AccountAddressChangedEventProperties { + address: string; +} + export const analytics = { addUserProperties: (properties: AnalyticsUserOptions): void => { evaluateIfEnabled(() => { @@ -65,9 +68,10 @@ export const analytics = { }, trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED), trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED), - trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ address }), + trackAccountReady: (eventProperties: AccountReadyEventProperties) => + trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ ...eventProperties }), trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED), trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED), - trackAccountAddressChanged: (address: string) => - trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }), + trackAccountAddressChanged: (eventProperties: AccountAddressChangedEventProperties) => + trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ ...eventProperties }), }; diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts index 78ec3b3cc..7c53c9918 100644 --- a/packages/instant/src/util/heap.ts +++ b/packages/instant/src/util/heap.ts @@ -6,11 +6,13 @@ import { HEAP_ANALYTICS_ID } from '../constants'; import { AnalyticsEventOptions, AnalyticsUserOptions } from './analytics'; +export type EventProperties = ObjectMap; + export interface HeapAnalytics { loaded: boolean; appid: string; identify(id: string, idType: string): void; - track(eventName: string, eventProperties?: ObjectMap): void; + track(eventName: string, eventProperties?: EventProperties): void; resetIdentity(): void; addUserProperties(properties: AnalyticsUserOptions): void; addEventProperties(properties: AnalyticsEventOptions): void; -- cgit v1.2.3 From 804de89796de047fe43dbb736b5e8b82bb30ee3a Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 21 Nov 2018 13:40:23 -0800 Subject: chore(instant): revert usage of event properties --- packages/instant/src/redux/analytics_middleware.ts | 4 ++-- packages/instant/src/util/analytics.ts | 13 +++---------- 2 files changed, 5 insertions(+), 12 deletions(-) (limited to 'packages') diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts index 931902187..299c2560e 100644 --- a/packages/instant/src/redux/analytics_middleware.ts +++ b/packages/instant/src/redux/analytics_middleware.ts @@ -27,10 +27,10 @@ export const analyticsMiddleware: Middleware = store => next => middlewareAction prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address; const ethAddress = curAccount.address; if (didJustTurnReady) { - analytics.trackAccountReady({ address: ethAddress }); + analytics.trackAccountReady(ethAddress); analytics.addUserProperties({ lastKnownEthAddress: ethAddress }); } else if (didJustUpdateAddress) { - analytics.trackAccountAddressChanged({ address: ethAddress }); + analytics.trackAccountAddressChanged(ethAddress); analytics.addUserProperties({ lastKnownEthAddress: ethAddress }); } } diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts index 31233fe7a..e389e1530 100644 --- a/packages/instant/src/util/analytics.ts +++ b/packages/instant/src/util/analytics.ts @@ -48,12 +48,6 @@ export interface AnalyticsEventOptions { gitSha?: string; npmVersion?: string; } -export interface AccountReadyEventProperties { - address: string; -} -export interface AccountAddressChangedEventProperties { - address: string; -} export const analytics = { addUserProperties: (properties: AnalyticsUserOptions): void => { @@ -68,10 +62,9 @@ export const analytics = { }, trackInstantOpened: trackingEventFnWithoutPayload(EventNames.INSTANT_OPENED), trackAccountLocked: trackingEventFnWithoutPayload(EventNames.ACCOUNT_LOCKED), - trackAccountReady: (eventProperties: AccountReadyEventProperties) => - trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ ...eventProperties }), + trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.ACCOUNT_READY)({ address }), trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_REQUESTED), trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.ACCOUNT_UNLOCK_DENIED), - trackAccountAddressChanged: (eventProperties: AccountAddressChangedEventProperties) => - trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ ...eventProperties }), + trackAccountAddressChanged: (address: string) => + trackingEventFnWithPayload(EventNames.ACCOUNT_ADDRESS_CHANGED)({ address }), }; -- cgit v1.2.3 From 06cc66005cf0713fcc877ae67b51b38fb110b09d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Thu, 22 Nov 2018 14:16:08 +0100 Subject: Make contract-templates an npm package --- packages/0x.js/package.json | 1 - packages/abi-gen-wrappers/package.json | 3 +- packages/contract-templates/CHANGELOG.json | 11 +++ packages/contract-templates/README.md | 17 ++++ packages/contract-templates/contract.handlebars | 91 ++++++++++++++++++++++ packages/contract-templates/package.json | 20 +++++ .../contract-templates/partials/call.handlebars | 3 + .../partials/callAsync.handlebars | 28 +++++++ .../contract-templates/partials/event.handlebars | 5 ++ .../contract-templates/partials/params.handlebars | 3 + .../partials/return_type.handlebars | 10 +++ packages/contract-templates/partials/tx.handlebars | 60 ++++++++++++++ .../partials/typed_params.handlebars | 3 + packages/contract_templates/README.md | 17 ---- packages/contract_templates/contract.handlebars | 91 ---------------------- .../contract_templates/partials/call.handlebars | 3 - .../partials/callAsync.handlebars | 28 ------- .../contract_templates/partials/event.handlebars | 5 -- .../contract_templates/partials/params.handlebars | 3 - .../partials/return_type.handlebars | 10 --- packages/contract_templates/partials/tx.handlebars | 60 -------------- .../partials/typed_params.handlebars | 3 - packages/contracts/package.json | 2 +- packages/metacoin/package.json | 3 +- 24 files changed, 256 insertions(+), 224 deletions(-) create mode 100644 packages/contract-templates/CHANGELOG.json create mode 100644 packages/contract-templates/README.md create mode 100644 packages/contract-templates/contract.handlebars create mode 100644 packages/contract-templates/package.json create mode 100644 packages/contract-templates/partials/call.handlebars create mode 100644 packages/contract-templates/partials/callAsync.handlebars create mode 100644 packages/contract-templates/partials/event.handlebars create mode 100644 packages/contract-templates/partials/params.handlebars create mode 100644 packages/contract-templates/partials/return_type.handlebars create mode 100644 packages/contract-templates/partials/tx.handlebars create mode 100644 packages/contract-templates/partials/typed_params.handlebars delete mode 100644 packages/contract_templates/README.md delete mode 100644 packages/contract_templates/contract.handlebars delete mode 100644 packages/contract_templates/partials/call.handlebars delete mode 100644 packages/contract_templates/partials/callAsync.handlebars delete mode 100644 packages/contract_templates/partials/event.handlebars delete mode 100644 packages/contract_templates/partials/params.handlebars delete mode 100644 packages/contract_templates/partials/return_type.handlebars delete mode 100644 packages/contract_templates/partials/tx.handlebars delete mode 100644 packages/contract_templates/partials/typed_params.handlebars (limited to 'packages') diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json index bc7ee2c87..3850e9038 100644 --- a/packages/0x.js/package.json +++ b/packages/0x.js/package.json @@ -42,7 +42,6 @@ }, "license": "Apache-2.0", "devDependencies": { - "@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", diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index 0977ca03a..df1c484ec 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -15,7 +15,7 @@ "lint": "tslint --format stylish --project .", "pre_build": "yarn generate_contract_wrappers", "clean": "shx rm -rf lib wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" }, "config": { "abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|OrderValidator|WETH9|ZRXToken).json" @@ -31,6 +31,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { "@0x/abi-gen": "^1.0.17", + "@0x/contract-templates": "^1.0.0", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.3.0", "@0x/utils": "^2.0.6", diff --git a/packages/contract-templates/CHANGELOG.json b/packages/contract-templates/CHANGELOG.json new file mode 100644 index 000000000..adf615b3b --- /dev/null +++ b/packages/contract-templates/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial publish", + "pr": 1305 + } + ] + } +] diff --git a/packages/contract-templates/README.md b/packages/contract-templates/README.md new file mode 100644 index 000000000..c6cc3b1b3 --- /dev/null +++ b/packages/contract-templates/README.md @@ -0,0 +1,17 @@ +These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen). + +To successfully compile the generated TypeScript contract wrappers, you must: + +* Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` +* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` +* Ensure that your TypeScript configuration includes the following: + +``` +"compilerOptions": { + "lib": ["ES2015"], + "typeRoots": [ + "node_modules/@0x/typescript-typings/types", + "node_modules/@types" + ] +} +``` diff --git a/packages/contract-templates/contract.handlebars b/packages/contract-templates/contract.handlebars new file mode 100644 index 000000000..9b2a2b336 --- /dev/null +++ b/packages/contract-templates/contract.handlebars @@ -0,0 +1,91 @@ +// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name +// tslint:disable:no-unused-variable +// tslint:disable:no-unbound-method +import { BaseContract } from '@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'; +// tslint:enable:no-unused-variable + +{{#if events}} +export type {{contractName}}EventArgs = +{{#each events}} + | {{@root.contractName}}{{name}}EventArgs{{#if @last}};{{/if}} +{{/each}} + +export enum {{contractName}}Events { + {{#each events}} + {{name}} = '{{name}}', + {{/each}} +} + +{{#each events}} +{{> event}} + +{{/each}} +{{/if}} + +/* istanbul ignore next */ +// tslint:disable:no-parameter-reassignment +// tslint:disable-next-line:class-name +export class {{contractName}}Contract extends BaseContract { +{{#each methods}} + {{#this.constant}} + {{> call contractName=../contractName}} + {{/this.constant}} + {{^this.constant}} + {{> tx contractName=../contractName}} + {{/this.constant}} +{{/each}} + public static async deployFrom0xArtifactAsync( + artifact: ContractArtifact | SimpleContractArtifact, + provider: Provider, + txDefaults: Partial, + {{> typed_params inputs=ctor.inputs}} + ): Promise<{{contractName}}Contract> { + if (_.isUndefined(artifact.compilerOutput)) { + throw new Error('Compiler output not found in the artifact file'); + } + const bytecode = artifact.compilerOutput.evm.bytecode.object; + const abi = artifact.compilerOutput.abi; + return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); + } + public static async deployAsync( + bytecode: string, + abi: ContractAbi, + provider: Provider, + txDefaults: Partial, + {{> typed_params inputs=ctor.inputs}} + ): Promise<{{contractName}}Contract> { + const constructorAbi = BaseContract._lookupConstructorAbi(abi); + [{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList( + constructorAbi.inputs, + [{{> params inputs=ctor.inputs}}], + BaseContract._bigNumberToString, + ); + const iface = new ethers.utils.Interface(abi); + const deployInfo = iface.deployFunction; + const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); + const web3Wrapper = new Web3Wrapper(provider); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + {data: txData}, + txDefaults, + web3Wrapper.estimateGasAsync.bind(web3Wrapper), + ); + const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); + logUtils.log(`transactionHash: ${txHash}`); + const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); + logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); + const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); + contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; + return contractInstance; + } + constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { + super('{{contractName}}', abi, address, provider, txDefaults); + classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); + } +} // tslint:disable:max-file-line-count +// tslint:enable:no-unbound-method diff --git a/packages/contract-templates/package.json b/packages/contract-templates/package.json new file mode 100644 index 000000000..f79ae8931 --- /dev/null +++ b/packages/contract-templates/package.json @@ -0,0 +1,20 @@ +{ + "name": "@0x/contract-templates", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Handlebars templates used by abi-gen to generate contract-wrappers", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-templates/README.md", + "publishConfig": { + "access": "public" + } +} diff --git a/packages/contract-templates/partials/call.handlebars b/packages/contract-templates/partials/call.handlebars new file mode 100644 index 000000000..7c9c934c3 --- /dev/null +++ b/packages/contract-templates/partials/call.handlebars @@ -0,0 +1,3 @@ +public {{this.tsName}} = { + {{> callAsync}} +}; diff --git a/packages/contract-templates/partials/callAsync.handlebars b/packages/contract-templates/partials/callAsync.handlebars new file mode 100644 index 000000000..ddbbe7508 --- /dev/null +++ b/packages/contract-templates/partials/callAsync.handlebars @@ -0,0 +1,28 @@ +async callAsync( +{{> typed_params inputs=inputs}} + callData: Partial = {}, + defaultBlock?: BlockParam, +): Promise<{{> return_type outputs=outputs}}> { + const self = this as any as {{contractName}}Contract; + const functionSignature = '{{this.functionSignature}}'; + const inputAbi = self._lookupAbi(functionSignature).inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); + BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); + const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}}; + const encodedData = ethersFunction.encode([{{> params inputs=inputs}}]); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); + let resultArray = ethersFunction.decode(rawCallResult); + const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs; + resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); + resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); + return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}}; +}, diff --git a/packages/contract-templates/partials/event.handlebars b/packages/contract-templates/partials/event.handlebars new file mode 100644 index 000000000..61d523ca2 --- /dev/null +++ b/packages/contract-templates/partials/event.handlebars @@ -0,0 +1,5 @@ +export interface {{@root.contractName}}{{name}}EventArgs extends DecodedLogArgs { + {{#each inputs}} + {{name}}: {{#returnType type components}}{{/returnType}}; + {{/each}} +} diff --git a/packages/contract-templates/partials/params.handlebars b/packages/contract-templates/partials/params.handlebars new file mode 100644 index 000000000..2d9bb8ed9 --- /dev/null +++ b/packages/contract-templates/partials/params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} +{{name}}{{#if @last}}{{else}},{{/if}} +{{/each}} diff --git a/packages/contract-templates/partials/return_type.handlebars b/packages/contract-templates/partials/return_type.handlebars new file mode 100644 index 000000000..77d96e8c4 --- /dev/null +++ b/packages/contract-templates/partials/return_type.handlebars @@ -0,0 +1,10 @@ +{{#if outputs.length}} +{{#singleReturnValue}} +{{#returnType outputs.0.type outputs.0.components}}{{/returnType}} +{{/singleReturnValue}} +{{^singleReturnValue}} +[{{#each outputs}}{{#returnType type components}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] +{{/singleReturnValue}} +{{else}} +void +{{/if}} diff --git a/packages/contract-templates/partials/tx.handlebars b/packages/contract-templates/partials/tx.handlebars new file mode 100644 index 000000000..b39156583 --- /dev/null +++ b/packages/contract-templates/partials/tx.handlebars @@ -0,0 +1,60 @@ +public {{this.tsName}} = { + async sendTransactionAsync( + {{> typed_params inputs=inputs}} + {{#this.payable}} + txData: Partial = {}, + {{/this.payable}} + {{^this.payable}} + txData: Partial = {}, + {{/this.payable}} + ): Promise { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); + BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + self.{{this.tsName}}.estimateGasAsync.bind( + self, + {{> params inputs=inputs}} + ), + ); + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + async estimateGasAsync( + {{> typed_params inputs=inputs}} + txData: Partial = {}, + ): Promise { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, + getABIEncodedTransactionData( + {{> typed_params inputs=inputs}} + ): string { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); + const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + return abiEncodedTransactionData; + }, + {{> callAsync}} +}; diff --git a/packages/contract-templates/partials/typed_params.handlebars b/packages/contract-templates/partials/typed_params.handlebars new file mode 100644 index 000000000..c100e58f7 --- /dev/null +++ b/packages/contract-templates/partials/typed_params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} + {{name}}: {{#parameterType type components}}{{/parameterType}}, +{{/each}} diff --git a/packages/contract_templates/README.md b/packages/contract_templates/README.md deleted file mode 100644 index c6cc3b1b3..000000000 --- a/packages/contract_templates/README.md +++ /dev/null @@ -1,17 +0,0 @@ -These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen). - -To successfully compile the generated TypeScript contract wrappers, you must: - -* Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` -* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` -* Ensure that your TypeScript configuration includes the following: - -``` -"compilerOptions": { - "lib": ["ES2015"], - "typeRoots": [ - "node_modules/@0x/typescript-typings/types", - "node_modules/@types" - ] -} -``` diff --git a/packages/contract_templates/contract.handlebars b/packages/contract_templates/contract.handlebars deleted file mode 100644 index 9b2a2b336..000000000 --- a/packages/contract_templates/contract.handlebars +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@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'; -// tslint:enable:no-unused-variable - -{{#if events}} -export type {{contractName}}EventArgs = -{{#each events}} - | {{@root.contractName}}{{name}}EventArgs{{#if @last}};{{/if}} -{{/each}} - -export enum {{contractName}}Events { - {{#each events}} - {{name}} = '{{name}}', - {{/each}} -} - -{{#each events}} -{{> event}} - -{{/each}} -{{/if}} - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class {{contractName}}Contract extends BaseContract { -{{#each methods}} - {{#this.constant}} - {{> call contractName=../contractName}} - {{/this.constant}} - {{^this.constant}} - {{> tx contractName=../contractName}} - {{/this.constant}} -{{/each}} - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [{{> params inputs=ctor.inputs}}], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('{{contractName}}', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/contract_templates/partials/call.handlebars b/packages/contract_templates/partials/call.handlebars deleted file mode 100644 index 7c9c934c3..000000000 --- a/packages/contract_templates/partials/call.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -public {{this.tsName}} = { - {{> callAsync}} -}; diff --git a/packages/contract_templates/partials/callAsync.handlebars b/packages/contract_templates/partials/callAsync.handlebars deleted file mode 100644 index ddbbe7508..000000000 --- a/packages/contract_templates/partials/callAsync.handlebars +++ /dev/null @@ -1,28 +0,0 @@ -async callAsync( -{{> typed_params inputs=inputs}} - callData: Partial = {}, - defaultBlock?: BlockParam, -): Promise<{{> return_type outputs=outputs}}> { - const self = this as any as {{contractName}}Contract; - const functionSignature = '{{this.functionSignature}}'; - const inputAbi = self._lookupAbi(functionSignature).inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); - BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); - const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}}; - const encodedData = ethersFunction.encode([{{> params inputs=inputs}}]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - let resultArray = ethersFunction.decode(rawCallResult); - const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}}; -}, diff --git a/packages/contract_templates/partials/event.handlebars b/packages/contract_templates/partials/event.handlebars deleted file mode 100644 index 61d523ca2..000000000 --- a/packages/contract_templates/partials/event.handlebars +++ /dev/null @@ -1,5 +0,0 @@ -export interface {{@root.contractName}}{{name}}EventArgs extends DecodedLogArgs { - {{#each inputs}} - {{name}}: {{#returnType type components}}{{/returnType}}; - {{/each}} -} diff --git a/packages/contract_templates/partials/params.handlebars b/packages/contract_templates/partials/params.handlebars deleted file mode 100644 index 2d9bb8ed9..000000000 --- a/packages/contract_templates/partials/params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} -{{name}}{{#if @last}}{{else}},{{/if}} -{{/each}} diff --git a/packages/contract_templates/partials/return_type.handlebars b/packages/contract_templates/partials/return_type.handlebars deleted file mode 100644 index 77d96e8c4..000000000 --- a/packages/contract_templates/partials/return_type.handlebars +++ /dev/null @@ -1,10 +0,0 @@ -{{#if outputs.length}} -{{#singleReturnValue}} -{{#returnType outputs.0.type outputs.0.components}}{{/returnType}} -{{/singleReturnValue}} -{{^singleReturnValue}} -[{{#each outputs}}{{#returnType type components}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] -{{/singleReturnValue}} -{{else}} -void -{{/if}} diff --git a/packages/contract_templates/partials/tx.handlebars b/packages/contract_templates/partials/tx.handlebars deleted file mode 100644 index b39156583..000000000 --- a/packages/contract_templates/partials/tx.handlebars +++ /dev/null @@ -1,60 +0,0 @@ -public {{this.tsName}} = { - async sendTransactionAsync( - {{> typed_params inputs=inputs}} - {{#this.payable}} - txData: Partial = {}, - {{/this.payable}} - {{^this.payable}} - txData: Partial = {}, - {{/this.payable}} - ): Promise { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); - BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); - const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.{{this.tsName}}.estimateGasAsync.bind( - self, - {{> params inputs=inputs}} - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - {{> typed_params inputs=inputs}} - txData: Partial = {}, - ): Promise { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); - const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - {{> typed_params inputs=inputs}} - ): string { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); - const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - return abiEncodedTransactionData; - }, - {{> callAsync}} -}; diff --git a/packages/contract_templates/partials/typed_params.handlebars b/packages/contract_templates/partials/typed_params.handlebars deleted file mode 100644 index c100e58f7..000000000 --- a/packages/contract_templates/partials/typed_params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} - {{name}}: {{#parameterType type components}}{{/parameterType}}, -{{/each}} diff --git a/packages/contracts/package.json b/packages/contracts/package.json index e10678d83..4fb0838f4 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -22,7 +22,7 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler --contracts-dir contracts", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index c5679a1d6..8081c03c9 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -18,7 +18,7 @@ "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov", "test:profile": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit --timeout 10000", - "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", "profiler:report:html": "istanbul report html && open coverage/index.html", @@ -30,6 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@0x/abi-gen": "^1.0.17", + "@0x/contract-templates": "^1.0.0", "@0x/base-contract": "^3.0.7", "@0x/sol-cov": "^2.1.13", "@0x/subproviders": "^2.1.5", -- cgit v1.2.3 From 03b3b80a657de864f020f605060b0dffd452b482 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 23 Nov 2018 15:20:33 +1100 Subject: bug: Only unmarshall receipt if blockNumber present. https://github.com/paritytech/parity-ethereum/issues/1180 Parity can return a pending transaction receipt with a number of null values --- packages/web3-wrapper/CHANGELOG.json | 9 +++++++++ packages/web3-wrapper/src/web3_wrapper.ts | 7 +++++-- 2 files changed, 14 insertions(+), 2 deletions(-) (limited to 'packages') diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json index 9725640ac..ad6902e33 100644 --- a/packages/web3-wrapper/CHANGELOG.json +++ b/packages/web3-wrapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "3.1.6", + "changes": [ + { + "note": "Unmarshall mined transaction receipts", + "pr": 1308 + } + ] + }, { "version": "3.1.5", "changes": [ diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts index f1247e48a..76cae4b01 100644 --- a/packages/web3-wrapper/src/web3_wrapper.ts +++ b/packages/web3-wrapper/src/web3_wrapper.ts @@ -223,7 +223,10 @@ export class Web3Wrapper { method: 'eth_getTransactionReceipt', params: [txHash], }); - if (!_.isNull(transactionReceiptRpc)) { + // HACK Parity can return a pending transaction receipt. We check for a non null + // block number before continuing with returning a fully realised receipt. + // ref: https://github.com/paritytech/parity-ethereum/issues/1180 + if (!_.isNull(transactionReceiptRpc) && !_.isNull(transactionReceiptRpc.blockNumber)) { transactionReceiptRpc.status = Web3Wrapper._normalizeTxReceiptStatus(transactionReceiptRpc.status); const transactionReceipt = marshaller.unmarshalTransactionReceipt(transactionReceiptRpc); return transactionReceipt; @@ -577,7 +580,7 @@ export class Web3Wrapper { } // Immediately check if the transaction has already been mined. let transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash); - if (!_.isUndefined(transactionReceipt) && !_.isNull(transactionReceipt.blockNumber)) { + if (!_.isUndefined(transactionReceipt)) { const logsWithDecodedArgs = _.map( transactionReceipt.logs, this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder), -- cgit v1.2.3 From f0f6b26c3bb206f59549e086b788da85bedd26f2 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Fri, 23 Nov 2018 17:52:08 +1100 Subject: bug: Use Testnet Exchange over mainnet --- packages/abi-gen-wrappers/CHANGELOG.json | 9 +++++++++ .../abi-gen-wrappers/src/generated-wrappers/exchange.ts | 17 ++++++++++++----- packages/contract-artifacts/CHANGELOG.json | 9 +++++++++ packages/contract-artifacts/artifacts/Exchange.json | 9 +++++++-- packages/migrations/src/migration.ts | 1 + 5 files changed, 38 insertions(+), 7 deletions(-) (limited to 'packages') diff --git a/packages/abi-gen-wrappers/CHANGELOG.json b/packages/abi-gen-wrappers/CHANGELOG.json index 955b8220f..f74d98afa 100644 --- a/packages/abi-gen-wrappers/CHANGELOG.json +++ b/packages/abi-gen-wrappers/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "2.0.0", + "changes": [ + { + "pr": 1309, + "note": "Update Exchange artifact to receive ZRX asset data as a constructor argument" + } + ] + }, { "version": "1.1.0", "changes": [ diff --git a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts index a04b6025e..11b5e7024 100644 --- a/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts +++ b/packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts @@ -3028,29 +3028,35 @@ export class ExchangeContract extends BaseContract { artifact: ContractArtifact | SimpleContractArtifact, provider: Provider, txDefaults: Partial, + _zrxAssetData: string, ): Promise { if (_.isUndefined(artifact.compilerOutput)) { throw new Error('Compiler output not found in the artifact file'); } const bytecode = artifact.compilerOutput.evm.bytecode.object; const abi = artifact.compilerOutput.abi; - return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, ); + return ExchangeContract.deployAsync(bytecode, abi, provider, txDefaults, _zrxAssetData +); } public static async deployAsync( bytecode: string, abi: ContractAbi, provider: Provider, txDefaults: Partial, + _zrxAssetData: string, ): Promise { const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [] = BaseContract._formatABIDataItemList( + [_zrxAssetData +] = BaseContract._formatABIDataItemList( constructorAbi.inputs, - [], + [_zrxAssetData +], BaseContract._bigNumberToString, ); const iface = new ethers.utils.Interface(abi); const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, []); + const txData = deployInfo.encode(bytecode, [_zrxAssetData +]); const web3Wrapper = new Web3Wrapper(provider); const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( {data: txData}, @@ -3062,7 +3068,8 @@ export class ExchangeContract extends BaseContract { const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); logUtils.log(`Exchange successfully deployed at ${txReceipt.contractAddress}`); const contractInstance = new ExchangeContract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = []; + contractInstance.constructorArgs = [_zrxAssetData +]; return contractInstance; } constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { diff --git a/packages/contract-artifacts/CHANGELOG.json b/packages/contract-artifacts/CHANGELOG.json index 8833255ed..b75ad5766 100644 --- a/packages/contract-artifacts/CHANGELOG.json +++ b/packages/contract-artifacts/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.1.2", + "changes": [ + { + "pr": 1309, + "note": "Update Exchange artifact to receive ZRX asset data as a constructor argument" + } + ] + }, { "version": "1.1.0", "changes": [ diff --git a/packages/contract-artifacts/artifacts/Exchange.json b/packages/contract-artifacts/artifacts/Exchange.json index 893bc5eae..6e586b899 100644 --- a/packages/contract-artifacts/artifacts/Exchange.json +++ b/packages/contract-artifacts/artifacts/Exchange.json @@ -1798,7 +1798,12 @@ "type": "function" }, { - "inputs": [], + "inputs": [ + { + "name": "_zrxAssetData", + "type": "bytes" + } + ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" @@ -1968,7 +1973,7 @@ "bytecode": { "linkReferences": {}, "object": - "0x60806040526000805460ff191690553480156200001b57600080fd5b50604080517f454950373132446f6d61696e28000000000000000000000000000000000000006020808301919091527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8301527f737472696e672076657273696f6e2c000000000000000000000000000000000060398301527f6164647265737320766572696679696e67436f6e74726163740000000000000060488301527f2900000000000000000000000000000000000000000000000000000000000000606183015282516042818403018152606290920192839052815191929182918401908083835b60208310620001245780518252601f19909201916020918201910162000103565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208285018552600b8084527f30782050726f746f636f6c000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620001ae5780518252601f1990920191602091820191016200018d565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3200000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620002385780518252601f19909201916020918201910162000217565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250306080808701919091528151808703909101815260a09095019081905284519093849350850191508083835b60208310620002c35780518252601f199092019160209182019101620002a2565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600155505060028054600160a060020a03191633179055506158b380620003166000396000f3006080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d6366004614800565b610664565b6040516101e89190615425565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614723565b610676565b6040516101e891906156ff565b34801561022a57600080fd5b5061023e610239366004614800565b6107a1565b6040516101e89190615417565b34801561025757600080fd5b5061026b61026636600461483d565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614971565b6108a3565b6040516101e8919061570d565b3480156102a657600080fd5b506102116102b5366004614a31565b610a3a565b3480156102c657600080fd5b506102da6102d5366004614900565b610a90565b6040516101e891906154e1565b3480156102f357600080fd5b5061026b6103023660046146ee565b610ab8565b34801561031357600080fd5b50610211610322366004614723565b610b85565b34801561033357600080fd5b5061026b610342366004614800565b610c75565b34801561035357600080fd5b50610211610362366004614723565b610e2a565b34801561037357600080fd5b50610387610382366004614900565b610ebe565b6040516101e89190615337565b3480156103a057600080fd5b5061023e6103af366004614800565b610f0c565b3480156103c057600080fd5b506102116103cf366004614a31565b610f21565b3480156103e057600080fd5b5061026b6103ef3660046146be565b610fcc565b34801561040057600080fd5b5061023e61040f366004614684565b611106565b34801561042057600080fd5b5061021161042f3660046147b7565b611126565b34801561044057600080fd5b5061045461044f3660046146ee565b61128a565b6040516101e89190615406565b34801561046d57600080fd5b5061023e61047c36600461481e565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b13660046148a5565b61135b565b3480156104c257600080fd5b506102116104d13660046147b7565b6118de565b3480156104e257600080fd5b506102116104f1366004614a31565b6119f1565b34801561050257600080fd5b5061026b610511366004614a7a565b611a6c565b34801561052257600080fd5b5061026b610531366004614666565b611d05565b34801561054257600080fd5b5061055661055136600461493c565b611f30565b6040516101e8919061571c565b34801561056f57600080fd5b5061026b61057e36600461493c565b61202a565b34801561058f57600080fd5b506101db61059e366004614684565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906154d0565b3480156105d157600080fd5b506102116105e03660046147b7565b612143565b3480156105f157600080fd5b506101db612218565b34801561060657600080fd5b506102116106153660046147b7565b61221e565b34801561062657600080fd5b50610387612390565b34801561063b57600080fd5b5061026b61064a366004614666565b6123ac565b34801561065b57600080fd5b506105b861245d565b60036020526000908152604090205481565b61067e614298565b600080610689614298565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b90602001906020020151612494565b90506107648482612532565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60046020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155af565b5050600091825260066020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6142c1565b6108b36142f0565b6108bb6142f0565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a612594565b9050610968888483896125c6565b610974878383886125c6565b61097e888861275e565b6109928888856040015185604001516127be565b8051602081015190519195506109ad918a9186918190612945565b6020808501519081015190516109c99189918591908190612945565b6109e28882856020015186604001518860000151612a5e565b6109fb8782846020015185604001518860200151612a5e565b610a0788888387612b0a565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614298565b6060610a4f858585612c92565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600a6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612e64565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614298565b600080610b98614298565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612e8f565b9050610c6a8482612532565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec612594565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600560209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563f565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526005602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615425565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614298565b600080610e3d614298565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea98482612532565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600a602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60086020526000908152604090205460ff1681565b610f29614298565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612e8f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d612594565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600760209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615417565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600760209081526000928352604080842090915290825290205460ff1681565b61112e614298565b6060600080600061113d614298565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612ee2565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a8682612532565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6142f0565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600660209081526000928352604080842090915290825290205460ff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061562f565b6113ad89612f29565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061554f565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061561f565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ef565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906154ef565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff612fed16565b935061156d89602163ffffffff612fed16565b925060018b868686604051600081526020016040526040516115929493929190615480565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906154ef565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff612fed16565b93506116b689602163ffffffff612fed16565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260408051929094018290038220600083529101928390526115929450925089918991508890615480565b60048660078111156117c757fe5b14156117df576117d88b8b8b613038565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc8961318d565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526007602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c613206565b600686600781111561185e57fe5b141561189e5760008b815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061554f565b505050505050509392505050565b6118e6614298565b60606000806000806118f6614298565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612ee2565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b906020019060200201516080015185613362565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc8782612532565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614298565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612494565b60095460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b611b02611afd888888888080601f016020809104026020016040519081016040528093929190818152602001838380828437506133b8945050505050565b6135f9565b60008181526008602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061559f565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156df565b600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600860205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155cf565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600980547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6002546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061568f565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc919081019061491e565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600a602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061552f565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600a60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906154b5565b60405180910390a150505050565b611f386142f0565b611f4182613639565b6020808301829052600091825260039052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526004909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526005602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612e64565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600560209081526000928352604080842090915290825290205481565b606060405190810160405280602481526020017ff47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f81526020017f4699f4980000000000000000000000000000000000000000000000000000000081525081565b61214b614298565b6060600080600061215a614298565b88600081518110151561216957fe5b906020019060200201516101600151945088519350600092505b82841461220c5784898481518110151561219957fe5b9060200190602002015161016001819052506121b9888760200151612ee2565b91506121e589848151811015156121cc57fe5b90602001906020020151838986815181101515610e8e57fe5b90506121f18682612532565b602086015188116122015761220c565b600190920191612183565b50505050509392505050565b60015481565b612226614298565b6060600080600080612236614298565b60005460ff1615612273576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567f565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122ab57fe5b906020019060200201516101400151955089519450600093505b83851461235a57858a858151811015156122db57fe5b60209081029091010151610140015286516122f7908a90612ee2565b925061230a8a8581518110151561196457fe5b91506123368a8581518110151561231d57fe5b90602001906020020151838a8781518110151561074957fe5b90506123428782612532565b8651891161234f5761235a565b6001909301926122c5565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b60095473ffffffffffffffffffffffffffffffffffffffff1681565b60025473ffffffffffffffffffffffffffffffffffffffff1633146123fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061568f565b73ffffffffffffffffffffffffffffffffffffffff81161561245a57600280547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015281565b61249c614298565b6124a46142f0565b60008060006124b288611f30565b93506124bc612594565b92506124ca888585896125c6565b6124dc8860a001518560400151612ee2565b91506124e88783613647565b90506124fb888589848960000151612945565b612505888261365d565b945061251c88848660200151876040015189612a5e565b6125278884876136be565b505050509392505050565b815181516125409190613776565b8252602080830151908201516125569190613776565b60208301526040808301519082015161256f9190613776565b6040830152606080830151908201516125889190613776565b60609092019190915250565b60095460009073ffffffffffffffffffffffffffffffffffffffff168181156125bd57816125bf565b335b9392505050565b825160ff16600314612604576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156af565b606084015173ffffffffffffffffffffffffffffffffffffffff161561267757606084015173ffffffffffffffffffffffffffffffffffffffff163314612677576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156bf565b602084015173ffffffffffffffffffffffffffffffffffffffff1615612702578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff16141515612702576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906154ff565b6040830151151561275857612720836020015185600001518361135b565b1515612758576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061556f565b50505050565b6127708260a001518260a001516137c0565b612782836080015183608001516137c0565b10156127ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156cf565b5050565b6127c66142c1565b6000806000806127da8960a0015188612ee2565b93506127ef89608001518a60a001518661381b565b92506127ff8860a0015187612ee2565b915061281488608001518960a001518461381b565b90508084106128575760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161284f929061381b565b855152612894565b845183905284516020908101859052855181015190860180519190915260a089015160808a015191515161288b9290613898565b60208087015101525b84515160208087015101516128a99190612ee2565b604086015284515160808a015160c08b01516128c692919061381b565b85516040015284516020015160a08a015160e08b01516128e792919061381b565b855160600152602085015151608089015160c08a015161290892919061381b565b856020015160400181815250506129308560200151602001518960a001518a60e0015161381b565b60208601516060015250505050949350505050565b82151561297e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155ef565b828211156129b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155df565b8460a001516129cb856040015184613776565b1115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061550f565b612a118560800151836137c0565b612a1f828760a001516137c0565b1115612a57576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061566f565b5050505050565b612a6c828260200151613776565b600084815260036020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612afb968f96339692959194909390615345565b60405180910390a45050505050565b60608060405190810160405280602481526020017ff47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f81526020017f4699f498000000000000000000000000000000000000000000000000000000008152509050612b8b85610140015186600001518660000151856020015160200151613935565b61014084015184518651845160200151612ba793929190613935565b612bc08561014001518660000151858560400151613935565b612bdc8186600001518760400151856000015160400151613935565b612bf88185600001518660400151856020015160400151613935565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612c6257612c5d81848760400151612c58866000015160600151876020015160600151613776565b613935565b612a57565b612c7a81848760400151856000015160600151613935565b612a5781848660400151856020015160600151613935565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612d99578351855260209485019490930192600101612d7b565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612de2578351855260209485019490930192600101612dc4565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612e2a578351855260209485019490930192600101612e0c565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612e6c6142f0565b612e7582611f30565b9050612e818282613aff565b6127ba828260200151613c16565b612e97614298565b612ea2848484612494565b602081015190915083146125bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061565f565b600082821115612f1e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061551f565b508082035b92915050565b6000808251111515612f67576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061560f565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8101908110612f9757fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b60008160200183511015151561302f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061553f565b50016020015190565b6040516000906060907f1626ba7e00000000000000000000000000000000000000000000000000000000906130739087908690602401615460565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093178352815191935090829081885afa808015613110576001811461318157612527565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b50505195945050505050565b600060148251101515156131cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061569f565b6131db826014845103613cbd565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b6040516000906060907f93634702000000000000000000000000000000000000000000000000000000009061324390879087908790602401615433565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931783528151919350908290818a5afa8080156132e0576001811461335157613356565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b825194505b50505050949350505050565b600080831161339d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061555f565b6133b06133aa85846137c0565b84613d1e565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b602083106134e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016134a4565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061357757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161353a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b6001546040517f19010000000000000000000000000000000000000000000000000000000000008152600281019190915260228101919091526042902090565b6000612f23611afd83613d35565b600081831061365657816125bf565b5090919050565b613665614298565b6020810182905260a0830151608084015161368191849161381b565b808252608084015160c085015161369992919061381b565b604082015260a083015160e08401516136b391849161381b565b606082015292915050565b60408051606081018252602481527ff47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f60208201527f4699f4980000000000000000000000000000000000000000000000000000000091810191909152610140840151845183516137319291908690613935565b61374a8461016001518486600001518560200151613935565b61376281856000015186604001518560400151613935565b612758818486604001518560600151613935565b6000828201838110156137b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061558f565b8091505b5092915050565b6000808315156137d357600091506137b9565b508282028284828115156137e357fe5b04146137b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061558f565b6000808311613856576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061555f565b61386184848461418e565b1561339d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155bf565b60008083116138d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061555f565b6138de848484614213565b15613915576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155bf565b6133b06133aa61392586856137c0565b613930866001612ee2565b613776565b60008060008311801561397457508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613af75785516003106139b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564f565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600a90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613a3d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155ff565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613ad957895181526020998a019901613ac1565b61020084858403866000895af1801515613af1573d85fd5b50505050505b505050505050565b805160009060ff16600314613b40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156af565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613bb357606083015173ffffffffffffffffffffffffffffffffffffffff163314613bb3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156bf565b613bbb612594565b835190915073ffffffffffffffffffffffffffffffffffffffff808316911614613c11576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061557f565b505050565b6000818152600460205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf792613cb1923392906153c9565b60405180910390a45050565b600081601401835110151515613cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061569f565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6000808284811515613d2c57fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b60208310613fbd57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613f80565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061405857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161401b565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106140f357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016140b6565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116141ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061555f565b8215806141d5575084155b156141e35760009150610a88565b838015156141ed57fe5b85840990506141fc85846137c0565b6142086103e8836137c0565b101595945050505050565b60008080841161424f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061555f565b82158061425a575084155b156142685760009150610a88565b8380151561427257fe5b8584099050836142828583612ee2565b81151561428b57fe5b0690506141fc85846137c0565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806142d6614298565b81526020016142e3614298565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b60006125bf82356157c2565b6000601f8201831361432d57600080fd5b813561434061433b82615751565b61572a565b81815260209384019390925082018360005b8381101561437e578135860161436888826144ce565b8452506020928301929190910190600101614352565b5050505092915050565b6000601f8201831361439957600080fd5b81356143a761433b82615751565b81815260209384019390925082018360005b8381101561437e57813586016143cf888261451d565b84525060209283019291909101906001016143b9565b6000601f820183136143f657600080fd5b813561440461433b82615751565b9150818183526020840193506020810190508385602084028201111561442957600080fd5b60005b8381101561437e578161443f8882614461565b845250602092830192919091019060010161442c565b60006125bf82356157db565b60006125bf82356157e0565b60006125bf82356157e3565b60006125bf82516157e3565b600080601f8301841361449757600080fd5b50813567ffffffffffffffff8111156144af57600080fd5b6020830191508360018202830111156144c757600080fd5b9250929050565b6000601f820183136144df57600080fd5b81356144ed61433b82615772565b9150808252602083016020830185838301111561450957600080fd5b614514838284615819565b50505092915050565b6000610180828403121561453057600080fd5b61453b61018061572a565b905060006145498484614310565b825250602061455a84848301614310565b602083015250604061456e84828501614310565b604083015250606061458284828501614310565b606083015250608061459684828501614461565b60808301525060a06145aa84828501614461565b60a08301525060c06145be84828501614461565b60c08301525060e06145d284828501614461565b60e0830152506101006145e784828501614461565b610100830152506101206145fd84828501614461565b6101208301525061014082013567ffffffffffffffff81111561461f57600080fd5b61462b848285016144ce565b6101408301525061016082013567ffffffffffffffff81111561464d57600080fd5b614659848285016144ce565b6101608301525092915050565b60006020828403121561467857600080fd5b60006133b08484614310565b6000806040838503121561469757600080fd5b60006146a38585614310565b92505060206146b485828601614310565b9150509250929050565b600080604083850312156146d157600080fd5b60006146dd8585614310565b92505060206146b485828601614455565b60006020828403121561470057600080fd5b813567ffffffffffffffff81111561471757600080fd5b6133b084828501614388565b60008060006060848603121561473857600080fd5b833567ffffffffffffffff81111561474f57600080fd5b61475b86828701614388565b935050602084013567ffffffffffffffff81111561477857600080fd5b614784868287016143e5565b925050604084013567ffffffffffffffff8111156147a157600080fd5b6147ad8682870161431c565b9150509250925092565b6000806000606084860312156147cc57600080fd5b833567ffffffffffffffff8111156147e357600080fd5b6147ef86828701614388565b935050602061478486828701614461565b60006020828403121561481257600080fd5b60006133b08484614461565b6000806040838503121561483157600080fd5b60006146a38585614461565b6000806000806060858703121561485357600080fd5b600061485f8787614461565b945050602061487087828801614310565b935050604085013567ffffffffffffffff81111561488d57600080fd5b61489987828801614485565b95989497509550505050565b6000806000606084860312156148ba57600080fd5b60006148c68686614461565b93505060206148d786828701614310565b925050604084013567ffffffffffffffff8111156148f457600080fd5b6147ad868287016144ce565b60006020828403121561491257600080fd5b60006133b0848461446d565b60006020828403121561493057600080fd5b60006133b08484614479565b60006020828403121561494e57600080fd5b813567ffffffffffffffff81111561496557600080fd5b6133b08482850161451d565b6000806000806080858703121561498757600080fd5b843567ffffffffffffffff81111561499e57600080fd5b6149aa8782880161451d565b945050602085013567ffffffffffffffff8111156149c757600080fd5b6149d38782880161451d565b935050604085013567ffffffffffffffff8111156149f057600080fd5b6149fc878288016144ce565b925050606085013567ffffffffffffffff811115614a1957600080fd5b614a25878288016144ce565b91505092959194509250565b600080600060608486031215614a4657600080fd5b833567ffffffffffffffff811115614a5d57600080fd5b614a698682870161451d565b93505060206148d786828701614461565b60008060008060008060808789031215614a9357600080fd5b6000614a9f8989614461565b9650506020614ab089828a01614310565b955050604087013567ffffffffffffffff811115614acd57600080fd5b614ad989828a01614485565b9450945050606087013567ffffffffffffffff811115614af857600080fd5b614b0489828a01614485565b92509250509295509295509295565b614b1c816157c2565b82525050565b6000614b2d826157be565b808452602084019350614b3f836157b8565b60005b82811015614b6f57614b558683516152f7565b614b5e826157b8565b606096909601959150600101614b42565b5093949350505050565b614b1c816157db565b614b1c816157e0565b614b1c816157e3565b6000614b9f826157be565b808452614bb3816020860160208601615825565b614bbc81615851565b9093016020019392505050565b614b1c8161580e565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906152858482614b82565b5060208201516152986020850182614b82565b5060408201516152ab6040850182614b82565b5060608201516127586060850182614b82565b80516101208301906152d08482615274565b5060208201516152e36080850182615274565b506040820151612758610100850182614b82565b80516060830190615308848261532e565b50602082015161531b6020850182614b82565b5060408201516127586040850182614b82565b614b1c81615808565b60208101612f238284614b13565b6101008101615354828b614b13565b615361602083018a614b13565b61536e6040830189614b82565b61537b6060830188614b82565b6153886080830187614b82565b61539560a0830186614b82565b81810360c08301526153a78185614b94565b905081810360e08301526153bb8184614b94565b9a9950505050505050505050565b606081016153d78286614b13565b81810360208301526153e98185614b94565b905081810360408301526153fd8184614b94565b95945050505050565b602080825281016125bf8184614b22565b60208101612f238284614b79565b60208101612f238284614b82565b606081016154418286614b82565b61544e6020830185614b13565b81810360408301526153fd8184614b94565b6040810161546e8285614b82565b81810360208301526133b08184614b94565b6080810161548e8287614b82565b61549b602083018661532e565b6154a86040830185614b82565b6153fd6060830184614b82565b604081016154c38285614b8b565b6125bf6020830184614b13565b602080825281016125bf8184614b94565b60208101612f238284614bc9565b60208082528101612f2381614bd2565b60208082528101612f2381614c02565b60208082528101612f2381614c32565b60208082528101612f2381614c62565b60208082528101612f2381614c92565b60208082528101612f2381614cc2565b60208082528101612f2381614d18565b60208082528101612f2381614d48565b60208082528101612f2381614d78565b60208082528101612f2381614da8565b60208082528101612f2381614dd8565b60208082528101612f2381614e08565b60208082528101612f2381614e38565b60208082528101612f2381614e68565b60208082528101612f2381614e98565b60208082528101612f2381614ec8565b60208082528101612f2381614ef8565b60208082528101612f2381614f28565b60208082528101612f2381614f58565b60208082528101612f2381614fae565b60208082528101612f2381614fde565b60208082528101612f238161500e565b60208082528101612f238161503e565b60208082528101612f238161506e565b60208082528101612f238161509e565b60208082528101612f23816150ce565b60208082528101612f23816150fe565b60208082528101612f238161512e565b60208082528101612f2381615184565b60208082528101612f23816151b4565b60208082528101612f23816151e4565b60208082528101612f2381615214565b60208082528101612f2381615244565b60808101612f238284615274565b6101208101612f2382846152be565b60608101612f2382846152f7565b60405181810167ffffffffffffffff8111828210171561574957600080fd5b604052919050565b600067ffffffffffffffff82111561576857600080fd5b5060209081020190565b600067ffffffffffffffff82111561578957600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612f23826157c2565b82818337506000910152565b60005b83811015615840578181015183820152602001615828565b838111156127585750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820b19c92201032603398c007dccf80930c626ef89fa6c848c8b7ef5267d07cd4ed6c6578706572696d656e74616cf50037" + "0x60806040526000805460ff191690553480156200001b57600080fd5b5060405162005ec038038062005ec083398101806040526200004191908101906200044d565b80518190620000589060019060208401906200034c565b5050604080517f454950373132446f6d61696e28000000000000000000000000000000000000006020808301919091527f737472696e67206e616d652c0000000000000000000000000000000000000000602d8301527f737472696e672076657273696f6e2c000000000000000000000000000000000060398301527f6164647265737320766572696679696e67436f6e74726163740000000000000060488301527f2900000000000000000000000000000000000000000000000000000000000000606183015282516042818403018152606290920192839052815191929182918401908083835b60208310620001625780518252601f19909201916020918201910162000141565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208285018552600b8084527f30782050726f746f636f6c000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620001ec5780518252601f199092019160209182019101620001cb565b51815160209384036101000a600019018019909216911617905260408051929094018290038220828501855260018084527f3200000000000000000000000000000000000000000000000000000000000000928401928352945190965091945090928392508083835b60208310620002765780518252601f19909201916020918201910162000255565b51815160209384036101000a6000190180199092169116179052604080519290940182900382208282019890985281840196909652606081019690965250306080808701919091528151808703909101815260a09095019081905284519093849350850191508083835b60208310620003015780518252601f199092019160209182019101620002e0565b5181516000196020949094036101000a939093019283169219169190911790526040519201829003909120600255505060038054600160a060020a03191633179055506200050f9050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200038f57805160ff1916838001178555620003bf565b82800160010185558215620003bf579182015b82811115620003bf578251825591602001919060010190620003a2565b50620003cd929150620003d1565b5090565b620003ee91905b80821115620003cd5760008155600101620003d8565b90565b6000601f820183136200040357600080fd5b81516200041a6200041482620004b4565b6200048d565b915080825260208301602083018583830111156200043757600080fd5b62000444838284620004dc565b50505092915050565b6000602082840312156200046057600080fd5b81516001604060020a038111156200047757600080fd5b6200048584828501620003f1565b949350505050565b6040518181016001604060020a0381118282101715620004ac57600080fd5b604052919050565b60006001604060020a03821115620004cb57600080fd5b506020601f91909101601f19160190565b60005b83811015620004f9578181015183820152602001620004df565b8381111562000509576000848401525b50505050565b6159a1806200051f6000396000f3006080604052600436106101b65763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663288cdc9181146101bb578063297bb70b146101f15780632ac126221461021e5780633683ef8e1461024b5780633c28d8611461026d5780633e228bae1461029a5780633fd3c997146102ba5780634ac14782146102e75780634d0ae546146103075780634f9559b11461032757806350dde190146103475780636070410814610367578063642f2eaf1461039457806364a3bc15146103b457806377fcce68146103d45780637b8e3514146103f45780637e1d9808146104145780637e9d74dc1461043457806382c174d0146104615780638da5cb5b146104815780639363470214610496578063a3e20380146104b6578063b4be83d5146104d6578063bfc8bfce146104f6578063c585bb9314610516578063c75e0a8114610536578063d46b02c314610563578063d9bfa73e14610583578063db123b1a146105a3578063dd1c7d18146105c5578063e306f779146105e5578063e5fa431b146105fa578063eea086ba1461061a578063f2fde38b1461062f578063ffa1ad741461064f575b600080fd5b3480156101c757600080fd5b506101db6101d63660046148ee565b610664565b6040516101e89190615513565b60405180910390f35b3480156101fd57600080fd5b5061021161020c366004614811565b610676565b6040516101e891906157ed565b34801561022a57600080fd5b5061023e6102393660046148ee565b6107a1565b6040516101e89190615505565b34801561025757600080fd5b5061026b61026636600461492b565b6107b6565b005b34801561027957600080fd5b5061028d610288366004614a5f565b6108a3565b6040516101e891906157fb565b3480156102a657600080fd5b506102116102b5366004614b1f565b610a3a565b3480156102c657600080fd5b506102da6102d53660046149ee565b610a90565b6040516101e891906155cf565b3480156102f357600080fd5b5061026b6103023660046147dc565b610ab8565b34801561031357600080fd5b50610211610322366004614811565b610b85565b34801561033357600080fd5b5061026b6103423660046148ee565b610c75565b34801561035357600080fd5b50610211610362366004614811565b610e2a565b34801561037357600080fd5b506103876103823660046149ee565b610ebe565b6040516101e89190615425565b3480156103a057600080fd5b5061023e6103af3660046148ee565b610f0c565b3480156103c057600080fd5b506102116103cf366004614b1f565b610f21565b3480156103e057600080fd5b5061026b6103ef3660046147ac565b610fcc565b34801561040057600080fd5b5061023e61040f366004614772565b611106565b34801561042057600080fd5b5061021161042f3660046148a5565b611126565b34801561044057600080fd5b5061045461044f3660046147dc565b61128a565b6040516101e891906154f4565b34801561046d57600080fd5b5061023e61047c36600461490c565b61131f565b34801561048d57600080fd5b5061038761133f565b3480156104a257600080fd5b5061023e6104b1366004614993565b61135b565b3480156104c257600080fd5b506102116104d13660046148a5565b6118de565b3480156104e257600080fd5b506102116104f1366004614b1f565b6119f1565b34801561050257600080fd5b5061026b610511366004614b68565b611a6c565b34801561052257600080fd5b5061026b610531366004614754565b611d05565b34801561054257600080fd5b50610556610551366004614a2a565b611f30565b6040516101e8919061580a565b34801561056f57600080fd5b5061026b61057e366004614a2a565b61202a565b34801561058f57600080fd5b506101db61059e366004614772565b6120c6565b3480156105af57600080fd5b506105b86120e3565b6040516101e891906155be565b3480156105d157600080fd5b506102116105e03660046148a5565b61218e565b3480156105f157600080fd5b506101db612263565b34801561060657600080fd5b506102116106153660046148a5565b612269565b34801561062657600080fd5b506103876123db565b34801561063b57600080fd5b5061026b61064a366004614754565b6123f7565b34801561065b57600080fd5b506105b86124a8565b60046020526000908152604090205481565b61067e614386565b600080610689614386565b60005460ff16156106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610758878381518110151561071957fe5b90602001906020020151878481518110151561073157fe5b90602001906020020151878581518110151561074957fe5b906020019060200201516124df565b9050610764848261257d565b600190910190610701565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509392505050565b60056020526000908152604090205460ff1681565b73ffffffffffffffffffffffffffffffffffffffff831633146108465761080e848484848080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515610846576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061569d565b5050600091825260076020908152604080842073ffffffffffffffffffffffffffffffffffffffff9093168452919052902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b6108ab6143af565b6108b36143de565b6108bb6143de565b6000805460ff16156108f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561016080890151610140808a01919091528901519088015261094588611f30565b925061095087611f30565b915061095a6125df565b905061096888848389612611565b61097487838388612611565b61097e88886127a9565b610992888885604001518560400151612809565b8051602081015190519195506109ad918a9186918190612990565b6020808501519081015190516109c99189918591908190612990565b6109e28882856020015186604001518860000151612aa9565b6109fb8782846020015185604001518860200151612aa9565b610a0788888387612b55565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550949350505050565b610a42614386565b6060610a4f858585612d2d565b9050608081825160208401305af48015610a8657815183526020820151602084015260408201516040840152606082015160608401525b505b509392505050565b600b6020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819060ff1615610af8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558151905b808214610b5857610b508382815181101515610b4157fe5b90602001906020020151612eff565b600101610b29565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b610b8d614386565b600080610b98614386565b60005460ff1615610bd5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558751935091505b81831461076f57610c5e8783815181101515610c1f57fe5b906020019060200201518784815181101515610c3757fe5b906020019060200201518785815181101515610c4f57fe5b90602001906020020151612f2a565b9050610c6a848261257d565b600190910190610c07565b6000805481908190819060ff1615610cb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610cec6125df565b935073ffffffffffffffffffffffffffffffffffffffff84163314610d115733610d14565b60005b73ffffffffffffffffffffffffffffffffffffffff8086166000908152600660209081526040808320938516835292905220549093506001860192509050808211610d8b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061572d565b73ffffffffffffffffffffffffffffffffffffffff80851660008181526006602090815260408083209488168084529490915290819020859055517f82af639571738f4ebd4268fb0363d8957ebe1bbb9e78dba5ebd69eed39b154f090610df3908690615513565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055505050565b610e32614386565b600080610e3d614386565b86519250600091505b818314610eb457610e9d8783815181101515610e5e57fe5b906020019060200201518784815181101515610e7657fe5b906020019060200201518785815181101515610e8e57fe5b90602001906020020151610a3a565b9050610ea9848261257d565b600190910190610e46565b5050509392505050565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205473ffffffffffffffffffffffffffffffffffffffff165b919050565b60096020526000908152604090205460ff1681565b610f29614386565b60005460ff1615610f66576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c848484612f2a565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055949350505050565b6000805460ff161561100a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561103d6125df565b73ffffffffffffffffffffffffffffffffffffffff8181166000818152600860209081526040808320948916808452949091529081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168715151790555192935090917fa8656e308026eeabce8f0bc18048433252318ab80ac79da0b3d3d8697dfba891906110d1908690615505565b60405180910390a35050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550565b600860209081526000928352604080842090915290825290205460ff1681565b61112e614386565b6060600080600061113d614386565b60005460ff161561117a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117815589518a919081106111b257fe5b906020019060200201516101600151945088519350600092505b828414611255578489848151811015156111e257fe5b906020019060200201516101600181905250611202888760200151612f7d565b915061122e898481518110151561121557fe5b9060200190602002015183898681518110151561074957fe5b905061123a868261257d565b6020860151881161124a57611255565b6001909201916111cc565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055509195945050505050565b606060006060600084519250826040519080825280602002602001820160405280156112d057816020015b6112bd6143de565b8152602001906001900390816112b55790505b509150600090505b808314610a88576112ff85828151811015156112f057fe5b90602001906020020151611f30565b828281518110151561130d57fe5b602090810290910101526001016112d8565b600760209081526000928352604080842090915290825290205460ff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600080600080600080600080600089511115156113a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061571d565b6113ad89612fc4565b7f010000000000000000000000000000000000000000000000000000000000000090049650600760ff88161061140f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b8660ff16600781111561141e57fe5b9550600086600781111561142e57fe5b1415611466576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061570d565b600186600781111561147457fe5b14156114bc578851156114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157dd565b600097506118d0565b60028660078111156114ca57fe5b141561160557885160411461150b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561151a57fe5b01602001517f010000000000000000000000000000000000000000000000000000000000000090819004810204945061155a89600163ffffffff61308816565b935061156d89602163ffffffff61308816565b925060018b86868660405160008152602001604052604051611592949392919061556e565b60206040516020810390808403906000865af11580156115b6573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015173ffffffffffffffffffffffffffffffffffffffff8c811690821614995092506118d09050565b600386600781111561161357fe5b14156117b9578851604114611654576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155dd565b88600081518110151561166357fe5b01602001517f01000000000000000000000000000000000000000000000000000000000000009081900481020494506116a389600163ffffffff61308816565b93506116b689602163ffffffff61308816565b925060018b60405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061175757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161171a565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822060008352910192839052611592945092508991899150889061556e565b60048660078111156117c757fe5b14156117df576117d88b8b8b6130d3565b97506118d0565b60058660078111156117ed57fe5b1415611850576117fc89613228565b73ffffffffffffffffffffffffffffffffffffffff808c1660009081526008602090815260408083209385168352929052205490915060ff16151561184457600097506118d0565b6117d8818c8c8c6132a1565b600686600781111561185e57fe5b141561189e5760008b815260076020908152604080832073ffffffffffffffffffffffffffffffffffffffff8e16845290915290205460ff1697506118d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061563d565b505050505050509392505050565b6118e6614386565b60606000806000806118f6614386565b89600081518110151561190557fe5b906020019060200201516101400151955089519450600093505b8385146119e457858a8581518110151561193557fe5b6020908102909101015161014001528651611951908a90612f7d565b92506119948a8581518110151561196457fe5b9060200190602002015160a001518b8681518110151561198057fe5b9060200190602002015160800151856133fd565b91506119c08a858151811015156119a757fe5b90602001906020020151838a87815181101515610e8e57fe5b90506119cc878261257d565b865189116119d9576119e4565b60019093019261191f565b5050505050509392505050565b6119f9614386565b60005460ff1615611a36576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610f9c8484846124df565b600a5460009073ffffffffffffffffffffffffffffffffffffffff1615611abf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b611b02611afd888888888080601f01602080910402602001604051908101604052809392919081815260200183838082843750613453945050505050565b613694565b60008181526009602052604090205490915060ff1615611b4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061568d565b73ffffffffffffffffffffffffffffffffffffffff86163314611c1f57611ba6818785858080601f0160208091040260200160405190810160405280939291908181526020018383808284375061135b945050505050565b1515611bde576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157cd565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff88161790555b6000818152600960205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790555130908690869080838380828437820191505092505050600060405180830381855af49150501515611cb6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156bd565b73ffffffffffffffffffffffffffffffffffffffff86163314611cfc57600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555b50505050505050565b6003546000908190819073ffffffffffffffffffffffffffffffffffffffff163314611d5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b8392508273ffffffffffffffffffffffffffffffffffffffff1663ae25532e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfc9190810190614a0c565b7fffffffff0000000000000000000000000000000000000000000000000000000081166000908152600b602052604090205490925073ffffffffffffffffffffffffffffffffffffffff1690508015611e81576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061561d565b7fffffffff0000000000000000000000000000000000000000000000000000000082166000908152600b60205260409081902080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8616179055517fd2c6b762299c609bdb96520b58a49bfb80186934d4f71a86a367571a15c0319490611f2290849087906155a3565b60405180910390a150505050565b611f386143de565b611f41826136d1565b6020808301829052600091825260049052604090819020549082015260808201511515611f755760015b60ff168152610f07565b60a08201511515611f87576002611f6b565b60a0820151604082015110611f9d576005611f6b565b6101008201514210611fb0576004611f6b565b60208082015160009081526005909152604090205460ff1615611fd4576006611f6b565b610120820151825173ffffffffffffffffffffffffffffffffffffffff90811660009081526006602090815260408083206060880151909416835292905220541115612021576006611f6b565b60038152919050565b60005460ff1615612067576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905561209b81612eff565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600660209081526000928352604080842090915290825290205481565b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156121865780601f1061215b57610100808354040283529160200191612186565b820191906000526020600020905b81548152906001019060200180831161216957829003601f168201915b505050505081565b612196614386565b606060008060006121a5614386565b8860008151811015156121b457fe5b906020019060200201516101600151945088519350600092505b828414612257578489848151811015156121e457fe5b906020019060200201516101600181905250612204888760200151612f7d565b9150612230898481518110151561221757fe5b90602001906020020151838986815181101515610e8e57fe5b905061223c868261257d565b6020860151881161224c57612257565b6001909201916121ce565b50505050509392505050565b60025481565b612271614386565b6060600080600080612281614386565b60005460ff16156122be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061576d565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011781558a518b919081106122f657fe5b906020019060200201516101400151955089519450600093505b8385146123a557858a8581518110151561232657fe5b6020908102909101015161014001528651612342908a90612f7d565b92506123558a8581518110151561196457fe5b91506123818a8581518110151561236857fe5b90602001906020020151838a8781518110151561074957fe5b905061238d878261257d565b8651891161239a576123a5565b600190930192612310565b5050600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905550929695505050505050565b600a5473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff163314612448576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061577d565b73ffffffffffffffffffffffffffffffffffffffff8116156124a557600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83161790555b50565b60408051808201909152600581527f322e302e30000000000000000000000000000000000000000000000000000000602082015281565b6124e7614386565b6124ef6143de565b60008060006124fd88611f30565b93506125076125df565b925061251588858589612611565b6125278860a001518560400151612f7d565b915061253387836136df565b9050612546888589848960000151612990565b61255088826136f5565b945061256788848660200151876040015189612aa9565b612572888487613756565b505050509392505050565b8151815161258b9190613864565b8252602080830151908201516125a19190613864565b6020830152604080830151908201516125ba9190613864565b6040830152606080830151908201516125d39190613864565b60609092019190915250565b600a5460009073ffffffffffffffffffffffffffffffffffffffff16818115612608578161260a565b335b9392505050565b825160ff1660031461264f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606084015173ffffffffffffffffffffffffffffffffffffffff16156126c257606084015173ffffffffffffffffffffffffffffffffffffffff1633146126c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b602084015173ffffffffffffffffffffffffffffffffffffffff161561274d578173ffffffffffffffffffffffffffffffffffffffff16846020015173ffffffffffffffffffffffffffffffffffffffff1614151561274d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155ed565b604083015115156127a35761276b836020015185600001518361135b565b15156127a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061565d565b50505050565b6127bb8260a001518260a001516138ae565b6127cd836080015183608001516138ae565b1015612805576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157bd565b5050565b6128116143af565b6000806000806128258960a0015188612f7d565b935061283a89608001518a60a0015186613909565b925061284a8860a0015187612f7d565b915061285f88608001518960a0015184613909565b90508084106128a25760208086018051839052805182018490525151865182015260808a015160a08b015187519092015161289a9290613909565b8551526128df565b845183905284516020908101859052855181015190860180519190915260a089015160808a01519151516128d69290613986565b60208087015101525b84515160208087015101516128f49190612f7d565b604086015284515160808a015160c08b0151612911929190613909565b85516040015284516020015160a08a015160e08b0151612932929190613909565b855160600152602085015151608089015160c08a0151612953929190613909565b8560200151604001818152505061297b8560200151602001518960a001518a60e00151613909565b60208601516060015250505050949350505050565b8215156129c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156dd565b82821115612a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156cd565b8460a00151612a16856040015184613864565b1115612a4e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906155fd565b612a5c8560800151836138ae565b612a6a828760a001516138ae565b1115612aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061575d565b5050505050565b612ab7828260200151613864565b600084815260046020908152604091829020929092558681015187518451938501518584015160608701516101408c01516101608d015196518b9873ffffffffffffffffffffffffffffffffffffffff9788169897909616967f0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c37112996612b46968f96339692959194909390615433565b60405180910390a45050505050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101008789161502019095169490940493840181900481028201810190925282815260609390929091830182828015612bfe5780601f10612bd357610100808354040283529160200191612bfe565b820191906000526020600020905b815481529060010190602001808311612be157829003601f168201915b50505050509050612c2685610140015186600001518660000151856020015160200151613a23565b61014084015184518651845160200151612c4293929190613a23565b612c5b8561014001518660000151858560400151613a23565b612c778186600001518760400151856000015160400151613a23565b612c938185600001518660400151856020015160400151613a23565b836040015173ffffffffffffffffffffffffffffffffffffffff16856040015173ffffffffffffffffffffffffffffffffffffffff161415612cfd57612cf881848760400151612cf3866000015160600151876020015160600151613864565b613a23565b612aa2565b612d1581848760400151856000015160600151613a23565b612aa281848660400151856020015160600151613a23565b604080517fb4be83d5000000000000000000000000000000000000000000000000000000006020808301919091526060602483018181528751608485019081528884015160a48601529488015160c48501529087015160e4840152608087015161010484015260a087015161012484015260c087015161014484015260e08701516101648401526101008701516101848401526101208701516101a4840152610140870180516101c485019081526101608901516101e4860152610180905251805161020485018190529394919384936044870192849261022489019291820191601f82010460005b81811015612e34578351855260209485019490930192600101612e16565b50505050818103610160808401919091528a0151805180835260209283019291820191601f82010460005b81811015612e7d578351855260209485019490930192600101612e5f565b50505089845250848103602093840190815288518083529093918201918981019190601f82010460005b81811015612ec5578351855260209485019490930192600101612ea7565b5050507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08883030188525060405250505050509392505050565b612f076143de565b612f1082611f30565b9050612f1c8282613bed565b612805828260200151613d04565b612f32614386565b612f3d8484846124df565b6020810151909150831461260a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061574d565b600082821115612fb9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061560d565b508082035b92915050565b6000808251111515613002576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156fd565b815182907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff810190811061303257fe5b016020015182517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909252507f0100000000000000000000000000000000000000000000000000000000000000908190040290565b6000816020018351101515156130ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061562d565b50016020015190565b6040516000906060907f1626ba7e000000000000000000000000000000000000000000000000000000009061310e908790869060240161554e565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093178352815191935090829081885afa8080156131ab576001811461321c57612572565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0c57414c4c45545f4552524f5200000000000000000000000000000000604052600060605260646000fd5b50505195945050505050565b60006014825110151515613268576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b613276826014845103613dab565b82517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec019092525090565b6040516000906060907f9363470200000000000000000000000000000000000000000000000000000000906132de90879087908790602401615521565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152919052602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009094169390931783528151919350908290818a5afa80801561337b57600181146133ec576133f1565b7f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c0f56414c494441544f525f4552524f5200000000000000000000000000604052600060605260646000fd5b825194505b50505050949350505050565b6000808311613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61344b61344585846138ae565b84613e0c565b949350505050565b604080517f5a65726f45785472616e73616374696f6e2800000000000000000000000000006020808301919091527f75696e743235362073616c742c0000000000000000000000000000000000000060328301527f61646472657373207369676e6572416464726573732c00000000000000000000603f8301527f627974657320646174610000000000000000000000000000000000000000000060558301527f2900000000000000000000000000000000000000000000000000000000000000605f830152825180830384018152606090920192839052815160009384938493909282918401908083835b6020831061357c57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161353f565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905260405191909301819003812089519097508995509093508392850191508083835b6020831061361257805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016135d5565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040805192909401829003822097825281019a909a525073ffffffffffffffffffffffffffffffffffffffff97909716968801969096525050606085015250506080909120919050565b600280546040517f190100000000000000000000000000000000000000000000000000000000000081529182015260228101919091526042902090565b6000612fbe611afd83613e23565b60008183106136ee578161260a565b5090919050565b6136fd614386565b6020810182905260a08301516080840151613719918491613909565b808252608084015160c0850151613731929190613909565b604082015260a083015160e084015161374b918491613909565b606082015292915050565b60018054604080516020601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156137ff5780601f106137d4576101008083540402835291602001916137ff565b820191906000526020600020905b8154815290600101906020018083116137e257829003601f168201915b5050505050905061381f8461014001518560000151858560000151613a23565b6138388461016001518486600001518560200151613a23565b61385081856000015186604001518560400151613a23565b6127a3818486604001518560600151613a23565b6000828201838110156138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b8091505b5092915050565b6000808315156138c157600091506138a7565b508282028284828115156138d157fe5b04146138a3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061567d565b6000808311613944576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b61394f84848461427c565b15613438576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b60008083116139c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b6139cc848484614301565b15613a03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ad565b61344b613445613a1386856138ae565b613a1e866001612f7d565b613864565b600080600083118015613a6257508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15613be5578551600310613aa2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061573d565b50506020848101517fffffffff00000000000000000000000000000000000000000000000000000000166000818152600b90925260409091205473ffffffffffffffffffffffffffffffffffffffff16801515613b2b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906156ed565b604051660fffffffffffe0603f885101168060840182017fa85e59e40000000000000000000000000000000000000000000000000000000083526080600484015273ffffffffffffffffffffffffffffffffffffffff8816602484015273ffffffffffffffffffffffffffffffffffffffff87166044840152856064840152608483015b81811015613bc757895181526020998a019901613baf565b61020084858403866000895af1801515613bdf573d85fd5b50505050505b505050505050565b805160009060ff16600314613c2e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061579d565b606083015173ffffffffffffffffffffffffffffffffffffffff1615613ca157606083015173ffffffffffffffffffffffffffffffffffffffff163314613ca1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c6906157ad565b613ca96125df565b835190915073ffffffffffffffffffffffffffffffffffffffff808316911614613cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061566d565b505050565b6000818152600560205260409081902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790558281015183516101408501516101608601519351859473ffffffffffffffffffffffffffffffffffffffff9485169493909316927fdc47b3613d9fe400085f6dbdc99453462279057e6207385042827ed6b1a62cf792613d9f923392906154b7565b60405180910390a45050565b600081601401835110151515613ded576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061578d565b50016014015173ffffffffffffffffffffffffffffffffffffffff1690565b6000808284811515613e1a57fe5b04949350505050565b604080517f4f726465722800000000000000000000000000000000000000000000000000006020808301919091527f61646472657373206d616b6572416464726573732c000000000000000000000060268301527f616464726573732074616b6572416464726573732c0000000000000000000000603b8301527f6164647265737320666565526563697069656e74416464726573732c0000000060508301527f616464726573732073656e646572416464726573732c00000000000000000000606c8301527f75696e74323536206d616b65724173736574416d6f756e742c0000000000000060828301527f75696e743235362074616b65724173736574416d6f756e742c00000000000000609b8301527f75696e74323536206d616b65724665652c00000000000000000000000000000060b48301527f75696e743235362074616b65724665652c00000000000000000000000000000060c58301527f75696e743235362065787069726174696f6e54696d655365636f6e64732c000060d68301527f75696e743235362073616c742c0000000000000000000000000000000000000060f48301527f6279746573206d616b65724173736574446174612c00000000000000000000006101018301527f62797465732074616b65724173736574446174610000000000000000000000006101168301527f290000000000000000000000000000000000000000000000000000000000000061012a830152825161010b81840301815261012b90920192839052815160009384938493849391929182918401908083835b602083106140ab57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161406e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101408b0151805191995095509093508392850191508083835b6020831061414657805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101614109565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930181900381206101608b0151805191985095509093508392850191508083835b602083106141e157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016141a4565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909116921691909117905260405192018290039091207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0890180516101408b018051610160909c0180519a84529881529288526101a0822091529890525050509190525090919050565b6000808084116142b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b8215806142c3575084155b156142d15760009150610a88565b838015156142db57fe5b85840990506142ea85846138ae565b6142f66103e8836138ae565b101595945050505050565b60008080841161433d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c69061564d565b821580614348575084155b156143565760009150610a88565b8380151561436057fe5b8584099050836143708583612f7d565b81151561437957fe5b0690506142ea85846138ae565b608060405190810160405280600081526020016000815260200160008152602001600081525090565b610120604051908101604052806143c4614386565b81526020016143d1614386565b8152602001600081525090565b604080516060810182526000808252602082018190529181019190915290565b600061260a82356158b0565b6000601f8201831361441b57600080fd5b813561442e6144298261583f565b615818565b81815260209384019390925082018360005b8381101561446c578135860161445688826145bc565b8452506020928301929190910190600101614440565b5050505092915050565b6000601f8201831361448757600080fd5b81356144956144298261583f565b81815260209384019390925082018360005b8381101561446c57813586016144bd888261460b565b84525060209283019291909101906001016144a7565b6000601f820183136144e457600080fd5b81356144f26144298261583f565b9150818183526020840193506020810190508385602084028201111561451757600080fd5b60005b8381101561446c578161452d888261454f565b845250602092830192919091019060010161451a565b600061260a82356158c9565b600061260a82356158ce565b600061260a82356158d1565b600061260a82516158d1565b600080601f8301841361458557600080fd5b50813567ffffffffffffffff81111561459d57600080fd5b6020830191508360018202830111156145b557600080fd5b9250929050565b6000601f820183136145cd57600080fd5b81356145db61442982615860565b915080825260208301602083018583830111156145f757600080fd5b614602838284615907565b50505092915050565b6000610180828403121561461e57600080fd5b614629610180615818565b9050600061463784846143fe565b8252506020614648848483016143fe565b602083015250604061465c848285016143fe565b6040830152506060614670848285016143fe565b60608301525060806146848482850161454f565b60808301525060a06146988482850161454f565b60a08301525060c06146ac8482850161454f565b60c08301525060e06146c08482850161454f565b60e0830152506101006146d58482850161454f565b610100830152506101206146eb8482850161454f565b6101208301525061014082013567ffffffffffffffff81111561470d57600080fd5b614719848285016145bc565b6101408301525061016082013567ffffffffffffffff81111561473b57600080fd5b614747848285016145bc565b6101608301525092915050565b60006020828403121561476657600080fd5b600061344b84846143fe565b6000806040838503121561478557600080fd5b600061479185856143fe565b92505060206147a2858286016143fe565b9150509250929050565b600080604083850312156147bf57600080fd5b60006147cb85856143fe565b92505060206147a285828601614543565b6000602082840312156147ee57600080fd5b813567ffffffffffffffff81111561480557600080fd5b61344b84828501614476565b60008060006060848603121561482657600080fd5b833567ffffffffffffffff81111561483d57600080fd5b61484986828701614476565b935050602084013567ffffffffffffffff81111561486657600080fd5b614872868287016144d3565b925050604084013567ffffffffffffffff81111561488f57600080fd5b61489b8682870161440a565b9150509250925092565b6000806000606084860312156148ba57600080fd5b833567ffffffffffffffff8111156148d157600080fd5b6148dd86828701614476565b93505060206148728682870161454f565b60006020828403121561490057600080fd5b600061344b848461454f565b6000806040838503121561491f57600080fd5b6000614791858561454f565b6000806000806060858703121561494157600080fd5b600061494d878761454f565b945050602061495e878288016143fe565b935050604085013567ffffffffffffffff81111561497b57600080fd5b61498787828801614573565b95989497509550505050565b6000806000606084860312156149a857600080fd5b60006149b4868661454f565b93505060206149c5868287016143fe565b925050604084013567ffffffffffffffff8111156149e257600080fd5b61489b868287016145bc565b600060208284031215614a0057600080fd5b600061344b848461455b565b600060208284031215614a1e57600080fd5b600061344b8484614567565b600060208284031215614a3c57600080fd5b813567ffffffffffffffff811115614a5357600080fd5b61344b8482850161460b565b60008060008060808587031215614a7557600080fd5b843567ffffffffffffffff811115614a8c57600080fd5b614a988782880161460b565b945050602085013567ffffffffffffffff811115614ab557600080fd5b614ac18782880161460b565b935050604085013567ffffffffffffffff811115614ade57600080fd5b614aea878288016145bc565b925050606085013567ffffffffffffffff811115614b0757600080fd5b614b13878288016145bc565b91505092959194509250565b600080600060608486031215614b3457600080fd5b833567ffffffffffffffff811115614b4b57600080fd5b614b578682870161460b565b93505060206149c58682870161454f565b60008060008060008060808789031215614b8157600080fd5b6000614b8d898961454f565b9650506020614b9e89828a016143fe565b955050604087013567ffffffffffffffff811115614bbb57600080fd5b614bc789828a01614573565b9450945050606087013567ffffffffffffffff811115614be657600080fd5b614bf289828a01614573565b92509250509295509295509295565b614c0a816158b0565b82525050565b6000614c1b826158ac565b808452602084019350614c2d836158a6565b60005b82811015614c5d57614c438683516153e5565b614c4c826158a6565b606096909601959150600101614c30565b5093949350505050565b614c0a816158c9565b614c0a816158ce565b614c0a816158d1565b6000614c8d826158ac565b808452614ca1816020860160208601615913565b614caa8161593f565b9093016020019392505050565b614c0a816158fc565b601281527f4c454e4754485f36355f52455155495245440000000000000000000000000000602082015260400190565b600d81527f494e56414c49445f54414b455200000000000000000000000000000000000000602082015260400190565b600e81527f4f524445525f4f56455246494c4c000000000000000000000000000000000000602082015260400190565b601181527f55494e543235365f554e444552464c4f57000000000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f414c52454144595f455849535453000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f33325f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601581527f5349474e41545552455f554e535550504f525445440000000000000000000000602082015260400190565b601081527f4449564953494f4e5f42595f5a45524f00000000000000000000000000000000602082015260400190565b601781527f494e56414c49445f4f524445525f5349474e4154555245000000000000000000602082015260400190565b600d81527f494e56414c49445f4d414b455200000000000000000000000000000000000000602082015260400190565b601081527f55494e543235365f4f564552464c4f5700000000000000000000000000000000602082015260400190565b600f81527f494e56414c49445f54585f484153480000000000000000000000000000000000602082015260400190565b601181527f494e56414c49445f5349474e4154555245000000000000000000000000000000602082015260400190565b600e81527f524f554e44494e475f4552524f52000000000000000000000000000000000000602082015260400190565b601081527f4641494c45445f455845435554494f4e00000000000000000000000000000000602082015260400190565b600d81527f54414b45525f4f56455250415900000000000000000000000000000000000000602082015260400190565b601481527f494e56414c49445f54414b45525f414d4f554e54000000000000000000000000602082015260400190565b601a81527f41535345545f50524f58595f444f45535f4e4f545f4558495354000000000000602082015260400190565b602181527f475245415445525f5448414e5f5a45524f5f4c454e4754485f5245515549524560208201527f4400000000000000000000000000000000000000000000000000000000000000604082015260600190565b601181527f5349474e41545552455f494c4c4547414c000000000000000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f305f52455155495245440000602082015260400190565b601781527f494e56414c49445f4e45575f4f524445525f45504f4348000000000000000000602082015260400190565b601e81527f4c454e4754485f475245415445525f5448414e5f335f52455155495245440000602082015260400190565b601481527f434f4d504c4554455f46494c4c5f4641494c4544000000000000000000000000602082015260400190565b601281527f494e56414c49445f46494c4c5f50524943450000000000000000000000000000602082015260400190565b601281527f5245454e5452414e43595f494c4c4547414c0000000000000000000000000000602082015260400190565b601381527f4f4e4c595f434f4e54524143545f4f574e455200000000000000000000000000602082015260400190565b602681527f475245415445525f4f525f455155414c5f544f5f32305f4c454e4754485f524560208201527f5155495245440000000000000000000000000000000000000000000000000000604082015260600190565b601081527f4f524445525f554e46494c4c41424c4500000000000000000000000000000000602082015260400190565b600e81527f494e56414c49445f53454e444552000000000000000000000000000000000000602082015260400190565b601881527f4e454741544956455f5350524541445f52455155495245440000000000000000602082015260400190565b601481527f494e56414c49445f54585f5349474e4154555245000000000000000000000000602082015260400190565b601181527f4c454e4754485f305f5245515549524544000000000000000000000000000000602082015260400190565b805160808301906153738482614c70565b5060208201516153866020850182614c70565b5060408201516153996040850182614c70565b5060608201516127a36060850182614c70565b80516101208301906153be8482615362565b5060208201516153d16080850182615362565b5060408201516127a3610100850182614c70565b805160608301906153f6848261541c565b5060208201516154096020850182614c70565b5060408201516127a36040850182614c70565b614c0a816158f6565b60208101612fbe8284614c01565b6101008101615442828b614c01565b61544f602083018a614c01565b61545c6040830189614c70565b6154696060830188614c70565b6154766080830187614c70565b61548360a0830186614c70565b81810360c08301526154958185614c82565b905081810360e08301526154a98184614c82565b9a9950505050505050505050565b606081016154c58286614c01565b81810360208301526154d78185614c82565b905081810360408301526154eb8184614c82565b95945050505050565b6020808252810161260a8184614c10565b60208101612fbe8284614c67565b60208101612fbe8284614c70565b6060810161552f8286614c70565b61553c6020830185614c01565b81810360408301526154eb8184614c82565b6040810161555c8285614c70565b818103602083015261344b8184614c82565b6080810161557c8287614c70565b615589602083018661541c565b6155966040830185614c70565b6154eb6060830184614c70565b604081016155b18285614c79565b61260a6020830184614c01565b6020808252810161260a8184614c82565b60208101612fbe8284614cb7565b60208082528101612fbe81614cc0565b60208082528101612fbe81614cf0565b60208082528101612fbe81614d20565b60208082528101612fbe81614d50565b60208082528101612fbe81614d80565b60208082528101612fbe81614db0565b60208082528101612fbe81614e06565b60208082528101612fbe81614e36565b60208082528101612fbe81614e66565b60208082528101612fbe81614e96565b60208082528101612fbe81614ec6565b60208082528101612fbe81614ef6565b60208082528101612fbe81614f26565b60208082528101612fbe81614f56565b60208082528101612fbe81614f86565b60208082528101612fbe81614fb6565b60208082528101612fbe81614fe6565b60208082528101612fbe81615016565b60208082528101612fbe81615046565b60208082528101612fbe8161509c565b60208082528101612fbe816150cc565b60208082528101612fbe816150fc565b60208082528101612fbe8161512c565b60208082528101612fbe8161515c565b60208082528101612fbe8161518c565b60208082528101612fbe816151bc565b60208082528101612fbe816151ec565b60208082528101612fbe8161521c565b60208082528101612fbe81615272565b60208082528101612fbe816152a2565b60208082528101612fbe816152d2565b60208082528101612fbe81615302565b60208082528101612fbe81615332565b60808101612fbe8284615362565b6101208101612fbe82846153ac565b60608101612fbe82846153e5565b60405181810167ffffffffffffffff8111828210171561583757600080fd5b604052919050565b600067ffffffffffffffff82111561585657600080fd5b5060209081020190565b600067ffffffffffffffff82111561587757600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b7fffffffff000000000000000000000000000000000000000000000000000000001690565b60ff1690565b6000612fbe826158b0565b82818337506000910152565b60005b8381101561592e578181015183820152602001615916565b838111156127a35750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016905600a265627a7a72305820d41ee66f45c4d1637cb6e5f109447c6d5d7fef3204a685dc442151c0f029b7da6c6578706572696d656e74616cf50037" } } }, diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 61ac56938..04d1abd4c 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -47,6 +47,7 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial artifacts.Exchange, provider, txDefaults, + zrxAssetData, ); // Multisigs -- cgit v1.2.3 From b1474973cd2995903c5b353b2b155eeef6b16643 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 23 Nov 2018 14:48:49 +0100 Subject: Copy assets in referenced in instant on commonjs build --- packages/instant/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/instant/package.json b/packages/instant/package.json index d3a85a646..9616af54f 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -11,7 +11,7 @@ "build": "yarn build:all", "build:all": "run-p build:umd:prod build:commonjs", "build:umd:prod": "webpack --mode production", - "build:commonjs": "tsc -b", + "build:commonjs": "tsc -b && shx cp -r src/assets lib", "build:ci": "yarn build", "watch_without_deps": "tsc -w", "dev": "webpack-dev-server --mode development", -- cgit v1.2.3 From 0c0a1db114b4cb9332523783c773c27ec43245b6 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 23 Nov 2018 14:49:33 +0100 Subject: Fix the lerna paremeter name from cdVersions to cd-versions --- packages/monorepo-scripts/CHANGELOG.json | 9 +++++++++ packages/monorepo-scripts/src/publish.ts | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/monorepo-scripts/CHANGELOG.json b/packages/monorepo-scripts/CHANGELOG.json index 170a97a33..4aa6be382 100644 --- a/packages/monorepo-scripts/CHANGELOG.json +++ b/packages/monorepo-scripts/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "1.0.7", + "changes": [ + { + "note": "Fix the lerna parameter name from cdVersions to cd-versions", + "pr": 1312 + } + ] + }, { "version": "1.0.6", "changes": [ diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 854a72b86..19947d78f 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -208,7 +208,7 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; }).join(','); - let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cdVersions=${packageVersionString} --registry=${ + let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cd-versions=${packageVersionString} --registry=${ configs.NPM_REGISTRY_URL } --yes`; if (configs.IS_LOCAL_PUBLISH) { -- cgit v1.2.3 From 9ddd45e2c687280041cc0bb4cd7cb3c1a2c22767 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Fri, 23 Nov 2018 15:22:16 +0100 Subject: Rename contract-templates to abi-gen-templates --- packages/abi-gen-templates/CHANGELOG.json | 11 +++ packages/abi-gen-templates/README.md | 17 ++++ packages/abi-gen-templates/contract.handlebars | 91 ++++++++++++++++++++++ packages/abi-gen-templates/package.json | 20 +++++ .../abi-gen-templates/partials/call.handlebars | 3 + .../partials/callAsync.handlebars | 28 +++++++ .../abi-gen-templates/partials/event.handlebars | 5 ++ .../abi-gen-templates/partials/params.handlebars | 3 + .../partials/return_type.handlebars | 10 +++ packages/abi-gen-templates/partials/tx.handlebars | 60 ++++++++++++++ .../partials/typed_params.handlebars | 3 + packages/abi-gen-wrappers/package.json | 4 +- packages/contract-templates/CHANGELOG.json | 11 --- packages/contract-templates/README.md | 17 ---- packages/contract-templates/contract.handlebars | 91 ---------------------- packages/contract-templates/package.json | 20 ----- .../contract-templates/partials/call.handlebars | 3 - .../partials/callAsync.handlebars | 28 ------- .../contract-templates/partials/event.handlebars | 5 -- .../contract-templates/partials/params.handlebars | 3 - .../partials/return_type.handlebars | 10 --- packages/contract-templates/partials/tx.handlebars | 60 -------------- .../partials/typed_params.handlebars | 3 - packages/contracts/package.json | 2 +- packages/metacoin/package.json | 4 +- 25 files changed, 256 insertions(+), 256 deletions(-) create mode 100644 packages/abi-gen-templates/CHANGELOG.json create mode 100644 packages/abi-gen-templates/README.md create mode 100644 packages/abi-gen-templates/contract.handlebars create mode 100644 packages/abi-gen-templates/package.json create mode 100644 packages/abi-gen-templates/partials/call.handlebars create mode 100644 packages/abi-gen-templates/partials/callAsync.handlebars create mode 100644 packages/abi-gen-templates/partials/event.handlebars create mode 100644 packages/abi-gen-templates/partials/params.handlebars create mode 100644 packages/abi-gen-templates/partials/return_type.handlebars create mode 100644 packages/abi-gen-templates/partials/tx.handlebars create mode 100644 packages/abi-gen-templates/partials/typed_params.handlebars delete mode 100644 packages/contract-templates/CHANGELOG.json delete mode 100644 packages/contract-templates/README.md delete mode 100644 packages/contract-templates/contract.handlebars delete mode 100644 packages/contract-templates/package.json delete mode 100644 packages/contract-templates/partials/call.handlebars delete mode 100644 packages/contract-templates/partials/callAsync.handlebars delete mode 100644 packages/contract-templates/partials/event.handlebars delete mode 100644 packages/contract-templates/partials/params.handlebars delete mode 100644 packages/contract-templates/partials/return_type.handlebars delete mode 100644 packages/contract-templates/partials/tx.handlebars delete mode 100644 packages/contract-templates/partials/typed_params.handlebars (limited to 'packages') diff --git a/packages/abi-gen-templates/CHANGELOG.json b/packages/abi-gen-templates/CHANGELOG.json new file mode 100644 index 000000000..adf615b3b --- /dev/null +++ b/packages/abi-gen-templates/CHANGELOG.json @@ -0,0 +1,11 @@ +[ + { + "version": "1.0.0", + "changes": [ + { + "note": "Initial publish", + "pr": 1305 + } + ] + } +] diff --git a/packages/abi-gen-templates/README.md b/packages/abi-gen-templates/README.md new file mode 100644 index 000000000..c6cc3b1b3 --- /dev/null +++ b/packages/abi-gen-templates/README.md @@ -0,0 +1,17 @@ +These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen). + +To successfully compile the generated TypeScript contract wrappers, you must: + +* Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` +* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` +* Ensure that your TypeScript configuration includes the following: + +``` +"compilerOptions": { + "lib": ["ES2015"], + "typeRoots": [ + "node_modules/@0x/typescript-typings/types", + "node_modules/@types" + ] +} +``` diff --git a/packages/abi-gen-templates/contract.handlebars b/packages/abi-gen-templates/contract.handlebars new file mode 100644 index 000000000..9b2a2b336 --- /dev/null +++ b/packages/abi-gen-templates/contract.handlebars @@ -0,0 +1,91 @@ +// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name +// tslint:disable:no-unused-variable +// tslint:disable:no-unbound-method +import { BaseContract } from '@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'; +// tslint:enable:no-unused-variable + +{{#if events}} +export type {{contractName}}EventArgs = +{{#each events}} + | {{@root.contractName}}{{name}}EventArgs{{#if @last}};{{/if}} +{{/each}} + +export enum {{contractName}}Events { + {{#each events}} + {{name}} = '{{name}}', + {{/each}} +} + +{{#each events}} +{{> event}} + +{{/each}} +{{/if}} + +/* istanbul ignore next */ +// tslint:disable:no-parameter-reassignment +// tslint:disable-next-line:class-name +export class {{contractName}}Contract extends BaseContract { +{{#each methods}} + {{#this.constant}} + {{> call contractName=../contractName}} + {{/this.constant}} + {{^this.constant}} + {{> tx contractName=../contractName}} + {{/this.constant}} +{{/each}} + public static async deployFrom0xArtifactAsync( + artifact: ContractArtifact | SimpleContractArtifact, + provider: Provider, + txDefaults: Partial, + {{> typed_params inputs=ctor.inputs}} + ): Promise<{{contractName}}Contract> { + if (_.isUndefined(artifact.compilerOutput)) { + throw new Error('Compiler output not found in the artifact file'); + } + const bytecode = artifact.compilerOutput.evm.bytecode.object; + const abi = artifact.compilerOutput.abi; + return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); + } + public static async deployAsync( + bytecode: string, + abi: ContractAbi, + provider: Provider, + txDefaults: Partial, + {{> typed_params inputs=ctor.inputs}} + ): Promise<{{contractName}}Contract> { + const constructorAbi = BaseContract._lookupConstructorAbi(abi); + [{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList( + constructorAbi.inputs, + [{{> params inputs=ctor.inputs}}], + BaseContract._bigNumberToString, + ); + const iface = new ethers.utils.Interface(abi); + const deployInfo = iface.deployFunction; + const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); + const web3Wrapper = new Web3Wrapper(provider); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + {data: txData}, + txDefaults, + web3Wrapper.estimateGasAsync.bind(web3Wrapper), + ); + const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); + logUtils.log(`transactionHash: ${txHash}`); + const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); + logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); + const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); + contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; + return contractInstance; + } + constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { + super('{{contractName}}', abi, address, provider, txDefaults); + classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); + } +} // tslint:disable:max-file-line-count +// tslint:enable:no-unbound-method diff --git a/packages/abi-gen-templates/package.json b/packages/abi-gen-templates/package.json new file mode 100644 index 000000000..e06be6127 --- /dev/null +++ b/packages/abi-gen-templates/package.json @@ -0,0 +1,20 @@ +{ + "name": "@0x/abi-gen-templates", + "version": "1.0.0", + "engines": { + "node": ">=6.12" + }, + "description": "Handlebars templates used by abi-gen to generate contract-wrappers", + "repository": { + "type": "git", + "url": "https://github.com/0xProject/0x-monorepo.git" + }, + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/0xProject/0x-monorepo/issues" + }, + "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-templates/README.md", + "publishConfig": { + "access": "public" + } +} diff --git a/packages/abi-gen-templates/partials/call.handlebars b/packages/abi-gen-templates/partials/call.handlebars new file mode 100644 index 000000000..7c9c934c3 --- /dev/null +++ b/packages/abi-gen-templates/partials/call.handlebars @@ -0,0 +1,3 @@ +public {{this.tsName}} = { + {{> callAsync}} +}; diff --git a/packages/abi-gen-templates/partials/callAsync.handlebars b/packages/abi-gen-templates/partials/callAsync.handlebars new file mode 100644 index 000000000..ddbbe7508 --- /dev/null +++ b/packages/abi-gen-templates/partials/callAsync.handlebars @@ -0,0 +1,28 @@ +async callAsync( +{{> typed_params inputs=inputs}} + callData: Partial = {}, + defaultBlock?: BlockParam, +): Promise<{{> return_type outputs=outputs}}> { + const self = this as any as {{contractName}}Contract; + const functionSignature = '{{this.functionSignature}}'; + const inputAbi = self._lookupAbi(functionSignature).inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); + BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); + const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}}; + const encodedData = ethersFunction.encode([{{> params inputs=inputs}}]); + const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...callData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); + BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); + let resultArray = ethersFunction.decode(rawCallResult); + const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs; + resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); + resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); + return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}}; +}, diff --git a/packages/abi-gen-templates/partials/event.handlebars b/packages/abi-gen-templates/partials/event.handlebars new file mode 100644 index 000000000..61d523ca2 --- /dev/null +++ b/packages/abi-gen-templates/partials/event.handlebars @@ -0,0 +1,5 @@ +export interface {{@root.contractName}}{{name}}EventArgs extends DecodedLogArgs { + {{#each inputs}} + {{name}}: {{#returnType type components}}{{/returnType}}; + {{/each}} +} diff --git a/packages/abi-gen-templates/partials/params.handlebars b/packages/abi-gen-templates/partials/params.handlebars new file mode 100644 index 000000000..2d9bb8ed9 --- /dev/null +++ b/packages/abi-gen-templates/partials/params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} +{{name}}{{#if @last}}{{else}},{{/if}} +{{/each}} diff --git a/packages/abi-gen-templates/partials/return_type.handlebars b/packages/abi-gen-templates/partials/return_type.handlebars new file mode 100644 index 000000000..77d96e8c4 --- /dev/null +++ b/packages/abi-gen-templates/partials/return_type.handlebars @@ -0,0 +1,10 @@ +{{#if outputs.length}} +{{#singleReturnValue}} +{{#returnType outputs.0.type outputs.0.components}}{{/returnType}} +{{/singleReturnValue}} +{{^singleReturnValue}} +[{{#each outputs}}{{#returnType type components}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] +{{/singleReturnValue}} +{{else}} +void +{{/if}} diff --git a/packages/abi-gen-templates/partials/tx.handlebars b/packages/abi-gen-templates/partials/tx.handlebars new file mode 100644 index 000000000..b39156583 --- /dev/null +++ b/packages/abi-gen-templates/partials/tx.handlebars @@ -0,0 +1,60 @@ +public {{this.tsName}} = { + async sendTransactionAsync( + {{> typed_params inputs=inputs}} + {{#this.payable}} + txData: Partial = {}, + {{/this.payable}} + {{^this.payable}} + txData: Partial = {}, + {{/this.payable}} + ): Promise { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); + BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + self.{{this.tsName}}.estimateGasAsync.bind( + self, + {{> params inputs=inputs}} + ), + ); + const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); + return txHash; + }, + async estimateGasAsync( + {{> typed_params inputs=inputs}} + txData: Partial = {}, + ): Promise { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); + const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( + { + to: self.address, + ...txData, + data: encodedData, + }, + self._web3Wrapper.getContractDefaults(), + ); + const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); + return gas; + }, + getABIEncodedTransactionData( + {{> typed_params inputs=inputs}} + ): string { + const self = this as any as {{contractName}}Contract; + const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; + [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); + const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); + return abiEncodedTransactionData; + }, + {{> callAsync}} +}; diff --git a/packages/abi-gen-templates/partials/typed_params.handlebars b/packages/abi-gen-templates/partials/typed_params.handlebars new file mode 100644 index 000000000..c100e58f7 --- /dev/null +++ b/packages/abi-gen-templates/partials/typed_params.handlebars @@ -0,0 +1,3 @@ +{{#each inputs}} + {{name}}: {{#parameterType type components}}{{/parameterType}}, +{{/each}} diff --git a/packages/abi-gen-wrappers/package.json b/packages/abi-gen-wrappers/package.json index df1c484ec..1b7015d55 100644 --- a/packages/abi-gen-wrappers/package.json +++ b/packages/abi-gen-wrappers/package.json @@ -15,7 +15,7 @@ "lint": "tslint --format stylish --project .", "pre_build": "yarn generate_contract_wrappers", "clean": "shx rm -rf lib wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/generated-wrappers --backend ethers" }, "config": { "abis": "../contract-artifacts/artifacts/@(AssetProxyOwner|DummyERC20Token|DummyERC721Token|ERC20Proxy|ERC20Token|ERC721Proxy|ERC721Token|Exchange|Forwarder|IValidator|IWallet|OrderValidator|WETH9|ZRXToken).json" @@ -31,7 +31,7 @@ "homepage": "https://github.com/0xProject/0x-monorepo/packages/abi-gen-wrappers/README.md", "devDependencies": { "@0x/abi-gen": "^1.0.17", - "@0x/contract-templates": "^1.0.0", + "@0x/abi-gen-templates": "^1.0.0", "@0x/tslint-config": "^1.0.10", "@0x/types": "^1.3.0", "@0x/utils": "^2.0.6", diff --git a/packages/contract-templates/CHANGELOG.json b/packages/contract-templates/CHANGELOG.json deleted file mode 100644 index adf615b3b..000000000 --- a/packages/contract-templates/CHANGELOG.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - { - "version": "1.0.0", - "changes": [ - { - "note": "Initial publish", - "pr": 1305 - } - ] - } -] diff --git a/packages/contract-templates/README.md b/packages/contract-templates/README.md deleted file mode 100644 index c6cc3b1b3..000000000 --- a/packages/contract-templates/README.md +++ /dev/null @@ -1,17 +0,0 @@ -These templates are used with [abi-gen](https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen). - -To successfully compile the generated TypeScript contract wrappers, you must: - -* Install the packages on which the main contract template directly depends: `yarn add @0x/base-contract @0x/sol-compiler @0x/utils @0x/web3-wrapper ethereum-types ethers lodash` -* Install the packages on which the main contract template *in*directly depends: `yarn add @types/lodash` -* Ensure that your TypeScript configuration includes the following: - -``` -"compilerOptions": { - "lib": ["ES2015"], - "typeRoots": [ - "node_modules/@0x/typescript-typings/types", - "node_modules/@types" - ] -} -``` diff --git a/packages/contract-templates/contract.handlebars b/packages/contract-templates/contract.handlebars deleted file mode 100644 index 9b2a2b336..000000000 --- a/packages/contract-templates/contract.handlebars +++ /dev/null @@ -1,91 +0,0 @@ -// tslint:disable:no-consecutive-blank-lines ordered-imports align trailing-comma whitespace class-name -// tslint:disable:no-unused-variable -// tslint:disable:no-unbound-method -import { BaseContract } from '@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'; -// tslint:enable:no-unused-variable - -{{#if events}} -export type {{contractName}}EventArgs = -{{#each events}} - | {{@root.contractName}}{{name}}EventArgs{{#if @last}};{{/if}} -{{/each}} - -export enum {{contractName}}Events { - {{#each events}} - {{name}} = '{{name}}', - {{/each}} -} - -{{#each events}} -{{> event}} - -{{/each}} -{{/if}} - -/* istanbul ignore next */ -// tslint:disable:no-parameter-reassignment -// tslint:disable-next-line:class-name -export class {{contractName}}Contract extends BaseContract { -{{#each methods}} - {{#this.constant}} - {{> call contractName=../contractName}} - {{/this.constant}} - {{^this.constant}} - {{> tx contractName=../contractName}} - {{/this.constant}} -{{/each}} - public static async deployFrom0xArtifactAsync( - artifact: ContractArtifact | SimpleContractArtifact, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - if (_.isUndefined(artifact.compilerOutput)) { - throw new Error('Compiler output not found in the artifact file'); - } - const bytecode = artifact.compilerOutput.evm.bytecode.object; - const abi = artifact.compilerOutput.abi; - return {{contractName}}Contract.deployAsync(bytecode, abi, provider, txDefaults, {{> params inputs=ctor.inputs}}); - } - public static async deployAsync( - bytecode: string, - abi: ContractAbi, - provider: Provider, - txDefaults: Partial, - {{> typed_params inputs=ctor.inputs}} - ): Promise<{{contractName}}Contract> { - const constructorAbi = BaseContract._lookupConstructorAbi(abi); - [{{> params inputs=ctor.inputs}}] = BaseContract._formatABIDataItemList( - constructorAbi.inputs, - [{{> params inputs=ctor.inputs}}], - BaseContract._bigNumberToString, - ); - const iface = new ethers.utils.Interface(abi); - const deployInfo = iface.deployFunction; - const txData = deployInfo.encode(bytecode, [{{> params inputs=ctor.inputs}}]); - const web3Wrapper = new Web3Wrapper(provider); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - {data: txData}, - txDefaults, - web3Wrapper.estimateGasAsync.bind(web3Wrapper), - ); - const txHash = await web3Wrapper.sendTransactionAsync(txDataWithDefaults); - logUtils.log(`transactionHash: ${txHash}`); - const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash); - logUtils.log(`{{contractName}} successfully deployed at ${txReceipt.contractAddress}`); - const contractInstance = new {{contractName}}Contract(abi, txReceipt.contractAddress as string, provider, txDefaults); - contractInstance.constructorArgs = [{{> params inputs=ctor.inputs}}]; - return contractInstance; - } - constructor(abi: ContractAbi, address: string, provider: Provider, txDefaults?: Partial) { - super('{{contractName}}', abi, address, provider, txDefaults); - classUtils.bindAll(this, ['_ethersInterfacesByFunctionSignature', 'address', 'abi', '_web3Wrapper']); - } -} // tslint:disable:max-file-line-count -// tslint:enable:no-unbound-method diff --git a/packages/contract-templates/package.json b/packages/contract-templates/package.json deleted file mode 100644 index f79ae8931..000000000 --- a/packages/contract-templates/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@0x/contract-templates", - "version": "1.0.0", - "engines": { - "node": ">=6.12" - }, - "description": "Handlebars templates used by abi-gen to generate contract-wrappers", - "repository": { - "type": "git", - "url": "https://github.com/0xProject/0x-monorepo.git" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/0xProject/0x-monorepo/issues" - }, - "homepage": "https://github.com/0xProject/0x-monorepo/packages/contract-templates/README.md", - "publishConfig": { - "access": "public" - } -} diff --git a/packages/contract-templates/partials/call.handlebars b/packages/contract-templates/partials/call.handlebars deleted file mode 100644 index 7c9c934c3..000000000 --- a/packages/contract-templates/partials/call.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -public {{this.tsName}} = { - {{> callAsync}} -}; diff --git a/packages/contract-templates/partials/callAsync.handlebars b/packages/contract-templates/partials/callAsync.handlebars deleted file mode 100644 index ddbbe7508..000000000 --- a/packages/contract-templates/partials/callAsync.handlebars +++ /dev/null @@ -1,28 +0,0 @@ -async callAsync( -{{> typed_params inputs=inputs}} - callData: Partial = {}, - defaultBlock?: BlockParam, -): Promise<{{> return_type outputs=outputs}}> { - const self = this as any as {{contractName}}Contract; - const functionSignature = '{{this.functionSignature}}'; - const inputAbi = self._lookupAbi(functionSignature).inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); - BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); - const ethersFunction = self._lookupEthersInterface(functionSignature).functions.{{this.name}}; - const encodedData = ethersFunction.encode([{{> params inputs=inputs}}]); - const callDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...callData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const rawCallResult = await self._web3Wrapper.callAsync(callDataWithDefaults, defaultBlock); - BaseContract._throwIfRevertWithReasonCallResult(rawCallResult); - let resultArray = ethersFunction.decode(rawCallResult); - const outputAbi = (_.find(self.abi, {name: '{{this.name}}'}) as MethodAbi).outputs; - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._lowercaseAddress.bind(this)); - resultArray = BaseContract._formatABIDataItemList(outputAbi, resultArray, BaseContract._bnToBigNumber.bind(this)); - return resultArray{{#singleReturnValue}}[0]{{/singleReturnValue}}; -}, diff --git a/packages/contract-templates/partials/event.handlebars b/packages/contract-templates/partials/event.handlebars deleted file mode 100644 index 61d523ca2..000000000 --- a/packages/contract-templates/partials/event.handlebars +++ /dev/null @@ -1,5 +0,0 @@ -export interface {{@root.contractName}}{{name}}EventArgs extends DecodedLogArgs { - {{#each inputs}} - {{name}}: {{#returnType type components}}{{/returnType}}; - {{/each}} -} diff --git a/packages/contract-templates/partials/params.handlebars b/packages/contract-templates/partials/params.handlebars deleted file mode 100644 index 2d9bb8ed9..000000000 --- a/packages/contract-templates/partials/params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} -{{name}}{{#if @last}}{{else}},{{/if}} -{{/each}} diff --git a/packages/contract-templates/partials/return_type.handlebars b/packages/contract-templates/partials/return_type.handlebars deleted file mode 100644 index 77d96e8c4..000000000 --- a/packages/contract-templates/partials/return_type.handlebars +++ /dev/null @@ -1,10 +0,0 @@ -{{#if outputs.length}} -{{#singleReturnValue}} -{{#returnType outputs.0.type outputs.0.components}}{{/returnType}} -{{/singleReturnValue}} -{{^singleReturnValue}} -[{{#each outputs}}{{#returnType type components}}{{/returnType}}{{#unless @last}}, {{/unless}}{{/each}}] -{{/singleReturnValue}} -{{else}} -void -{{/if}} diff --git a/packages/contract-templates/partials/tx.handlebars b/packages/contract-templates/partials/tx.handlebars deleted file mode 100644 index b39156583..000000000 --- a/packages/contract-templates/partials/tx.handlebars +++ /dev/null @@ -1,60 +0,0 @@ -public {{this.tsName}} = { - async sendTransactionAsync( - {{> typed_params inputs=inputs}} - {{#this.payable}} - txData: Partial = {}, - {{/this.payable}} - {{^this.payable}} - txData: Partial = {}, - {{/this.payable}} - ): Promise { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString.bind(self)); - BaseContract.strictArgumentEncodingCheck(inputAbi, [{{> params inputs=inputs}}]); - const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - self.{{this.tsName}}.estimateGasAsync.bind( - self, - {{> params inputs=inputs}} - ), - ); - const txHash = await self._web3Wrapper.sendTransactionAsync(txDataWithDefaults); - return txHash; - }, - async estimateGasAsync( - {{> typed_params inputs=inputs}} - txData: Partial = {}, - ): Promise { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); - const encodedData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - const txDataWithDefaults = await BaseContract._applyDefaultsToTxDataAsync( - { - to: self.address, - ...txData, - data: encodedData, - }, - self._web3Wrapper.getContractDefaults(), - ); - const gas = await self._web3Wrapper.estimateGasAsync(txDataWithDefaults); - return gas; - }, - getABIEncodedTransactionData( - {{> typed_params inputs=inputs}} - ): string { - const self = this as any as {{contractName}}Contract; - const inputAbi = self._lookupAbi('{{this.functionSignature}}').inputs; - [{{> params inputs=inputs}}] = BaseContract._formatABIDataItemList(inputAbi, [{{> params inputs=inputs}}], BaseContract._bigNumberToString); - const abiEncodedTransactionData = self._lookupEthersInterface('{{this.functionSignature}}').functions.{{this.name}}.encode([{{> params inputs=inputs}}]); - return abiEncodedTransactionData; - }, - {{> callAsync}} -}; diff --git a/packages/contract-templates/partials/typed_params.handlebars b/packages/contract-templates/partials/typed_params.handlebars deleted file mode 100644 index c100e58f7..000000000 --- a/packages/contract-templates/partials/typed_params.handlebars +++ /dev/null @@ -1,3 +0,0 @@ -{{#each inputs}} - {{name}}: {{#parameterType type components}}{{/parameterType}}, -{{/each}} diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 4fb0838f4..25445c4f8 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -22,7 +22,7 @@ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit", "compile": "sol-compiler --contracts-dir contracts", "clean": "shx rm -rf lib generated-artifacts generated-wrappers", - "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers", "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json index 8081c03c9..332fbb466 100644 --- a/packages/metacoin/package.json +++ b/packages/metacoin/package.json @@ -18,7 +18,7 @@ "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov", "test:profile": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html", "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit --timeout 10000", - "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../../node_modules/@0x/contract-templates/contract.handlebars --partials '../../node_modules/@0x/contract-templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", + "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers", "coverage:report:text": "istanbul report text", "coverage:report:html": "istanbul report html && open coverage/index.html", "profiler:report:html": "istanbul report html && open coverage/index.html", @@ -30,7 +30,7 @@ "license": "Apache-2.0", "dependencies": { "@0x/abi-gen": "^1.0.17", - "@0x/contract-templates": "^1.0.0", + "@0x/abi-gen-templates": "^1.0.0", "@0x/base-contract": "^3.0.7", "@0x/sol-cov": "^2.1.13", "@0x/subproviders": "^2.1.5", -- cgit v1.2.3 From 99e92a346b134c1e91ecf02db8124614d8fd971d Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Mon, 26 Nov 2018 09:37:31 +1100 Subject: chore: Fund forwarder in migrations --- packages/migrations/src/migration.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages') diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index 04d1abd4c..e4febb1f8 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -141,6 +141,11 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial zrxAssetData, ); + // Fund the Forwarder with ZRX + await web3Wrapper.awaitTransactionSuccessAsync( + await zrxToken.transfer.sendTransactionAsync(forwarder.address, new BigNumber(1000000000000000000), txDefaults), + ); + return { erc20Proxy: erc20Proxy.address, erc721Proxy: erc721Proxy.address, -- cgit v1.2.3 From 09a683557bdf8633e1e0ff85ebf8c8789f391c27 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Mon, 26 Nov 2018 09:57:43 +1100 Subject: chore: Update CHANGELOGS use mainnet ZRX amount in Forwarder. --- packages/migrations/CHANGELOG.json | 13 +++++++++++++ packages/migrations/src/migration.ts | 4 +++- 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index dea87b477..f302838a2 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,17 @@ [ + { + "version": "2.2.0", + "changes": [ + { + "note": "Deploy testnet Exchange arfitact. Previously mainnet Exchange artifact was deployed.", + "pr": 1309 + }, + { + "note": "Fund the Forwarder with ZRX for fees.", + "pr": 1309 + } + ] + }, { "version": "2.1.0", "changes": [ diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts index e4febb1f8..c684c4970 100644 --- a/packages/migrations/src/migration.ts +++ b/packages/migrations/src/migration.ts @@ -142,8 +142,10 @@ export async function runMigrationsAsync(provider: Provider, txDefaults: Partial ); // Fund the Forwarder with ZRX + const zrxDecimals = await zrxToken.decimals.callAsync(); + const zrxForwarderAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5000), zrxDecimals); await web3Wrapper.awaitTransactionSuccessAsync( - await zrxToken.transfer.sendTransactionAsync(forwarder.address, new BigNumber(1000000000000000000), txDefaults), + await zrxToken.transfer.sendTransactionAsync(forwarder.address, zrxForwarderAmount, txDefaults), ); return { -- cgit v1.2.3 From ebc31169094e17b17a0968ad2e5f1d2eb014a698 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 26 Nov 2018 14:09:24 +0100 Subject: Revert "[@0x/instant] Fix CI build broken by instant installation tests" --- packages/instant/package.json | 2 +- packages/monorepo-scripts/CHANGELOG.json | 9 --------- packages/monorepo-scripts/src/publish.ts | 2 +- 3 files changed, 2 insertions(+), 11 deletions(-) (limited to 'packages') diff --git a/packages/instant/package.json b/packages/instant/package.json index 9616af54f..d3a85a646 100644 --- a/packages/instant/package.json +++ b/packages/instant/package.json @@ -11,7 +11,7 @@ "build": "yarn build:all", "build:all": "run-p build:umd:prod build:commonjs", "build:umd:prod": "webpack --mode production", - "build:commonjs": "tsc -b && shx cp -r src/assets lib", + "build:commonjs": "tsc -b", "build:ci": "yarn build", "watch_without_deps": "tsc -w", "dev": "webpack-dev-server --mode development", diff --git a/packages/monorepo-scripts/CHANGELOG.json b/packages/monorepo-scripts/CHANGELOG.json index 4aa6be382..170a97a33 100644 --- a/packages/monorepo-scripts/CHANGELOG.json +++ b/packages/monorepo-scripts/CHANGELOG.json @@ -1,13 +1,4 @@ [ - { - "version": "1.0.7", - "changes": [ - { - "note": "Fix the lerna parameter name from cdVersions to cd-versions", - "pr": 1312 - } - ] - }, { "version": "1.0.6", "changes": [ diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts index 19947d78f..854a72b86 100644 --- a/packages/monorepo-scripts/src/publish.ts +++ b/packages/monorepo-scripts/src/publish.ts @@ -208,7 +208,7 @@ async function lernaPublishAsync(packageToNextVersion: { [name: string]: string const packageVersionString = _.map(packageToNextVersion, (nextVersion: string, packageName: string) => { return `${packageName}@${nextVersion}`; }).join(','); - let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cd-versions=${packageVersionString} --registry=${ + let lernaPublishCmd = `node ${constants.lernaExecutable} publish --cdVersions=${packageVersionString} --registry=${ configs.NPM_REGISTRY_URL } --yes`; if (configs.IS_LOCAL_PUBLISH) { -- cgit v1.2.3 From eefd9d9dd2164c6ff222250934812ac62df9bc15 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 26 Nov 2018 14:59:27 +0000 Subject: Add command-line interface to @0x/migrations --- packages/migrations/bin/0x-migrate.js | 2 ++ packages/migrations/package.json | 3 +++ packages/migrations/src/cli.ts | 38 +++++++++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100755 packages/migrations/bin/0x-migrate.js create mode 100644 packages/migrations/src/cli.ts (limited to 'packages') diff --git a/packages/migrations/bin/0x-migrate.js b/packages/migrations/bin/0x-migrate.js new file mode 100755 index 000000000..59778c0fc --- /dev/null +++ b/packages/migrations/bin/0x-migrate.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +require('../lib/cli.js'); diff --git a/packages/migrations/package.json b/packages/migrations/package.json index c1ce7050d..b006a470a 100644 --- a/packages/migrations/package.json +++ b/packages/migrations/package.json @@ -21,6 +21,9 @@ "assets": [] } }, + "bin": { + "0x-migrate": "bin/0x-migrate.js" + }, "license": "Apache-2.0", "devDependencies": { "@0x/dev-utils": "^1.0.18", diff --git a/packages/migrations/src/cli.ts b/packages/migrations/src/cli.ts new file mode 100644 index 000000000..46a524e85 --- /dev/null +++ b/packages/migrations/src/cli.ts @@ -0,0 +1,38 @@ +#!/usr/bin/env node +import { RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders'; +import { logUtils } from '@0x/utils'; +import * as yargs from 'yargs'; + +import { runMigrationsAsync } from './migration'; + +const args = yargs + .option('node-endpoint', { + describe: 'Endpoint where backing Ethereum node is hosted', + type: 'string', + demandOption: false, + default: 'http://localhost:8545', + }) + .option('from', { + describe: 'Ethereum address from which to deploy the contracts', + type: 'string', + demandOption: true, + }) + .example( + '$0 --node-endpoiont http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', + 'Full usage example', + ).argv; + +(async () => { + const rpcSubprovider = new RPCSubprovider(args['node-endpoint']); + const provider = new Web3ProviderEngine(); + provider.addProvider(rpcSubprovider); + provider.start(); + const txDefaults = { + from: args.from, + }; + await runMigrationsAsync(provider, txDefaults); + process.exit(0); +})().catch(err => { + logUtils.log(err); + process.exit(1); +}); -- cgit v1.2.3 From 527f074e598c8ac2e473428e0c192cfbb7a9314d Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 26 Nov 2018 15:03:58 +0000 Subject: Fix typo --- packages/migrations/src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages') diff --git a/packages/migrations/src/cli.ts b/packages/migrations/src/cli.ts index 46a524e85..94fbb5fe2 100644 --- a/packages/migrations/src/cli.ts +++ b/packages/migrations/src/cli.ts @@ -18,7 +18,7 @@ const args = yargs demandOption: true, }) .example( - '$0 --node-endpoiont http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', + '$0 --node-endpoint http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', 'Full usage example', ).argv; -- cgit v1.2.3 From 9da43878b169226e628ad2ea834e0fab78d5909b Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 26 Nov 2018 15:04:27 +0000 Subject: Add CHANGELOG entry to migrations --- packages/migrations/CHANGELOG.json | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'packages') diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json index dea87b477..78719fc90 100644 --- a/packages/migrations/CHANGELOG.json +++ b/packages/migrations/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "2.2.0", + "changes": [ + { + "note": "Add CLI `0x-migrate` for running the 0x migrations in a language-agnostic way", + "pr": 1324 + } + ] + }, { "version": "2.1.0", "changes": [ -- cgit v1.2.3 From c6592148a725768f652ddfa8f94aa3e2c6f7f213 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Mon, 26 Nov 2018 15:57:49 +0000 Subject: Rename node-endpoint to rpc-url for clarity --- packages/migrations/src/cli.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/migrations/src/cli.ts b/packages/migrations/src/cli.ts index 94fbb5fe2..2404e7921 100644 --- a/packages/migrations/src/cli.ts +++ b/packages/migrations/src/cli.ts @@ -6,8 +6,8 @@ import * as yargs from 'yargs'; import { runMigrationsAsync } from './migration'; const args = yargs - .option('node-endpoint', { - describe: 'Endpoint where backing Ethereum node is hosted', + .option('rpc-url', { + describe: 'Endpoint where backing Ethereum JSON RPC interface is available', type: 'string', demandOption: false, default: 'http://localhost:8545', @@ -18,12 +18,12 @@ const args = yargs demandOption: true, }) .example( - '$0 --node-endpoint http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', + '$0 --rpc-url http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631', 'Full usage example', ).argv; (async () => { - const rpcSubprovider = new RPCSubprovider(args['node-endpoint']); + const rpcSubprovider = new RPCSubprovider(args['rpc-url']); const provider = new Web3ProviderEngine(); provider.addProvider(rpcSubprovider); provider.start(); -- cgit v1.2.3